@layer base, components, utilities;

@layer base {
/* === base/base.css === */
/* ============================================================
   Enotale v2 — Prototype CSS
   ALL values reference design-system/tokens.css custom properties.
   Zero hardcoded colors, spacing, or typography values.
   ============================================================ */

/* ============================================================
   BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* Horizontal-overflow guard. Prevents any stray element (off-canvas hover
   folds, full-bleed media, long unbreakable strings) from creating a sideways
   scroll on narrow viewports — the symptom of "no right-edge spacing" on
   mobile. `clip` (not `hidden`) keeps position:sticky working and does NOT
   create a scroll container, so inner overflow-x:auto regions (tables,
   chip rails) still scroll normally. */
html { overflow-x: clip; }

body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-text-primary);
  background-color: var(--color-surface-primary);
}

a {
  color: var(--color-text-link);
  text-decoration: none;
}
a:hover { color: var(--color-accent-primary); text-decoration: underline; }
a:visited { color: var(--color-text-link-visited); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-text-primary);
  line-height: var(--line-height-display);
  margin: 0 0 var(--spacing-md);
}
h1 { font-size: var(--font-size-h1); font-weight: var(--font-weight-display-light); }
h2 { font-size: var(--font-size-h2); font-weight: var(--font-weight-display-regular); }
h3 { font-size: var(--font-size-h3); font-weight: var(--font-weight-display-regular); }
h4 { font-size: var(--font-size-h4); font-weight: var(--font-weight-display-medium); }

p { margin: 0 0 var(--spacing-md); line-height: var(--line-height-editorial); }

img, video { max-width: 100%; height: auto; display: block; }

/* Screen-reader-only — visually hidden, available to assistive tech.
   Durable base-layer home for `.sr-only`, referenced by 8+ components
   (suborder-timeline, kyc-checklist, bar-chart, tab-nav, sla-dot,
   checkbox-checklist, claim-evidence, stat-summary-strip). Lives here in
   the hand-authored base layer — NOT in utilities.css, which is generated
   by build/utility-build.js and would wipe a hand edit. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
}

@layer base {
/* === base/skip-link.css === */
/* ============================================================
   SKIP LINK
   ============================================================ */

.skip-link {
  position: absolute;
  top: -40px;
  left: var(--spacing-md);
  background: var(--color-accent-primary);
  color: var(--color-text-on-accent);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  z-index: var(--z-toast);
  transition: top var(--duration-fast) var(--easing-standard);
}
.skip-link:focus { top: var(--spacing-sm); }
}

@layer base {
/* === base/hotspot.css === */
/* ============================================================
   HOTSPOT
   ============================================================ */

.hotspot {
  outline: 1px dotted var(--color-border-strong);
  cursor: pointer;
}
.hotspot:hover {
  outline-color: var(--color-accent-primary);
  background-color: var(--color-surface-sunk);
}

.link-disabled {
  color: var(--color-text-subtle);
  cursor: not-allowed;
  pointer-events: none;
}
}

@layer base {
/* === base/layout-utilities.css === */
/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-editorial-md) 0;
}

.section--tight {
  padding: var(--spacing-xl) 0;
}

/* Tight spacing modifiers — one step down from editorial-md on the targeted edge(s).
   Desktop: 80px → 56px  |  ≤768px: 64px → 40px  |  ≤480px: 40px → 32px
   Responsive overrides live in responsive-overrides.css (search "tight modifiers"). */
.section--tight-top {
  padding-top: var(--spacing-3xl);
}

.section--tight-bottom {
  padding-bottom: var(--spacing-3xl);
}

.section--tight-both {
  padding: var(--spacing-3xl) 0;
}

/* Tighter spacing modifiers — one further step down from tight-*, home page only.
   Desktop: 56px → 32px  |  ≤768px: 40px → 24px  |  ≤480px: 32px → 16px
   Responsive overrides live in responsive-overrides.css (search "tighter modifiers"). */
.section--tighter-top {
  padding-top: var(--spacing-xl);
}

.section--tighter-bottom {
  padding-bottom: var(--spacing-xl);
}

.section--tighter-both {
  padding: var(--spacing-xl) 0;
}

/* Tightest-top modifier — one further step down from tighter-top, top edge only.
   Desktop: 32px → 16px  |  ≤768px: 24px → 8px  |  ≤480px: 16px → 4px
   Responsive overrides live in responsive-overrides.css (search "tightest-top"). */
.section--tightest-top {
  padding-top: var(--spacing-md);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--spacing-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--spacing-lg); }
/* Let grid items shrink below their content's intrinsic width so a long
   word or wide child never forces the whole track (and page) wider. */
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
}

@layer components {
/* === components/header/header.css === */
/* ============================================================
   HEADER — PUBLIC
   ============================================================ */

.header-public {
  background: var(--color-surface-primary);
  border-bottom: 1px solid var(--color-border-default);
  position: sticky;
  top: 0;
  z-index: var(--z-dropdown);
  height: var(--nav-height);
}

.header-public__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.header-public__logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.header-public__logo-img {
  height: 68px;
  width: auto;
  display: block;
  transition: filter var(--duration-base) var(--easing-standard);
}
.header-public__logo:hover .header-public__logo-img {
  filter: brightness(1.05);
}

/* Theme-aware logo swap:
   - Light theme (default) → dark logo for contrast on light surface
   - Dark theme            → light logo for contrast on dark surface
   Second <img> sits on top of the first; we toggle display, not visibility,
   so the hidden one doesn't consume layout space. */
.header-public__logo-img--dark { display: none; }
[data-theme="dark"] .header-public__logo-img--light { display: none; }
[data-theme="dark"] .header-public__logo-img--dark { display: block; }

.header-public__nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
  flex: 1;
}

.header-public__nav a {
  font-size: var(--nav-link-font-size);
  font-weight: var(--nav-link-font-weight);
  letter-spacing: var(--nav-link-letter-spacing);
  color: var(--nav-link-color);
  text-transform: uppercase;
  text-decoration: none;
  padding: var(--spacing-sm) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--duration-fast) var(--easing-standard),
              border-color var(--duration-fast) var(--easing-standard);
}
.header-public__nav a:hover { color: var(--nav-link-hover); text-decoration: none; }
.header-public__nav a.active { color: var(--nav-link-active); border-bottom-color: var(--color-accent-primary); }

.header-public__utils {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-left: auto;
}

.header-public__utils a,
.header-public__utils .util-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-text-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--easing-standard),
              color var(--duration-fast) var(--easing-standard);
}
.header-public__utils a:hover,
.header-public__utils .util-icon:hover { background: var(--color-surface-sunk); color: var(--color-accent-primary); text-decoration: none; }

/* Editorial line icons — currentColor stroke, 1.5px weight, rounded caps */
.util-icon__svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.cart-count__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--color-accent-primary);
  color: var(--color-accent-primary-text);
  font-size: 10px;
  font-weight: var(--font-weight-ui-semibold);
  line-height: 16px;
  text-align: center;
  letter-spacing: 0;
}

/* Hamburger mobile */
.header-public__hamburger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-primary);
  font-size: 1.25rem;
}

/* ============================================================
   HEADER — TRANSPARENT VARIANT (full-bleed hero overlay)
   Used when transparentHeader: true in page front matter.
   Sits fixed above hero, transitions to solid on scroll (.is-scrolled).
   ============================================================ */

.header-public--transparent {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
  z-index: var(--z-dropdown);
  transition:
    background var(--duration-base) var(--easing-standard),
    border-color var(--duration-base) var(--easing-standard);
}

/* All text/icon elements inside transparent header flip to light */
.header-public--transparent .header-public__nav a,
.header-public--transparent .header-public__utils a,
.header-public--transparent .header-public__utils .util-icon,
.header-public--transparent .header-public__hamburger {
  color: var(--color-paper-light);
  text-shadow: 0 1px 4px color-mix(in srgb, var(--color-ink) 60%, transparent);
  transition:
    color var(--duration-fast) var(--easing-standard),
    text-shadow var(--duration-base) var(--easing-standard);
}

/* Transparent header sits over a dark hero — force the light logo regardless
   of theme. Once scrolled past hero, theme rules take over again. */
.header-public--transparent .header-public__logo-img--light { display: none; }
.header-public--transparent .header-public__logo-img--dark { display: block; }

.header-public--transparent .header-public__nav a:hover {
  color: var(--color-white);
  text-decoration: none;
}

.header-public--transparent .header-public__nav a.active {
  color: var(--color-white);
  border-bottom-color: var(--color-paper-light);
}

/* Hover background on utils — subtle tint so touch target is visible */
.header-public--transparent .header-public__utils a:hover,
.header-public--transparent .header-public__utils .util-icon:hover {
  background: color-mix(in srgb, var(--color-white) 15%, transparent);
  color: var(--color-white);
}

/* Solid state after scrolling past hero */
.header-public--transparent.is-scrolled {
  background: var(--color-surface-primary);
  border-bottom-color: var(--color-border-default);
}

.header-public--transparent.is-scrolled .header-public__nav a,
.header-public--transparent.is-scrolled .header-public__utils a,
.header-public--transparent.is-scrolled .header-public__utils .util-icon,
.header-public--transparent.is-scrolled .header-public__hamburger {
  color: var(--color-text-primary);
  text-shadow: none;
}

/* Scrolled transparent header behaves like a solid header — theme rules win. */
.header-public--transparent.is-scrolled .header-public__logo-img--light { display: block; }
.header-public--transparent.is-scrolled .header-public__logo-img--dark { display: none; }
[data-theme="dark"] .header-public--transparent.is-scrolled .header-public__logo-img--light { display: none; }
[data-theme="dark"] .header-public--transparent.is-scrolled .header-public__logo-img--dark { display: block; }

.header-public--transparent.is-scrolled .header-public__nav a:hover {
  color: var(--color-accent-primary);
}

.header-public--transparent.is-scrolled .header-public__nav a.active {
  color: var(--color-accent-primary);
  border-bottom-color: var(--color-accent-primary);
}

.header-public--transparent.is-scrolled .header-public__utils a:hover,
.header-public--transparent.is-scrolled .header-public__utils .util-icon:hover {
  background: var(--color-surface-sunk);
  color: var(--color-accent-primary);
}

/* Reduced motion — suppress transitions */
@media (prefers-reduced-motion: reduce) {
  .header-public--transparent,
  .header-public--transparent .header-public__logo-img,
  .header-public--transparent .header-public__nav a,
  .header-public--transparent .header-public__utils a,
  .header-public--transparent .header-public__utils .util-icon,
  .header-public--transparent .header-public__hamburger {
    transition: none;
  }
}

/* ============================================================
   MOBILE NAV DRAWER (C2 fix)
   Full-overlay drawer from left edge. Appears on .is-open.
   JS removes [hidden] attr to unblock display, then adds .is-open.
   Z-index sits BELOW age-gate modal (z-modal-overlay = 200) but
   ABOVE all page content (z-dropdown = 100).
   ============================================================ */

.mobile-nav {
  /* Hidden state: positioned off-screen left, invisible. */
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal-overlay) - 10); /* 190 — below age-gate, above everything else */
  display: flex; /* always flex so .is-open has effect without !important */
  visibility: hidden;
  background: var(--modal-overlay-bg); /* overlay backdrop — same Ink-50% as modal overlay */
  transition: visibility 0ms var(--duration-base); /* defer visibility until after opacity transition */
}

.mobile-nav.is-open {
  visibility: visible;
}

.mobile-nav__inner {
  width: min(320px, 85vw);
  height: 100%;
  background: var(--color-surface-primary); /* Parchment */
  border-right: 1px solid var(--color-border-default);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--duration-base) var(--easing-decelerate);
}

.mobile-nav.is-open .mobile-nav__inner {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav__inner {
    transition: none;
  }
}

.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--color-border-default);
  height: var(--nav-height-mobile);
  flex-shrink: 0;
}

.mobile-nav__brand {
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-display-medium);
  color: var(--color-text-primary);
  letter-spacing: var(--letter-spacing-tight);
}

.mobile-nav__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: var(--font-size-body);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
}
.mobile-nav__close:hover { background: var(--color-surface-sunk); color: var(--color-text-primary); }
.mobile-nav__close:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }

.mobile-nav__inner a {
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border-default);
  transition: background var(--duration-fast), color var(--duration-fast);
}
.mobile-nav__inner a:hover { background: var(--color-surface-sunk); color: var(--color-accent-primary); text-decoration: none; }
.mobile-nav__inner a:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: -2px; }

.mobile-nav__divider {
  height: 1px;
  background: var(--color-border-default);
  margin: var(--spacing-xs) 0;
}

.mobile-nav__legal {
  font-size: var(--font-size-small) !important;
  color: var(--color-text-muted) !important;
}

/* ============================================================
   HEADER — MINIMAL
   ============================================================ */

.header-minimal {
  background: var(--color-surface-primary);
  border-bottom: 1px solid var(--color-border-default);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-lg);
  gap: var(--spacing-lg);
}

.header-minimal__back {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.header-minimal__secure {
  margin-left: auto;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}
}

@layer components {
/* === components/footer/footer.css === */
/* ============================================================
   FOOTER — FULL
   ============================================================ */

.footer-full {
  background: var(--color-surface-sunk);
  border-top: 1px solid var(--color-border-default);
  padding: var(--spacing-editorial-md) 0 var(--spacing-xl);
  margin-top: var(--spacing-editorial-md);
}

.footer-full__grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--spacing-xl);
}

.footer-full__col h3 {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
}

.footer-full__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-full__col ul li a {
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  text-decoration: none;
}
.footer-full__col ul li a:hover { color: var(--color-accent-primary); text-decoration: underline; }

.footer-full__age {
  font-size: var(--font-size-micro);
  color: var(--color-text-muted); /* was: text-subtle (oak #8E7F6D 3.12:1 on surface-sunk — WCAG FAIL); muted ≈ 5.0:1 passes AA */
  line-height: var(--line-height-body);
}

.footer-full__bottom {
  max-width: 1280px;
  margin: var(--spacing-xl) auto 0;
  padding: var(--spacing-md) var(--spacing-lg) 0;
  border-top: 1px solid var(--color-border-default);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted); /* was: text-subtle (oak #8E7F6D 3.12:1 on surface-sunk — WCAG FAIL); muted ≈ 5.0:1 passes AA */
}

/* ============================================================
   FOOTER — MINIMAL
   ============================================================ */

.footer-minimal {
  background: var(--color-surface-sunk);
  border-top: 1px solid var(--color-border-default);
  padding: var(--spacing-lg) var(--spacing-lg);
  text-align: center;
  font-size: var(--font-size-micro);
  color: var(--color-text-muted); /* was: color-text-subtle (oak #8E7F6D ≈ 2.84:1 on surface-sunk — WCAG FAIL); muted (walnut #6B5D4E ≈ 5.0:1) passes AA */
}
}

@layer components {
/* === components/divider/divider.css === */
/* ============================================================
   VINTAGE RULE DIVIDER
   ============================================================ */

.rule-divider {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.rule-divider::before,
.rule-divider::after {
  content: '';
  flex: 1;
  height: var(--divider-vintage-weight);
  background: var(--divider-vintage-color);
}

.rule-divider__ornament {
  color: var(--divider-vintage-color);
  font-size: var(--font-size-micro);
  letter-spacing: var(--letter-spacing-wide);
  flex-shrink: 0;
}
}

@layer components {
/* === components/button/button.css === */
/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  min-height: var(--button-min-height);
  min-width: var(--button-min-width);
  padding: var(--button-padding-y) var(--button-padding-x);
  font-family: var(--button-font-family);
  font-size: var(--button-font-size);
  font-weight: var(--button-font-weight);
  letter-spacing: var(--button-letter-spacing);
  border-radius: var(--button-radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--button-transition-duration) var(--button-transition-easing),
              color var(--button-transition-duration) var(--button-transition-easing),
              border-color var(--button-transition-duration) var(--button-transition-easing);
}
.btn:focus-visible { outline: none; box-shadow: var(--button-primary-focus-ring); }

.btn--primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
  border-color: var(--button-primary-border);
}
.btn--primary:hover { background: var(--button-primary-bg-hover); color: var(--button-primary-text); text-decoration: none; }
.btn--primary:disabled { background: var(--button-primary-bg-disabled); color: var(--button-primary-text-disabled); cursor: not-allowed; }

.btn--secondary {
  background: var(--button-secondary-bg);
  color: var(--button-secondary-text);
  border-color: var(--button-secondary-border);
}
.btn--secondary:hover { background: var(--button-secondary-bg-hover); color: var(--button-secondary-text-hover); border-color: var(--button-secondary-border-hover); text-decoration: none; }

.btn--ghost {
  background: var(--button-ghost-bg);
  color: var(--button-ghost-text);
  border-color: var(--button-ghost-border);
}
.btn--ghost:hover { background: var(--button-ghost-bg-hover); color: var(--button-ghost-text-hover); text-decoration: none; }

.btn--small {
  padding: var(--button-small-padding-y) var(--button-small-padding-x);
  font-size: var(--button-small-font-size);
  letter-spacing: var(--button-small-letter-spacing);
  font-weight: var(--button-small-font-weight);
  text-transform: uppercase;
  min-height: 36px;
}

.btn--full { width: 100%; }
}

@layer components {
/* === components/product-card/product-card.css === */
/* ============================================================
   PRODUCT CARD
   ============================================================ */

.product-card {
  background: var(--card-product-bg);
  border: 1px solid var(--card-product-border-color);
  border-radius: var(--card-radius);
  box-shadow: var(--card-product-shadow);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--duration-fast) var(--easing-standard);
}
.product-card:hover { box-shadow: var(--shadow-floating); }

.product-card__image-wrap {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--color-surface-sunk);
  overflow: hidden;
}

.product-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder bottle image */
.product-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-sunk);
  color: var(--color-text-subtle);
  font-size: 3rem;
}

/* Wine type badge */
.wine-badge {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  padding: var(--badge-padding-y) var(--badge-padding-x);
  border-radius: var(--badge-radius);
  font-size: var(--badge-font-size);
  font-weight: var(--badge-font-weight);
  letter-spacing: var(--badge-letter-spacing);
  text-transform: uppercase;
}
.wine-badge--red { background: var(--badge-wine-red-bg); color: var(--badge-wine-red-text); }
.wine-badge--white { background: var(--badge-wine-white-bg); color: var(--badge-wine-white-text); border: 1px solid var(--badge-wine-white-border); }
/* M4 fix: wine badges consume semantic-layer tokens shipped by UI Designer. */
.wine-badge--rose {
  background: var(--color-badge-wine-rose-bg);
  color: var(--color-badge-wine-rose-fg);
}
.wine-badge--orange {
  background: var(--color-badge-wine-orange-bg);
  color: var(--color-badge-wine-orange-fg);
}
.wine-badge--sparkling {
  background: var(--color-badge-wine-sparkling-bg);
  color: var(--color-badge-wine-sparkling-fg);
}
.wine-badge--natural {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: var(--color-badge-wine-natural-bg);
  color: var(--color-badge-wine-natural-fg);
  padding: var(--badge-padding-y) var(--badge-padding-x);
  border-radius: var(--badge-radius);
  font-size: var(--badge-font-size);
  font-weight: var(--badge-font-weight);
  letter-spacing: var(--badge-letter-spacing);
  text-transform: uppercase;
}

.product-card__body {
  padding: var(--card-product-padding);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.product-card__name {
  font-family: var(--card-product-wine-name-font);
  font-size: var(--card-product-wine-name-size);
  font-weight: var(--card-product-wine-name-weight);
  color: var(--color-text-primary);
  line-height: var(--line-height-tight);
  margin: 0;
  text-decoration: none;
}
.product-card__name:hover { color: var(--color-accent-primary); text-decoration: none; }

.product-card__winery {
  font-family: var(--card-product-winery-font);
  font-size: var(--font-size-small);
  font-weight: var(--card-product-winery-weight);
  color: var(--color-text-muted);
  font-style: italic;
}
.product-card__winery a { color: var(--color-text-muted); text-decoration: none; }
.product-card__winery a:hover { color: var(--color-accent-primary); text-decoration: underline; }

.product-card__meta {
  font-size: var(--card-product-meta-size);
  color: var(--card-product-meta-color);
  font-family: var(--card-product-meta-font);
}

.product-card__price {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--card-product-price-color);
  margin-top: auto;
}

.product-card__cta {
  margin-top: var(--spacing-sm);
}

/* Parchment Fold Hover — Direction C killer detail */
.product-card__fold {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 50%;
  background: var(--card-product-fold-bg);
  border-top: 1px solid var(--color-border-default);
  padding: var(--spacing-md);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  transform: translateX(100%);
  transition: transform var(--card-product-fold-duration) var(--card-product-fold-easing);
  z-index: var(--z-raised);
}

.product-card:hover .product-card__fold {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .product-card__fold {
    transition: none;
    opacity: 0;
  }
  .product-card:hover .product-card__fold {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Parchment fold is a hover-only desktop detail — suppress on mobile where
   it only obstructs the card and can stick on touch. */
@media (max-width: 640px) {
  .product-card__fold { display: none; }
}

.fold-portrait {
  width: var(--card-product-author-portrait-size);
  height: var(--card-product-author-portrait-size);
  border-radius: var(--radius-avatar);
  border: 2px solid var(--card-product-author-ring-color);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface-sunk);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-h4); /* M3 fix: was bare 1.5rem → --font-size-h4 (icon/glyph size, not type scale) */
  overflow: hidden;
}

.fold-portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-avatar); }

.fold-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* "Разгледай" button inside fold — decorative only (fold is aria-hidden).
   Accessible CTA lives in .product-card__body. tabindex="-1" set in markup. */
.fold-info__cta {
  margin-top: var(--spacing-sm);
  align-self: flex-start;
}

.fold-info__name {
  font-family: var(--font-display);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-display-light);
  font-style: italic;
  color: var(--color-text-primary);
  line-height: var(--line-height-tight);
}

.fold-info__role {
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
}

.fold-info__quote {
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: var(--spacing-xs);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Mobile tap-to-reveal fold */
.product-card.fold-open .product-card__fold {
  transform: translateX(0);
}
}

@layer components {
/* === components/winery-card/winery-card.css === */
/* ============================================================
   WINERY CARD
   ============================================================ */

.winery-card {
  background: var(--card-winery-bg);
  border: 1px solid var(--card-winery-border-color);
  border-radius: var(--card-radius);
  box-shadow: var(--card-winery-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.winery-card__image {
  aspect-ratio: 16/9;
  background: var(--color-surface-sunk);
  overflow: hidden;
  position: relative;
}
.winery-card__image img { width: 100%; height: 100%; object-fit: cover; }
.winery-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-subtle);
  font-size: 2rem;
}

.winery-card__body {
  padding: var(--card-winery-padding);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.winery-card__name {
  font-family: var(--card-winery-header-font);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-text-primary);
  margin: 0;
}

.winery-card__region {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.winery-card__desc {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  line-height: var(--line-height-body);
  flex: 1;
}

.winery-card__meta {
  font-size: var(--font-size-micro);
  color: var(--color-text-subtle);
}

.winery-card__cta { margin-top: auto; }

/* Bookmark ribbon */
.bookmark-ribbon {
  position: absolute;
  top: 0;
  right: var(--spacing-md);
  width: 0;
  height: 0;
  border-left: calc(var(--bookmark-ribbon-size) / 2) solid transparent;
  border-right: calc(var(--bookmark-ribbon-size) / 2) solid transparent;
  border-top: var(--bookmark-ribbon-size) solid var(--bookmark-ribbon-color);
  z-index: var(--z-raised);
}

/* Tag badges */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--badge-padding-y) var(--badge-padding-x);
  border-radius: var(--badge-radius);
  font-size: var(--badge-font-size);
  font-weight: var(--badge-font-weight);
  letter-spacing: var(--badge-letter-spacing);
  text-transform: uppercase;
}
.tag--premium { background: var(--badge-premium-bg); color: var(--badge-premium-text); }
.tag--verified { border: 1px solid var(--badge-verified-border); color: var(--badge-verified-text); background: transparent; }
.tag--new { background: var(--color-surface-sunk); color: var(--color-text-muted); border: 1px solid var(--color-border-default); }
}

