/* ============================================================
   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; }

body {
  margin: 0;
  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 { max-width: 100%; height: auto; display: block; }

/* ============================================================
   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); }

/* ============================================================
   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;
}

/* ============================================================
   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;
}

.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); }

/* ============================================================
   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;
}

.header-public__logo img {
  height: 36px;
  width: auto;
}

.header-public__logo-text {
  font-family: var(--font-display);
  font-size: var(--font-size-h4); /* M3 fix: was bare 1.5rem → mapped to --font-size-h4 (clamp 1rem→1.5rem) */
  font-weight: var(--font-weight-display-medium);
  color: var(--color-text-primary);
  letter-spacing: var(--letter-spacing-tight);
  text-decoration: none;
}
.header-public__logo-text:hover { color: var(--color-accent-primary); text-decoration: none; }

.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__logo-text,
.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);
}

.header-public--transparent .header-public__logo-text:hover,
.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__logo-text,
.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;
}

.header-public--transparent.is-scrolled .header-public__logo-text:hover,
.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-text,
  .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);
}

/* ============================================================
   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 h4 {
  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-subtle);
  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-subtle);
}

/* ============================================================
   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-subtle);
}

/* ============================================================
   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;
}

/* ============================================================
   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%; }

/* ============================================================
   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: 42%;
  background: var(--card-product-fold-bg);
  border-top: 1px solid var(--color-border-default);
  padding: var(--spacing-md);
  display: flex;
  align-items: center;
  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);
  }
}

.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; }

.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);
}

/* ============================================================
   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); }

/* ============================================================
   AUTHOR BADGE
   ============================================================ */

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

.author-badge__portrait {
  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);
}

/* ============================================================
   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);
}

/* ============================================================
   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 { background: var(--color-accent-primary); border-color: var(--color-accent-primary); color: var(--color-text-on-accent); }
.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);
}

/* ============================================================
   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); }

/* ============================================================
   STATUS PILL
   ============================================================ */

.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); }

/* ============================================================
   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); }

/* ============================================================
   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;
}

/* ============================================================
   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);
}

/* ============================================================
   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__nav 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);
}
.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;
}

/* ============================================================
   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(--color-accent-primary); 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);
}
.stat-card a { text-decoration: none; color: inherit; display: block; }
.stat-card a:hover .stat-card__value { color: var(--color-accent-primary); }

.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;
}

/* ============================================================
   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;
}

.table-standard a, .table-compact a {
  color: var(--color-text-link);
  text-decoration: none;
}
.table-standard a:hover, .table-compact a:hover { text-decoration: underline; }

/* ============================================================
   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-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); }

/* ============================================================
   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-subtle);
  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); }

/* ============================================================
   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); }

/* ============================================================
   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); }

/* ============================================================
   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; }

/* ============================================================
   REGION MAP (BG)
   ============================================================ */

.region-map-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--spacing-xl) 0;
}

.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);
}

/* ============================================================
   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);
}

/* ============================================================
   TABS
   ============================================================ */

.tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border-default);
  gap: 0;
  margin-bottom: var(--spacing-xl);
}

.tab {
  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); }

/* ============================================================
   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);
}

/* ============================================================
   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) {
  .pdp-lightbox__layout {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas: "thumbs stage" "info info";
    gap: var(--spacing-md);
  }
  .pdp-lightbox__thumbs { grid-area: thumbs; }
  .pdp-lightbox__stage { grid-area: stage; }
  .pdp-lightbox__info { grid-area: info; max-height: 30vh; }
}

@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__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);
}

/* ============================================================
   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);
}

/* ============================================================
   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;
}

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

/* ============================================================
   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; }

.winery-page[data-winery] a { color: var(--winery-accent); }
.winery-page[data-winery] a:hover { color: color-mix(in oklab, var(--winery-accent) 82%, black); }

/* ============================================================
   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); }

/* ============================================================
   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); }

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  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);
}

/* ============================================================
   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); }

/* ============================================================
   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);
}

/* ============================================================
   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);
}

/* ============================================================
   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; }

  .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; }

  /* 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) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 var(--spacing-md); }
  .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%; }
}

/* ============================================================
   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; }

/* ============================================================
   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;
  }
}

/* ============================================================
   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;
  min-height: 100svh;
  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);
  /* Top padding accounts for fixed transparent header */
  padding-top: calc(var(--nav-height) + var(--spacing-editorial-md));
}

/* Top strip: brand group (logo + slogan).
   Mobile/tablet: centered column (logo above, slogan below).
   Desktop: row — logo left, slogan inline right. */
.home-hero__top {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
}

.home-hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

/* Logo link — no underline, transparent bg */
.home-hero__logo-link {
  display: inline-block;
  line-height: 0;
}

/* Logo — mobile size (noticeably smaller than landing-hero's 140px) */
.home-hero__logo {
  height: 90px;
  width: auto;
  opacity: 0.92;
}

/* Slogan — italic display type, cream. Two lines via <br>. */
.home-hero__slogan {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-display-light);
  font-style: italic;
  line-height: var(--line-height-tight);
  color: var(--color-paper-light);
  opacity: 0.95;
  text-align: center;
  text-shadow:
    0 1px 8px color-mix(in srgb, var(--color-ink) 50%, transparent),
    0 1px 2px color-mix(in srgb, var(--color-ink) 65%, transparent);
}

/* 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)
   ============================================================ */

@media (min-width: 641px) {
  .home-hero__logo {
    height: 110px;
  }

  .home-hero__slogan {
    color: var(--color-white);
    font-weight: var(--font-weight-display-bold);
    opacity: 1;
    text-shadow: none;
    -webkit-text-stroke: 3px #260017;
    paint-order: stroke fill;
  }
}

/* ============================================================
   HOME HERO — DESKTOP (≥1025px)
   Logo + slogan become a horizontal row (logo left, slogan right).
   ============================================================ */

@media (min-width: 1025px) {
  .home-hero__logo {
    height: 130px;
  }

  /* Body: push headline toward bottom with top-anchored brand block */
  .home-hero__body {
    justify-content: flex-start;
    padding: calc(var(--nav-height) + var(--spacing-editorial-md)) var(--spacing-editorial-lg) var(--spacing-editorial-xl);
    gap: var(--spacing-xl);
  }

  .home-hero__headline {
    max-width: 22ch;
    margin-top: auto;
  }

  /* Brand group becomes an inline row on desktop */
  .home-hero__brand {
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-lg);
  }

  /* Slogan realigns left when beside logo */
  .home-hero__slogan {
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-display-light);
    text-align: left;
    color: var(--color-paper-light);
    opacity: 0.95;
    -webkit-text-stroke: 0;
    text-shadow:
      0 1px 8px color-mix(in srgb, var(--color-ink) 50%, transparent),
      0 1px 2px color-mix(in srgb, var(--color-ink) 65%, transparent);
  }
}

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

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