@layer components {
/* === components/author-badge/author-badge.css === */
/* ============================================================
   AUTHOR BADGE
   ============================================================ */

.author-badge {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.author-badge__portrait {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-avatar);
  border: 2px solid var(--card-author-ring-default);
  object-fit: cover;
  background: var(--color-surface-sunk);
  flex-shrink: 0;
  overflow: hidden;
}
.author-badge__portrait--premium { border-color: var(--card-author-ring-premium); border-width: 2px; }
.author-badge__portrait--sm { width: var(--card-author-portrait-sm); height: var(--card-author-portrait-sm); }
.author-badge__portrait--md { width: var(--card-author-portrait-md); height: var(--card-author-portrait-md); }
.author-badge__portrait--lg { width: var(--card-author-portrait-lg); height: var(--card-author-portrait-lg); }

.author-badge__info {}
.author-badge__name {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display-light);
  font-style: italic;
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
}
.author-badge__role {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
}

@layer components {
/* === components/quote-block/quote-block.css === */
/* ============================================================
   QUOTE BLOCK
   ============================================================ */

.quote-block {
  border-left: 3px solid var(--color-border-default);
  padding-left: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.quote-block__text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-display-light);
  color: var(--color-text-primary);
  line-height: var(--line-height-editorial);
}

.quote-block__attribution {
  margin-top: var(--spacing-sm);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
}

@layer components {
/* === components/filter-chip/filter-chip.css === */
/* ============================================================
   FILTER CHIP
   ============================================================ */

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  align-items: center;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-full);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
  background: var(--color-surface-primary);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}
.filter-chip:hover { border-color: var(--color-border-strong); background: var(--color-surface-sunk); text-decoration: none; color: var(--color-text-primary); }
.filter-chip--active,
a.filter-chip--active,
a.filter-chip--active:visited { background: var(--color-accent-primary); border-color: var(--color-accent-primary); color: var(--color-text-on-accent); }
.filter-chip--active:hover,
a.filter-chip--active:hover { background: var(--color-accent-primary-hover); color: var(--color-text-on-accent); }
.filter-chip__remove {
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: var(--spacing-xs);
}
}

@layer components {
/* === components/filter-sidebar/filter-sidebar.css === */
/* ============================================================
   FILTER SIDEBAR
   ============================================================ */

.filter-sidebar {
  background: var(--color-surface-sunk);
  border-radius: var(--radius-card);
  padding: var(--spacing-lg);
  width: 240px;
  flex-shrink: 0;
  height: fit-content;
}

.filter-group { border-bottom: 1px solid var(--color-border-default); padding-bottom: var(--spacing-md); margin-bottom: var(--spacing-md); }
.filter-group:last-child { border-bottom: none; }

.filter-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
  padding: var(--spacing-sm) 0;
  text-align: left;
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
}

.filter-group__content { display: flex; flex-direction: column; gap: var(--spacing-sm); padding-top: var(--spacing-sm); }

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  cursor: pointer;
}
.filter-option input[type="checkbox"] { accent-color: var(--color-accent-primary); }
}

@layer components {
/* === components/status-pill/status-pill.css === */
/* ============================================================
   STATUS PILL
   ============================================================ */
/* Plan-tier pill variants — defined here for shared use across ADM_10, ADM_11, ADM_16, WIN_10 */
/* Light mode: gold bg + ink text for plan-premium (contrast passes in light) */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--badge-padding-y) var(--badge-padding-x);
  border-radius: var(--radius-full);
  font-size: var(--badge-font-size);
  font-weight: var(--badge-font-weight);
  letter-spacing: var(--badge-letter-spacing);
  text-transform: uppercase;
}
/* M4 fix: status pills consume semantic-layer tokens.
   M1 fix embedded: shipped/transit/review fg = Ink (5.25:1) not White (3.61:1 fail). */
.status-pill--confirmed { background: var(--color-status-pill-confirmed-bg); color: var(--color-status-pill-confirmed-fg); }
.status-pill--preparing { background: var(--color-status-pill-preparing-bg); color: var(--color-status-pill-preparing-fg); }
.status-pill--shipped   { background: var(--color-status-pill-shipped-bg);   color: var(--color-status-pill-shipped-fg); }
.status-pill--transit   { background: var(--color-status-pill-transit-bg);   color: var(--color-status-pill-transit-fg); }
.status-pill--delivered { background: var(--color-status-pill-delivered-bg); color: var(--color-status-pill-delivered-fg); }
.status-pill--published { background: var(--color-status-pill-published-bg); color: var(--color-status-pill-published-fg); }
.status-pill--pending   { background: var(--color-status-pill-pending-bg);   color: var(--color-status-pill-pending-fg); }
.status-pill--review    { background: var(--color-status-pill-review-bg);    color: var(--color-status-pill-review-fg); }
.status-pill--rejected  { background: var(--color-status-pill-rejected-bg);  color: var(--color-status-pill-rejected-fg); }
.status-pill--draft     { background: var(--color-status-pill-draft-bg);     color: var(--color-status-pill-draft-fg);     border: 1px solid var(--color-border-default); }
.status-pill--warning   { background: var(--color-status-pill-review-bg);    color: var(--color-status-pill-review-fg); } /* "Изисква се" pending-obligation pill (ADM_18 / ADM_22 / WIN_14) — same amber-bark/Ink pair as --review, 4.84:1 */

/* Plan-tier premium pill dark mode contrast fix.
   Light: gold bg (#C8942A) + --color-text-primary (Ink #1F1712) → passes.
   Dark:  gold bg is still light (#C8942A); --color-text-primary flips to near-white
          → contrast falls to ~1.78:1 (fail). Fix: force foreground to --color-ink
          (#1F1712) in dark — a dark value that always reads on gold regardless of
          theme layer. Does not regress light mode (color-ink is the same as light
          color-text-primary). */
[data-theme="dark"] .status-pill--plan-premium {
  color: var(--color-ink);
}

@media (prefers-color-scheme: dark) {
  .status-pill--plan-premium {
    color: var(--color-ink);
  }
}

/* ---- Campaign lifecycle variants (Promotions feature, 2026-06-11) ----
   Three new states: active / scheduled / ended.
   Campaign draft reuses .status-pill--draft (no new CSS needed).
   All values are semantic tokens — dark-mode safe. */

/* Active campaign: success green */
.status-pill--campaign-active {
  background: var(--color-status-success-subtle, var(--color-surface-alt));
  color: var(--color-status-success);
  border: 1px solid var(--color-status-success);
}

/* Scheduled campaign: accent-secondary (info/neutral) */
.status-pill--campaign-scheduled {
  background: var(--color-accent-secondary-subtle, var(--color-surface-alt));
  color: var(--color-accent-secondary, var(--color-text-primary));
  border: 1px solid var(--color-accent-secondary, var(--color-border-default));
}

/* Ended campaign: muted neutral */
.status-pill--campaign-ended {
  background: var(--color-surface-sunk);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-default);
}
}

@layer components {
/* === components/trust-strip/trust-strip.css === */
/* ============================================================
   TRUST STRIP
   ============================================================ */

.trust-strip {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
  padding: var(--spacing-lg) 0;
  border-top: 1px solid var(--color-border-default);
  border-bottom: 1px solid var(--color-border-default);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.trust-item__icon {
  font-size: 1.25rem;
  color: var(--color-accent-primary);
}

.trust-item__label { font-weight: var(--font-weight-ui-medium); color: var(--color-text-primary); }
.trust-item__sub { font-size: var(--font-size-micro); }
}

@layer components {
/* === components/sub-order-card/sub-order-card.css === */
/* ============================================================
   SUB-ORDER CARD
   ============================================================ */

.sub-order-card {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--card-radius);
  overflow: hidden;
  margin-bottom: var(--spacing-lg);
}

.sub-order-card__header {
  background: var(--color-surface-sunk);
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--color-border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sub-order-card__winery-name {
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-display-medium);
  color: var(--color-text-primary);
}
.sub-order-card__winery-name a { color: var(--color-text-primary); text-decoration: none; }
.sub-order-card__winery-name a:hover { color: var(--color-accent-primary); text-decoration: underline; }

.sub-order-card__region {
  font-size: var(--font-size-micro);
  color: var(--color-text-subtle);
}

.sub-order-card__items { padding: var(--spacing-md) var(--spacing-lg); }

.order-line {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border-default);
}
.order-line:last-child { border-bottom: none; }

.order-line__image {
  width: 48px;
  height: 64px;
  background: var(--color-surface-sunk);
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-h4); /* M3 fix: was bare 1.5rem → --font-size-h4 (icon/glyph size) */
  color: var(--color-text-subtle);
}
.order-line__image img { width: 100%; height: 100%; object-fit: cover; }

.order-line__info { flex: 1; }
.order-line__name { font-size: var(--font-size-small); font-weight: var(--font-weight-ui-medium); color: var(--color-text-primary); }
.order-line__name a { color: var(--color-text-primary); text-decoration: none; }
.order-line__name a:hover { color: var(--color-accent-primary); text-decoration: underline; }
.order-line__meta { font-size: var(--font-size-micro); color: var(--color-text-muted); }

.order-line__qty { font-size: var(--font-size-small); color: var(--color-text-muted); min-width: 40px; text-align: center; }
.order-line__price { font-size: var(--font-size-small); font-weight: var(--font-weight-ui-semibold); color: var(--color-text-primary); min-width: 80px; text-align: right; }

.sub-order-card__footer {
  background: var(--color-surface-sunk);
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--color-border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-small);
}

.sub-order-card__subtotal { font-weight: var(--font-weight-ui-semibold); }
.sub-order-card__delivery { color: var(--color-text-muted); }
.sub-order-card__shipping-note {
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
  font-style: italic;
}
}

@layer components {
/* === components/order-summary-panel/order-summary-panel.css === */
/* ============================================================
   ORDER SUMMARY PANEL
   ============================================================ */

.order-summary {
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--card-radius);
  padding: var(--spacing-lg);
  position: sticky;
  top: calc(var(--nav-height) + var(--spacing-lg));
}

.order-summary__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-display-medium);
  margin-bottom: var(--spacing-lg);
}

.order-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-small);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border-default);
}
.order-summary__row:last-child { border-bottom: none; }
.order-summary__row--total {
  font-weight: var(--font-weight-ui-semibold);
  font-size: var(--font-size-body);
  padding-top: var(--spacing-md);
}

.order-summary__note {
  font-size: var(--font-size-micro);
  color: var(--color-text-subtle);
  text-align: center;
  margin-top: var(--spacing-sm);
}
}

@layer components {
/* === components/profile-sidebar/profile-sidebar.css === */
/* ============================================================
   PROFILE SIDEBAR
   ============================================================ */

.profile-sidebar {
  width: 220px;
  flex-shrink: 0;
}

.profile-sidebar__header {
  background: var(--color-surface-sunk);
  border-radius: var(--card-radius);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.profile-sidebar__name {
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-display-medium);
  margin-bottom: var(--spacing-xs);
}

.profile-sidebar__meta {
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
}

.profile-sidebar__nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.profile-sidebar__icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  margin-right: var(--spacing-sm);
  vertical-align: middle;
}

.profile-sidebar__icon svg {
  width: 1em;
  height: 1em;
}

.profile-sidebar__nav a {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--duration-fast), color var(--duration-fast);
}
.profile-sidebar__nav a:hover { background: var(--color-surface-sunk); color: var(--color-accent-primary); text-decoration: none; }
.profile-sidebar__nav a.active { background: var(--color-accent-primary); color: var(--color-text-on-accent); }

.profile-sidebar__divider {
  height: 1px;
  background: var(--color-border-default);
  margin: var(--spacing-sm) 0;
}
}

@layer components {
/* === components/dashboard-shell/dashboard-shell.css === */
/* ============================================================
   DASHBOARD SHELL
   ============================================================ */

.dashboard {
  display: flex;
  min-height: 100vh;
  background: var(--color-surface-primary);
}

.dashboard__nav {
  width: 220px;
  background: var(--color-surface-sunk);
  border-right: 1px solid var(--color-border-default);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.dashboard__nav-brand {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border-default);
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-display-medium);
}
.dashboard__nav-brand a { color: var(--color-text-primary); text-decoration: none; }

.dashboard__nav-links {
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.dashboard__nav-links a {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--duration-fast), color var(--duration-fast);
}
.dashboard__nav-links a:hover { background: var(--color-surface-primary); color: var(--nav-link-hover); text-decoration: none; }
.dashboard__nav-links a.active { background: var(--color-accent-primary); color: var(--color-text-on-accent); }
.dashboard__nav-links .nav-divider { height: 1px; background: var(--color-border-default); margin: var(--spacing-sm) 0; }

.dashboard__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.dashboard__topbar {
  background: var(--color-surface-primary);
  border-bottom: 1px solid var(--color-border-default);
  padding: 0 var(--spacing-xl);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

/* Dashboard hamburger (hidden on desktop, shown mobile) */
.dashboard__hamburger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.dashboard__topbar-title {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-muted);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
}

.dashboard__topbar-winery {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
}

.dashboard__content {
  padding: var(--spacing-xl);
  flex: 1;
}

/* Dashboard stat cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.stat-card {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--card-radius);
  padding: var(--spacing-lg);
  min-width: 0;
}
.stat-card a { text-decoration: none; color: inherit; display: block; }
.stat-card a:hover .stat-card__value { color: var(--nav-link-hover); }

.stat-card__label {
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-display-medium);
  color: var(--color-text-primary);
  line-height: 1;
}
}

@layer components {
/* === components/table/table.css === */
/* ============================================================
   TABLE — STANDARD + COMPACT
   ============================================================ */

.table-wrap {
  background: var(--table-container-bg);
  border-radius: var(--card-radius);
  border: 1px solid var(--color-border-default);
  overflow-x: auto;
}

.table-standard, .table-compact {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--table-font-family);
  font-size: var(--table-font-size-compact);
  line-height: var(--table-line-height-compact);
}

.table-standard th, .table-compact th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  font-weight: var(--table-header-font-weight);
  font-size: var(--font-size-micro);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  padding: var(--table-padding-compact-y) var(--table-padding-compact-x);
  text-align: left;
  border-bottom: 1px solid var(--table-border);
}

.table-standard td, .table-compact td {
  padding: var(--table-padding-compact-y) var(--table-padding-compact-x);
  border-bottom: 1px solid var(--color-border-default);
  color: var(--table-cell-text);
  background: var(--table-row-bg);
}

.table-standard tr:nth-child(even) td,
.table-compact tr:nth-child(even) td {
  background: var(--table-row-alt-bg);
}

.table-standard tr:last-child td,
.table-compact tr:last-child td {
  border-bottom: none;
}

/* :not(.btn) so button-styled links in tables keep button colors (else table
   link-color overrode .btn--primary white text → 1.7:1 contrast fail) */
.table-standard a:not(.btn), .table-compact a:not(.btn) {
  color: var(--color-text-link);
  text-decoration: none;
}
.table-standard a:not(.btn):hover, .table-compact a:not(.btn):hover { text-decoration: underline; }

/* Empty-state row — used when a collection has zero rows.
   Consumers: ADM_06, ADM_08, ADM_10, ADM_11, ADM_12, ADM_13, ADM_15, WIN_09
   via partials/table-empty.njk */
.table-empty {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  border-bottom: none;
  background: var(--table-row-bg);
}

/* ============================================================
   TABLE — STACK-TO-CARD (mobile, ≤640 px)
   ============================================================
   At narrow viewports each table row collapses into a bordered
   card. `thead` is hidden visually (visually-hidden technique,
   NOT display:none) so assistive technology that exposes column
   header semantics can still read them; the per-cell data-label
   pseudo-element carries the visible column context for sighted
   users. The Front-end Developer is responsible for adding
   data-label="<column header>" to every <td>.
   ============================================================ */
@media (max-width: 640px) {

  /* Neutralise the scroll wrapper — cards carry their own borders */
  .table-wrap {
    overflow-x: visible;
    border: none;
    background: transparent;
  }

  /* Visually hide thead while keeping it in the accessibility tree */
  .table-standard thead,
  .table-compact thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* Flatten table structure to block flow */
  .table-standard,
  .table-compact,
  .table-standard tbody,
  .table-compact tbody,
  .table-standard tr,
  .table-compact tr,
  .table-standard td,
  .table-compact td {
    display: block;
    width: 100%;
  }

  /* Each row becomes a card */
  .table-standard tr,
  .table-compact tr {
    border: 1px solid var(--color-border-default);
    border-radius: var(--card-radius);
    margin-bottom: var(--spacing-sm);
    background: var(--table-row-bg);
    padding: var(--table-padding-compact-y) 0;
  }

  /* Remove zebra-stripe — card border defines the row boundary */
  .table-standard tr:nth-child(even) td,
  .table-compact tr:nth-child(even) td {
    background: transparent;
  }

  /* Each cell is a label/value flex row */
  .table-standard td,
  .table-compact td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--spacing-md);
    background: transparent;
    border-bottom: none;
    padding: var(--table-padding-compact-y) var(--table-padding-compact-x);
    text-align: right;
  }

  /* Remove the last-child border override (no per-td borders in card mode) */
  .table-standard tr:last-child td,
  .table-compact tr:last-child td {
    border-bottom: none;
  }

  /* Column label rendered from data-label attribute — mirrors <th> styling */
  .table-standard td::before,
  .table-compact td::before {
    content: attr(data-label);
    flex-shrink: 0;
    text-align: left;
    color: var(--table-header-text);
    font-weight: var(--table-header-font-weight);
    font-size: var(--font-size-micro);
    letter-spacing: var(--letter-spacing-allcaps);
    text-transform: uppercase;
  }

  /* Suppress empty cells — no ghost rows */
  .table-standard td:empty,
  .table-compact td:empty {
    display: none;
  }

  /* ----------------------------------------------------------
     TFOOT TOTALS ROW — stack-to-card mode
     ----------------------------------------------------------
     In card mode <tfoot> rows render as cards alongside <tbody>
     cards. The spanning label cell (e.g. <td colspan="3">Общо</td>)
     has no data-label so its ::before pseudo-element produces an
     empty string — it renders as a right-aligned orphan.

     Fix: give the tfoot card a stronger top border so it reads as
     "the summary of this stack", then restyle the colspan/label
     cell as a full-width left-aligned uppercase section heading
     (matching the column-label micro type already used in ::before).
     Value cells keep the normal label/value flex row layout.

     Selector logic:
       tfoot tr          — the card container (stronger top border)
       tfoot td[colspan] — the spanning label (e.g. "Общо")
       tfoot td:not([colspan]) — value cells (keep flex row, normal)

     td:empty { display:none } does NOT hide the "Общо" cell because
     it contains text — the selector targets truly empty elements only.
  -- ---------------------------------------------------------- */

  .table-standard tfoot,
  .table-compact tfoot {
    display: block;
    width: 100%;
  }

  /* Totals card: same card shell as tbody rows but with a stronger
     top border that visually anchors it as the summary card. */
  .table-standard tfoot tr,
  .table-compact tfoot tr {
    border-top: 2px solid var(--color-border-strong);
    border-color: var(--color-border-strong);
    margin-top: var(--spacing-xs);
  }

  /* The spanning label cell ("Общо" / "Всичко") — render as a
     full-width uppercase micro heading, left-aligned, not a
     data row. The flex layout is overridden to block so it
     spans the full card width without a right-side value slot. */
  .table-standard tfoot td[colspan],
  .table-compact tfoot td[colspan] {
    display: block;
    text-align: left;
    color: var(--table-header-text);
    font-weight: var(--table-header-font-weight);
    font-size: var(--font-size-micro);
    letter-spacing: var(--letter-spacing-allcaps);
    text-transform: uppercase;
    padding-bottom: var(--table-padding-compact-y);
    border-bottom: 1px solid var(--color-border-default);
    margin-bottom: var(--table-padding-compact-y);
  }

  /* Suppress the ::before pseudo on the colspan cell — it has no
     data-label attribute so content:attr(data-label) would be empty,
     producing a ghost label slot before "Общо". */
  .table-standard tfoot td[colspan]::before,
  .table-compact tfoot td[colspan]::before {
    content: none;
  }

}
}

@layer components {
/* === components/form-field/form-field.css === */
/* ============================================================
   FORM FIELDS
   ============================================================ */

.form-group { margin-bottom: var(--spacing-lg); }

.form-label {
  display: block;
  font-size: var(--input-label-font-size);
  font-weight: var(--input-label-font-weight);
  color: var(--input-label-color);
  margin-bottom: var(--spacing-sm);
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: var(--input-min-height);
  padding: var(--input-padding-y) var(--input-padding-x);
  font-family: var(--input-font-family);
  font-size: var(--input-font-size);
  color: var(--input-text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--input-radius);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: var(--input-border-hover); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--input-border-focus);
  box-shadow: var(--input-focus-ring);
}

.form-textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: var(--font-size-micro); color: var(--input-hint-color); margin-top: var(--spacing-xs); }
.form-error { font-size: var(--font-size-micro); color: var(--input-error-color); margin-top: var(--spacing-xs); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); }
}

@layer components {
/* === components/split-layout/split-layout.css === */
/* ============================================================
   RESPONSIVE SPLIT LAYOUTS
   Two-column layouts that collapse to a single column on mobile.
   minmax(0, …) lets each track shrink below its content's
   intrinsic width, so long strings (IBANs, prices) never force
   horizontal page overflow before the collapse breakpoint.
   Replaces hardcoded inline `grid-template-columns` in templates.
   ============================================================ */
.split-detail {                 /* main content + sidebar (order / product review) */
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: var(--spacing-xl);
  align-items: start;
}
.split-summary {                /* cart / checkout: content + order summary */
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: var(--spacing-xl);
  align-items: start;
}
.split-even {                   /* generic two-up that should stack on mobile */
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--spacing-md);
  align-items: start;
}

/* Auto-collapsing metric grid — no fixed column count, no breakpoint needed. */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
}

/* Label/value spec list (replaces inline `140px 1fr` dl grids).
   Flexible label column + shrinkable value column so long values never
   force overflow; stacks to a single column on small phones. */
.spec-list {
  display: grid;
  grid-template-columns: minmax(80px, max-content) minmax(0, 1fr);
  gap: var(--spacing-sm) var(--spacing-lg);
}
@media (max-width: 480px) {
  .spec-list { grid-template-columns: 1fr; gap: var(--spacing-xs); }
  .spec-list dt { margin-top: var(--spacing-sm); }
  .spec-list dt:first-child { margin-top: 0; }
}
}

@layer components {
/* === components/age-gate/age-gate.css === */
/* ============================================================
   AGE GATE MODAL
   ============================================================ */

.age-gate-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay-bg);
  z-index: var(--z-modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
}
.age-gate-overlay[hidden] {
  /* Respect the native hidden attribute — without this, `display: flex` above wins
     and the modal stays open even after JS sets [hidden] on confirm. */
  display: none;
}

.age-gate-modal {
  background: var(--modal-bg);
  border-radius: var(--modal-radius);
  box-shadow: var(--modal-shadow);
  max-width: var(--modal-max-width-sm);
  width: 90%;
  padding: var(--modal-padding);
  text-align: center;
}

.age-gate-modal__logo {
  margin: 0 auto var(--spacing-lg);
  width: 48px;
}

.age-gate-modal__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-display-light);
  margin-bottom: var(--spacing-md);
}

.age-gate-modal__copy {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xl);
  line-height: var(--line-height-editorial);
}

.age-gate-modal__year-input {
  width: 120px;
  margin: 0 auto var(--spacing-lg);
  text-align: center;
  font-size: var(--font-size-h4);
}

.age-gate-modal__note {
  font-size: var(--font-size-micro);
  color: var(--color-text-muted); /* was: text-subtle (oak 3.88:1 on white — WCAG FAIL); muted (walnut) ≈ 5.6:1 passes AA */
  margin-top: var(--spacing-lg);
}

/* Generic Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay-bg);
  z-index: var(--z-modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--modal-bg);
  border-radius: var(--modal-radius);
  box-shadow: var(--modal-shadow);
  max-width: var(--modal-max-width-md);
  width: 90%;
  padding: var(--modal-padding);
  max-height: 90vh;
  overflow-y: auto;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
}

.modal__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-display-regular);
  margin: 0;
}

.modal__close {
  background: none;
  border: none;
  font-size: var(--font-size-h4); /* M3 fix: was bare 1.5rem → --font-size-h4 (icon/glyph close × button) */
  color: var(--color-text-muted);
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
}
.modal__close:hover { background: var(--color-surface-sunk); }
}

@layer components {
/* === components/pagination/pagination.css === */
/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xl) 0;
}

.pagination__item {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: background var(--duration-fast), border-color var(--duration-fast);
}
.pagination__item:hover { border-color: var(--color-accent-primary); color: var(--color-accent-primary); text-decoration: none; }
.pagination__item--active { background: var(--color-accent-primary); border-color: var(--color-accent-primary); color: var(--color-text-on-accent); }
}

@layer components {
/* === components/breadcrumb/breadcrumb.css === */
/* ============================================================
   BREADCRUMB
   ============================================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  padding: var(--spacing-md) 0;
}

.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-accent-primary); text-decoration: underline; }
.breadcrumb__sep { color: var(--color-text-subtle); }
.breadcrumb__current { color: var(--color-text-primary); }
}

@layer components {
/* === components/bundle-selector/bundle-selector.css === */
/* ============================================================
   BUNDLE SELECTOR
   ============================================================ */

.bundle-selector {
  display: flex;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.bundle-option {
  flex: 1;
  padding: var(--spacing-md);
  text-align: center;
  cursor: pointer;
  border-right: 1px solid var(--color-border-default);
  background: var(--color-surface-primary);
  transition: background var(--duration-fast), color var(--duration-fast);
}
.bundle-option:last-child { border-right: none; }
.bundle-option--active { background: var(--color-accent-primary); color: var(--color-text-on-accent); }
.bundle-option:hover:not(.bundle-option--active) { background: var(--color-surface-sunk); }
.bundle-option__qty { font-weight: var(--font-weight-ui-semibold); font-size: var(--font-size-body); }
.bundle-option__price { font-size: var(--font-size-micro); color: inherit; opacity: 0.8; }
}

@layer components {
/* === components/region-map/region-map.css === */
/* ============================================================
   REGION MAP (BG)
   ============================================================ */

.region-map-wrap {
  max-width: 600px;
  margin: 0 auto;
  /* Reduced top whitespace above "Открий вина по регион" (home + izbi). */
  padding: var(--spacing-sm) 0 var(--spacing-xl);
}

.region-map-wrap h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.region-map svg {
  width: 100%;
  height: auto;
}

.region-path {
  cursor: pointer;
  transition: opacity var(--duration-fast);
}
.region-path:hover { opacity: 0.8; }

.region-label {
  font-family: var(--font-ui);
  font-size: 11px;
  fill: var(--color-text-primary);
  pointer-events: none;
}

/* M2 fix: Region map semantic token classes consume the region tokens shipped by UI Designer. */
.region-dunav {
  fill: var(--color-region-dunav-fill);
  stroke: var(--color-region-dunav-stroke);
}
.region-trakiya {
  fill: var(--color-region-trakiya-fill);
  stroke: var(--color-region-trakiya-stroke);
}
.region-chernomorie {
  fill: var(--color-region-chernomorie-fill);
  stroke: var(--color-region-chernomorie-stroke);
}
}

@layer components {
/* === components/info-bar/info-bar.css === */
/* ============================================================
   INFO BAR
   ============================================================ */

.info-bar {
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}
}

@layer components {
/* === components/tabs/tabs.css === */
/* ============================================================
   TABS
   ============================================================ */

.tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border-default);
  gap: 0;
  margin-bottom: var(--spacing-xl);
  /* Horizontal scroll instead of overflow when tabs exceed viewport (mobile). */
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;

  /*
   * Scroll-shadow affordance — signals that more tabs exist beyond the
   * right edge. Technique: dual background-attachment (local + scroll).
   *
   * Two radial-gradient layers are stacked per edge:
   *   - The "cover" layer uses background-attachment:local so it moves with
   *     the scroll position. At the left edge it sits over the left shadow;
   *     at the right edge it sits over the right shadow. When the container
   *     is scrolled to an edge the cover matches the page surface colour and
   *     hides that side's shadow — so the fade only appears where there IS
   *     more content to scroll to.
   *   - The "shadow" layers use background-attachment:scroll so they are
   *     fixed to the element box and always rendered, but the covers mask
   *     them at the natural scroll stops.
   *
   * The fade colour is var(--color-surface-primary) — the page background
   * token — so it remaps automatically for dark mode without any extra rule.
   * The gradient renders behind the flex children (below the tab buttons)
   * and behind the border-bottom underline, so neither the tab strip line
   * nor the active-tab indicator is affected.
   *
   * At viewports wide enough that no tabs overflow, the container does not
   * scroll at all: both covers sit on top of both shadows from the start,
   * so nothing is visible. No JS, no observer, pure CSS.
   */
  background:
    /* Right-edge cover: solid surface colour at right, fades left.
       Uses local attachment so it moves with the scrollable content.
       When scrolled fully right, this layer sits over the right shadow
       and hides it — telling the user there is nothing more to the right. */
    linear-gradient(to left, var(--color-surface-primary), transparent)
      right center / 40px 100% no-repeat local,
    /* Left-edge cover: solid surface colour at left, fades right.
       Hides the left shadow when scrolled fully left (start position). */
    linear-gradient(to right, var(--color-surface-primary), transparent)
      left center / 40px 100% no-repeat local,
    /* Right overflow shadow: fixed to element box, always rendered.
       Visible only when the right cover does not reach this position
       (i.e. when there is scrollable content to the right). */
    linear-gradient(to left, var(--color-border-default), transparent)
      right center / 40px 100% no-repeat scroll,
    /* Left overflow shadow: visible only when scrolled away from left edge. */
    linear-gradient(to right, var(--color-border-default), transparent)
      left center / 40px 100% no-repeat scroll;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex-shrink: 0;
  white-space: nowrap;
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  background: none;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  text-decoration: none;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}
.tab:hover { color: var(--color-accent-primary); text-decoration: none; }
.tab--active { color: var(--color-accent-primary); border-bottom-color: var(--color-accent-primary); }

/* ── Dark theme overrides — WCAG AA contrast fix
   accent-primary (#8B2D3D) on dark surface-primary (#1A1410) = 2.21:1 — FAIL (need ≥4.5:1 text).
   accent-link (#C4706C) on dark surface-primary (#1A1410) = 5.11:1 — PASS.
   ── */
[data-theme="dark"] .tab:hover { color: var(--color-accent-link); }
[data-theme="dark"] .tab--active { color: var(--color-accent-link); border-bottom-color: var(--color-accent-link); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tab:hover { color: var(--color-accent-link); }
  :root:not([data-theme="light"]) .tab--active { color: var(--color-accent-link); border-bottom-color: var(--color-accent-link); }
}
}

@layer components {
/* === components/hero/hero.css === */
/* ============================================================
   HERO SECTIONS
   ============================================================ */

.hero {
  background: var(--color-surface-sunk);
  padding: var(--spacing-editorial-lg) 0;
  position: relative;
}

.hero--editorial {
  background-image: linear-gradient(135deg, var(--color-surface-sunk) 0%, var(--color-surface-primary) 100%);
}

.hero__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-editorial-md);
  align-items: center;
}

.hero__text { }

.hero__eyebrow {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-display-light);
  color: var(--color-text-primary);
  line-height: var(--line-height-display);
  margin-bottom: var(--spacing-md);
}

.hero__subtitle {
  font-size: var(--font-size-body);
  color: var(--color-text-muted);
  line-height: var(--line-height-editorial);
  margin-bottom: var(--spacing-xl);
}

.hero__ctas {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__image-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--color-surface-sunk);
  border-radius: var(--card-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-subtle);
  font-size: 4rem;
  border: 1px solid var(--color-border-default);
}
}

@layer components {
/* === components/pdp/pdp.css === */
/* ============================================================
   @layer context (Phase 2 — layer-taxonomy.md §!important audit)
   This file is assigned to @layer components by css-build.

   The !important declarations below target CloudImage/lightbox elements
   that inject inline style="" attributes via JavaScript at runtime.
   Inline styles have specificity 1000 and are NOT part of any stylesheet
   layer — they are unlayered in the cascade sense. @layer !important
   rules from the components layer lose to inline styles: an unlayered
   non-!important rule beats a layered !important rule when the unlayered
   rule is an inline style. This means the !important declarations here
   continue to lose to CloudImage inline overrides exactly as they did
   before Phase 2. Behavior is unchanged.

   If CloudImage ever moves its overrides to a <style> tag (unlayered
   stylesheet), those rules would beat components-layer !important —
   the same interaction as today, since an unlayered stylesheet also
   currently beats our source-order position. No regression from layering.
   ============================================================ */

/* ============================================================
   PDP — 360° BOTTLE VIEW (CloudImage CI360 plugin host)
   ============================================================ */

.pdp-bottle-360 {
  position: relative;
  background: var(--color-surface-sunk);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-default);
  overflow: hidden;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-bottle-360 .cloudimage-360 {
  width: 100% !important;
  height: 100% !important;
  padding-bottom: 0 !important;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdp-bottle-360 .cloudimage-360:active {
  cursor: grabbing;
}
.pdp-bottle-360 .cloudimage-360 img,
.pdp-bottle-360 .cloudimage-360 canvas {
  width: auto !important;
  height: 88% !important;
  max-width: 90% !important;
  object-fit: contain;
  position: relative !important;
  top: auto !important;
  left: auto !important;
}

.pdp-bottle-360__hint {
  position: absolute;
  bottom: var(--spacing-sm);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: var(--spacing-xs) var(--spacing-md);
  background: rgba(31, 23, 18, 0.7);
  color: var(--color-text-on-accent);
  font-size: var(--font-size-micro);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  pointer-events: none;
  white-space: nowrap;
}

/* ============================================================
   PDP — BOTTLE FLIP (front ↔ back, click to toggle)
   ============================================================ */

.pdp-bottle-flip {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: grab;
  perspective: 1200px;
  touch-action: pan-y;
  user-select: none;
}
.pdp-bottle-flip:active { cursor: grabbing; }

.pdp-bottle-flip img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  backface-visibility: hidden;
  transition: transform 0.6s ease;
}

.pdp-bottle-flip .pdp-bottle-flip__back {
  transform: rotateY(180deg);
}

.pdp-bottle-flip.is-flipped .pdp-bottle-flip__front {
  transform: rotateY(180deg);
}

.pdp-bottle-flip.is-flipped .pdp-bottle-flip__back {
  transform: rotateY(0deg);
}

.pdp-bottle-flip__hint {
  position: absolute;
  bottom: var(--spacing-sm);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: var(--spacing-xs) var(--spacing-md);
  background: rgba(31, 23, 18, 0.7);
  color: var(--color-text-on-accent);
  font-size: var(--font-size-micro);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
}

/* ============================================================
   PDP — BOTTLE 360 (drag-to-rotate, CloudImage CI360 host)
   The library injects inline padding-bottom for aspect ratio and
   absolute-positioned frames; the !important overrides force the
   viewer to fill our fixed 3/4 slot without library-driven sizing.
   ============================================================ */

.pdp-bottle-360 {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--color-surface-sunk);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-default);
  overflow: hidden;
}

.pdp-bottle-360 .cloudimage-360 {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding-bottom: 0 !important;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-bottle-360 .cloudimage-360:active {
  cursor: grabbing;
}

.pdp-bottle-360 .cloudimage-360-inner-box {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-bottle-360 .cloudimage-360 img,
.pdp-bottle-360 .cloudimage-360 canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

.pdp-bottle-360 .cloudimage-360-hints-overlay,
.pdp-bottle-360 .cloudimage-initial-icon,
.pdp-bottle-360 .cloudimage-360-button {
  display: none !important;
}

.pdp-bottle-360__hint {
  position: absolute;
  bottom: var(--spacing-sm);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: var(--spacing-xs) var(--spacing-md);
  background: rgba(31, 23, 18, 0.7);
  color: var(--color-text-on-accent);
  font-size: var(--font-size-micro);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}

/* Square thumbnail variant + button trigger for lightbox */
.pdp-thumbs--square {
  grid-template-columns: repeat(3, 1fr);
}


.pdp-thumb--button {
  display: block;
  padding: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pdp-thumb--button:hover,
.pdp-thumb--button:focus-visible {
  border-color: var(--color-accent-primary);
  transform: translateY(-1px);
}

.pdp-thumb--button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Lightbox overlay — three-column layout: thumbs | stage | info.
   Background matches the site's primary surface (parchment in light theme,
   deep brown in dark theme) so the gallery feels integrated, not a black void. */
.pdp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--color-surface-primary);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: var(--spacing-xl);
}

.pdp-lightbox[hidden] { display: none; }

.pdp-lightbox__layout {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 320px;
  gap: var(--spacing-xl);
  align-items: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* LEFT — vertical thumbnails */
.pdp-lightbox__thumbs {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  max-height: 100%;
  overflow-y: auto;
  padding: var(--spacing-xs);
}
.pdp-lightbox__thumb {
  appearance: none;
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  padding: var(--spacing-xs);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdp-lightbox__thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.pdp-lightbox__thumb:hover,
.pdp-lightbox__thumb:focus-visible {
  border-color: var(--color-border-strong);
  background: var(--color-surface-alt);
}
.pdp-lightbox__thumb.is-active {
  border-color: var(--color-accent-gold, var(--color-accent-primary));
  background: var(--color-surface-alt);
}

/* CENTER — main image stage with prev/next */
.pdp-lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
}
.pdp-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
}

/* RIGHT — product info panel */
.pdp-lightbox__info {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  padding: var(--spacing-xl);
  color: var(--color-text-primary);
  align-self: center;
  max-height: 100%;
  overflow-y: auto;
}
.pdp-lightbox__info-eyebrow {
  font-size: var(--font-size-micro);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--spacing-xs);
}
.pdp-lightbox__info-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-display-regular);
  margin: 0 0 var(--spacing-xs);
  color: var(--color-text-primary);
}
.pdp-lightbox__info-region {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0 0 var(--spacing-lg);
}
.pdp-lightbox__info-facts {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin: 0 0 var(--spacing-lg);
  padding: var(--spacing-md) 0;
  border-top: 1px solid var(--color-border-default);
  border-bottom: 1px solid var(--color-border-default);
}
.pdp-lightbox__info-facts > div {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
  font-size: var(--font-size-small);
}
.pdp-lightbox__info-facts dt {
  color: var(--color-text-subtle);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  font-size: var(--font-size-micro);
}
.pdp-lightbox__info-facts dd {
  margin: 0;
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
}
.pdp-lightbox__info-price {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
}

/* Close + nav buttons */
.pdp-lightbox__close,
.pdp-lightbox__nav {
  background: var(--color-surface-alt);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.pdp-lightbox__close:hover,
.pdp-lightbox__nav:hover,
.pdp-lightbox__close:focus-visible,
.pdp-lightbox__nav:focus-visible {
  background: var(--color-surface-sunk);
  border-color: var(--color-border-strong);
}
.pdp-lightbox__close {
  position: absolute;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  width: 44px;
  height: 44px;
  font-size: 20px;
  z-index: 2;
}
.pdp-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 4px;
  z-index: 1;
}
.pdp-lightbox__nav--prev { left: var(--spacing-sm); }
.pdp-lightbox__nav--next { right: var(--spacing-sm); }

@media (max-width: 960px) {
  /* The whole overlay scrolls as one column; the info panel sits statically
     in normal flow (no separate inner scroll window). */
  .pdp-lightbox {
    align-items: flex-start;
    overflow-y: auto;
  }
  .pdp-lightbox__layout {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas: "thumbs stage" "info info";
    gap: var(--spacing-md);
    align-items: start;
  }
  .pdp-lightbox__thumbs { grid-area: thumbs; max-height: none; }
  .pdp-lightbox__stage { grid-area: stage; height: auto; }
  .pdp-lightbox__img { max-height: 55vh; }
  /* Static description — no inner scrollbar, full content always visible. */
  .pdp-lightbox__info {
    grid-area: info;
    max-height: none;
    overflow: visible;
  }
  /* Keep the close button pinned to the viewport while the overlay scrolls. */
  .pdp-lightbox__close { position: fixed; }
}

@media (max-width: 600px) {
  .pdp-lightbox { padding: var(--spacing-md); }
  .pdp-lightbox__layout { gap: var(--spacing-sm); }
  .pdp-lightbox__close { top: var(--spacing-md); right: var(--spacing-md); }
  .pdp-lightbox__nav { width: 40px; height: 40px; font-size: 22px; }
  .pdp-lightbox__nav--prev { left: var(--spacing-xs); }
  .pdp-lightbox__nav--next { right: var(--spacing-xs); }
}

/* ============================================================
   PDP — HERO LAYOUT + GALLERY + SECONDARY SECTIONS
   Responsive: stacks single-column under 768px.
   ============================================================ */

.pdp-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-editorial-md);
  align-items: start;
}

.pdp-thumbs {
  list-style: none;
  margin: var(--spacing-md) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-sm);
}

.pdp-thumb {
  aspect-ratio: 1 / 1;
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Vertical thumbnail rail — placed to the LEFT of the main flip image.
   Declared after .pdp-thumbs so the flex override beats the base grid. */
.pdp-bottle-flip-layout {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--spacing-md);
  align-items: start;
}

.pdp-bottle-flip-layout__main {
  min-width: 0;
}

.pdp-thumbs.pdp-thumbs--vertical {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  grid-template-columns: none;
}

.pdp-thumbs--vertical > li {
  width: 100%;
}

.pdp-thumb--mini {
  width: 120px;
  aspect-ratio: 1 / 1;
}

@media (max-width: 600px) {
  .pdp-bottle-flip-layout {
    grid-template-columns: 88px 1fr;
    gap: var(--spacing-sm);
  }
  .pdp-thumb--mini { width: 88px; }
}

.pdp-author {
  display: flex;
  gap: var(--spacing-xl);
  align-items: flex-start;
}

.pdp-author__portrait {
  width: var(--card-author-portrait-lg);
  height: var(--card-author-portrait-lg);
  border-radius: var(--radius-avatar);
  border: 3px solid var(--card-author-ring-premium);
  background: var(--color-surface-sunk);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
}

.pdp-winery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.pdp-winery-grid__media {
  background: var(--color-surface-primary);
  border-radius: var(--radius-card);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border: 1px solid var(--color-border-default);
}

.pdp-secondary-cta {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--card-radius);
  padding: var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-xl);
}

.pdp-secondary-cta__price {
  text-align: right;
  flex-shrink: 0;
}

/* PDP — paired sections (two editorial blocks side-by-side).
   Used for История | Какво е това вино, Тех. данни | Логистика, Автор | Изба. */
.pdp-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl, var(--spacing-xl));
  align-items: start;
}
.pdp-pair > * { min-width: 0; }

/* Trust strip vertical variant — used inside a half-width column. */
.trust-strip--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-md);
}

/* Compact author block — fits within a half-width column. */
.pdp-author--compact { gap: var(--spacing-md); align-items: flex-start; }
.pdp-author--compact .pdp-author__portrait {
  width: calc(var(--card-author-portrait-lg) * 0.65);
  height: calc(var(--card-author-portrait-lg) * 0.65);
  font-size: 2rem;
}

/* Winery profile — vertical stack (media on top, text below).
   Used inside a half-width column where horizontal split would be too cramped. */
.pdp-winery-stack { display: flex; flex-direction: column; gap: var(--spacing-md); }
.pdp-winery-stack__media {
  background: var(--color-surface-primary);
  border-radius: var(--radius-card);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border: 1px solid var(--color-border-default);
}

/* PDP facts — tight vertical list with pictogram + label + value per row.
   Used inside the "За виното" column to surface technical data without a heading. */
.pdp-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-border-default);
}
.pdp-facts__row {
  display: grid;
  grid-template-columns: 1.75rem 8rem 1fr;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border-default);
  font-size: var(--font-size-small);
  /* Warm taupe cascades to icon + label (and via currentColor to SVG strokes).
     Value cell overrides this with the darker primary text color. */
  color: #6b5d4e;
}
.pdp-facts__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  color: inherit;
}
.pdp-facts__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}
.pdp-facts__label {
  font-size: var(--font-size-micro);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  color: inherit;
}
.pdp-facts__value {
  font-weight: var(--font-weight-ui-semibold);
  color: #1f1712;
}
.pdp-facts__value a { color: inherit; }

/* Food pairing — circle pictograms in a single row.
   Used inside "За виното" → "С какво да пиете" subsection. */
.food-pairing-row {
  display: flex;
  gap: var(--spacing-md);
  margin: var(--spacing-sm) 0 var(--spacing-md);
  flex-wrap: wrap;
}
.food-pairing-card {
  flex: 1 1 0;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  text-align: center;
}
.food-pairing-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
}
.food-pairing-card__icon:has(.food-pairing-card__img) {
  padding: 0;
  overflow: hidden;
}
.food-pairing-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  /* Source pictograms carry built-in whitespace padding; scale the illustration
     up inside the circular icon (which clips via overflow:hidden) so the subject
     reads larger. Applies to SYS_03 reference page, PDP and WIN_13. */
  transform: scale(1.3);
  transform-origin: center;
}
.food-pairing-card__label {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0;
  line-height: var(--line-height-tight, 1.3);
}

.hero__image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--color-border-default);
}
.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero__author-overlay {
  position: absolute;
  left: var(--spacing-lg);
  right: var(--spacing-lg);
  bottom: var(--spacing-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  background: linear-gradient(180deg, rgba(31,23,18,0) 0%, rgba(31,23,18,0.55) 60%, rgba(31,23,18,0.75) 100%);
  border-radius: var(--card-radius);
  text-align: center;
}
.author-badge--on-image {
  justify-content: center;
}
.author-badge--on-image .author-badge__name,
.author-badge--on-image .author-badge__role {
  color: var(--color-text-on-accent);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
}

@layer components {
/* === components/progress-bar/progress-bar.css === */
/* ============================================================
   PROGRESS BAR (order status)
   ============================================================ */

.progress-bar-wrap {
  margin: var(--spacing-sm) 0;
}

.progress-bar {
  height: 4px;
  background: var(--color-border-default);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--color-accent-primary);
  border-radius: var(--radius-full);
  transition: width var(--duration-moderate) var(--easing-standard);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-micro);
  color: var(--color-text-subtle);
  margin-top: var(--spacing-xs);
}
}

@layer components {
/* === components/card/card.css === */
/* ============================================================
   CARD — shared base chrome
   Layer: components (assigned at concat time by css-build)

   CHROME ONLY. Padding, margin, and width are composed via
   utility classes in templates — they are intentionally NOT
   set here. Inline pattern observed:
     background + border + radius constant (12× alt, 8× sunk)
     padding and margin-bottom varied per use
   ============================================================ */

.card {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--card-radius);
}

/* ----------------------------------------------------------
   MODIFIER: sunk surface
   Use for inset/recessed content areas (form sections,
   profile info panels, account settings blocks).
   8× observed inline: surface-sunk + card-radius + no border.
   ---------------------------------------------------------- */

.card--sunk {
  background: var(--color-surface-sunk);
  /* Truly borderless (not transparent 1px) — matches the observed inline sunk
     pattern (surface-sunk + radius + padding, no border). Using border:none
     keeps the box model identical to the borderless inline it replaces. */
  border: none;
}
}

@layer components {
/* === components/section-heading/section-heading.css === */
/* ============================================================
   SECTION-HEADING — display typography for section/page headings
   Layer: components (assigned at concat time by css-build)

   Sets font-family only — the single property invariant across
   all inline combos. font-weight, line-height, and margin are
   NOT set; they inherit from the heading element or are
   composed via utilities at migration time.

   Distinct from .section-header (the flex title+link row in
   components/section-header/section-header.css).

   Observed inline combos:
     font-display + h3 + mb-xs   (7×)
     font-display + h3 + mb-xl   (7×)
     font-display + h4 + mb-md   (7×)
     font-display + h4 + mb-lg   (9×)
     font-display + h2 + mb-xl   (~14×)
     font-display + h1 + various (7×)
   No dominant default pairing — size+margin compose via utils.
   ============================================================ */

.section-heading {
  font-family: var(--font-display);
}
}

@layer components {
/* === components/eyebrow/eyebrow.css === */
/* ============================================================
   EYEBROW — kicker / category label
   Layer: components (assigned at concat time by css-build)

   Declares exactly the 4 properties set by all 7 inline uses.
   font-family, font-weight, and margin are NOT set — they
   inherit from context, matching the inline behaviour.

   Observed inline pattern:
     <p style="font-size: var(--font-size-micro); text-transform: uppercase;
               letter-spacing: var(--letter-spacing-allcaps);
               color: var(--color-text-muted);">…</p>
   ============================================================ */

.eyebrow {
  font-size: var(--font-size-micro);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-allcaps);
  color: var(--color-text-muted);
}
}

@layer components {
/* === base/layout-helpers.css === */
/* ============================================================
   PAGE LAYOUT HELPERS
   ============================================================ */

.page-header {
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  border-bottom: 1px solid var(--color-border-default);
  margin-bottom: var(--spacing-xl);
}

.page-header__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-display-regular);
  margin: 0 0 var(--spacing-sm);
}

.page-header__meta {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.sidebar-layout {
  display: flex;
  gap: var(--spacing-xl);
  align-items: flex-start;
}
/* Let the main column shrink below its content's intrinsic width
   (flex children default to min-width:auto, which forces overflow). */
.sidebar-layout > * { min-width: 0; }

.main-content { flex: 1; min-width: 0; }
}

@layer components {
/* === components/winery-hero/winery-hero.css === */
/* ============================================================
   WINERY HERO (Option B tenancy)
   ============================================================ */

.winery-hero {
  position: relative;
  padding: var(--spacing-editorial-md) 0;
  background: var(--color-surface-sunk);
  border-left: 4px solid var(--tenant-accent-default);
}

.winery-hero[data-winery="izvor"] {
  --winery-accent: #7A1F2E;
  border-left-color: var(--winery-accent);
}
.winery-hero[data-winery="balkana"] {
  --winery-accent: #3D4A6B;
  border-left-color: var(--winery-accent);
}
.winery-hero[data-winery="marea"] {
  --winery-accent: #2A5F7E;
  border-left-color: var(--winery-accent);
}

/* Winery accent on links (Option B — only links)
   --winery-accent is set per data-winery on .winery-hero; scoped here on .winery-page.
   Hover derived via color-mix() — no hardcoded darkened hex. C4 fix. */
.winery-page[data-winery="izvor"] { --winery-accent: #7A1F2E; }
.winery-page[data-winery="balkana"] { --winery-accent: #3D4A6B; }
.winery-page[data-winery="marea"] { --winery-accent: #2A5F7E; }

/* Content links only — buttons keep their own component colors
   (primary = white text, secondary = cherry-red text matching its border). */
.winery-page[data-winery] a:not(.btn) { color: var(--winery-accent); }
.winery-page[data-winery] a:not(.btn):hover { color: color-mix(in oklab, var(--winery-accent) 82%, black); }

/* ---- Hero layout: text + image side by side, image stacks ABOVE text on mobile ---- */
.winery-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-editorial-md);
  align-items: center;
}

@media (max-width: 768px) {
  .winery-hero__grid { grid-template-columns: 1fr; gap: var(--spacing-lg); }
  /* Image on its own row, above the heading + copy + CTAs. */
  .winery-hero__media { order: -1; }
}
}

@layer components {
/* === components/collection-card/collection-card.css === */
/* ============================================================
   COLLECTION CARDS
   ============================================================ */

.collection-card {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--card-radius);
  padding: var(--spacing-xl) var(--spacing-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: box-shadow var(--duration-fast), transform var(--duration-fast);
}
.collection-card:hover { box-shadow: var(--shadow-floating); transform: translateY(-2px); text-decoration: none; }

.collection-card__icon { font-size: 2.5rem; margin-bottom: var(--spacing-md); }
.collection-card__name {
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}
.collection-card__desc { font-size: var(--font-size-small); color: var(--color-text-muted); }
}

@layer components {
/* === components/empty-state/empty-state.css === */
/* ============================================================
   EMPTY STATES
   ============================================================ */

.empty-state {
  text-align: center;
  padding: var(--spacing-editorial-md) var(--spacing-lg);
  color: var(--color-text-muted);
}

.empty-state__icon { font-size: 3rem; margin-bottom: var(--spacing-lg); }

.empty-state__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
}

.empty-state__copy { font-size: var(--font-size-body); margin-bottom: var(--spacing-xl); }
}

@layer components {
/* === components/section-header/section-header.css === */
/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--spacing-sm) var(--spacing-md);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
}

.section-header__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-display-regular);
  margin: 0;
}

.section-header__link {
  font-size: var(--font-size-small);
  color: var(--color-text-link);
}
}

@layer components {
/* === components/document/document.css === */
/* ============================================================
   DOCUMENT LAYOUT (legal pages)
   ============================================================ */

.document-layout {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--spacing-editorial-md) var(--spacing-lg);
}

.document-layout h1 { margin-bottom: var(--spacing-xl); }
.document-layout h2 { margin-top: var(--spacing-xl); }
.document-layout p { line-height: var(--line-height-editorial); color: var(--color-text-muted); }
}

@layer components {
/* === components/checkout/checkout.css === */
/* ============================================================
   CHECKOUT FORM
   ============================================================ */

.checkout-step__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-display-regular);
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border-default);
}
}

@layer components {
/* === components/sticky-cta/sticky-cta.css === */
/* ============================================================
   STICKY CTA BAR (mobile)
   ============================================================ */

.sticky-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface-raised);
  border-top: 1px solid var(--color-border-default);
  padding: var(--spacing-md) var(--spacing-lg);
  z-index: var(--z-modal);
  /* C5 fix: consume --sticky-bar-shadow component-layer token (global→semantic→component chain). */
  box-shadow: var(--sticky-bar-shadow);
}
}

@layer components {
/* === base/responsive-overrides.css === */
/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-full__grid { grid-template-columns: repeat(3, 1fr); }
  .hero__inner { gap: var(--spacing-xl); }
}

@media (max-width: 768px) {
  .header-public__nav { display: none; }
  .header-public__hamburger { display: flex; }
  .header-public__utils a[data-util="search"] { display: none; }

  /* Header no longer has room for the desktop logo + full gaps once the
     nav collapses — tighten so utils + hamburger fit narrow phones.
     Logo keeps its full 68px height per Design Director (do not shrink). */
  .header-public__inner { gap: var(--spacing-md); padding: 0 var(--spacing-md); }
  .header-public__logo-img { height: 68px; }
  .header-public__utils { gap: var(--spacing-sm); }

  /* Split layouts stack on mobile (replaces inline fixed-column grids).
     minmax(0, …) + min-width:0 on the children lets the single column
     shrink below its content's intrinsic width (long words, dl grids). */
  .split-detail,
  .split-summary,
  .split-even { grid-template-columns: minmax(0, 1fr); }
  .split-detail > *,
  .split-summary > *,
  .split-even > * { min-width: 0; }

  /* Reclaim side space inside dashboards on mobile. */
  .dashboard__content { padding: var(--spacing-lg); }
  .dashboard__topbar { padding: 0 var(--spacing-lg); }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }

  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }

  .filter-sidebar { display: none; }

  .sidebar-layout { flex-direction: column; }
  .profile-sidebar { width: 100%; }
  .profile-sidebar__nav { flex-direction: row; overflow-x: auto; }

  .footer-full__grid { grid-template-columns: repeat(2, 1fr); }

  /* C3 fix: sidebar nav hidden on mobile — replaced by drawer via dashboard-mobile-nav */
  .dashboard__nav { display: none; }
  .dashboard__hamburger { display: flex; }

  .order-summary { position: static; }

  .sticky-cta-bar { display: block; }

  .stat-cards { grid-template-columns: repeat(2, 1fr); }

  .hero { padding: var(--spacing-xl) 0; }

  /* R-1 fix: reduce section vertical rhythm on tablet/mobile (80px → 64px / 32px → 24px) */
  .section        { padding: var(--spacing-editorial-sm) 0; }
  .section--tight { padding: var(--spacing-lg) 0; }

  /* Tight modifiers — reduced edges at ≤768px (64px → 40px) */
  .section--tight-top    { padding-top: var(--spacing-2xl); }
  .section--tight-bottom { padding-bottom: var(--spacing-2xl); }
  .section--tight-both   { padding: var(--spacing-2xl) 0; }

  /* Tighter modifiers — reduced edges at ≤768px (32px → 24px) */
  .section--tighter-top    { padding-top: var(--spacing-lg); }
  .section--tighter-bottom { padding-bottom: var(--spacing-lg); }
  .section--tighter-both   { padding: var(--spacing-lg) 0; }

  /* Tightest-top modifier — reduced top edge at ≤768px (16px → 8px) */
  .section--tightest-top { padding-top: var(--spacing-sm); }

  /* PDP responsive — single-column hero, stacked author/winery/CTA blocks */
  .pdp-hero-grid { grid-template-columns: 1fr; gap: var(--spacing-xl); }
  .pdp-thumbs { max-width: 360px; }
  .pdp-winery-grid { grid-template-columns: 1fr; gap: var(--spacing-lg); }
  .pdp-winery-grid__media { aspect-ratio: 16 / 9; }
  .pdp-secondary-cta { flex-direction: column; align-items: stretch; gap: var(--spacing-lg); padding: var(--spacing-lg); }
  .pdp-secondary-cta__price { text-align: left; }
  .pdp-author { gap: var(--spacing-lg); }
  .pdp-author__portrait {
    width: calc(var(--card-author-portrait-lg) * 0.7);
    height: calc(var(--card-author-portrait-lg) * 0.7);
    font-size: 2rem;
  }

  /* Paired sections collapse to single column on tablet/mobile. */
  .pdp-pair { grid-template-columns: 1fr; gap: var(--spacing-xl); }
}

@media (max-width: 480px) {
  /* R-1 fix: tightest section vertical rhythm on small phones (64px → 40px / 24px → 16px) */
  .section        { padding: var(--spacing-2xl) 0; }
  .section--tight { padding: var(--spacing-md) 0; }

  /* Tight modifiers — reduced edges at ≤480px (40px → 32px) */
  .section--tight-top    { padding-top: var(--spacing-xl); }
  .section--tight-bottom { padding-bottom: var(--spacing-xl); }
  .section--tight-both   { padding: var(--spacing-xl) 0; }

  /* Tighter modifiers — reduced edges at ≤480px (32px → 16px) */
  .section--tighter-top    { padding-top: var(--spacing-md); }
  .section--tighter-bottom { padding-bottom: var(--spacing-md); }
  .section--tighter-both   { padding: var(--spacing-md) 0; }

  /* Tightest-top modifier — reduced top edge at ≤480px (8px → 4px) */
  .section--tightest-top { padding-top: var(--spacing-xs); }

  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  /* Opt-in modifier: stack specific 3-col card grids to one per row on phones
     (declared after .grid-3 so it wins at equal specificity). */
  .grid-3--stack-mobile { grid-template-columns: 1fr; }
  .container { padding: 0 var(--spacing-md); }

  /* Smallest phones (down to 320px): tightest header gaps so logo + 3 utility
     icons + hamburger still fit. Logo height stays 68px per Design Director. */
  .header-public__logo-img { height: 68px; }
  .header-public__inner { gap: var(--spacing-sm); }
  .header-public__utils { gap: var(--spacing-xs); }

  /* Tightest dashboard padding + truncating top bar on small phones. */
  .dashboard__content { padding: var(--spacing-md); }
  .dashboard__topbar { padding: 0 var(--spacing-md); gap: var(--spacing-sm); }
  .dashboard__topbar-winery { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .footer-full__grid { grid-template-columns: 1fr 1fr; }
  .trust-strip { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .bundle-selector { flex-direction: column; }

  /* PDP — tighter spacing on small phones, stacked author */
  .pdp-author { flex-direction: column; align-items: center; text-align: center; }
  .pdp-thumbs { max-width: 100%; }
}
}

@layer utilities {
/* === base/utilities.css === */
/* GENERATED — do not edit; source: build/utility-build.js */
/* Spec: design-system/utilities.md */
/* Layer: utilities — wrapped by css-build at concat time */
/* Class counts: 169 spacing + 8 font-size + 6 font-weight + 6 text-color = 189 total */

/* ============================================================
   SPACING UTILITIES
   169 classes: 13 directions × 13 steps
   Source: --spacing-{step} semantic aliases
   ============================================================ */

/* mb-* */
.mb-xs {
  margin-bottom: var(--spacing-xs);
}
.mb-sm {
  margin-bottom: var(--spacing-sm);
}
.mb-md {
  margin-bottom: var(--spacing-md);
}
.mb-lg {
  margin-bottom: var(--spacing-lg);
}
.mb-xl {
  margin-bottom: var(--spacing-xl);
}
.mb-2xl {
  margin-bottom: var(--spacing-2xl);
}
.mb-2xl-plus {
  margin-bottom: var(--spacing-2xl-plus);
}
.mb-3xl {
  margin-bottom: var(--spacing-3xl);
}
.mb-editorial-sm {
  margin-bottom: var(--spacing-editorial-sm);
}
.mb-editorial-md {
  margin-bottom: var(--spacing-editorial-md);
}
.mb-editorial-lg {
  margin-bottom: var(--spacing-editorial-lg);
}
.mb-editorial-xl {
  margin-bottom: var(--spacing-editorial-xl);
}
.mb-section-hero {
  margin-bottom: var(--spacing-section-hero);
}

/* mt-* */
.mt-xs {
  margin-top: var(--spacing-xs);
}
.mt-sm {
  margin-top: var(--spacing-sm);
}
.mt-md {
  margin-top: var(--spacing-md);
}
.mt-lg {
  margin-top: var(--spacing-lg);
}
.mt-xl {
  margin-top: var(--spacing-xl);
}
.mt-2xl {
  margin-top: var(--spacing-2xl);
}
.mt-2xl-plus {
  margin-top: var(--spacing-2xl-plus);
}
.mt-3xl {
  margin-top: var(--spacing-3xl);
}
.mt-editorial-sm {
  margin-top: var(--spacing-editorial-sm);
}
.mt-editorial-md {
  margin-top: var(--spacing-editorial-md);
}
.mt-editorial-lg {
  margin-top: var(--spacing-editorial-lg);
}
.mt-editorial-xl {
  margin-top: var(--spacing-editorial-xl);
}
.mt-section-hero {
  margin-top: var(--spacing-section-hero);
}

/* ml-* */
.ml-xs {
  margin-left: var(--spacing-xs);
}
.ml-sm {
  margin-left: var(--spacing-sm);
}
.ml-md {
  margin-left: var(--spacing-md);
}
.ml-lg {
  margin-left: var(--spacing-lg);
}
.ml-xl {
  margin-left: var(--spacing-xl);
}
.ml-2xl {
  margin-left: var(--spacing-2xl);
}
.ml-2xl-plus {
  margin-left: var(--spacing-2xl-plus);
}
.ml-3xl {
  margin-left: var(--spacing-3xl);
}
.ml-editorial-sm {
  margin-left: var(--spacing-editorial-sm);
}
.ml-editorial-md {
  margin-left: var(--spacing-editorial-md);
}
.ml-editorial-lg {
  margin-left: var(--spacing-editorial-lg);
}
.ml-editorial-xl {
  margin-left: var(--spacing-editorial-xl);
}
.ml-section-hero {
  margin-left: var(--spacing-section-hero);
}

/* mr-* */
.mr-xs {
  margin-right: var(--spacing-xs);
}
.mr-sm {
  margin-right: var(--spacing-sm);
}
.mr-md {
  margin-right: var(--spacing-md);
}
.mr-lg {
  margin-right: var(--spacing-lg);
}
.mr-xl {
  margin-right: var(--spacing-xl);
}
.mr-2xl {
  margin-right: var(--spacing-2xl);
}
.mr-2xl-plus {
  margin-right: var(--spacing-2xl-plus);
}
.mr-3xl {
  margin-right: var(--spacing-3xl);
}
.mr-editorial-sm {
  margin-right: var(--spacing-editorial-sm);
}
.mr-editorial-md {
  margin-right: var(--spacing-editorial-md);
}
.mr-editorial-lg {
  margin-right: var(--spacing-editorial-lg);
}
.mr-editorial-xl {
  margin-right: var(--spacing-editorial-xl);
}
.mr-section-hero {
  margin-right: var(--spacing-section-hero);
}

/* mx-* */
.mx-xs {
  margin-left: var(--spacing-xs);
  margin-right: var(--spacing-xs);
}
.mx-sm {
  margin-left: var(--spacing-sm);
  margin-right: var(--spacing-sm);
}
.mx-md {
  margin-left: var(--spacing-md);
  margin-right: var(--spacing-md);
}
.mx-lg {
  margin-left: var(--spacing-lg);
  margin-right: var(--spacing-lg);
}
.mx-xl {
  margin-left: var(--spacing-xl);
  margin-right: var(--spacing-xl);
}
.mx-2xl {
  margin-left: var(--spacing-2xl);
  margin-right: var(--spacing-2xl);
}
.mx-2xl-plus {
  margin-left: var(--spacing-2xl-plus);
  margin-right: var(--spacing-2xl-plus);
}
.mx-3xl {
  margin-left: var(--spacing-3xl);
  margin-right: var(--spacing-3xl);
}
.mx-editorial-sm {
  margin-left: var(--spacing-editorial-sm);
  margin-right: var(--spacing-editorial-sm);
}
.mx-editorial-md {
  margin-left: var(--spacing-editorial-md);
  margin-right: var(--spacing-editorial-md);
}
.mx-editorial-lg {
  margin-left: var(--spacing-editorial-lg);
  margin-right: var(--spacing-editorial-lg);
}
.mx-editorial-xl {
  margin-left: var(--spacing-editorial-xl);
  margin-right: var(--spacing-editorial-xl);
}
.mx-section-hero {
  margin-left: var(--spacing-section-hero);
  margin-right: var(--spacing-section-hero);
}

/* my-* */
.my-xs {
  margin-top: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
}
.my-sm {
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}
.my-md {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}
.my-lg {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}
.my-xl {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}
.my-2xl {
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}
.my-2xl-plus {
  margin-top: var(--spacing-2xl-plus);
  margin-bottom: var(--spacing-2xl-plus);
}
.my-3xl {
  margin-top: var(--spacing-3xl);
  margin-bottom: var(--spacing-3xl);
}
.my-editorial-sm {
  margin-top: var(--spacing-editorial-sm);
  margin-bottom: var(--spacing-editorial-sm);
}
.my-editorial-md {
  margin-top: var(--spacing-editorial-md);
  margin-bottom: var(--spacing-editorial-md);
}
.my-editorial-lg {
  margin-top: var(--spacing-editorial-lg);
  margin-bottom: var(--spacing-editorial-lg);
}
.my-editorial-xl {
  margin-top: var(--spacing-editorial-xl);
  margin-bottom: var(--spacing-editorial-xl);
}
.my-section-hero {
  margin-top: var(--spacing-section-hero);
  margin-bottom: var(--spacing-section-hero);
}

/* p-* */
.p-xs {
  padding: var(--spacing-xs);
}
.p-sm {
  padding: var(--spacing-sm);
}
.p-md {
  padding: var(--spacing-md);
}
.p-lg {
  padding: var(--spacing-lg);
}
.p-xl {
  padding: var(--spacing-xl);
}
.p-2xl {
  padding: var(--spacing-2xl);
}
.p-2xl-plus {
  padding: var(--spacing-2xl-plus);
}
.p-3xl {
  padding: var(--spacing-3xl);
}
.p-editorial-sm {
  padding: var(--spacing-editorial-sm);
}
.p-editorial-md {
  padding: var(--spacing-editorial-md);
}
.p-editorial-lg {
  padding: var(--spacing-editorial-lg);
}
.p-editorial-xl {
  padding: var(--spacing-editorial-xl);
}
.p-section-hero {
  padding: var(--spacing-section-hero);
}

/* pb-* */
.pb-xs {
  padding-bottom: var(--spacing-xs);
}
.pb-sm {
  padding-bottom: var(--spacing-sm);
}
.pb-md {
  padding-bottom: var(--spacing-md);
}
.pb-lg {
  padding-bottom: var(--spacing-lg);
}
.pb-xl {
  padding-bottom: var(--spacing-xl);
}
.pb-2xl {
  padding-bottom: var(--spacing-2xl);
}
.pb-2xl-plus {
  padding-bottom: var(--spacing-2xl-plus);
}
.pb-3xl {
  padding-bottom: var(--spacing-3xl);
}
.pb-editorial-sm {
  padding-bottom: var(--spacing-editorial-sm);
}
.pb-editorial-md {
  padding-bottom: var(--spacing-editorial-md);
}
.pb-editorial-lg {
  padding-bottom: var(--spacing-editorial-lg);
}
.pb-editorial-xl {
  padding-bottom: var(--spacing-editorial-xl);
}
.pb-section-hero {
  padding-bottom: var(--spacing-section-hero);
}

/* pt-* */
.pt-xs {
  padding-top: var(--spacing-xs);
}
.pt-sm {
  padding-top: var(--spacing-sm);
}
.pt-md {
  padding-top: var(--spacing-md);
}
.pt-lg {
  padding-top: var(--spacing-lg);
}
.pt-xl {
  padding-top: var(--spacing-xl);
}
.pt-2xl {
  padding-top: var(--spacing-2xl);
}
.pt-2xl-plus {
  padding-top: var(--spacing-2xl-plus);
}
.pt-3xl {
  padding-top: var(--spacing-3xl);
}
.pt-editorial-sm {
  padding-top: var(--spacing-editorial-sm);
}
.pt-editorial-md {
  padding-top: var(--spacing-editorial-md);
}
.pt-editorial-lg {
  padding-top: var(--spacing-editorial-lg);
}
.pt-editorial-xl {
  padding-top: var(--spacing-editorial-xl);
}
.pt-section-hero {
  padding-top: var(--spacing-section-hero);
}

/* pl-* */
.pl-xs {
  padding-left: var(--spacing-xs);
}
.pl-sm {
  padding-left: var(--spacing-sm);
}
.pl-md {
  padding-left: var(--spacing-md);
}
.pl-lg {
  padding-left: var(--spacing-lg);
}
.pl-xl {
  padding-left: var(--spacing-xl);
}
.pl-2xl {
  padding-left: var(--spacing-2xl);
}
.pl-2xl-plus {
  padding-left: var(--spacing-2xl-plus);
}
.pl-3xl {
  padding-left: var(--spacing-3xl);
}
.pl-editorial-sm {
  padding-left: var(--spacing-editorial-sm);
}
.pl-editorial-md {
  padding-left: var(--spacing-editorial-md);
}
.pl-editorial-lg {
  padding-left: var(--spacing-editorial-lg);
}
.pl-editorial-xl {
  padding-left: var(--spacing-editorial-xl);
}
.pl-section-hero {
  padding-left: var(--spacing-section-hero);
}

/* pr-* */
.pr-xs {
  padding-right: var(--spacing-xs);
}
.pr-sm {
  padding-right: var(--spacing-sm);
}
.pr-md {
  padding-right: var(--spacing-md);
}
.pr-lg {
  padding-right: var(--spacing-lg);
}
.pr-xl {
  padding-right: var(--spacing-xl);
}
.pr-2xl {
  padding-right: var(--spacing-2xl);
}
.pr-2xl-plus {
  padding-right: var(--spacing-2xl-plus);
}
.pr-3xl {
  padding-right: var(--spacing-3xl);
}
.pr-editorial-sm {
  padding-right: var(--spacing-editorial-sm);
}
.pr-editorial-md {
  padding-right: var(--spacing-editorial-md);
}
.pr-editorial-lg {
  padding-right: var(--spacing-editorial-lg);
}
.pr-editorial-xl {
  padding-right: var(--spacing-editorial-xl);
}
.pr-section-hero {
  padding-right: var(--spacing-section-hero);
}

/* px-* */
.px-xs {
  padding-left: var(--spacing-xs);
  padding-right: var(--spacing-xs);
}
.px-sm {
  padding-left: var(--spacing-sm);
  padding-right: var(--spacing-sm);
}
.px-md {
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}
.px-lg {
  padding-left: var(--spacing-lg);
  padding-right: var(--spacing-lg);
}
.px-xl {
  padding-left: var(--spacing-xl);
  padding-right: var(--spacing-xl);
}
.px-2xl {
  padding-left: var(--spacing-2xl);
  padding-right: var(--spacing-2xl);
}
.px-2xl-plus {
  padding-left: var(--spacing-2xl-plus);
  padding-right: var(--spacing-2xl-plus);
}
.px-3xl {
  padding-left: var(--spacing-3xl);
  padding-right: var(--spacing-3xl);
}
.px-editorial-sm {
  padding-left: var(--spacing-editorial-sm);
  padding-right: var(--spacing-editorial-sm);
}
.px-editorial-md {
  padding-left: var(--spacing-editorial-md);
  padding-right: var(--spacing-editorial-md);
}
.px-editorial-lg {
  padding-left: var(--spacing-editorial-lg);
  padding-right: var(--spacing-editorial-lg);
}
.px-editorial-xl {
  padding-left: var(--spacing-editorial-xl);
  padding-right: var(--spacing-editorial-xl);
}
.px-section-hero {
  padding-left: var(--spacing-section-hero);
  padding-right: var(--spacing-section-hero);
}

/* py-* */
.py-xs {
  padding-top: var(--spacing-xs);
  padding-bottom: var(--spacing-xs);
}
.py-sm {
  padding-top: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
}
.py-md {
  padding-top: var(--spacing-md);
  padding-bottom: var(--spacing-md);
}
.py-lg {
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
}
.py-xl {
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
}
.py-2xl {
  padding-top: var(--spacing-2xl);
  padding-bottom: var(--spacing-2xl);
}
.py-2xl-plus {
  padding-top: var(--spacing-2xl-plus);
  padding-bottom: var(--spacing-2xl-plus);
}
.py-3xl {
  padding-top: var(--spacing-3xl);
  padding-bottom: var(--spacing-3xl);
}
.py-editorial-sm {
  padding-top: var(--spacing-editorial-sm);
  padding-bottom: var(--spacing-editorial-sm);
}
.py-editorial-md {
  padding-top: var(--spacing-editorial-md);
  padding-bottom: var(--spacing-editorial-md);
}
.py-editorial-lg {
  padding-top: var(--spacing-editorial-lg);
  padding-bottom: var(--spacing-editorial-lg);
}
.py-editorial-xl {
  padding-top: var(--spacing-editorial-xl);
  padding-bottom: var(--spacing-editorial-xl);
}
.py-section-hero {
  padding-top: var(--spacing-section-hero);
  padding-bottom: var(--spacing-section-hero);
}

/* ============================================================
   FONT-SIZE UTILITIES
   8 classes: .text-{scale-name}
   Source: --font-size-{name}
   Note: .text-{size} and .text-{color} share prefix but differ in suffix pattern.
   ============================================================ */

.text-h1 {
  font-size: var(--font-size-h1);
}
.text-h2 {
  font-size: var(--font-size-h2);
}
.text-h3 {
  font-size: var(--font-size-h3);
}
.text-h4 {
  font-size: var(--font-size-h4);
}
.text-body {
  font-size: var(--font-size-body);
}
.text-small {
  font-size: var(--font-size-small);
}
.text-micro {
  font-size: var(--font-size-micro);
}
.text-compact {
  font-size: var(--font-size-compact);
}

/* ============================================================
   FONT-WEIGHT UTILITIES
   6 classes: .fw-{weight-name}
   Source: --font-weight-{name}
   Omitted (0 inline uses): .fw-display-bold, .fw-ui-light
   ============================================================ */

.fw-ui-medium {
  font-weight: var(--font-weight-ui-medium);
}
.fw-ui-semibold {
  font-weight: var(--font-weight-ui-semibold);
}
.fw-display-light {
  font-weight: var(--font-weight-display-light);
}
.fw-display-medium {
  font-weight: var(--font-weight-display-medium);
}
.fw-display-regular {
  font-weight: var(--font-weight-display-regular);
}
.fw-ui-regular {
  font-weight: var(--font-weight-ui-regular);
}

/* ============================================================
   TEXT-COLOR UTILITIES
   6 classes: .text-{color-name}
   Source: semantic color tokens (mixed: text-*, accent-*, status-*)
   Note: .text-error → --color-status-error per spec (no text-error alias exists)
   ============================================================ */

.text-muted {
  color: var(--color-text-muted);
}
.text-subtle {
  color: var(--color-text-subtle);
}
.text-primary {
  color: var(--color-text-primary);
}
.text-error {
  color: var(--color-status-error);
}
.text-accent {
  color: var(--color-accent-primary);
}
.text-gold {
  color: var(--color-accent-gold);
}

/* Total: 169 spacing + 8 font-size + 6 font-weight + 6 text-color = 189 classes */
}

@layer utilities {
/* === components/row-between/row-between.css === */
/* ============================================================
   ROW-BETWEEN — flex row with space-between alignment
   Layer: utilities (assigned at concat time by css-build)

   Layout primitive for header rows: title on the left,
   action/meta on the right. Margin-bottom composes via
   utility classes.

   Placed in utilities layer (not components) because this
   expresses pure layout intent with no semantic component
   identity, analogous to .container. The utilities layer
   ensures it wins over component defaults without !important.

   Observed inline pattern (28× total, 13× with mb-xl):
     display:flex; align-items:center;
     justify-content:space-between; margin-bottom: var(--spacing-xl)
   ============================================================ */

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
}

@layer components {
/* === components/theme-toggle/theme-toggle.css === */
/* ============================================================
   THEME TOGGLE — sun/moon icon swap based on data-theme
   ============================================================ */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.theme-toggle__icon-sun { display: none; }
.theme-toggle__icon-moon { display: block; }
[data-theme="dark"] .theme-toggle__icon-sun { display: block; }
[data-theme="dark"] .theme-toggle__icon-moon { display: none; }
}

@layer components {
/* === components/back-to-top/back-to-top.css === */
/* ============================================================
   BACK-TO-TOP — wine bottle, fixed bottom-right
   Hidden until user scrolls past 400px (toggled via .is-visible).
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-md) var(--spacing-xs) var(--spacing-sm);
  background: var(--color-accent-primary);
  color: var(--color-accent-primary-text);
  border: 1px solid var(--color-accent-primary);
  border-radius: var(--radius-full, 999px);
  font-family: var(--font-ui);
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: var(--font-weight-ui-semibold, 600);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-floating, var(--shadow-modal));
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--duration-base) var(--easing-standard),
              transform var(--duration-base) var(--easing-standard),
              background var(--duration-fast) var(--easing-standard);
}
.back-to-top[hidden] { display: none; }
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--color-accent-primary-hover);
  border-color: var(--color-accent-primary-hover);
}
.back-to-top:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring), var(--shadow-floating, var(--shadow-modal));
}
.back-to-top__bottle {
  width: 22px;
  height: 30px;
  display: block;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.back-to-top__label {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .back-to-top {
    padding: var(--spacing-xs);
    gap: 0;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
  }
  .back-to-top__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .back-to-top__bottle {
    width: 24px;
    height: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
    transform: none;
  }
}
}

@layer components {
/* === components/home-hero/home-hero.css === */
/* ============================================================
   HOME HERO
   Full-bleed video hero for PUB_01_HOME.
   Independent BEM block — does not inherit from .landing-hero
   or .hero--editorial. Header overlays this section via fixed positioning.
   ============================================================ */

.home-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Horizontal band, not full-bleed — capped at ~680px tall */
  height: clamp(440px, 60vh, 680px);
  overflow: hidden;
}

/* Background video — fills entire hero, sits below scrim and content */
.home-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
}

/* Dark scrim — same gradient pattern as .landing-hero::before */
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--color-ink) 40%, transparent) 0%,
    color-mix(in srgb, var(--color-ink) 28%, transparent) 35%,
    color-mix(in srgb, var(--color-ink) 65%, transparent) 100%
  );
}

/* Hero body — single centered column above scrim */
.home-hero__body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-editorial-md) var(--spacing-lg) var(--spacing-editorial-lg);
  gap: var(--spacing-lg);
}

/* H1 headline — white, weighty display */
.home-hero__headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-display-medium);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-white);
  max-width: 24ch;
  text-shadow:
    0 2px 12px color-mix(in srgb, var(--color-ink) 55%, transparent),
    0 1px 3px color-mix(in srgb, var(--color-ink) 70%, transparent);
}

/* Subtitle — readable on dark scrim */
.home-hero__body-text {
  margin: 0;
  font-family: var(--font-ui);
  font-size: calc(var(--font-size-body) + 2px);
  line-height: var(--line-height-body);
  color: var(--color-paper-light);
  opacity: 0.95;
  max-width: 58ch;
  text-shadow:
    0 1px 6px color-mix(in srgb, var(--color-ink) 55%, transparent);
}

/* CTA row — primary + ghost-light secondary */
.home-hero__ctas {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  justify-content: center;
}

/* Secondary CTA over dark video — ghost light variant.
   Overrides .btn--secondary (wine-on-parchment) to be readable on dark scrim.
   Uses semi-transparent white border + paper-light text. */
.home-hero__cta-ghost-light {
  background: color-mix(in srgb, var(--color-white) 15%, transparent);
  color: var(--color-paper-light);
  border-color: color-mix(in srgb, var(--color-paper-light) 70%, transparent);
}
.home-hero__cta-ghost-light:hover {
  background: color-mix(in srgb, var(--color-white) 25%, transparent);
  color: var(--color-white);
  border-color: var(--color-paper-light);
  text-decoration: none;
}

/* ============================================================
   HOME HERO — TABLET (≥641px)
   ============================================================ */

/* ============================================================
   HOME HERO — DESKTOP (≥1025px)
   ============================================================ */

@media (min-width: 1025px) {
  .home-hero__headline {
    max-width: 22ch;
  }
}

/* ============================================================
   HOME HERO — REDUCED MOTION
   No video autoplay — poster stays. Scrim stays. No animation.
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .home-hero__video {
    display: none;
  }
}
}

@layer components {
/* === components/admin/admin-components.css === */
/* ============================================================
   ADM BATCH 1 — ADMIN-SPECIFIC COMPONENTS
   [AD-FLAGGED: anticipatory — interim styling, SYSTEM to formalize per gap §4]
   All values reference Direction C tokens; zero hardcoded colours/spacing.
   ============================================================ */

/* ── Admin nav: section headers (grouped 4-section nav, Decision A) ── */

.nav-section-header {
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-xs);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  /* text-muted (walnut, 5.13:1 on sidebar) — subtle/oak failed WCAG AA at 3.13:1 */
  color: var(--color-text-muted);
  user-select: none;
  margin-top: var(--spacing-sm);
}

.nav-item-indented {
  padding-left: var(--spacing-xl) !important;
}

/* Mobile nav: section headers + indented items */
.mobile-nav__section-header {
  padding: var(--spacing-md) var(--spacing-lg) var(--spacing-xs);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  /* text-muted (walnut ≥4.55:1 on paper-fold) — subtle/oak failed WCAG AA */
  color: var(--color-text-muted);
  background: var(--color-surface-sunk);
  border-bottom: 1px solid var(--color-border-default);
  margin-top: var(--spacing-xs);
}

.mobile-nav__indent {
  padding-left: calc(var(--spacing-lg) + var(--spacing-md)) !important;
}

/* ── Stat cards: 5-column variant (ADM_01) ── */
/* [AD-FLAGGED: anticipatory — interim styling, SYSTEM to formalize per gap §4] */
.stat-cards--5col {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 900px) {
  .stat-cards--5col {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .stat-cards--5col {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Sub-order status distribution strip (ADM_01) ── */
/* [AD-FLAGGED: anticipatory — interim styling, SYSTEM to formalize per gap §4] */
.stat-distribution-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.stat-distribution-strip__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-lg);
  border-right: 1px solid var(--color-border-default);
  gap: var(--spacing-xs);
  min-width: 0;
}

.stat-distribution-strip__item:last-child {
  border-right: none;
}

.stat-distribution-strip__count {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-display-medium);
  color: var(--color-text-primary);
  line-height: 1;
}

.stat-distribution-strip__count--ready {
  color: var(--color-status-info);
}

.stat-distribution-strip__count--shipped {
  color: var(--color-status-warning);
}

.stat-distribution-strip__count--delivered {
  color: var(--color-status-success);
}

.stat-distribution-strip__count--warn {
  color: var(--color-status-error);
}

.stat-distribution-strip__label {
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-medium);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .stat-distribution-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .stat-distribution-strip__item:nth-child(3) {
    border-right: none;
  }
}

/* ── Module nav grid (ADM_01) ── */
/* [AD-FLAGGED: anticipatory — interim styling, SYSTEM to formalize per gap §4] */
.module-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

@media (max-width: 700px) {
  .module-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.module-nav-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--spacing-lg);
  min-height: 80px;
  gap: var(--spacing-xs);
  text-align: left;
  text-decoration: none;
}

.module-nav-card__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-display-medium);
  color: inherit;
  line-height: var(--line-height-tight);
}

.module-nav-card__sub {
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-medium);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.module-nav-card.link-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── SLA dot indicator (ADM_05, ADM_12, WIN_03) ── */
/* [AD-FLAGGED: anticipatory — interim styling, SYSTEM to formalize per gap §4] */
.sla-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: var(--spacing-xs);
}

.sla-dot--ok {
  background: var(--color-status-pill-delivered-bg);
  border: 1.5px solid var(--color-status-pill-delivered-fg);
}

.sla-dot--warn {
  background: var(--color-status-pill-rejected-bg);
  border: 1.5px solid var(--color-status-error);
}

/* ── SLA at-risk row highlight ── */
/* [AD-FLAGGED: anticipatory — interim styling, SYSTEM to formalize per gap §4] */
.table-row--at-risk td {
  background: color-mix(in srgb, var(--color-status-pill-rejected-bg) 20%, var(--table-row-bg)) !important;
}

.sla-risk-label {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-status-error);
  white-space: nowrap;
}

/* ── Filter bar (ADM_04, ADM_06, ADM_08, ADM_10, ADM_12, ADM_13) ── */
/* [AD-FLAGGED: anticipatory — interim styling, SYSTEM to formalize per gap §4] */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--card-radius);
  padding: var(--spacing-md) var(--spacing-lg);
}

.filter-bar__controls {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-md);
  flex: 1;
  flex-wrap: wrap;
}

.filter-bar__group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  min-width: 140px;
}

.filter-bar__label {
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.filter-bar__select {
  min-width: 140px;
}

.filter-bar__select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.filter-bar__mock-note {
  font-size: var(--font-size-micro);
  /* text-muted (walnut) — subtle/oak failed WCAG AA at 3.6:1 on page bg */
  color: var(--color-text-muted);
  font-style: italic;
  margin: 0;
  white-space: nowrap;
  align-self: flex-end;
  padding-bottom: calc(var(--spacing-sm) / 2);
}

/* ── Checkbox group (ADM_03 review checklist, WIN_08 notification settings) ── */
/* [AD-FLAGGED: anticipatory — interim styling, SYSTEM to formalize per gap §4] */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.checkbox-group__item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  cursor: pointer;
  line-height: var(--line-height-body);
}

.checkbox-group__item:hover {
  color: var(--color-accent-primary);
}

/* ── Dark theme override — WCAG AA contrast fix
   accent-primary (#8B2D3D) on surface-primary (#1A1410) = 2.21:1 — FAIL (need ≥4.5:1 text).
   accent-link (#C4706C) on surface-primary (#1A1410) = 5.11:1 — PASS.
   ── */
[data-theme="dark"] .checkbox-group__item:hover { color: var(--color-accent-link); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .checkbox-group__item:hover { color: var(--color-accent-link); }
}

.checkbox-group__input {
  accent-color: var(--color-accent-primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

/* ── Dashboard responsive: hide side rail on mobile ── */

@media (max-width: 768px) {
  .dashboard__nav {
    display: none;
  }
  .dashboard__hamburger {
    display: flex;
  }
  .stat-distribution-strip {
    grid-template-columns: 1fr 1fr;
  }
  .stat-distribution-strip__item:nth-child(2),
  .stat-distribution-strip__item:nth-child(4) {
    border-right: none;
  }
}
}

@layer components {
/* === components/admin/admin-nav-icons.css === */
/* ============================================================
   ADMIN NAV ICONS — line-icon set (Feather/Lucide style)
   All icons are decorative (aria-hidden); stroke inherits
   from link color so contrast is covered by nav link tokens.
   [AD-FLAGGED: anticipatory — interim styling, SYSTEM to formalize]
   ============================================================ */

/* Nav link inner layout: icon + label side by side */
.dashboard__nav-links a,
.mobile-nav__inner a {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* Icon wrapper — fixed width keeps label column stable across links */
.nav-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--nav-icon-size, 18px);
  height: var(--nav-icon-size, 18px);
}

/* SVG icon — 18×18 at nav scale (vs 22px util-icon__svg) */
.nav-icon {
  width: var(--nav-icon-size, 18px);
  height: var(--nav-icon-size, 18px);
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  flex-shrink: 0;
}

/* nav-item-indented: icon sits inside the indent, preserve existing padding-left */
.nav-item-indented .nav-link__icon {
  /* no additional offset — icon absorbs into the existing indent */
  flex-shrink: 0;
}

/* mobile nav indent mirror */
.mobile-nav__indent .nav-link__icon {
  flex-shrink: 0;
}

/* Topbar theme toggle — scoped flex alignment within topbar */
.dashboard__theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  color: var(--color-text-primary);
  transition: background var(--duration-fast) var(--easing-standard),
              color var(--duration-fast) var(--easing-standard);
}
.dashboard__theme-toggle:hover {
  background: var(--color-surface-sunk);
  color: var(--color-accent-primary);
}

/* ── Dark theme override — WCAG AA graphical contrast fix
   accent-primary (#8B2D3D) on surface-sunk (#15110E) = 2.27:1 — FAIL (need ≥3:1 graphical).
   accent-link (#C4706C) on surface-sunk (#15110E) = 5.26:1 — PASS.
   ── */
[data-theme="dark"] .dashboard__theme-toggle:hover { color: var(--color-accent-link); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dashboard__theme-toggle:hover { color: var(--color-accent-link); }
}
}

@layer components {
/* === components/sla-dot/sla-dot.css === */
/* ============================================================
   SLA DOT — inline SLA status indicator
   3 states: ok / at-risk / breach
   Dark-safe: all colors are semantic tokens remapped by [data-theme="dark"].
   WCAG: color is never the sole signal — a text label (.sla-dot__label) is
         mandatory in every usage context.
   ============================================================ */

.sla-status {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  white-space: nowrap;
}

.sla-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  vertical-align: middle;
}

/* OK — SLA met: success green fill, subtle border for dark-mode pop */
.sla-dot--ok {
  background: var(--color-status-success);
  box-shadow: 0 0 0 1.5px var(--color-status-success);
}

/* At-risk — SLA approaching deadline: warning amber */
.sla-dot--at-risk {
  background: var(--color-status-warning);
  box-shadow: 0 0 0 1.5px var(--color-status-warning);
}

/* Breach — SLA deadline missed: error red */
.sla-dot--breach {
  background: var(--color-status-error);
  box-shadow: 0 0 0 1.5px var(--color-status-error);
}

/* Text labels — required, never suppress */
.sla-dot__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
  line-height: var(--line-height-compact);
}

/* At-risk label — text-grade amber for scannability + AA contrast.
   Uses --color-status-warning-text (not --color-status-warning) because
   600-weight 14px does not qualify as large text; 4.5:1 required.
   Light: #7A4E0E on parchment = 6.33:1. Dark: #D4924A on #1A1410 = 6.96:1. */
.sla-dot__label--at-risk {
  color: var(--color-status-warning-text);
  font-weight: var(--font-weight-ui-semibold);
}

/* Breach label — error red for urgency */
.sla-dot__label--breach {
  color: var(--color-status-error);
  font-weight: var(--font-weight-ui-semibold);
}

@media (prefers-reduced-motion: reduce) {
  .sla-dot {
    transition: none;
  }
}
}

@layer components {
/* === components/kyc-checklist/kyc-checklist.css === */
/* ============================================================
   KYC CHECKLIST — dated milestone tracker (done / pending)
   Consumer: ADM_11_WINERY_DETAIL KYC tab
   Dark-safe: semantic tokens only.
   ============================================================ */

.kyc-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kyc-checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--color-border-default);
  position: relative;
}

.kyc-checklist__item:last-child {
  border-bottom: none;
}

/* Icon column — fixed width keeps labels aligned */
.kyc-checklist__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  line-height: 1;
}

/* Done state: success-green circle with checkmark */
.kyc-checklist__item--done .kyc-checklist__icon {
  background: var(--color-status-success);
  color: var(--color-text-on-accent);
}

/* Pending state: muted circle outline */
.kyc-checklist__item--pending .kyc-checklist__icon {
  background: var(--color-surface-sunk);
  color: var(--color-text-subtle);
  border: 1.5px solid var(--color-border-default);
}

/* Content column */
.kyc-checklist__content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  flex: 1;
  min-width: 0;
}

/* Step label */
.kyc-checklist__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
  line-height: var(--line-height-compact);
}

.kyc-checklist__item--pending .kyc-checklist__label {
  color: var(--color-text-muted);
}

/* Date span */
.kyc-checklist__date {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-regular);
  color: var(--color-text-muted);
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-compact);
}

.kyc-checklist__date--pending {
  color: var(--color-text-subtle);
  font-style: italic;
}
}

@layer components {
/* === components/bar-chart/bar-chart.css === */
/* ============================================================
   BAR CHART — CSS-only mock. No JS.
   Bar height is driven by --bar-height custom property set
   inline on each .bar-chart__bar (e.g. style="--bar-height: 72%").
   Consumer: WIN_09_ANALYTICS — sales by month.
   Dark-safe: semantic tokens only.
   ============================================================ */

.bar-chart {
  margin: 0;
  padding: var(--spacing-lg) 0;
  border: none;
}

/* Column grid — equal-width, flex-gap driven */
.bar-chart__bars {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-md);
  height: 180px;           /* Fixed track height for all columns */
  padding-bottom: var(--spacing-xl); /* room for labels */
  border-bottom: 1px solid var(--color-border-default);
  position: relative;
}

/* Single column: value on top, bar in middle, label below */
.bar-chart__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  height: 100%;
  gap: var(--spacing-xs);
  position: relative;
}

/* Value label above bar */
.bar-chart__value {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-muted);
  white-space: nowrap;
  line-height: 1;
  /* Positioned above bar; sits at column top via flex column layout */
  order: -1;
  margin-bottom: var(--spacing-xs);
}

/* Bar: height driven by --bar-height CSS custom property */
.bar-chart__bar {
  width: 100%;
  max-width: 48px;
  /* --bar-height must be set inline; fallback 0% prevents render error */
  height: var(--bar-height, 0%);
  background: var(--color-accent-primary);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height var(--motion-duration-base) var(--motion-easing-standard);
  flex-shrink: 0;
}

/* Peak bar — highest value, uses gold accent per Direction C editorial tone */
.bar-chart__bar--peak {
  background: var(--color-accent-primary);
  box-shadow: inset 0 0 0 1.5px var(--color-accent-gold);
}

/* Month label below bar */
.bar-chart__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-muted); /* D4: was --color-text-subtle (~3.1:1); muted passes 4.5:1 both modes */
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  text-align: center;
  position: absolute;
  bottom: calc(-1 * var(--spacing-xl));
  white-space: nowrap;
}

/* Mobile: shrink gaps so 6 columns fit within 375px viewport without scroll */
@media (max-width: 640px) {
  .bar-chart__bars {
    gap: var(--spacing-xs);
  }

  .bar-chart__value {
    white-space: normal;
    text-align: center;
    word-break: break-word;
  }
}

/* Reduced motion: disable height transition */
@media (prefers-reduced-motion: reduce) {
  .bar-chart__bar {
    transition: none;
  }
}
}

@layer components {
/* === components/suborder-timeline/suborder-timeline.css === */
/* ============================================================
   SUBORDER TIMELINE — 4-step horizontal fulfillment tracker
   States: completed / current / pending
   Consumer: WIN_05_ORDER_DETAIL, optionally ADM_05
   Dark-safe: semantic tokens only.
   ============================================================ */

.suborder-timeline {
  display: flex;
  align-items: flex-start;
  width: 100%;
  gap: 0;
  padding: var(--spacing-lg) 0;
  overflow-x: auto;
}

/* ── Step ── */
.suborder-timeline__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 80px;
  position: relative;
  text-align: center;
}

/* ── Dot + connectors row ── */
.suborder-timeline__dot-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: var(--spacing-sm);
}

/* Connector line — half-width on each side of the dot */
.suborder-timeline__connector {
  flex: 1;
  height: 2px;
  background: var(--color-border-default);
}

/* First step: no left connector; last step: no right connector */
.suborder-timeline__connector--left:first-child {
  background: transparent;
}
.suborder-timeline__connector--last {
  background: transparent;
}

/* Filled connector (steps leading to current) */
.suborder-timeline__connector--filled {
  background: var(--color-accent-primary);
}

/* ── Dot ── */
.suborder-timeline__dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border-default);
  background: var(--color-surface-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-surface-primary);
  z-index: var(--z-raised);
  position: relative;
  transition:
    background var(--motion-duration-fast),
    border-color var(--motion-duration-fast);
}

/* Completed: filled accent dot with checkmark */
.suborder-timeline__step--completed .suborder-timeline__dot {
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  color: var(--color-text-on-accent);
}

/* Current: accent ring, white fill with accent dot inside */
.suborder-timeline__step--current .suborder-timeline__dot {
  background: var(--color-surface-primary);
  border-color: var(--color-accent-primary);
  /* Inner filled dot via box-shadow ring */
  box-shadow: inset 0 0 0 4px var(--color-accent-primary);
}

/* Pending: muted border, surface background, empty */
.suborder-timeline__step--pending .suborder-timeline__dot {
  background: var(--color-surface-sunk);
  border-color: var(--color-border-default);
}

/* ── Info block ── */
.suborder-timeline__info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  align-items: center;
}

.suborder-timeline__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
  line-height: var(--line-height-tight);
  text-align: center;
}

.suborder-timeline__step--pending .suborder-timeline__label {
  color: var(--color-text-muted);
}

.suborder-timeline__date {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-subtle);
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-compact);
}

/* ── Responsive: stack vertically below 640px ── */
@media (max-width: 640px) {
  .suborder-timeline {
    flex-direction: column;
    gap: 0;
    padding: var(--spacing-md) 0;
  }

  .suborder-timeline__step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    width: 100%;
  }

  .suborder-timeline__dot-wrap {
    flex-direction: column;
    width: auto;
    margin-bottom: 0;
    margin-right: 0;
  }

  .suborder-timeline__connector {
    width: 2px;
    height: var(--spacing-lg);
    flex: none;
  }

  .suborder-timeline__connector--last {
    background: transparent;
    height: 0;
  }

  .suborder-timeline__info {
    align-items: flex-start;
    padding-top: var(--spacing-xs);
  }
}

@media (prefers-reduced-motion: reduce) {
  .suborder-timeline__dot {
    transition: none;
  }
}
}

@layer components {
/* === components/claim-evidence/claim-evidence.css === */
/* ============================================================
   CLAIM EVIDENCE — image thumbnail grid + buyer description block
   Consumer: ADM_07_CLAIM_DETAIL
   Built from scratch in Direction C. No Natiwine model used.
   Dark-safe: semantic tokens only.
   ============================================================ */

.claim-evidence {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* Section heading */
.claim-evidence__heading {
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-display-medium);
  color: var(--color-text-primary);
  margin: 0;
  line-height: var(--line-height-tight);
}

/* ── Buyer description block ── */
.claim-evidence__description {
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  padding: var(--spacing-md) var(--spacing-lg);
}

.claim-evidence__description-label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--spacing-sm);
}

.claim-evidence__description-text {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  line-height: var(--line-height-editorial);
  margin: 0;
}

/* ── Image thumbnail grid ── */
.claim-evidence__images {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

/* Single thumbnail */
.claim-evidence__thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  margin: 0;
  width: 120px;
  flex-shrink: 0;
}

/* Loaded image */
.claim-evidence__thumb-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-default);
  display: block;
  background: var(--color-surface-sunk);
}

/* Empty / placeholder thumbnail */
.claim-evidence__thumb--empty {
  width: 120px;
  height: 120px;
  background: var(--color-surface-sunk);
  border: 1.5px dashed var(--color-border-default);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  cursor: default;
}

.claim-evidence__thumb-placeholder {
  font-size: var(--font-size-h4);
  color: var(--color-text-subtle);
  line-height: 1;
}

.claim-evidence__thumb-caption {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1;
}

.claim-evidence__thumb-caption--muted {
  color: var(--color-text-subtle);
}

/* ── Meta row ── */
.claim-evidence__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border-default);
}

.claim-evidence__meta-item {
  display: flex;
  gap: var(--spacing-xs);
  align-items: baseline;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
}

.claim-evidence__meta-label {
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.claim-evidence__meta-value {
  font-weight: var(--font-weight-ui-regular);
  color: var(--color-text-primary);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .claim-evidence__images {
    gap: var(--spacing-sm);
  }
  .claim-evidence__thumb,
  .claim-evidence__thumb-img,
  .claim-evidence__thumb--empty {
    width: 96px;
    height: 96px;
  }
}
}

@layer components {
/* === components/filter-bar/filter-bar.css === */
/* ============================================================
   FILTER BAR — horizontal mock filter row
   All selects are disabled (prototype mock convention).
   Reuses filter-chip/filter-sidebar token vocabulary:
   --color-surface-alt, --color-border-default, --color-text-muted,
   --color-accent-primary, --color-surface-sunk.
   Consumers: ADM_04, ADM_06, ADM_08, ADM_10, ADM_12, ADM_13.
   Dark-safe: semantic tokens only.
   ============================================================ */

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

/* Controls row — all filter groups side by side */
.filter-bar__controls {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-md);
  flex: 1;
  flex-wrap: wrap;
}

/* Single filter group: label stacked above select */
.filter-bar__group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  min-width: 140px;
}

/* Filter label — all-caps metadata style, consistent with filter-sidebar */
.filter-bar__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Filter select — reuses form-select base, width at min 140px */
.filter-bar__select {
  min-width: 140px;
  /* form-select styles from form-field.css apply (display, padding, font, border, etc.) */
}

/* Disabled state — prototype mock signal */
.filter-bar__select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--color-surface-sunk);
  border-color: var(--color-border-default);
}

/* Mock note — italic muted label, right-aligned, aligns with select bottom edge */
.filter-bar__mock-note {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
  font-style: italic;
  margin: 0;
  white-space: nowrap;
  align-self: flex-end;
  padding-bottom: calc(var(--spacing-sm-plus) + 1px); /* aligns baseline with select */
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  .filter-bar__controls {
    width: 100%;
  }
  .filter-bar__group {
    min-width: 0;
    width: 100%;
  }
  .filter-bar__select {
    width: 100%;
    min-width: 0;
  }
  .filter-bar__mock-note {
    padding-bottom: 0;
    align-self: flex-start;
  }
}
}

@layer components {
/* === components/stat-summary-strip/stat-summary-strip.css === */
/* ============================================================
   STAT SUMMARY STRIP — 5-column status distribution strip
   Two display modes:
     A) .stat-cards--5col modifier extends existing .stat-cards grid
        (dashboard-shell.css defines .stat-cards + .stat-card)
     B) .stat-summary-strip — inline divider-separated strip variant
        for use inside an existing card (.card) body
   Both modes use semantic value-color modifiers on the value element.

   NOTE: .stat-cards--5col is also declared in admin-components.css
   (anticipatory stub). This file formalizes the value-color modifiers
   and adds the .stat-summary-strip Mode B variant.
   Dark-safe: semantic tokens only.
   ============================================================ */

/* ── Mode A: Value color modifiers on .stat-card__value ── */
/* Applied on top of .stat-card__value (defined in dashboard-shell.css) */

.stat-card__value--success {
  color: var(--color-status-success);
}
.stat-card__value--warning {
  color: var(--color-status-warning);
}
.stat-card__value--error {
  color: var(--color-status-error);
}
.stat-card__value--info {
  color: var(--color-status-info);
}

/* ── Mode B: Inline divider-separated strip ── */
/* Compact variant intended for placement inside a .card body */

.stat-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.stat-summary-strip__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-sm-plus);
  border-right: 1px solid var(--color-border-default);
  gap: var(--spacing-xs);
  min-width: 0;
}

.stat-summary-strip__item:last-child {
  border-right: none;
}

.stat-summary-strip__value {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-display-medium);
  color: var(--color-text-primary);
  line-height: 1;
}

/* Value color modifiers for strip mode.
   Warning uses --color-status-warning-text (not --color-status-warning):
   font-size-h3 clamp floor is 1.25rem (20px) at weight 500 — does not qualify as
   large text (needs >=24px at non-bold weight). 4.5:1 required; amber-bark #B8782A
   is only 3.21:1 on parchment. warning-text provides 6.33:1 light / 6.96:1 dark. */
.stat-summary-strip__value--success { color: var(--color-status-success); }
.stat-summary-strip__value--warning { color: var(--color-status-warning-text); }
.stat-summary-strip__value--error   { color: var(--color-status-error); }
.stat-summary-strip__value--info    { color: var(--color-status-info); }

.stat-summary-strip__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-medium);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
  white-space: nowrap;
}

/* ── Responsive: Mode B strip ── */
@media (max-width: 900px) {
  .stat-summary-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .stat-summary-strip__item:nth-child(3) {
    border-right: none;
  }
}

@media (max-width: 600px) {
  .stat-summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-summary-strip__item:nth-child(2) {
    border-right: none;
  }
  .stat-summary-strip__item:nth-child(4) {
    border-right: none;
  }
}

/* Mode A grid is governed by .stat-cards--5col in admin-components.css
   (breakpoints at 900px → 3col, 600px → 2col) */
}

@layer components {
/* === components/checkbox-checklist/checkbox-checklist.css === */
/* ============================================================
   CHECKBOX CHECKLIST — admin review checklist
   Extends form-field.css (form-group, form-label, form-input tokens).
   Label-wrapping pattern: <label> wraps <input type="checkbox"> + text span.
   Consumer: ADM_03_REVIEW_DETAIL, WIN_08_WINERY_PROFILE
   Dark-safe: semantic tokens only.
   ============================================================ */

/* ── Fieldset / legend ── */

.checkbox-checklist {
  border: none;
  padding: 0;
  margin: 0;
}

.checkbox-checklist__legend {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
  padding: 0;
  margin-bottom: var(--spacing-md);
  /* legend has a browser default display:block rendering quirk in grid; reset: */
  float: left;
  width: 100%;
}

/* Clear the float after legend for proper fieldset layout */
.checkbox-checklist__legend + * {
  clear: both;
}

/* ── List reset ── */

.checkbox-checklist__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm-plus);
}

/* ── Item ── */

.checkbox-checklist__item {
  /* No extra styles needed — layout is on the label */
}

/* ── Label (wraps checkbox + text) ── */

.checkbox-checklist__label {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  cursor: pointer;
  /* Minimum touch target height */
  min-height: 44px;
  align-items: center;
}

.checkbox-checklist__label:hover .checkbox-checklist__text {
  color: var(--color-accent-primary);
}

/* ── Checkbox input ── */

.checkbox-checklist__input {
  /* Sizing and appearance */
  width: 16px;
  height: 16px;
  min-width: 16px;
  /* Accent color picks up the primary accent — works in all modern browsers */
  accent-color: var(--color-accent-primary);
  cursor: pointer;
  margin: 0;
  /* Vertically center with multi-line text */
  flex-shrink: 0;
  margin-top: 2px;
}

/* Focus: native focus ring is preserved; add our token ring as enhancement */
.checkbox-checklist__input:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
  border-radius: var(--radius-xs);
}

/* ── Label text ── */

.checkbox-checklist__text {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-regular);
  color: var(--color-text-primary);
  line-height: var(--line-height-body);
  transition: color var(--motion-duration-fast);
}

/* Checked state: these are admin VERIFICATIONS, not to-do items — a checked
   item reads as "confirmed", so it stays fully legible (no strikethrough,
   no muting). The checkbox control itself carries the verified state. */
.checkbox-checklist__input:checked + .checkbox-checklist__text {
  color: var(--color-text-primary);
}

/* Disabled state */
.checkbox-checklist__input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.checkbox-checklist__input:disabled + .checkbox-checklist__text {
  color: var(--color-text-subtle);
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .checkbox-checklist__text {
    transition: none;
  }
}
}

@layer components {
/* === components/detail-grid/detail-grid.css === */
/* ============================================================
   DETAIL GRID — dense label/value grid
   UNIFICATION: Extends .spec-list (split-layout.css), does NOT
   create a new component class. .spec-list is the canonical
   label/value pattern in v2. This file adds:
     1. .spec-list--dense — 2-column auto-fill for wider containers
        (ADM_11 Financial tab, ADM_11 Contact tab)
     2. dt / dd typography tokens (supplements split-layout.css
        which only sets the grid, not the text styles)
   Dark-safe: semantic tokens only.
   ============================================================ */

/* ── Typography on spec-list (supplements split-layout.css grid) ── */
/* Applied universally to .spec-list — these rules do not conflict
   with existing usage (ADM_03, ADM_05 had no explicit dt/dd styles). */

.spec-list dt {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-muted);
  line-height: var(--line-height-compact);
  /* align label to top of dd when dd wraps */
  align-self: start;
}

.spec-list dd {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-regular);
  color: var(--color-text-primary);
  line-height: var(--line-height-compact);
  margin: 0;
}

/* Inline links in dd values */
.spec-list dd a {
  color: var(--color-text-link);
  text-decoration: none;
}
.spec-list dd a:hover {
  text-decoration: underline;
}

/* ── Dense modifier — 2-column auto-fill for wider containers ── */
/* Switches to a 2-across layout: each pair (dt+dd) sits on one row,
   two such rows side by side. Achieved via display:contents on items
   is not viable in CSS; instead, use a repeat(auto-fill) column count
   that makes room for two label-value pairs.
   Approach: grid-template-columns: repeat(2, minmax(80px,max-content) minmax(0,1fr))
   gives: label | value | label | value in a 4-track grid. */

.spec-list--dense {
  grid-template-columns: repeat(2, minmax(80px, max-content) minmax(0, 1fr));
  column-gap: var(--spacing-xl);
  row-gap: var(--spacing-sm);
}

/* Collapse back to single column below 600px */
@media (max-width: 600px) {
  .spec-list--dense {
    grid-template-columns: minmax(80px, max-content) minmax(0, 1fr);
    column-gap: var(--spacing-lg);
    row-gap: var(--spacing-xs);
  }
}
}

@layer components {
/* === components/tab-nav/tab-nav.css === */
/* ============================================================
   TAB NAV — page-level anchor-scroll tab navigation
   Extends .tabs (tabs.css) — adds anchor-scroll variant behavior.
   The base .tabs strip, .tab item, and .tab--active indicator are
   inherited from tabs.css. This file adds:
     1. Focus + hover rules for <a> anchor tabs (keyboard nav)
     2. :target pseudo-class fallback for no-JS environments
     3. .tab-nav__panel section layout
   Consumer: ADM_11_WINERY_DETAIL (6-tab cockpit)
   Dark-safe: semantic tokens only. All base tokens from tabs.css.
   ============================================================ */

/* ── .tab when used as <a> anchor ── */
/* tabs.css already sets text-decoration: none and color transitions.
   These rules ensure anchor tabs behave identically to button tabs. */

.tab-nav .tab {
  /* Keyboard focus: visible ring on the tab itself */
  border-radius: var(--radius-button) var(--radius-button) 0 0;
}

.tab-nav .tab:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
  border-radius: var(--radius-button) var(--radius-button) 0 0;
}

/* Active state via aria-current="page" (server-rendered) */
.tab-nav .tab[aria-current="page"] {
  color: var(--color-accent-primary);
  border-bottom-color: var(--color-accent-primary);
}

/* ── Dark theme override — WCAG AA contrast fix
   accent-primary (#8B2D3D) on surface-primary (#1A1410) = 2.21:1 — FAIL (need ≥4.5:1 text).
   accent-link (#C4706C) on surface-primary (#1A1410) = 5.11:1 — PASS.
   Note: base tabs.css [data-theme="dark"] overrides cover .tab:hover and .tab--active.
         This rule covers the tab-nav-specific aria-current="page" selector. ── */
[data-theme="dark"] .tab-nav .tab[aria-current="page"] {
  color: var(--color-accent-link);
  border-bottom-color: var(--color-accent-link);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tab-nav .tab[aria-current="page"] {
    color: var(--color-accent-link);
    border-bottom-color: var(--color-accent-link);
  }
}

/* :target fallback — when user navigates to #section via anchor link,
   the corresponding tab activates if the href matches the :target section.
   This requires a CSS sibling approach (tabs precede panels).
   Note: full :target highlight requires panels to be siblings of the nav;
   in a typical template they are, but JS class management is preferred. */

/* Panel sections */
.tab-nav__panel {
  padding-top: var(--spacing-xl);
}

/* :target scroll-margin — ensures the section heading is not hidden
   under a sticky top bar when anchor-scrolling */
.tab-nav__panel:target {
  scroll-margin-top: calc(var(--nav-height) + var(--spacing-md));
}
}

@layer components {
/* === components/promo-components/promo-components.css === */
/* ============================================================
   PROMOTIONS / CAMPAIGNS COMPONENTS
   quota-meter + promo-price-pair
   Semantic tokens only — no primitives. Dark-mode safe.
   Added: 2026-06-11 (BUILD — promotions feature)
   ============================================================ */

/* ----------------------------------------------------------
   QUOTA METER
   role="meter" ratio bar showing N/MAX active campaigns.
   .quota-meter--full triggers danger state when N = MAX.
   ---------------------------------------------------------- */

.quota-meter {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md, 6px);
}

.quota-meter__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.quota-meter__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
}

.quota-meter__count {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.quota-meter--full .quota-meter__count {
  color: var(--color-status-danger, var(--color-accent-danger));
}

.quota-meter__track {
  width: 100%;
  height: 6px;
  background: var(--color-surface-sunk);
  border-radius: 3px;
  overflow: hidden;
}

.quota-meter__fill {
  height: 100%;
  background: var(--color-accent-primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.quota-meter--full .quota-meter__fill {
  background: var(--color-status-danger, var(--color-accent-danger));
}

.quota-meter__note {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
}

.quota-meter--full .quota-meter__note {
  color: var(--color-status-danger, var(--color-accent-danger));
}

@media (prefers-reduced-motion: reduce) {
  .quota-meter__fill {
    transition: none;
  }
}

/* ----------------------------------------------------------
   PROMO PRICE PAIR
   Two-cell layout: read-only standard price <output> + editable
   promo <input> + live discount badge.
   ---------------------------------------------------------- */

.promo-price-pair {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  padding: var(--spacing-sm) 0;
}

.promo-price-pair__standard {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  min-width: 120px;
}

.promo-price-pair__standard-label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
}

.promo-price-pair__standard output {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
  padding: var(--spacing-xs) 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.promo-price-pair__input-cell {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  min-width: 140px;
}

.promo-price-pair__input-label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
}

.promo-price-pair__input-cell input {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm, 4px);
  padding: var(--spacing-xs) var(--spacing-sm);
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
}

.promo-price-pair__input-cell input:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 1px;
  border-color: var(--color-border-strong);
}

.promo-price-pair__input-cell input[aria-invalid="true"] {
  border-color: var(--color-status-danger, var(--color-accent-danger));
}

/* Discount badge — valid/invalid states */
.discount-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 2px var(--spacing-xs);
  border-radius: var(--radius-sm, 4px);
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-medium);
  transition: background 0.15s, color 0.15s;
}

.discount-badge--valid {
  background: var(--color-status-success-subtle, var(--color-surface-alt));
  color: var(--color-status-success);
  border: 1px solid var(--color-status-success);
}

.discount-badge--invalid {
  background: var(--color-status-danger-subtle, var(--color-surface-alt));
  color: var(--color-status-danger, var(--color-accent-danger));
  border: 1px solid var(--color-status-danger, var(--color-accent-danger));
}

/* Inline validation message below the input */
.promo-price-pair__error {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-status-danger, var(--color-accent-danger));
  display: none;
}

.promo-price-pair__error.is-visible {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .discount-badge {
    transition: none;
  }
}
}

@layer components {
/* === components/social-walk/social-walk.css === */
/* Social Walk components (Wave-5): checkpoint strip, material cards, feedback panel, project form, quota meter. Token-referenced only — zero hardcoded values. */

/* ============================================================
   STATUS PILL VARIANTS — Social Walk lifecycle states
   All use semantic token bg/fg pairs. No hardcoded color.
   ============================================================ */

/* Ново (gray/neutral — material not yet acted on) */
.status-pill--sw-novo {
  background: var(--color-surface-sunk);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-default);
}

/* Постнат (green/success — material marked as posted by winery) */
.status-pill--sw-postnat {
  background: var(--color-status-pill-published-bg);
  color: var(--color-status-pill-published-fg);
}

/* Project: В процес (blue/info) */
.status-pill--sw-project-progress {
  background: var(--color-status-pill-pending-bg);
  color: var(--color-status-pill-pending-fg);
}

/* Project: Готов (green/success) */
.status-pill--sw-project-ready {
  background: var(--color-status-pill-published-bg);
  color: var(--color-status-pill-published-fg);
}

/* ADM_23: Подготвя се (gray) */
.status-pill--sw-adm-preparing {
  background: var(--color-surface-sunk);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-default);
}

/* ADM_23: Изпратен (blue/info) */
.status-pill--sw-adm-sent {
  background: var(--color-status-pill-pending-bg);
  color: var(--color-status-pill-pending-fg);
}

/* ADM_23: Постнат by winery (green) */
.status-pill--sw-adm-postnat {
  background: var(--color-status-pill-published-bg);
  color: var(--color-status-pill-published-fg);
}

/* ADM_23: Quota В норма (green) */
.status-pill--sw-quota-ok {
  background: var(--color-status-pill-published-bg);
  color: var(--color-status-pill-published-fg);
}

/* ADM_23: Quota Приближава лимита (amber/warning) */
.status-pill--sw-quota-warn {
  background: var(--color-status-pill-review-bg);
  color: var(--color-status-pill-review-fg);
}

/* ADM_23: Quota Надхвърля квотата (red/error) */
.status-pill--sw-quota-over {
  background: var(--color-status-pill-rejected-bg);
  color: var(--color-status-pill-rejected-fg);
}

/* ============================================================
   PAGE HEADER — Social Walk branded header
   ============================================================ */

.sw-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.sw-page-header__title-block {}

.sw-page-header__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-display-medium);
  color: var(--color-text-primary);
  letter-spacing: var(--letter-spacing-tight);
  margin: 0 0 var(--spacing-xs) 0;
}

.sw-page-header__tagline {
  font-family: var(--font-display);
  font-size: var(--font-size-small);
  font-style: italic;
  color: var(--color-text-muted);
  margin: 0;
}

.sw-page-header__period {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  padding-top: var(--spacing-sm);
  white-space: nowrap;
}

/* ============================================================
   TAG FILTER BAR — segmented toggle (Всички / За винарната / За виното)
   ============================================================ */

.sw-tag-filter {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
}

.sw-tag-filter__btn {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-default);
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-regular);
  cursor: pointer;
  text-decoration: none;
  min-height: 44px; /* 44px touch target (F4: was 36px) */
  transition: background var(--duration-fast) var(--easing-standard),
              color var(--duration-fast) var(--easing-standard),
              border-color var(--duration-fast) var(--easing-standard);
}

.sw-tag-filter__btn:hover {
  background: var(--color-surface-sunk);
  border-color: var(--color-border-strong);
  color: var(--color-accent-primary);
}

.sw-tag-filter__btn--active {
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  color: var(--color-text-on-accent);
  font-weight: var(--font-weight-ui-medium);
}

.sw-tag-filter__btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  .sw-tag-filter__btn { transition: none; }
}

/* ============================================================
   CHECKPOINT STRIP — monthly path / progress
   ============================================================ */

.sw-checkpoint-strip {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.sw-checkpoint-strip__heading {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-muted);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  margin: 0 0 var(--spacing-lg) 0;
}

.sw-checkpoint-strip__track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--spacing-sm);
}

/* Hide scrollbar on webkit but keep scroll functionality */
.sw-checkpoint-strip__track::-webkit-scrollbar {
  height: 4px;
}
.sw-checkpoint-strip__track::-webkit-scrollbar-track {
  background: var(--color-surface-sunk);
  border-radius: var(--radius-full);
}
.sw-checkpoint-strip__track::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
}

.sw-checkpoint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  flex: 1;
  min-width: 100px;
  position: relative;
}

/* Connector line between checkpoints */
.sw-checkpoint:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 21px; /* center of 44px station */
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 2px;
  background: var(--color-border-default);
  z-index: 0;
}

.sw-checkpoint--completed:not(:last-child)::after {
  background: var(--color-status-success);
}

.sw-checkpoint__station {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border-default);
  background: var(--color-surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transition: border-color var(--duration-fast) var(--easing-standard),
              background var(--duration-fast) var(--easing-standard);
}

.sw-checkpoint--completed .sw-checkpoint__station {
  border-color: var(--color-status-success);
  background: var(--color-status-success);
  color: var(--color-text-on-accent);
}

.sw-checkpoint--current .sw-checkpoint__station {
  border-color: var(--color-accent-primary);
  border-width: 3px;
  background: var(--color-surface-raised);
  color: var(--color-accent-primary);
}

.sw-checkpoint--upcoming .sw-checkpoint__station {
  border-color: var(--color-border-default);
  background: var(--color-surface-primary);
  color: var(--color-text-muted);
}

.sw-checkpoint__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
  text-align: center;
  line-height: var(--line-height-compact);
  max-width: 90px;
}

.sw-checkpoint--completed .sw-checkpoint__label {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-ui-medium);
}

.sw-checkpoint--current .sw-checkpoint__label {
  color: var(--color-accent-primary);
  font-weight: var(--font-weight-ui-medium);
}

.sw-checkpoint-strip__progress {
  margin-top: var(--spacing-md);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.sw-checkpoint-strip__progress strong {
  color: var(--color-text-primary);
}

@media (prefers-reduced-motion: reduce) {
  .sw-checkpoint__station { transition: none; }
}

/* ============================================================
   SECTION HEADER — "От нас за вас", "Вашите проекти"
   ============================================================ */

.sw-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.sw-section-title {
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-display-medium);
  color: var(--color-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.sw-section-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  background: var(--color-accent-primary);
  color: var(--color-text-on-accent);
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  letter-spacing: var(--letter-spacing-allcaps);
}

/* ============================================================
   MATERIAL CARD GRID
   ============================================================ */

.sw-material-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
}

@media (max-width: 768px) {
  .sw-material-grid {
    grid-template-columns: 1fr;
  }
}

.sw-material-card {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 1:1 social preview thumbnail */
.sw-material-card__thumb {
  aspect-ratio: 1 / 1;
  background: var(--color-surface-sunk);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sw-material-card__thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  text-align: center;
  padding: var(--spacing-md);
}

.sw-material-card__network-badge {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.sw-material-card__body {
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.sw-material-card__meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.sw-material-card__title {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
  margin: 0;
  line-height: var(--line-height-compact);
}

.sw-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Inline reactions row (👍/👎 quick-react) */
.sw-material-card__reactions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--color-border-default);
  flex-wrap: wrap;
}

.sw-react-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-default);
  background: var(--color-surface-raised);
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  cursor: pointer;
  min-height: 44px; /* 44px primary touch target (F4: was 32px) */
  transition: background var(--duration-fast) var(--easing-standard),
              border-color var(--duration-fast) var(--easing-standard);
}

.sw-react-btn:hover {
  background: var(--color-surface-sunk);
  border-color: var(--color-border-strong);
}

.sw-react-btn--active-up {
  background: color-mix(in srgb, var(--color-status-success) 12%, var(--color-surface-raised));
  border-color: var(--color-status-success);
  color: var(--color-status-success);
}

.sw-react-btn--active-down {
  background: color-mix(in srgb, var(--color-status-error) 12%, var(--color-surface-raised));
  border-color: var(--color-status-error);
  color: var(--color-status-error);
}

.sw-react-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
}

.sw-material-card__actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: var(--spacing-sm);
}

@media (prefers-reduced-motion: reduce) {
  .sw-react-btn { transition: none; }
}

/* ============================================================
   DASHED EMPTY-STATE CARD
   ============================================================ */

.sw-empty-card {
  background: var(--color-surface-primary);
  border: 2px dashed var(--color-border-default);
  border-radius: var(--radius-card);
  padding: var(--spacing-2xl) var(--spacing-xl);
  text-align: center;
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  line-height: var(--line-height-editorial);
}

.sw-empty-card__title {
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-sm) 0;
  font-size: var(--font-size-body);
}

/* ============================================================
   PLAN GATE CARD (FREE tier)
   Mirrors WIN_11 plan-gate pattern.
   ============================================================ */

.sw-plan-gate {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  padding: var(--spacing-2xl) var(--spacing-xl);
  text-align: center;
  max-width: 540px;
}

.sw-plan-gate__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-md) 0;
}

.sw-plan-gate__body {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0 0 var(--spacing-lg) 0;
  line-height: var(--line-height-editorial);
}

/* ============================================================
   QUOTA METER
   ============================================================ */

.sw-quota-meter {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

.sw-quota-meter__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.sw-quota-meter__bar-wrap {
  flex: 1;
  min-width: 100px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-surface-sunk);
  overflow: hidden;
}

.sw-quota-meter__bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-accent-primary);
  transition: width var(--duration-base) var(--easing-standard);
}

.sw-quota-meter__bar-fill--warn {
  background: var(--color-status-warning);
}

.sw-quota-meter__bar-fill--full {
  background: var(--color-status-error);
}

.sw-quota-meter__count {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
}

.sw-quota-exhausted-callout {
  padding: var(--spacing-sm) var(--spacing-md);
  background: color-mix(in srgb, var(--color-status-warning) 10%, var(--color-surface-raised));
  border: 1px solid var(--color-status-warning);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-status-warning-text);
  margin-bottom: var(--spacing-lg);
}

@media (prefers-reduced-motion: reduce) {
  .sw-quota-meter__bar-fill { transition: none; }
}

/* ============================================================
   PROJECT CARDS (Вашите проекти)
   ============================================================ */

.sw-project-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.sw-project-card {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.sw-project-card__info {
  flex: 1;
  min-width: 0;
}

.sw-project-card__name {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-xs) 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sw-project-card__template {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
  margin: 0;
}

.sw-project-card__meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ============================================================
   FOOTER TEASER (completion state)
   ============================================================ */

.sw-footer-teaser {
  background: color-mix(in srgb, var(--color-status-success) 8%, var(--color-surface-raised));
  border: 1px solid var(--color-status-success);
  border-radius: var(--radius-card);
  padding: var(--spacing-lg) var(--spacing-xl);
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  margin-top: var(--spacing-xl);
}

/* ============================================================
   WIN_21 MATERIAL DETAIL — left preview + right feedback panel
   ============================================================ */

.sw-preview-notice {
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.sw-preview-panel {
  aspect-ratio: 1 / 1;
  background: var(--color-surface-sunk);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: var(--spacing-lg);
}

.sw-preview-panel__inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  padding: var(--spacing-xl);
  text-align: center;
}

.sw-network-label-bar {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: var(--spacing-xs) var(--spacing-md);
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-muted);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: 0;
}

.sw-preview-panel--with-label {
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

/* Metadata card */
.sw-metadata-card {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

/* Recommended copy block */
.sw-caption-block {
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-left: 3px solid var(--color-accent-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.sw-caption-block__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-muted);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  margin: 0 0 var(--spacing-sm) 0;
}

.sw-caption-block__text {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  line-height: var(--line-height-editorial);
  margin: 0;
}

/* Feedback / action panel (right column) */
.sw-feedback-panel {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.sw-feedback-panel__card {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  padding: var(--spacing-lg);
}

.sw-feedback-panel__status-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  flex-wrap: wrap;
}

.sw-feedback-panel__helper {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0;
  line-height: var(--line-height-editorial);
}

.sw-reaction-row {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.sw-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-default);
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  cursor: pointer;
  min-height: 44px;
  transition: background var(--duration-fast) var(--easing-standard),
              border-color var(--duration-fast) var(--easing-standard);
}

.sw-reaction-btn:hover {
  background: var(--color-surface-sunk);
  border-color: var(--color-border-strong);
}

.sw-reaction-btn--active-up {
  background: color-mix(in srgb, var(--color-status-success) 12%, var(--color-surface-raised));
  border-color: var(--color-status-success);
  color: var(--color-status-success);
  font-weight: var(--font-weight-ui-medium);
}

.sw-reaction-btn--active-down {
  background: color-mix(in srgb, var(--color-status-error) 12%, var(--color-surface-raised));
  border-color: var(--color-status-error);
  color: var(--color-status-error);
  font-weight: var(--font-weight-ui-medium);
}

.sw-reaction-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
}

/* Mark-as-posted button (primary CTA) */
.sw-post-btn--done {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  background: color-mix(in srgb, var(--color-status-success) 10%, var(--color-surface-raised));
  border-color: var(--color-status-success);
  color: var(--color-status-success);
}

@media (max-width: 768px) {
  .sw-reaction-row {
    flex-direction: column;
  }
  .sw-reaction-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sw-reaction-btn { transition: none; }
}

/* ============================================================
   WIN_22 PROJECT FORM — template picker + slot-fill
   ============================================================ */

.sw-template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

@media (max-width: 768px) {
  .sw-template-grid {
    grid-template-columns: 1fr;
  }
}

.sw-template-card {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--easing-standard),
              box-shadow var(--duration-fast) var(--easing-standard);
}

.sw-template-card:hover {
  border-color: var(--color-accent-primary);
  box-shadow: var(--shadow-card);
}

.sw-template-card--selected {
  border-color: var(--color-accent-primary);
  border-width: 2px;
  box-shadow: var(--shadow-card);
}

.sw-template-card:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
}

.sw-template-card__thumb {
  aspect-ratio: 16 / 9;
  background: var(--color-surface-sunk);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
  overflow: hidden;
}

.sw-template-card__name {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.sw-template-card__desc {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
  margin: 0;
  line-height: var(--line-height-editorial);
}

.sw-template-card__networks {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-muted);
}

/* Step 2 slot-fill reveal */
.sw-slot-fill {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  display: none; /* revealed by JS */
}

.sw-slot-fill.is-active {
  display: block;
}

.sw-slot-fill__heading {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-muted);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  margin: 0 0 var(--spacing-lg) 0;
}

.sw-change-template-btn {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--color-text-link);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  margin-bottom: var(--spacing-lg);
  display: inline-block;
}

.sw-change-template-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  .sw-template-card { transition: none; }
}

/* ============================================================
   ADM_23 — TOAST NOTIFICATION (mirrors WIN_11 pattern)
   ============================================================ */

.sw-toast {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  border-left: 3px solid var(--color-status-success);
  border-radius: var(--radius-card);
  padding: var(--spacing-md) var(--spacing-lg);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-floating);
  z-index: var(--z-toast);
  display: none;
  max-width: 340px;
}

.sw-toast.is-visible {
  display: block;
  animation: sw-toast-in var(--duration-base) var(--easing-decelerate);
}

@keyframes sw-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .sw-toast {
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    left: var(--spacing-md);
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sw-toast.is-visible { animation: none; }
}

/* ============================================================
   ADM_23 — COMPACT QUOTA TABLE
   ============================================================ */

.table-compact {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
}

.table-compact th {
  text-align: left;
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-muted);
  letter-spacing: var(--letter-spacing-allcaps);
  text-transform: uppercase;
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--color-border-default);
}

.table-compact td {
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--color-border-default);
  vertical-align: middle;
  color: var(--color-text-primary);
}

.table-compact tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   MOBILE OVERRIDES
   ============================================================ */

@media (max-width: 768px) {
  .sw-page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .sw-page-header__period {
    padding-top: 0;
  }

  .sw-checkpoint-strip {
    padding: var(--spacing-md);
  }

  .sw-material-card__thumb {
    /* 1:1 maintained via aspect-ratio, nothing extra needed */
  }

  .sw-quota-meter {
    flex-direction: column;
    align-items: flex-start;
  }

  .sw-quota-meter__bar-wrap {
    width: 100%;
  }

  /* ADM quota table horizontal scroll */
  .sw-quota-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
}

@layer components {
/* === components/visitka/visitka.css === */
/* ============================================================
   Visitka components (Wave-5)
   WIN_23_VISITKA · WIN_24_VISITKA_PREVIEW
   All values reference design tokens (var(--*)). ZERO hardcoded
   color/spacing/type values — except where documented below.
   ============================================================ */

/* ── EXCEPTION: palette-swatch color chips (WIN_23 only) ─────────
   The 8 .vs-palette-chip elements in WIN_23 carry a literal accent
   hex as an inline background-color. This is the one sanctioned
   hardcoded-color location: the chip IS the visual color sample.
   See WIN_23_VISITKA.njk inline style="background:#XXXXXX;" comments.
   All other color references in this file and in the page templates
   use semantic token vars.
   ───────────────────────────────────────────────────────────────── */

/* ── Palette picker: shared swatch layout ────────────────────────
   (Detailed rules live in WIN_23 scoped <style>; this registers
   the component contract for reuse and the token-compliance record.)

   .vs-palette-swatch          — radio-button swatch card
   .vs-palette-chip            — accent color block (inline style hex)
   .vs-palette-name            — palette name text
   .vs-palette-descriptor      — short character descriptor
   .vs-palette-check           — selected checkmark badge
   ─────────────────────────────────────────────────────────────── */

/* ── Section toggle row: accessible toggle switch ────────────────
   .vs-toggle-row              — flex row, min-height 44px (WCAG 2.5.8)
   .vs-toggle-switch           — custom toggle wrapper
   .vs-toggle-track            — visual track (accent when :checked)
   .vs-lock-badge              — locked indicator with tooltip
   ─────────────────────────────────────────────────────────────── */

/* ── Featured-wine picker ────────────────────────────────────────
   .vs-wine-row                — flex row, min-height 44px
   .vs-wine-check-label        — label wraps checkbox + thumb + text
   .vs-wine-thumb              — 36×36 wine bottle thumbnail
   .vs-wine-count-badge        — "N / 6" counter, data-over attr
   ─────────────────────────────────────────────────────────────── */

/* ── Notice bar (WIN_24) ─────────────────────────────────────────
   .vp-notice                  — sticky bar, z-index: --z-modal
   .vp-notice__text            — preview label text
   .vp-notice__actions         — CTA group (publish + back)
   ─────────────────────────────────────────────────────────────── */

/* ── Visitka one-pager (WIN_24) ──────────────────────────────────
   Rendered region carries data-theme="visitka-{name}" which remaps
   all --color-* semantic vars via the token-pack definitions in tokens.css.
   Components inside must reference ONLY semantic tokens:
     --color-surface-primary
     --color-surface-alt
     --color-surface-sunk
     --color-text-primary
     --color-text-muted
     --color-accent-primary
     --color-text-on-accent
     --color-border-default
   Platform-brand-specific tokens NOT in the pack must NOT appear
   inside the .visitka wrapper or the palette remap won't apply.

   .visitka                    — one-pager root (carries data-theme)
   .visitka-container          — max-width 900px, inner padding
   .visitka-section            — section with padding + border-bottom
   .visitka-section-heading    — Cormorant display italic
   .visitka-hero               — full-bleed hero with cover image
   .visitka-hero__overlay      — gradient overlay (surface-primary)
   .visitka-about-grid         — 2-col story + team card
   .visitka-team-card          — winemaker card (surface-alt)
   .visitka-wines-grid         — 3-col wine cards (responsive)
   .visitka-wine-card          — individual wine card
   .visitka-visit-grid         — 2-col map + address block
   .visitka-map-placeholder    — static map placeholder (surface-sunk)
   .visitka-contacts-grid      — flex row of contact items
   .visitka-footer             — "Сайт от Enotale" footer (surface-sunk)
   ─────────────────────────────────────────────────────────────── */

/* ── Status indicator (WIN_23) ───────────────────────────────────
   .vs-status-dot--published   — green dot (--color-status-success)
   .vs-status-dot--pending     — amber dot (--color-status-warning)
   ─────────────────────────────────────────────────────────────── */

/* ── Source-of-truth strip (WIN_23) ─────────────────────────────
   .vs-source-strip            — info strip (surface-alt + border)
   ─────────────────────────────────────────────────────────────── */

/* ── Hosting info strip (WIN_23) ────────────────────────────────
   .vs-hosting-strip           — subdomain display (surface-alt)
   .vs-hosting-url             — bold subdomain text
   ─────────────────────────────────────────────────────────────── */

/* ── Toast (shared) ──────────────────────────────────────────────
   .vs-toast / .vp-toast       — success toast, border-left success
   .is-visible                 — display: block + slide-in animation
   Respects prefers-reduced-motion: no animation when reduced.
   ─────────────────────────────────────────────────────────────── */

/* ══ VISITKA ONE-PAGER RENDER RULES ═══════════════════════════════
   Moved from WIN_24_VISITKA_PREVIEW.njk <style> block.
   Consumed by:
     - WIN_24 (inside dashboard bleed-wrap, via prototype.css)
     - SITES_VISITKA pages (standalone public sites, same rules)
   All colors reference --color-* semantic tokens.
   The data-theme="visitka-{name}" attribute remaps them per palette.
   ZERO hardcoded color values — see visitka.css header comment for
   the one sanctioned exception (palette swatch chips in WIN_23).
   ════════════════════════════════════════════════════════════════ */

/* ── Visitka container ───────────────────────────────────────────── */
.visitka {
  background: var(--color-surface-primary);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  line-height: var(--line-height-body);
}

/* ── Visitka inner max-width ─────────────────────────────────────── */
.visitka-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}
@media (max-width: 480px) {
  .visitka-container { padding: 0 var(--spacing-md); }
}

/* ── Section rhythm ──────────────────────────────────────────────── */
.visitka-section {
  padding: var(--spacing-xl) 0;
  border-bottom: 1px solid var(--color-border-default);
}
.visitka-section:last-of-type { border-bottom: none; }

.visitka-section-heading {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-lg);
}

/* ── a. HERO ─────────────────────────────────────────────────────── */
.visitka-hero {
  position: relative;
  min-height: 360px;
  background: var(--color-surface-sunk);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.visitka-hero__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.visitka-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-surface-primary) 0%, transparent 60%);
}
.visitka-hero__content {
  position: relative;
  padding: var(--spacing-xl);
  z-index: 1;
}
.visitka-hero__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-sm);
  line-height: var(--line-height-display);
}
.visitka-hero__tagline {
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  color: var(--color-text-muted);
  margin: 0;
  max-width: 560px;
}
@media (max-width: 480px) {
  .visitka-hero { min-height: 260px; }
  .visitka-hero__content { padding: var(--spacing-lg); }
  .visitka-hero__name { font-size: var(--font-size-h2); }
}

/* ── b. ЗА НАС ──────────────────────────────────────────────────── */
.visitka-about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}
@media (max-width: 640px) {
  .visitka-about-grid { grid-template-columns: 1fr; }
}
.visitka-story {
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  line-height: var(--line-height-editorial);
  margin: 0;
}
.visitka-team-card {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
}
.visitka-team-card__portrait {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-surface-sunk);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-muted);
}
.visitka-team-card__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-xs);
}
.visitka-team-card__role {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0;
}
.visitka-team-empty {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  font-style: italic;
}

/* ── c. ВИНОТО НИ ────────────────────────────────────────────────── */
.visitka-wines-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}
@media (max-width: 640px) {
  .visitka-wines-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
  .visitka-wines-grid { grid-template-columns: 1fr; }
}
.visitka-wine-card {
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-alt);
}
.visitka-wine-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: var(--color-surface-sunk);
  padding: var(--spacing-md);
}
.visitka-wine-card__body {
  padding: var(--spacing-md);
  border-top: 1px solid var(--color-border-default);
}
.visitka-wine-card__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-xs);
}
.visitka-wine-card__vintage {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0 0 var(--spacing-md);
}
.visitka-wine-card__cta {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-accent-primary);
  text-decoration: underline;
  cursor: default;
  pointer-events: none;
  opacity: 0.5;
}

/* ── d. ПОСЕТЕТЕ НИ (conditional) ───────────────────────────────── */
.visitka-visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}
@media (max-width: 600px) {
  .visitka-visit-grid { grid-template-columns: 1fr; }
}
.visitka-map-placeholder {
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}
.visitka-address-block {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
.visitka-address-item {
  display: flex;
  gap: var(--spacing-sm);
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
}
.visitka-address-item svg { flex-shrink: 0; margin-top: 2px; color: var(--color-text-muted); }
.visitka-address-item__label {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-allcaps);
  display: block;
  margin-bottom: var(--spacing-xs);
}

/* ── e. КОНТАКТИ + FOOTER ────────────────────────────────────────── */
.visitka-contacts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}
.visitka-contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
}
.visitka-contact-item svg { color: var(--color-text-muted); flex-shrink: 0; }
.visitka-footer {
  background: var(--color-surface-sunk);
  border-top: 1px solid var(--color-border-default);
  padding: var(--spacing-lg) var(--spacing-xl);
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
.visitka-footer__brand {
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
}

@media (prefers-reduced-motion: reduce) {
  /* No animations in the visitka one-pager — static presentation */
}

/* ══ PART B — PALETTE READS: make accent token prominent across ALL templates ══
   Previously accent was used ONLY on .visitka-wine-card__cta (the CTA button).
   These additions apply accent to eyebrows, hero bands/overlays, rules, links,
   section dividers and footer so palette swaps visibly transform the whole page.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Section dividers (original .visitka-section) now use accent tint on border-bottom */
.visitka-section {
  border-bottom-color: var(--color-border-default);
}

/* Eyebrow labels — use accent for the small uppercase "За нас" type labels */
.visitka-section-heading {
  /* Keep heading in text-primary but add a subtle left accent marker */
  border-left: 3px solid var(--color-accent-primary);
  padding-left: var(--spacing-md);
}

/* Hero overlay now bleeds accent into the gradient bottom edge */
.visitka-hero__overlay {
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--color-surface-primary) 92%, var(--color-accent-primary) 8%) 0%,
    transparent 55%
  );
}

/* Hero name — accent color directly on the winery name (Part B: heading in accent) */
.visitka-hero__name {
  color: var(--color-accent-primary);
}

/* CTA opacity lifted slightly, underline replaced by accent fill */
.visitka-wine-card__cta {
  color: var(--color-text-on-accent);
  background: var(--color-accent-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  opacity: 0.8;
}

/* Footer gets accent surface-sunk background + accent divider on top */
.visitka-footer {
  background: var(--color-surface-sunk);
  border-top: 3px solid var(--color-accent-primary);
}

/* Footer brand name in accent */
.visitka-footer__brand {
  color: var(--color-accent-primary);
}

/* Links inside visitka get accent color */
.visitka-contact-item a {
  color: var(--color-accent-primary);
}

/* Per-palette typography — targeted weight/style rules per data-theme.
   Keep light: a few rules per palette, not a full type system.
   Applied inside ANY visitka template (all carry data-theme on root). */

/* Розé / Туш — Cormorant Light Italic (300) for hero names; restraint + delicacy */
[data-theme="visitka-roze"] .visitka-hero__name,
[data-theme="visitka-tush"] .visitka-hero__name {
  font-weight: 300;
  font-style: italic;
}

/* Варовик — Cormorant Light (300) for hero; cool tonality reads more openly */
[data-theme="visitka-varovik"] .visitka-hero__name {
  font-weight: 300;
}

/* Хума / Праг / Мавруд — Cormorant Medium (500); dark/dense palettes need more weight */
[data-theme="visitka-huma"] .visitka-hero__name,
[data-theme="visitka-prag"] .visitka-hero__name,
[data-theme="visitka-mavrud"] .visitka-hero__name {
  font-weight: 500;
}

/* Трева — nav/label text lighter (nature, open, field); reduce Geologica weight in meta */
[data-theme="visitka-treva"] .visitka-section-heading,
[data-theme="visitka-treva"] .visitka-team-card__role,
[data-theme="visitka-treva"] .visitka-wine-card__vintage {
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ══ КЛАСИКА TEMPLATE (vk-klasika / vkk-*) ════════════════════════════
   Single centered column (max 760px), generous vertical whitespace.
   Cormorant-prominent. Full-bleed hero with accent rule under name.
   Centered eyebrows + thin accent ornament rules before headings.
   ═══════════════════════════════════════════════════════════════════ */

.vk-klasika {
  background: var(--color-surface-primary);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  line-height: var(--line-height-body);
}

/* Inner container — narrow centered column */
.vkk-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  text-align: center;
}
@media (max-width: 480px) {
  .vkk-container { padding: 0 var(--spacing-md); }
}

/* ── HERO ── */
.vkk-hero {
  position: relative;
  min-height: 480px;
  background: var(--color-surface-sunk);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.vkk-hero__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vkk-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--color-surface-primary) 85%, var(--color-accent-primary) 15%) 0%,
    color-mix(in srgb, var(--color-text-primary) 35%, transparent) 40%,
    color-mix(in srgb, var(--color-text-primary) 10%, transparent) 100%
  );
}
.vkk-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--spacing-2xl) var(--spacing-xl);
  text-align: center;
}
/* Winery name — large Cormorant centered; color inherited from per-palette rule */
.vkk-hero__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-accent-primary);
  margin: 0 0 var(--spacing-md);
  line-height: var(--line-height-display);
  text-shadow: 0 1px 4px color-mix(in srgb, var(--color-text-primary) 40%, transparent);
}
/* Accent horizontal rule under the name */
.vkk-hero__rule {
  width: 60px;
  height: 3px;
  background: var(--color-accent-primary);
  margin: 0 auto var(--spacing-md);
  opacity: 0.85;
}
.vkk-hero__tagline {
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  margin: 0 auto;
  max-width: 520px;
  opacity: 0.92;
}
@media (max-width: 480px) {
  .vkk-hero { min-height: 320px; }
  .vkk-hero__name { font-size: 2rem; }
  .vkk-hero__content { padding: var(--spacing-xl) var(--spacing-md); }
}

/* ── SECTIONS ── */
.vkk-section {
  padding: var(--spacing-2xl) 0;
  border-bottom: 1px solid var(--color-border-default);
}
.vkk-section:last-of-type { border-bottom: none; }
/* Alternating background sections */
.vkk-section--alt {
  background: var(--color-surface-alt);
}

/* Eyebrow — small uppercase label in accent, centered */
.vkk-eyebrow {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-allcaps);
  color: var(--color-accent-primary);
  margin: 0 0 var(--spacing-sm);
}

/* Centered thin accent ornament line */
.vkk-ornament {
  width: 40px;
  height: 1px;
  background: var(--color-accent-primary);
  margin: 0 auto var(--spacing-md);
  opacity: 0.6;
}

/* Section headings — Cormorant italic, centered */
.vkk-heading {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-xl);
}

/* Story — narrow centered measure */
.vkk-story {
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  line-height: var(--line-height-editorial);
  max-width: 600px;
  margin: 0 auto var(--spacing-xl);
}

/* Team card — centered */
.vkk-team-card {
  display: inline-block;
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-top: 3px solid var(--color-accent-primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg) var(--spacing-xl);
  text-align: center;
  min-width: 200px;
}
.vkk-team-card__portrait {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-surface-primary);
  border: 2px solid var(--color-accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  color: var(--color-accent-primary);
}
.vkk-team-card__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-xs);
}
.vkk-team-card__role {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0;
}

/* Wine cards — 2-col centered */
.vkk-wines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
  max-width: 600px;
  margin: 0 auto;
}
@media (max-width: 480px) {
  .vkk-wines-grid { grid-template-columns: 1fr; }
}
.vkk-wine-card {
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-primary);
  text-align: center;
}
.vkk-wine-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: var(--color-surface-sunk);
  padding: var(--spacing-md);
}
.vkk-wine-card__body {
  padding: var(--spacing-md);
  border-top: 1px solid var(--color-border-default);
}
.vkk-wine-card__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-xs);
}
.vkk-wine-card__vintage {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0 0 var(--spacing-md);
}
.vkk-wine-card__cta {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-on-accent);
  background: var(--color-accent-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: var(--spacing-xs) var(--spacing-md);
  cursor: default;
  pointer-events: none;
  opacity: 0.85;
}

/* Visit block — centered */
.vkk-visit-block {
  max-width: 480px;
  margin: 0 auto;
}
.vkk-map-placeholder {
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  margin-bottom: var(--spacing-lg);
}
.vkk-address {
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-sm);
}
.vkk-hours {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0;
}

/* Contacts */
.vkk-contacts {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  align-items: center;
}
.vkk-contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
}
.vkk-contact-item svg { color: var(--color-accent-primary); flex-shrink: 0; }
.vkk-link {
  color: var(--color-accent-primary);
  text-decoration: underline;
}

/* Footer — centered, accent divider */
.vkk-footer {
  background: var(--color-surface-sunk);
  padding: var(--spacing-xl) var(--spacing-xl);
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
.vkk-footer__rule {
  width: 100%;
  height: 3px;
  background: var(--color-accent-primary);
  margin: 0 auto var(--spacing-lg);
  opacity: 0.7;
}
.vkk-footer__brand {
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-accent-primary);
}

/* ── Per-palette Klasika typography ── */
[data-theme="visitka-roze"] .vkk-hero__name,
[data-theme="visitka-tush"] .vkk-hero__name {
  font-weight: 300;
  font-style: italic;
}
[data-theme="visitka-varovik"] .vkk-hero__name {
  font-weight: 300;
}
[data-theme="visitka-huma"] .vkk-hero__name,
[data-theme="visitka-prag"] .vkk-hero__name,
[data-theme="visitka-mavrud"] .vkk-hero__name {
  font-weight: 500;
}

/* ══ РЕДАКЦИЯ TEMPLATE (vk-redaktsiya / vkr-*) ═════════════════════════
   Asymmetric, wide (~1100px), left-aligned, large asymmetric margins.
   Split hero: SOLID ACCENT BAND (name) + cover photo side-by-side.
   Numbered eyebrows ("01 — За нас"), editorial wine grid.
   ═══════════════════════════════════════════════════════════════════ */

.vk-redaktsiya {
  background: var(--color-surface-primary);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  line-height: var(--line-height-body);
}

.vkr-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}
@media (max-width: 480px) {
  .vkr-container { padding: 0 var(--spacing-md); }
}

/* ── HERO — split layout ── */
.vkr-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
}
@media (max-width: 700px) {
  .vkr-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

/* Left band: solid accent background, winery name in on-accent color */
.vkr-hero__band {
  background: var(--color-accent-primary);
  color: var(--color-text-on-accent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--spacing-2xl) var(--spacing-xl) var(--spacing-xl) var(--spacing-xl);
}
.vkr-hero__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-allcaps);
  color: var(--color-text-on-accent);
  opacity: 0.7;
  margin: 0 0 var(--spacing-md);
}
/* Huge display Cormorant winery name on accent band */
.vkr-hero__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-text-on-accent);
  margin: 0 0 var(--spacing-md);
  line-height: 1.1;
}
.vkr-hero__tagline {
  font-size: var(--font-size-body);
  color: var(--color-text-on-accent);
  opacity: 0.8;
  margin: 0 0 var(--spacing-xl);
  max-width: 340px;
}
.vkr-hero__cta {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-accent-primary);
  background: var(--color-text-on-accent);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  cursor: default;
  pointer-events: none;
  align-self: flex-start;
  opacity: 0.9;
}

/* Right side: cover photo */
.vkr-hero__photo {
  overflow: hidden;
  background: var(--color-surface-sunk);
  position: relative;
}
.vkr-hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vkr-hero__photo-fallback {
  position: absolute;
  inset: 0;
  background: var(--color-surface-sunk);
}
@media (max-width: 700px) {
  .vkr-hero__photo { min-height: 240px; }
  .vkr-hero__band { padding: var(--spacing-xl) var(--spacing-md); }
}

/* ── SECTIONS ── */
.vkr-section {
  padding: var(--spacing-2xl) 0;
  border-bottom: 1px solid var(--color-border-default);
}
.vkr-section:last-of-type { border-bottom: none; }
.vkr-section--sunk {
  background: var(--color-surface-sunk);
}

/* Section meta: numbered eyebrow row */
.vkr-section__meta {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border-default);
}
/* Large numbered eyebrow in accent */
.vkr-number {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-accent-primary);
  line-height: 1;
}
.vkr-section__divider {
  font-size: var(--font-size-body);
  color: var(--color-text-muted);
  margin: 0 var(--spacing-xs);
}
.vkr-section__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-allcaps);
  margin: 0;
}

/* About layout: large pull-quote left, story right */
.vkr-about-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--spacing-2xl);
  align-items: start;
}
@media (max-width: 640px) {
  .vkr-about-layout { grid-template-columns: 1fr; }
}
.vkr-display-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: var(--font-weight-display-regular);
  color: var(--color-accent-primary);
  line-height: var(--line-height-display);
  margin: 0;
}
.vkr-story {
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  line-height: var(--line-height-editorial);
  margin: 0 0 var(--spacing-lg);
}
.vkr-team {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border-default);
}
.vkr-team__portrait {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface-sunk);
  border: 2px solid var(--color-accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent-primary);
}
.vkr-team__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-xs);
}
.vkr-team__role {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0;
}

/* Editorial wine grid: first card spans 2 rows (featured large) */
.vkr-wines-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: auto;
  gap: var(--spacing-lg);
  align-items: start;
}
@media (max-width: 640px) {
  .vkr-wines-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  .vkr-wines-grid { grid-template-columns: 1fr; }
}
.vkr-wine-card {
  background: var(--color-surface-primary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}
/* First (featured) wine card spans 2 grid rows */
.vkr-wine-card--featured {
  grid-row: span 1;
}
@media (min-width: 641px) {
  .vkr-wine-card--featured {
    grid-row: span 2;
  }
}
.vkr-wine-card__img-wrap {
  overflow: hidden;
  background: var(--color-surface-sunk);
  padding: var(--spacing-md);
}
.vkr-wine-card--featured .vkr-wine-card__img-wrap {
  padding: var(--spacing-xl);
}
.vkr-wine-card__img-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}
.vkr-wine-card__body {
  padding: var(--spacing-md);
  border-top: 1px solid var(--color-border-default);
}
.vkr-wine-card__vintage {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--spacing-xs);
}
.vkr-wine-card__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-md);
}
.vkr-wine-card--featured .vkr-wine-card__name {
  font-size: var(--font-size-h3);
}
.vkr-wine-card__cta {
  display: inline-block;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-on-accent);
  background: var(--color-accent-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: var(--spacing-xs) var(--spacing-md);
  cursor: default;
  pointer-events: none;
  opacity: 0.85;
}

/* Visit */
.vkr-visit-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}
@media (max-width: 600px) {
  .vkr-visit-layout { grid-template-columns: 1fr; }
}
.vkr-map-placeholder {
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}
.vkr-address-block {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}
.vkr-address-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
}
.vkr-address-item__label {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-accent-primary);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-allcaps);
}

/* Footer — left-aligned, large, accent divider top */
.vkr-footer {
  background: var(--color-surface-sunk);
  border-top: 3px solid var(--color-accent-primary);
  padding: var(--spacing-xl) 0;
}
.vkr-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-xl);
  flex-wrap: wrap;
}
.vkr-footer__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
.vkr-footer__link {
  color: var(--color-accent-primary);
  text-decoration: underline;
}
.vkr-footer__brand {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0;
  white-space: nowrap;
}
.vkr-footer__brand strong {
  color: var(--color-accent-primary);
}

/* ── Per-palette Redaktsiya typography ── */
/* On the accent band, name color is always text-on-accent — no per-palette override needed.
   For the display-quote in За нас section, apply palette weights: */
[data-theme="visitka-roze"] .vkr-display-quote,
[data-theme="visitka-tush"] .vkr-display-quote {
  font-weight: 300;
}
[data-theme="visitka-huma"] .vkr-display-quote,
[data-theme="visitka-prag"] .vkr-display-quote,
[data-theme="visitka-mavrud"] .vkr-display-quote {
  font-weight: 500;
}

/* ══ ВИТРИНА TEMPLATE (vk-vitrina / vkv-*) ══════════════════════════════
   Tight grid (~1000px), sans-forward (Geologica headings), compact spacing.
   Compact horizontal hero band with accent background. Wines FIRST and
   prominent (3-col grid). За нас condensed below in 2-col. Footer accent band.
   ═══════════════════════════════════════════════════════════════════════ */

.vk-vitrina {
  background: var(--color-surface-primary);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  line-height: var(--line-height-body);
}

.vkv-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}
@media (max-width: 480px) {
  .vkv-container { padding: 0 var(--spacing-md); }
}

/* ── NAV bar ── */
.vkv-nav {
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border-default);
  padding: var(--spacing-sm) 0;
}
.vkv-nav .vkv-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
}
.vkv-nav__brand {
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
}
.vkv-nav__links {
  display: flex;
  gap: var(--spacing-lg);
}
.vkv-nav__link {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-accent-primary);
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}
@media (max-width: 480px) {
  .vkv-nav__links { display: none; }
}

/* ── HERO — compact accent band ── */
.vkv-hero {
  background: var(--color-accent-primary);
  padding: var(--spacing-xl) 0;
}
.vkv-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-xl);
}
@media (max-width: 600px) {
  .vkv-hero__inner { flex-direction: column; align-items: flex-start; }
}
.vkv-hero__text {
  flex: 1;
}
.vkv-hero__eyebrow {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-allcaps);
  color: var(--color-text-on-accent);
  opacity: 0.65;
  margin: 0 0 var(--spacing-xs);
}
/* Vitrina hero name — Geologica-based (sans-forward) */
.vkv-hero__name {
  font-family: var(--font-ui);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-on-accent);
  margin: 0 0 var(--spacing-sm);
  line-height: 1.2;
}
.vkv-hero__tagline {
  font-size: var(--font-size-body);
  color: var(--color-text-on-accent);
  opacity: 0.8;
  margin: 0 0 var(--spacing-lg);
  max-width: 480px;
}
.vkv-hero__cta {
  display: inline-block;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-accent-primary);
  background: var(--color-text-on-accent);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  cursor: default;
  pointer-events: none;
}

/* Small cover thumbnail on right side of hero */
.vkv-hero__thumb {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-surface-sunk);
  border: 2px solid var(--color-text-on-accent);
  opacity: 0.9;
}
.vkv-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 600px) {
  .vkv-hero__thumb { display: none; }
}

/* ── WINES section — prominent, first, 3-col grid ── */
.vkv-wines {
  padding: var(--spacing-xl) 0;
  background: var(--color-surface-primary);
  border-bottom: 1px solid var(--color-border-default);
}
.vkv-section-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--color-accent-primary);
}
/* Section titles sans-forward (Geologica) */
.vkv-section-title {
  font-family: var(--font-ui);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
  margin: 0;
}
.vkv-section-count {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.vkv-wines-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}
@media (max-width: 640px) {
  .vkv-wines-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
  .vkv-wines-grid { grid-template-columns: 1fr; }
}
.vkv-wine-card {
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-alt);
}
.vkv-wine-card__img-wrap {
  background: var(--color-surface-sunk);
  padding: var(--spacing-md);
}
.vkv-wine-card__img-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}
.vkv-wine-card__body {
  padding: var(--spacing-md);
  border-top: 1px solid var(--color-border-default);
}
.vkv-wine-card__name {
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-xs);
}
.vkv-wine-card__vintage {
  font-size: var(--font-size-small);
  color: var(--color-accent-primary);
  font-weight: var(--font-weight-ui-semibold);
  margin: 0 0 var(--spacing-xs);
}
.vkv-wine-card__grape {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0 0 var(--spacing-md);
}
.vkv-wine-card__cta {
  display: inline-block;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-ui-medium);
  color: var(--color-text-on-accent);
  background: var(--color-accent-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: var(--spacing-xs) var(--spacing-md);
  cursor: default;
  pointer-events: none;
  opacity: 0.85;
}

/* ── ABOUT + VISIT — condensed 2-col ── */
.vkv-about {
  padding: var(--spacing-xl) 0;
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border-default);
}
.vkv-about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--spacing-xl);
  align-items: start;
}
@media (max-width: 640px) {
  .vkv-about-grid { grid-template-columns: 1fr; }
}
/* About title: Geologica, compact */
.vkv-about-title {
  font-family: var(--font-ui);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-accent-primary);
  margin: 0 0 var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-allcaps);
  font-size: var(--font-size-small);
}
.vkv-about-story {
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  line-height: var(--line-height-editorial);
  margin: 0 0 var(--spacing-md);
}
.vkv-about-team {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border-default);
}
.vkv-about-team__name {
  font-weight: var(--font-weight-ui-semibold);
  color: var(--color-text-primary);
}
.vkv-about-team__role::before { content: "— "; }

/* Visit block compact */
.vkv-visit-block {}
.vkv-map-placeholder {
  background: var(--color-surface-sunk);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  margin-bottom: var(--spacing-md);
}
.vkv-map-placeholder svg { color: var(--color-accent-primary); }
.vkv-visit-address {
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-xs);
}
.vkv-visit-hours {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0;
}

/* ── FOOTER — compact accent band ── */
.vkv-footer {
  background: var(--color-accent-primary);
  padding: var(--spacing-lg) 0;
}
.vkv-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-xl);
  flex-wrap: wrap;
}
.vkv-footer__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}
.vkv-footer__item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-small);
  color: var(--color-text-on-accent);
  opacity: 0.85;
}
.vkv-footer__link {
  text-decoration: underline;
}
.vkv-footer__brand {
  font-size: var(--font-size-small);
  color: var(--color-text-on-accent);
  opacity: 0.7;
  margin: 0;
  white-space: nowrap;
}
.vkv-footer__brand strong {
  opacity: 1;
  font-weight: var(--font-weight-ui-semibold);
}

@media (prefers-reduced-motion: reduce) {
  /* All three templates — no animations */
}
}
