/* ============================================================
   ORIGIN THEME — Main Stylesheet
   All colors use CSS custom properties only — zero hardcoded hex
   ============================================================ */

@import url("tokens.css");

:root {
  --icon-stroke-width: 1px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: none !important;
  text-size-adjust: none !important;
  overflow-x: hidden; /* prevent horizontal scroll at root */
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  -webkit-text-size-adjust: none !important;
  text-size-adjust: none !important;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: var(--size-h1, clamp(2rem, 5vw, 3.5rem)); }
h2 { font-size: var(--size-h2, clamp(1.5rem, 3.5vw, 2.5rem)); }
h3 { font-size: var(--size-h3, clamp(1.2rem, 2.5vw, 1.75rem)); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }
body { font-size: var(--size-body, 1rem); }

p { color: var(--text-muted); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--accent-hover); }

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

ul, ol { list-style: none; }

input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button { cursor: pointer; border: none; background: none; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-2xl);
}

.section--sm { padding-block: var(--space-xl); }
.section--lg { padding-block: var(--space-3xl); }

.section__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section__heading {
  font-family: var(--font-heading);
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.section__subheading {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin-inline: auto;
}

/* ============================================================
   GRID SYSTEM — static utility classes (no CSS vars in repeat)
   Usage: class="grid grid-m-2 grid-d-4"
   ============================================================ */
.grid {
  display: grid;
  gap: var(--grid-gap, var(--space-lg));
  grid-template-columns: repeat(2, 1fr); /* default: 2-col mobile */
}

/* Prevent grid items from overflowing their track */
.grid > * {
  min-width: 0;
}

/* Mobile column overrides */
.grid-m-1 { grid-template-columns: 1fr; }
.grid-m-2 { grid-template-columns: repeat(2, 1fr); }

/* Tablet: always 3 cols (overrides mobile setting) */
@media (min-width: 768px) {
  .grid      { grid-template-columns: repeat(3, 1fr); }
  .grid-m-1  { grid-template-columns: repeat(3, 1fr); }
}

/* Desktop column overrides */
@media (min-width: 1024px) {
  .grid      { grid-template-columns: repeat(4, 1fr); } /* default 4 */
  .grid-d-2  { grid-template-columns: repeat(2, 1fr); }
  .grid-d-3  { grid-template-columns: repeat(3, 1fr); }
  .grid-d-4  { grid-template-columns: repeat(4, 1fr); }
  .grid-d-5  { grid-template-columns: repeat(5, 1fr); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  border-radius: var(--btn-radius, var(--radius-md));
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--surface-2) !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 2px solid var(--btn-border, var(--btn-bg));
}

.btn-primary:hover {
  background: var(--btn-hover-bg, var(--accent-hover));
  color: var(--btn-hover-text, var(--btn-text));
  border-color: var(--btn-hover-bg, var(--accent-hover));
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.btn-outline {
  background: var(--btn2-bg, transparent);
  color: var(--btn2-text, var(--accent));
  border: 2px solid var(--btn2-border, var(--accent));
}

.btn-outline:hover {
  background: var(--btn2-hover-bg, var(--accent));
  color: var(--btn2-hover-text, var(--btn2-text, var(--bg)));
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

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

.btn--sm {
  padding: 8px 18px;
  font-size: 0.8rem;
}

.btn--lg {
  padding: 16px 40px;
  font-size: 1rem;
}

/* ============================================================
   ANNOUNCEMENT BAR
   ============================================================ */
.announcement-bar {
  background-color: var(--accent);
  color: var(--bg);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px var(--container-pad);
  padding-inline-end: calc(var(--container-pad) + 28px);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  overflow: hidden;
}

.announcement-bar a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Multi-message track */
.announcement-bar__track { position: relative; display: flex; align-items: center; justify-content: center; min-height: 1.2em; width: 100%; }
.announcement-bar__msg { display: none; align-items: center; gap: 6px; }
.announcement-bar__msg.is-active { display: inline-flex; }
.announcement-bar__icon { flex-shrink: 0; display: inline-flex; align-items: center; }
.announcement-bar__icon img { width: 16px; height: 16px; object-fit: contain; display: block; }
.announcement-bar__close {
  position: absolute;
  inset-inline-end: var(--container-pad);
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: inherit;
  line-height: 1;
  transform: translateY(-50%);
}

/* Fade animation */
.announcement-bar[data-ann-anim="fade"] .announcement-bar__msg { opacity: 0; transition: opacity 0.4s ease; }
.announcement-bar[data-ann-anim="fade"] .announcement-bar__msg.is-active { opacity: 1; }

/* Slide animation */
.announcement-bar[data-ann-anim="slide"] .announcement-bar__msg { transform: translateY(8px); opacity: 0; transition: transform 0.35s ease, opacity 0.35s ease; }
.announcement-bar[data-ann-anim="slide"] .announcement-bar__msg.is-active { transform: translateY(0); opacity: 1; }

/* Marquee */
.announcement-bar__track--marquee { overflow: hidden; white-space: nowrap; justify-content: flex-start; }
.announcement-bar__marquee-inner { display: flex; flex: none; width: max-content; animation: ann-marquee var(--ann-marquee-duration, 32s) linear infinite; }
.announcement-bar__marquee-inner:hover { animation-play-state: paused; }
.announcement-bar__marquee-set { display: flex; flex: none; align-items: center; justify-content: space-around; min-width: 100vw; }
.announcement-bar__track--marquee .announcement-bar__msg { display: inline-flex; padding-inline: var(--space-2xl); }
@keyframes ann-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
[dir="rtl"] .announcement-bar__marquee-inner { animation-name: ann-marquee-rtl; }
@keyframes ann-marquee-rtl {
  from { transform: translateX(0); }
  to   { transform: translateX(50%); }
}

/* ============================================================
   HEADER
   ============================================================ */
/* Announcement bar sits at the very top; NOT sticky */
.announcement-bar { position: relative; z-index: 999; }

/* The header wrapper is the sticky container for just the <header> */
.site-header-wrap {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--header-bg);
  box-shadow: none;
  filter: none;
}

/* Transparent mode: fix only the header wrapper, floating over the hero.
   top is offset by announcement bar height (set via --announce-h in JS). */
body.header-transparent .site-header-wrap {
  position: fixed;
  top: var(--announce-h, 0px);
  left: 0;
  right: 0;
  width: 100%;
  background-color: transparent;
}

/* When scrolled past threshold, wrapper gets a solid bg + shadow and snaps to very top */
body.header-transparent .site-header-wrap.scrolled {
  top: 0;
  background-color: var(--header-bg);
}

/* <header> sits inside the wrapper */
.site-header {
  position: relative;
  transition: background-color var(--transition-normal),
              border-color var(--transition-normal);
}

/* Transparent (top of page) — white-ish text over hero image */
body.header-transparent .site-header-wrap:not(.scrolled) .nav-link,
body.header-transparent .site-header-wrap:not(.scrolled) .header-icon,
body.header-transparent .site-header-wrap:not(.scrolled) .header__logo-text,
body.header-transparent .site-header-wrap:not(.scrolled) .lang-switcher__btn {
  color: var(--transparent-header-text, #ffffff);
}

body.header-transparent .site-header-wrap:not(.scrolled) .hamburger__bar {
  background-color: var(--transparent-header-text, #ffffff);
}

/* Wishlist icon: always visible on desktop, hidden on mobile (shown in drawer instead) */
@media (min-width: 1024px) {
  [data-wishlist-link].header-icon { display: flex !important; }
}
@media (max-width: 1023px) {
  .header-icon--desktop-only { display: none !important; }
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding-inline: var(--container-pad);
  padding-block: var(--space-xs);
  max-width: var(--container-max);
  margin-inline: auto;
  gap: var(--space-lg);
  position: relative;
}

/* Logo */
.header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header__logo img {
  height: var(--logo-height, 40px);
  width: auto;
  object-fit: contain;
}

.header__logo-text {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}

/* Desktop Nav */
.header__nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 2px;
  column-gap: var(--space-sm);
  pointer-events: auto;
  min-width: 0;
}

.header__nav-link {
  color: var(--header-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: uppercase;
  padding: 4px 2px;
  opacity: 0.85;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.header__nav-link:hover { opacity: 1; }
.header__nav-link--has-children { display: flex; align-items: center; gap: 4px; }
.nav-chevron { transition: transform 0.2s; }

.header__nav-dropdown { position: relative; }
.header__nav-dropdown:hover > .header__nav-submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.header__nav-dropdown:hover .nav-chevron { transform: rotate(180deg); }
.header__nav-submenu {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.header__nav-submenu-link {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s;
}
.header__nav-submenu-link:hover { background: var(--border); }
.header__nav-submenu-item--has-children { position: relative; }
.header__nav-submenu-item--has-children > .header__nav-submenu-link { display: flex; align-items: center; justify-content: space-between; }
.nav-chevron-right { opacity: 0.5; transition: transform 0.2s; }
[dir="rtl"] .nav-chevron-right { transform: scaleX(-1); }
.header__nav-submenu--nested {
  position: absolute;
  inset-inline-start: 100%;
  top: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
[dir="rtl"] .header__nav-submenu--nested { transform: translateX(-4px); }
.header__nav-submenu-item--has-children:hover > .header__nav-submenu--nested { opacity: 1; visibility: visible; transform: translateX(0); }

body.header-transparent .site-header-wrap:not(.scrolled) .header__nav-link {
  color: var(--transparent-header-text);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover { color: var(--accent); }

.nav-link svg {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.nav-item:hover .nav-link svg { transform: rotate(180deg); }

/* Header Icons */
.header__icons {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast);
}

.header-icon:hover {
  color: var(--accent);
}

.header-icon:not(.header-icon--account) svg {
  width: 22px;
  height: 22px;
}

[data-search-toggle] svg {
  width: 30px;
  height: 30px;
}

.cart-badge {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  min-width: 18px;
  height: 18px;
  background-color: var(--accent);
  color: var(--bg);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  line-height: 1;
}

.cart-badge:empty,
.cart-badge[data-count="0"] { display: none; }

/* Language switcher */
.lang-switcher {
  position: relative;
}

.lang-switcher__btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.lang-switcher__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Two-language stores: the button is a one-click toggle named after the other language */
.lang-switcher--toggle .lang-switcher__btn svg { display: none; }
.lang-switcher--toggle .lang-switcher__btn { white-space: nowrap; cursor: pointer; }

.lang-switcher__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 120px;
  padding: var(--space-xs);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
  z-index: 200;
}

.lang-switcher.is-open .lang-switcher__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switcher__option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: start;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.lang-switcher__option:hover,
.lang-switcher__option.is-active {
  background-color: var(--surface-2);
  color: var(--accent);
}


/* (REMOVED) Old noir/midnight scheme switcher styles — schemes are now
   driven entirely by cs-1 / cs-2 / cs-3 classes from layout.jinja. */

/* Wishlist button */
[data-wishlist-btn] svg { transition: fill var(--transition-fast), stroke var(--transition-fast); }
[data-wishlist-btn].is-wishlisted svg { fill: var(--accent); stroke: var(--accent); }

/* Hide wishlist from desktop header only — remains in mobile drawer */
.header__icons [data-wishlist-link] { display: none; }

/* ============================================================
   MEGA MENU
   ============================================================ */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: var(--container-max);
  background-color: var(--surface);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--border);
  padding: var(--space-xl) var(--container-pad);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity var(--transition-fast),
              visibility var(--transition-fast),
              transform var(--transition-fast);
  z-index: 999;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-menu__col-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.mega-menu__link {
  display: block;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.mega-menu__link:hover { color: var(--accent); }

/* ============================================================
   HAMBURGER + MOBILE DRAWER
   ============================================================ */
.hamburger {
  display: none; /* shown only on mobile via media query below */
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
}

@media (max-width: 1023px) {
  .hamburger { display: flex; }
  .header__nav { display: none; }
  .lang-switcher { display: none; }

  /* True center logo — equal flanks, logo absolutely centered */
  .header__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .header__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}


.hamburger:hover { background-color: var(--surface); }

.hamburger__bar {
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--header-text, var(--text));
  border-radius: 2px;
  transition: transform var(--transition-normal),
              opacity var(--transition-fast);
  transform-origin: center;
}

/* Vessel: 2 lines only — hide middle bar */
.hamburger__bar:nth-child(2) {
  display: none;
}

.hamburger.is-open .hamburger__bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.hamburger.is-open .hamburger__bar:nth-child(2) {
  opacity: 0; /* already display:none — kept for safety */
}

.hamburger.is-open .hamburger__bar:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Drawer overlay */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Drawer panel */
.mobile-drawer {
  /* Mobile Menu color controls (Theme Settings > Site Colors). Remapping the
     drawer's local tokens here means every existing var(--surface/--text/
     --accent) reference inside the drawer — nav links, icons, language card,
     hover/active states — picks these up automatically. Desktop header sits
     outside this scope and is unaffected. */
  --bg:           var(--mobile-menu-bg);
  --surface:      var(--mobile-menu-bg);
  --surface-2:    var(--mobile-menu-card-bg);
  --text:         var(--mobile-menu-text);
  --text-muted:   var(--mobile-menu-text);
  --accent:       var(--mobile-menu-accent);
  --accent-hover: var(--mobile-menu-accent);
  --border:       var(--mobile-menu-border);
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: min(320px, 85vw);
  height: 100%;
  background-color: var(--surface);
  z-index: 1200;
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

[dir="rtl"] .mobile-drawer {
  transform: translateX(100%);
}

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

.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background-color: var(--surface);
  z-index: 1;
}

.mobile-drawer__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.mobile-drawer__close:hover {
  color: var(--text);
  background-color: var(--surface-2);
}

.mobile-drawer__nav {
  flex: 1;
  padding: var(--space-md);
}

.drawer-nav-item {
  border-bottom: 1px solid var(--border);
}

.drawer-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-sm);
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.drawer-nav-link:hover { color: var(--accent); }

.drawer-nav-item__row { display: flex; align-items: center; }
.drawer-nav-item__row .drawer-nav-link { flex: 1; }
.drawer-nav-toggle {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: var(--space-sm); display: flex; align-items: center;
  transition: transform 0.2s;
}
.drawer-nav-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.drawer-nav-submenu { padding-inline-start: var(--space-md); }
.drawer-nav-item--sub .drawer-nav-link { font-size: 0.9rem; padding-block: var(--space-xs); }

.drawer-sub-menu {
  display: none;
  padding-bottom: var(--space-sm);
}

.drawer-sub-menu.is-open { display: block; }

.drawer-sub-link {
  display: block;
  padding: 8px var(--space-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.drawer-sub-link:hover { color: var(--accent); }

.mobile-drawer__footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero-banner {
  position: relative;
  min-height: calc(var(--hero-h-d, 100) * 1svh);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-banner__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-banner__media img,
.hero-banner__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-banner__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,var(--overlay-opacity, 0.5));
  z-index: 1;
}

.hero-banner__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-inline: var(--container-pad);
  max-width: var(--container-max);
  margin-inline: auto;
}

.hero-banner--left .hero-banner__content  { text-align: start; }
.hero-banner--center .hero-banner__content { text-align: center; }
.hero-banner--right .hero-banner__content  { text-align: end; }

.hero-banner--center .hero-banner__inner {
  max-width: 720px;
  margin-inline: auto;
}

.hero-banner--right .hero-banner__inner {
  max-width: 640px;
  margin-inline-start: auto;
}

.hero-banner--left .hero-banner__inner {
  max-width: 640px;
}

.hero-banner__heading {
  font-family: var(--font-heading);
  color: var(--text-on-overlay);
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 1.1;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-banner__subheading {
  color: rgba(255,255,255,0.85);
  font-size: clamp(1rem, 2vw, 1.3rem);
  margin-bottom: var(--space-xl);
  max-width: 520px;
  line-height: 1.6;
}

.hero-banner--center .hero-banner__subheading {
  margin-inline: auto;
}

.hero-banner--right .hero-banner__subheading {
  margin-inline-start: auto;
}

.hero-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.hero-banner--center .hero-banner__actions { justify-content: center; }
.hero-banner--right .hero-banner__actions  { justify-content: flex-end; }

.hero-banner--v-top    { align-items: flex-start; padding-top: calc(var(--header-height, 0px) + var(--space-3xl, 4rem)); }
.hero-banner--v-center { align-items: center; }
.hero-banner--v-bottom { align-items: flex-end; padding-bottom: var(--space-3xl, 4rem); }

/* ============================================================
   PRODUCT CARD — Luxury minimal design
   ============================================================ */
.product-card {
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Media container */
.product-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--img-ratio, 3/4);
  background-color: var(--surface-2);
  display: block;
  text-decoration: none;
  border-radius: 0;
  flex-shrink: 0;
}

.product-card--rounded .product-card__media {
  border-radius: var(--radius-md);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.product-card:hover .product-card__image {
  transform: scale(1.03);
}

.product-card__no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0.3;
}

/* Badges */
.product-card__badges {
  position: absolute;
  top: var(--space-sm);
  inset-inline-start: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  z-index: 2;
  pointer-events: none;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge--sale {
  background-color: var(--accent);
  color: var(--bg);
}

.badge--new {
  background-color: var(--text);
  color: var(--bg);
}

.badge--bundle {
  background-color: var(--accent);
  color: var(--bg);
}

.badge--label {
  background-color: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.badge--out-of-stock {
  background-color: var(--text-muted);
  color: var(--bg);
}

.badge--vat-exempt {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Wishlist icon — top-right, always visible */
.product-card__wishlist {
  position: absolute;
  top: var(--space-sm);
  inset-inline-end: var(--space-sm);
  z-index: 3;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 50%;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.product-card__wishlist:hover { color: var(--accent); }
.product-card__wishlist.is-wishlisted { color: var(--accent); }
.product-card__wishlist.is-wishlisted svg { fill: currentColor; }

/* CTA overlay — desktop hover only, inside the image */
.product-card__cta--overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 var(--space-sm) var(--space-sm);
  transform: translateY(110%);
  transition: transform 0.28s ease;
  display: block;
}

.product-card:hover .product-card__cta--overlay { transform: translateY(0); }

@media (max-width: 1023px) {
  .product-card__cta--overlay { display: none; }
}

/* CTA mobile — below info, always visible */
.product-card__cta--mobile {
  display: none;
  margin-top: var(--space-xs);
  width: 100%;
  padding: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius, var(--radius-md));
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast),
              width 0.25s ease, height 0.25s ease, padding 0.25s ease;
  position: relative;
}

.product-card--rounded .product-card__cta--mobile { border-radius: var(--radius-sm); }
.product-card__cta--mobile:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.product-card__cta--out { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.product-card__cta--out:hover { background: transparent; border-color: var(--border); color: var(--text-muted); }

/* Quick-add form wrapper — strip form chrome */
.product-card__quick-add-form { margin: 0; padding: 0; }
.product-card__quick-add-form button.product-card__cta--mobile { cursor: pointer; font-family: inherit; }

@media (max-width: 1023px) {
  .product-card__cta--mobile { display: block; }
  .product-card__quick-add-form { display: block; }
}

.product-card__cta-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius, var(--radius-md));
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast),
              width 0.25s ease, height 0.25s ease, padding 0.25s ease;
  cursor: pointer;
  position: relative;
}

.product-card--rounded .product-card__cta-btn { border-radius: var(--radius-sm); }

/* Add-to-cart morph animation: pill collapses into a circular spinner, then a checkmark */
.product-card__cta-btn[data-morph-loading],
.product-card__cta--mobile[data-morph-loading],
.product-card__cta-btn[data-morph-success],
.product-card__cta--mobile[data-morph-success] {
  width: 36px;
  height: 36px;
  padding: 0;
  margin-inline: auto;
  border-radius: 50%;
  color: transparent !important;
  pointer-events: none;
}

.product-card__cta-btn[data-morph-loading],
.product-card__cta--mobile[data-morph-loading] {
  background: var(--surface, transparent);
}

.product-card__cta-btn[data-morph-loading]::after,
.product-card__cta--mobile[data-morph-loading]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2.5px solid color-mix(in srgb, var(--text) 15%, transparent);
  border-top-color: var(--accent, #c9a96e);
  border-radius: 50%;
  animation: cta-morph-spin 0.6s linear infinite;
}

.product-card__cta-btn[data-morph-success],
.product-card__cta--mobile[data-morph-success] {
  background: var(--accent, #c9a96e) !important;
  border-color: var(--accent, #c9a96e) !important;
}

.product-card__cta-btn[data-morph-success]::after,
.product-card__cta--mobile[data-morph-success]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 6px;
  margin: -3px 0 0 -5px;
  border-inline-start: 2px solid var(--bg, #fff);
  border-block-end: 2px solid var(--bg, #fff);
  transform: rotate(-45deg);
}

@keyframes cta-morph-spin { to { transform: rotate(360deg); } }
.product-card__cta-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.product-card__cta-btn--out  { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* Info area */
.product-card__info {
  padding: 10px var(--space-xs) var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.product-card__name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__name a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.product-card__name a:hover { color: var(--accent); }

.product-card__short-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-top: 2px;
}

.product-card__rating { display: flex; align-items: center; gap: 2px; margin-top: 2px; }
.product-card__rating svg { flex-shrink: 0; }
.product-card__rating-count { font-size: 0.72rem; color: var(--text-muted); margin-inline-start: 2px; }

.price-current {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  direction: ltr;
  unicode-bidi: embed;
}

.price-original {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
  direction: ltr;
  unicode-bidi: embed;
}

/* ============================================================
   CAROUSEL
   ============================================================ */
.carousel-wrapper {
  position: relative;
}

.carousel-track {
  display: flex;
  align-items: start;
  gap: var(--space-lg);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-sm);
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-track > * {
  scroll-snap-align: start;
  flex: 0 0 calc((100% - (max(var(--carousel-cols-mobile, 2), 1) - 1) * var(--space-lg)) / max(var(--carousel-cols-mobile, 2), 1));
}

@media (min-width: 768px) {
  .carousel-track > * { flex: 0 0 var(--card-width-md, 300px); }
}

@media (min-width: 1024px) {
  .carousel-track > * { flex: 0 0 calc((100% - (max(var(--carousel-cols-desktop, 4), 1) - 1) * var(--space-lg)) / max(var(--carousel-cols-desktop, 4), 1)); }
}

.carousel-controls {
  position: absolute;
  inset-inline: 0;
  top: 0;
  bottom: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  padding-inline: var(--space-sm);
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  pointer-events: auto;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.55);
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-lg);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background-color: var(--border);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.carousel-dot.is-active {
  width: 22px;
  border-radius: 4px;
  background-color: var(--text);
}

/* ============================================================
   CATEGORY CARD
   ============================================================ */
.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  display: block;
  text-decoration: none;
  background-color: var(--surface-2);
}

.category-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.category-card:hover .category-card__image {
  transform: scale(1.08);
}

.category-card__no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0.3;
}

.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 60%);
  transition: opacity var(--transition-normal);
}

.category-card:hover .category-card__overlay {
  opacity: 0.9;
}

.category-card__label {
  position: absolute;
  bottom: var(--space-lg);
  left: var(--space-lg);
  right: var(--space-lg);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-on-overlay);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ============================================================
   RICH TEXT BANNER
   ============================================================ */
.rich-text-banner {
  padding-block: var(--rtb-padding-block, var(--space-2xl));
  background-color: var(--surface);
  background-image: var(--rtb-bg-image, none);
  background-size: cover;
  background-position: center;
}

.rich-text-banner__inner {
  max-width: 800px;
  text-align: var(--rtb-align, center);
}

.rich-text-banner--center .rich-text-banner__inner { margin-inline: auto; }
.rich-text-banner--right .rich-text-banner__inner  { margin-inline-start: auto; }

.rich-text-banner__heading {
  margin-bottom: var(--space-md);
}

.rich-text-banner__body {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: var(--space-xl);
}

.rich-text-banner__body p + p { margin-top: var(--space-md); }

/* ============================================================
   PRODUCT LISTING PAGE
   ============================================================ */
.listing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.listing-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 36px 10px 14px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  outline: none;
  transition: border-color var(--transition-fast);
}

.sort-select:focus { border-color: var(--accent); }


/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
}

.pagination__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.pagination__link:hover,
.pagination__link.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--surface);
}

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */
.product-detail {
  padding-block: var(--space-2xl);
  /* do NOT add .section class — that would double the padding */
}

.product-detail__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

/* Prevent grid children from exceeding their track width (min-width: auto default causes overflow) */
.product-detail__grid > * {
  min-width: 0;
}

@media (min-width: 768px) {
  .product-detail__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
  }
}

/* Gallery */
.product-gallery__main {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background-color: var(--surface);
  /* aspect-ratio set inline from settings */
}
.product-gallery__main--rounded {
  border-radius: var(--radius-lg);
}

.product-gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition-fast);
}

.product-gallery__thumbs {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  padding-bottom: 2px;
}

.product-gallery__thumb {
  flex: 0 0 76px;
  height: 76px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  background-color: var(--surface-2);
  box-shadow: 0 0 0 1px var(--border);
  opacity: 0.6;
  transform: scale(0.96);
  transition: opacity var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.product-gallery__thumb:hover {
  opacity: 0.9;
  transform: scale(1);
}

.product-gallery__thumb.is-active {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 0 0 1.5px var(--accent);
}

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

.product-gallery__arrows { z-index: 2; bottom: 0; }
.product-gallery__dots { display: none; }

@media (max-width: 767px) {
  .product-gallery__thumbs { display: none; }
  .product-gallery__dots { display: flex; }
}

@media (min-width: 768px) {
  .product-gallery__arrows { display: none; }
}

.product-gallery__video {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: #000;
}

.product-gallery__video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.product-gallery__thumb--video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.05) 45%);
  pointer-events: none;
}

.product-gallery__play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}

.product-gallery__play-icon::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
}

.product-gallery__play-icon::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #111;
  margin-inline-start: 2px;
}

/* Product Info */
.product-info__vendor {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.product-info__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.product-info__short-desc,
.product-info__short-desc * {
  font-size: 0.95rem !important;
  font-weight: normal !important;
  line-height: 1.6 !important;
}

.product-info__short-desc {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.product-info__sku {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.product-info__weight {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* Stock info */
.product-stock-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  min-height: 0;
  margin-bottom: var(--space-md);
}

.stock-sold {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stock-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.stock-badge--in  { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.stock-badge--low { background: rgba(234, 179, 8, 0.12);  color: #eab308; }
.stock-badge--out { background: rgba(239, 68, 68, 0.12);  color: #ef4444; }

.preorder-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(201, 169, 110, 0.14);
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.preorder-badge--product-card {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  margin-bottom: 0;
}

.product-info__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.product-info__price .price-current {
  font-size: 1.6rem;
  font-weight: 700;
}

.product-info__price .price-original {
  font-size: 1.1rem;
}

/* Variant selectors — custom classes (kept for product-card) */
.variant-group {
  margin-bottom: var(--space-lg);
}

/* ============================================================
   Vitrin variant picker — vitrin:products/variants_list.jinja
   CONFIRMED HTML structure (inspected live via DevTools):
     #product-variants-options
       .form-group
         div
           label          ← bare label, no class
           ul[name][index] ← bare ul, no class
             li[value][onclick][class="active"] ← bare li, .active when selected
               span       ← option value text
   ============================================================ */
#product-variants-options {
  margin-bottom: var(--space-md);
}

#product-variants-options .form-group {
  margin-bottom: var(--space-lg);
}

#product-variants-options label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

#product-variants-options ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  list-style: none;
  padding: 0;
  margin: 0;
}

#product-variants-options ul li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
  white-space: nowrap;
  min-width: 44px;
  min-height: 38px;
}

#product-variants-options ul li span {
  pointer-events: none;
}

#product-variants-options ul li:hover {
  border-color: var(--text-muted);
  background: var(--surface-2);
}

#product-variants-options ul li.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

#product-variants-options .variant-color-swatches ul li.has-swatch {
  padding: 4px 10px;
  gap: 4px;
}
#product-variants-options .variant-color-swatches ul li.has-swatch.active .color-swatch {
  box-shadow: 0 0 0 2px var(--accent);
}

/* Zid's newer option markup (Nov 2026): li.product-options__item(--color) with its own
   .product-options__swatch (merchant colour code) and a screen-reader-only name, styled by an
   inline <style> inside #product-form that makes the pill border transparent and hides the name.
   The extra #product-form id makes these rules win over Zid's. Keep Zid's swatch (one circle),
   restyle it like ours, show the name, restore the pill outline. */
#product-form #product-variants-options ul li.product-options__item { border-color: var(--border); }
#product-form #product-variants-options ul li.product-options__item:hover { border-color: var(--text-muted); }
#product-form #product-variants-options ul li.product-options__item.active { border-color: var(--accent); }
#product-form #product-variants-options ul li.product-options__item--color { padding: 4px 10px; gap: 4px; }
#product-form #product-variants-options .product-options__item-text--sr {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: nowrap;
  border: 0;
}
#product-form #product-variants-options .product-options__swatch {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-inline-end: 6px;
  border: 2px solid var(--border);
  border-radius: 50%;
  box-sizing: border-box;
  vertical-align: middle;
}
#product-form #product-variants-options li.active .product-options__swatch {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

/* ============================================================
   Vitrin product customization fields
   Covers dropdown, multi-select, text, number, date, time,
   image upload, and file upload controls generated by Zid.
   ============================================================ */
#product-form .custom-field-wrapper {
  margin-bottom: var(--space-lg);
}

#product-form .custom-field-wrapper:last-child {
  margin-bottom: 0;
}

#product-form .custom-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}

#product-form .custom-field__label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}

#product-form .custom-field__required {
  color: var(--error, #c0392b);
}

#product-form .custom-field__price,
#product-form .custom-field__hint,
#product-form .custom-field__option-price {
  color: var(--text-muted);
}

#product-form .custom-field__price {
  font-weight: 400;
}

#product-form .custom-field__hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

#product-form .custom-field__input,
#product-form .custom-field__select,
#product-form .custom-field__textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  background-color: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

#product-form .custom-field__input::placeholder,
#product-form .custom-field__textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

#product-form .custom-field__input:hover,
#product-form .custom-field__select:hover,
#product-form .custom-field__textarea:hover {
  border-color: var(--text-muted);
}

#product-form .custom-field__input:focus,
#product-form .custom-field__select:focus,
#product-form .custom-field__textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent);
}

#product-form .custom-field__select {
  appearance: none;
  cursor: pointer;
  padding-inline-end: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

[dir="rtl"] #product-form .custom-field__select {
  background-position: 20px 50%, 15px 50%;
}

#product-form .custom-field__textarea {
  min-height: 120px;
  resize: vertical;
}

#product-form .custom-field__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

#product-form .custom-field__option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

#product-form .custom-field__option:hover {
  border-color: var(--text-muted);
  background: var(--surface);
}

#product-form .custom-field__checkbox {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  accent-color: var(--accent);
  cursor: pointer;
}

#product-form .custom-field__option-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

#product-form .file-upload {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 56px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
}

#product-form .file-upload__preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

#product-form .file-upload__preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#product-form .file-upload__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#product-form .file-upload__button,
#product-form .file-upload__delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast), opacity var(--transition-fast);
}

#product-form .file-upload__button {
  flex-shrink: 0;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

#product-form .file-upload__button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#product-form .file-upload__delete {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 6px;
  border-radius: 50%;
  background: var(--error, #c0392b);
  color: var(--bg);
}

#product-form .file-upload__delete:hover {
  opacity: 0.8;
}

#product-form .file-upload__delete-icon {
  width: 14px;
  height: 14px;
}

#product-form .custom-field__error,
#product-form .custom-field [aria-invalid="true"] + * {
  color: var(--error, #c0392b);
  font-size: 0.8rem;
}

@media (max-width: 480px) {
  #product-form .file-upload {
    align-items: stretch;
    flex-wrap: wrap;
  }

  #product-form .file-upload__name {
    flex-basis: calc(100% - 52px);
    align-self: center;
  }
}

.variant-group__label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.variant-group__label span {
  color: var(--text);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition-fast),
              transform var(--transition-fast);
  background-clip: padding-box;
}

.color-swatch:hover { transform: scale(1.1); }

.color-swatch.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

.size-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.size-btn {
  min-width: 48px;
  height: 40px;
  padding-inline: var(--space-sm);
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.size-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.size-btn.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background-color: rgba(var(--accent), 0.05);
}

.size-btn.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Quantity selector */
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: fit-content;
  margin-bottom: var(--space-md);
}

.qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background-color: var(--surface);
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.qty-btn:hover {
  background-color: var(--surface-2);
  color: var(--text);
}

.qty-input {
  width: 56px;
  height: 44px;
  text-align: center;
  background-color: var(--surface-2);
  border: none;
  border-inline: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Product form actions */
.product-form__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

/* Tabs */
.tabs {
  border-top: 1px solid var(--border);
  padding-top: var(--space-lg);
}

.tabs__nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.tab-btn {
  padding: 12px var(--space-lg);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.tab-btn:hover { color: var(--text); }

.tab-btn.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.tab-panel__content {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

.tab-panel__content p + p { margin-top: var(--space-md); }

.tab-panel__content ul {
  list-style: disc;
  padding-inline-start: var(--space-lg);
  margin-top: var(--space-sm);
}

.tab-panel__content li { margin-bottom: var(--space-xs); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: var(--footer-bg, var(--surface));
  color: var(--footer-text, var(--text));
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer__main {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: var(--space-md);
  padding-block: var(--space-2xl);
}

@media (min-width: 640px) {
  .footer__main {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
}

@media (min-width: 1024px) {
  .footer__main {
    grid-template-columns: 1.2fr 1fr 1fr 1fr 1.2fr;
    gap: var(--space-xl);
  }

  .footer__main--compact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .footer__main--compact > * {
    flex: 0 1 280px;
  }

  .footer__main--compact .footer__contact,
  .footer__main--compact .footer__social {
    justify-content: center;
    align-items: center;
  }

  .footer__main--compact .footer__contact-link {
    justify-content: center;
  }
}

.footer__logo img {
  height: 36px;
  width: auto;
  margin-bottom: var(--space-md);
}

.footer__logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--footer-text, var(--text));
  margin-bottom: var(--space-md);
  display: block;
}

.footer__description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  text-align: center;
}

.footer__brand > a {
  display: block;
  text-align: center;
}

.footer__brand .footer__logo {
  display: block;
  margin-inline: auto;
}

@media (max-width: 639px) {
  .footer__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
  }
  .footer__newsletter { order: 8; }
  .footer__contact-social {
    order: 10;
    text-align: center;
  }
  .footer__contact-social .footer__contact-link { justify-content: center; }
  .footer__contact-social .footer__social { justify-content: center; }
  .footer__logo {
    display: block;
    height: 36px;
    width: auto;
    margin-bottom: var(--space-md);
  }
  .footer__logo,
  .footer__logo img {
    margin-inline: auto;
  }
  .footer__social {
    justify-content: center;
  }
}

.footer__contact {
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}
.footer__contact-title {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}
.footer__contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
  transition: color var(--transition-fast);
}
.footer__contact-link:hover { color: var(--accent); }
.footer__contact-link svg { flex-shrink: 0; }

.footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer__social-link {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  transition: color var(--transition-fast), border-color var(--transition-fast),
              background-color var(--transition-fast), transform var(--transition-fast);
}

.footer__social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--surface-2);
  transform: scale(1.15);
}

.footer__social-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .footer__social {
    justify-content: center;
  }
  .footer__social-link {
    width: 44px;
    height: 44px;
  }
}

.footer__nav-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--footer-text, var(--text));
  margin-bottom: var(--space-md);
}

.footer__nav-toggle {
  display: none;
}

.footer__nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer__nav-link:hover { color: var(--accent); }

@media (max-width: 767px) {
  .footer__nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 0;
    padding: var(--space-sm) 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--footer-text, var(--text));
    cursor: pointer;
  }
  .footer__nav-chevron {
    transition: transform 0.25s ease;
    flex-shrink: 0;
  }
  .footer__nav-col.is-open .footer__nav-chevron {
    transform: rotate(180deg);
  }
  .footer__nav-title {
    display: none;
  }
  .footer__nav-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    gap: 0;
    padding-bottom: 0;
  }
  .footer__nav-col.is-open .footer__nav-list {
    padding-bottom: var(--space-md);
  }
  .footer__nav-list li {
    padding-top: var(--space-sm);
  }
}

.footer__newsletter-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--footer-text, var(--text));
  margin-bottom: var(--space-sm);
}

.footer__newsletter-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
}

.footer-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-newsletter-form input {
  padding: 10px 16px;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.footer-newsletter-form input::placeholder { color: var(--text-muted); }
.footer-newsletter-form input:focus { border-color: var(--accent); }

.footer__legal {
  border-top: 1px solid var(--border);
  padding-block: var(--space-md);
}
.footer__legal .footer__bottom-inner { gap: var(--space-md); justify-content: center; }
.footer__legal-item { color: var(--text-muted); font-size: 0.8rem; margin: 0; }
.footer__legal-item a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-block: var(--space-lg);
}

.footer__bottom-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs, 6px);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.footer__copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer__copyright:empty { display: none; }
.footer__copyright a:empty { display: none; }

.payment-icons {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-inline-start: auto;
}

.payment-icon {
  height: 24px;
  width: auto;
  transition: opacity var(--transition-fast);
}

.payment-icon:hover { opacity: 1; }

.shipping-icons {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.shipping-icon {
  height: 24px;
  width: auto;
  opacity: 0.7;
  filter: grayscale(1) brightness(1.5);
  transition: opacity var(--transition-fast);
}
.shipping-icon:hover { opacity: 1; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }

/* ============================================================
   RESPONSIVE — Mobile adjustments
   ============================================================ */
@media (max-width: 1023px) {
  .header__nav { display: none; }
  .hamburger    { display: flex; }
  .header__logo-text { font-size: 1.6rem; }
  .header__icons { gap: 4px; }
}

@media (max-width: 767px) {
  .product-detail__grid { grid-template-columns: 1fr; }
  .hero-banner { min-height: calc(var(--hero-h-m, 90) * 1svh); }
  .listing-header { flex-direction: column; align-items: flex-start; }
  .footer__bottom-inner { flex-direction: column; align-items: center; text-align: center; }
  .payment-icons { margin-inline-start: 0; justify-content: center; flex-wrap: nowrap; }
  .shipping-icons { justify-content: center; flex-wrap: nowrap; }
}

@media (max-width: 479px) {
  :root { --container-pad: 16px; }
  .hero-banner__heading { font-size: 2rem; }
  .tabs__nav { overflow-x: auto; }
  .tab-btn { white-space: nowrap; }
}

/* ============================================================
   RTL ADJUSTMENTS
   ============================================================ */
[dir="rtl"] .hamburger { order: 2; }
[dir="rtl"] .header__logo { order: 1; }
[dir="rtl"] .header__nav { order: 2; }
[dir="rtl"] .header__icons { order: 3; }

[dir="rtl"] .hero-banner__actions {
  flex-direction: row-reverse;
}
/* row-reverse swaps flex-start/flex-end, so remap them to keep buttons on the same side as the text */
[dir="rtl"] .hero-banner--left .hero-banner__actions  { justify-content: flex-end; }
[dir="rtl"] .hero-banner--right .hero-banner__actions { justify-content: flex-start; }

[dir="rtl"] .mega-menu {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}

[dir="rtl"] .mega-menu:hover,
[dir="rtl"] .nav-item:hover .mega-menu {
  transform: translateX(50%) translateY(0);
}

[dir="rtl"] .carousel-btn svg { transform: scaleX(-1); }

[dir="rtl"] .breadcrumb li:not(:last-child)::after { content: '‹'; }

/* ============================================================
   FIX 8 — Header / Footer text colors
   ============================================================ */
.site-header .nav-link,
.site-header .header-icon,
.site-header .header__logo-text { color: var(--header-text, var(--text)); }
/* Language button: same colour as the header icons; its frame is a soft tint of that colour (also follows the transparent header) */
.site-header .lang-switcher__btn { color: var(--header-text, var(--text)); border-color: var(--border); border-color: color-mix(in srgb, currentColor 35%, transparent); }
.site-header .lang-switcher__btn:hover { color: var(--accent); border-color: var(--accent); }
.site-footer, .site-footer p, .site-footer a { color: var(--footer-text, var(--text-muted)); }
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4, .site-footer h5, .site-footer h6 { color: var(--footer-text, var(--text)); }
.header-transparent .site-header-wrap:not(.scrolled) .nav-link,
.header-transparent .site-header-wrap:not(.scrolled) .header-icon { color: var(--transparent-header-text, #ffffff); }

/* ============================================================
   FOOTER — section color cascade & alignment
   ============================================================ */
.footer-section {
  color: inherit;
}
.footer-section a {
  color: inherit;
  opacity: 0.8;
}
.footer-section a:hover {
  opacity: 1;
}

/* Center alignment — flex containers need justify-content */
.footer--center .footer__contact       { text-align: center; }
.footer--center .footer__contact-link  { justify-content: center; }
.footer--center .footer__social        { justify-content: center; }
.footer--center .footer__bottom-inner { justify-content: center; }
.footer--center .footer__nav-list     { align-items: center; }
.footer--center .footer__brand        { align-items: center; display: flex; flex-direction: column; }

/* ============================================================
   FIX 9 — Inverse logo for transparent header
   ============================================================ */
.logo-inverse { display: none; }
body.header-transparent .site-header-wrap:not(.scrolled) .header__logo:has(.logo-inverse) .logo-desktop { display: none; }
body.header-transparent .site-header-wrap:not(.scrolled) .logo-inverse { display: block; }

/* Product page accordions — allow taller content than the FAQ 400px cap */
.pdp-accordions { margin-top: var(--space-xl); }
.pdp-accordion__answer { overflow: hidden; }
.faq-item.is-open .pdp-accordion__answer { max-height: 3000px; }

/* ============================================================
   FIX 7 — Extended button, input, variant styles
   ============================================================ */
input, select, textarea { background: var(--input-bg, var(--surface)); border-color: var(--input-border, var(--border)); color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

/* ============================================================
   FIX 15 — Option value buttons (variant selector)
   ============================================================ */
.option-value-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; border: 1px solid var(--variant-border, var(--border));
  background: var(--variant-bg, var(--surface));
  color: var(--variant-text, var(--text));
  font-size: 0.85rem; border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition-fast);
  min-width: 44px;
}
.option-value-btn:hover { border-color: var(--text-muted); }
.option-value-btn.is-active {
  background: var(--variant-selected-bg, var(--accent));
  color: var(--variant-selected-text, var(--bg));
  border-color: var(--variant-selected-bg, var(--accent));
}
.option-values { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-sm); }

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  [data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), transform 0.6s cubic-bezier(0.22,1,0.36,1);
  }
  [data-animate="fade"] { transform: none; }
  [data-animate="slide-left"] { transform: translateX(-24px); }
  [data-animate="slide-right"] { transform: translateX(24px); }
  [data-animate="scale"] { transform: scale(0.95); }
  [data-animate].is-visible {
    opacity: 1;
    transform: none;
  }
  [data-animate-delay="1"] { transition-delay: 0.1s; }
  [data-animate-delay="2"] { transition-delay: 0.2s; }
  [data-animate-delay="3"] { transition-delay: 0.3s; }
  [data-animate-delay="4"] { transition-delay: 0.4s; }
}

/* Premium product card hover — subtle lift, no heavy shadow */
.product-card { transition: transform 0.35s cubic-bezier(0.22,1,0.36,1); }
.product-card:hover { transform: translateY(-3px); }
.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-card:hover::after { opacity: 1; }

/* ============================================================
   SECTION HEADINGS — consistent premium typography
   ============================================================ */
.section__heading {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.section__subheading {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 560px;
  margin-inline: auto;
  margin-top: var(--space-sm);
}

/* ============================================================
   SITE LOADER
   ============================================================ */
#site-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#site-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.site-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}
.site-loader__logo-img {
  height: var(--loader-logo-height, 44px);
  width: auto;
  object-fit: contain;
}
.site-loader__logo-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
}
.site-loader__bar {
  width: 100px;
  height: 1px;
  background: var(--border);
  overflow: hidden;
}
.site-loader__progress {
  height: 100%;
  background: var(--accent);
  animation: loader-fill 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes loader-fill {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

/* ============================================================
   PREMIUM CART TOAST
   ============================================================ */
#origin-cart-toast {
  position: fixed;
  bottom: 32px;
  inset-inline-end: 32px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.12);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#origin-cart-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
#origin-cart-toast .toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#origin-cart-toast .toast-icon svg {
  width: 11px;
  height: 11px;
}

/* ============================================================
   QUICK-VIEW SPINNER
   ============================================================ */
.qv__spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: qv-spin 0.7s linear infinite;
}
@keyframes qv-spin { to { transform: rotate(360deg); } }

.qv__loading {
  padding: var(--space-3xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Quick-view variant option styles (mirrors PDP) */
#product-variants-options-qv {
  margin-bottom: var(--space-md);
}
#product-variants-options-qv .qv-option-group {
  margin-bottom: var(--space-md);
}
#product-variants-options-qv .qv-option-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
#product-variants-options-qv ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  list-style: none;
  padding: 0;
  margin: 0;
}
#product-variants-options-qv ul li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
  min-width: 44px;
  min-height: 38px;
}
#product-variants-options-qv ul li:hover {
  border-color: var(--text-muted);
  background: var(--surface-2);
}
#product-variants-options-qv ul li.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ============================================================
   FIX 3 — Search drawer
   ============================================================ */
.search-drawer { position: fixed; top: 0; left: 0; right: 0; z-index: 2000; background: var(--bg); padding: var(--space-lg) var(--container-pad); transform: translateY(-100%); transition: transform 0.3s cubic-bezier(0.22,1,0.36,1); box-shadow: var(--shadow-lg); border-bottom: 1px solid var(--border); }
.search-drawer.is-open { transform: translateY(0); }
.search-drawer__inner { max-width: var(--container-max); margin-inline: auto; }
.search-drawer__form { display: flex; gap: var(--space-sm); align-items: center; }
.search-drawer__input {
  flex: 1;
  padding: 14px var(--space-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search-drawer__input::placeholder { color: var(--text-muted); opacity: 1; }
.search-drawer__input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; box-shadow: 0 0 0 4px rgba(0,0,0,0.1); }
.search-drawer__submit, .search-drawer__close { flex-shrink: 0; padding: 10px; color: var(--text); border-radius: var(--radius-sm); transition: color var(--transition-fast); background: transparent; border: 0; cursor: pointer; }
.search-drawer__submit:hover, .search-drawer__close:hover { color: var(--accent); }

.search-results { max-height: 400px; overflow-y: auto; margin-top: var(--space-sm); }
.search-results__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--space-sm); border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; transition: background 0.15s;
}
.search-results__item:hover { background: var(--surface-2); }
.search-results__img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.search-results__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-results__name { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results__price { font-size: 0.8rem; color: var(--text-muted); }
.search-results__empty { text-align: center; padding: var(--space-lg); color: var(--text-muted); font-size: 0.875rem; }
.search-results__all {
  display: block; text-align: center; padding: 12px;
  color: var(--accent); font-size: 0.875rem; font-weight: 500;
  text-decoration: none; border-top: 1px solid var(--border);
  margin-top: var(--space-xs);
}
.search-results__all:hover { text-decoration: underline; }
.search-overlay { position: fixed; inset: 0; z-index: 1999; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.search-overlay.is-active { opacity: 1; pointer-events: auto; }

/* ============================================================
   FIX 2 — Mobile drawer footer actions + badges
   ============================================================ */
.mobile-drawer__footer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); padding: var(--space-sm) 0; }
.mobile-drawer__action-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: var(--space-sm); background-color: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); font-size: 0.75rem; text-decoration: none; position: relative; transition: border-color var(--transition-fast); }
.mobile-drawer__action-btn:hover { border-color: var(--accent); color: var(--accent); }

/* 4th grid cell: reuses the existing .lang-switcher / .lang-switcher__btn
   component as-is (border, radius, typography, dropdown, active state) —
   only stretched to fill the grid cell so it lines up with the other 3 cards. */
.mobile-drawer__action-btn--lang { padding: 0; border: 0; }
.mobile-drawer__action-btn--lang .lang-switcher__btn { width: 100%; height: 100%; justify-content: center; }

/* Full-viewport language modal. initLangSwitcher() relocates this element to
   <body> so it escapes the drawer's transform and covers the entire viewport.
   It lives outside .mobile-drawer, so it reads the --mobile-menu-* tokens
   directly (the remapped generic tokens are not in scope here). The desktop
   dropdown has no .mobile-lang-modal class, so it is unaffected. */
.mobile-lang-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transform: none;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  z-index: 2600;
}
.mobile-lang-modal.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.mobile-lang-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
.mobile-lang-modal__panel {
  position: relative;
  width: min(320px, calc(100vw - 40px));
  background: var(--mobile-menu-card-bg);
  border: 1px solid var(--mobile-menu-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-lg);
}
.mobile-lang-modal__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--mobile-menu-text);
  text-align: center;
  margin-bottom: var(--space-xs);
}
.mobile-lang-modal__panel .lang-switcher__option {
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--mobile-menu-text);
  border: 1px solid var(--mobile-menu-border);
  border-radius: var(--radius-md);
}
.mobile-lang-modal__panel .lang-switcher__option:hover,
.mobile-lang-modal__panel .lang-switcher__option.is-active {
  background: transparent;
  border-color: var(--mobile-menu-accent);
  color: var(--mobile-menu-accent);
}
.mobile-lang-modal__panel .lang-switcher__option.is-active::before {
  content: "\2713";
  margin-inline-end: 8px;
  color: var(--mobile-menu-accent);
}
.mobile-lang-modal__close {
  margin-top: var(--space-xs);
  padding: 10px;
  background: transparent;
  border: 1px solid var(--mobile-menu-border);
  border-radius: var(--radius-md);
  color: var(--mobile-menu-text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.mobile-lang-modal__close:hover {
  border-color: var(--mobile-menu-accent);
  color: var(--mobile-menu-accent);
}
.wishlist-badge { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; background: var(--accent); color: var(--bg); font-size: 0.65rem; font-weight: 700; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.cart-badge:empty, .wishlist-badge:empty { display: none; }

/* ============================================================
   CATEGORY HERO + BREADCRUMB
   ============================================================ */
.category-hero {
  position: relative;
  height: clamp(260px, 42vh, 480px);
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 0;
}

.category-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 8s ease;
}

.category-hero:hover .category-hero__img {
  transform: scale(1.04);
}

.category-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.52) 70%,
    rgba(0,0,0,0.68) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: var(--space-2xl) var(--container-pad);
  max-width: 100%;
}

.category-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  text-align: start;
  max-width: var(--container-max);
  margin: 0 auto 0 0;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.45);
  /* Decorative underline accent */
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

@media (max-width: 767px) {
  .category-hero__overlay {
    padding: var(--space-xl) var(--container-pad);
    align-items: center;
    justify-content: center;
  }
  .category-hero__title {
    text-align: center;
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    margin: 0;
  }
}

.listing-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.breadcrumb {
  padding: var(--space-md) var(--container-pad);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.breadcrumb ol {
  display: flex;
  gap: var(--space-sm);
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  max-width: var(--container-max);
  margin-inline: auto;
  align-items: center;
}
.breadcrumb li:not(:last-child)::after {
  content: '›';
  margin-inline-start: var(--space-sm);
  opacity: 0.4;
  font-size: 1em;
}
.breadcrumb a { color: var(--text-muted); transition: color var(--transition-fast); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--text); font-weight: 500; }

/* No-cover category title block */
.category-title-block {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-2xl);
}

.breadcrumb-inline ol {
  display: flex;
  gap: var(--space-sm);
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--space-md);
  padding: 0;
}
.breadcrumb-inline li:not(:last-child)::after {
  content: '›';
  margin-inline-start: var(--space-sm);
  opacity: 0.4;
}
.breadcrumb-inline a { color: var(--text-muted); }
.breadcrumb-inline a:hover { color: var(--accent); }
.breadcrumb-inline [aria-current] { color: var(--text); font-weight: 500; }

.category-inline-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-sm);
  /* Accent underline */
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.category-inline-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: var(--space-md);
  max-width: 600px;
}

/* ============================================================
   QUICK-VIEW MODAL
   ============================================================ */
#origin-quick-view {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
}
#origin-quick-view.is-open {
  visibility: visible;
  pointer-events: auto;
}
.qv__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
}
#origin-quick-view.is-open .qv__backdrop { opacity: 1; }

.qv__panel {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  width: min(92vw, 860px);
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
#origin-quick-view.is-open .qv__panel {
  transform: translateY(0);
  opacity: 1;
}

.qv__close {
  position: absolute;
  top: var(--space-md);
  inset-inline-end: var(--space-md);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  z-index: 1;
  line-height: 1;
}
.qv__close:hover { color: var(--text); }

.qv__loading {
  padding: var(--space-2xl);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.qv__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 340px;
}
@media (max-width: 600px) {
  .qv__grid { grid-template-columns: 1fr; }
}

.qv__media {
  background: var(--surface);
  overflow: hidden;
}
.qv__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qv__info {
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.qv__title {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text);
  line-height: 1.25;
  margin: 0;
}

.qv__price {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.qv__price .price-original {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-inline-start: var(--space-xs);
  font-weight: 400;
}

/* Variant chips inside quick-view inherit same styles as PDP */
.qv__info #product-variants-options { margin-bottom: var(--space-sm); }

.qv__qty { margin-block: var(--space-sm) var(--space-md); }

.qv__add-btn { margin-top: auto; }

.qv__view-link {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
  text-decoration: underline;
}
.qv__view-link:hover { color: var(--text); }

/* ============================================================
   FLY-TO-CART ANIMATION
   ============================================================ */
.fly-to-cart-clone {
  position: fixed;
  z-index: 9999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 600ms ease;
}

@keyframes cartBounce {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.3); }
  65%  { transform: scale(0.88); }
  100% { transform: scale(1); }
}

.cart-icon--bounce {
  animation: cartBounce 380ms cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
}

/* ============================================================
   BUTTON LOADING STATE — three-dot pulse (site-wide)
   Apply via [data-loading] on any button. The button falls back
   to its disabled (neutral) background, so dots use the accent
   gold for contrast rather than the button's own text color.
   ============================================================ */
[data-loading],
.btn[data-loading],
.btn[disabled][data-loading] {
  position: relative;
  color: transparent !important;
  opacity: 1 !important;
  pointer-events: none;
  --dots-color: var(--accent, #c9a96e);
}

[data-loading]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dots-color);
  box-shadow: -10px 0 0 var(--dots-color), 10px 0 0 var(--dots-color);
  transform: translate(-50%, -50%);
  animation: btn-dots-pulse 1.1s ease-in-out infinite;
}

@keyframes btn-dots-pulse {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

/* Back to top */
.back-to-top {
  position: fixed;
  inset-block-end: var(--space-xl);
  inset-inline-end: var(--space-xl);
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--btn2-bg);
  color: var(--btn2-text);
  border: 1px solid var(--btn2-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  pointer-events: none;
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--btn2-hover-bg);
  color: var(--btn2-hover-text);
  border-color: var(--btn2-hover-bg);
}

/* Loyalty floating button — opposite side from back-to-top */
.loyalty-floating-btn {
  position: fixed;
  z-index: 900;
  inset-block-end: var(--space-xl);
  inset-inline-start: var(--space-xl);
  display: inline-block;
}
.loyalty-floating-btn__trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  background: var(--header-bg);
  color: var(--header-text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}
.loyalty-floating-btn__trigger:hover {
  background: var(--accent);
  color: var(--btn-text);
  transform: translateY(-2px);
}
.loyalty-floating-btn__trigger svg { flex-shrink: 0; }

/* Style the platform-injected "Discover More" link as a Origin secondary button */
.loyalty-rewards-popup__learn-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  border-radius: var(--btn-radius, var(--radius-md));
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  background: var(--btn2-bg, transparent);
  color: var(--btn2-text, var(--accent)) !important;
  border: 2px solid var(--btn2-border, var(--accent));
}
.loyalty-rewards-popup__learn-button:hover {
  background: var(--btn2-hover-bg, var(--accent));
  color: var(--btn2-hover-text, var(--btn2-text, var(--bg))) !important;
  transform: translateY(-1px);
}

/* This popup is injected by the platform and scopes its own --accent/--btn*
   custom properties (white/black), unrelated to Origin's real palette. Using
   var(--accent) etc. here silently resolves to the platform's colors, not
   ours — so this block uses literal Origin palette values (see tokens.css:
   --accent #c9a96e) instead of the (contaminated) custom properties. */
.loyalty-rewards-popup__rewards_row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.loyalty-rewards-popup__rewards_row svg {
  flex-shrink: 0;
}
.loyalty-rewards-popup__rewards_row > div {
  flex: 1 1 160px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  color: #2c3e50;
}
.loyalty-rewards-popup__rewards_row--applied > div {
  color: #c9a96e;
  font-weight: 600;
}

.loyalty-rewards-popup__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-basis: 100%;
  margin-top: 4px;
}

.loyalty-rewards-popup__redeem-btn,
.loyalty-rewards-popup__remove-btn {
  padding: 7px 20px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  background: transparent;
  color: #c9a96e;
  border: 1.5px solid #c9a96e;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.loyalty-rewards-popup__redeem-btn:hover,
.loyalty-rewards-popup__remove-btn:hover {
  background: #c9a96e;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(201, 169, 110, 0.45);
}

.loyalty-rewards-popup__redeem-btn:disabled,
.loyalty-rewards-popup__remove-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.loyalty-rewards-popup__status {
  display: block;
  flex-basis: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: #999999;
}
.loyalty-rewards-popup__status:empty {
  display: none;
}

/* ============================================================
   GLOBAL POPUP
   ============================================================ */
#origin-popup {
  position: fixed;
  inset: 0;
  z-index: 8500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  visibility: hidden;
  pointer-events: none;
}
#origin-popup.is-open {
  visibility: visible;
  pointer-events: auto;
}
.popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition: opacity 0.3s ease;
}
#origin-popup.is-open .popup__backdrop { opacity: 1; }

.popup__panel {
  position: relative;
  display: flex;
  width: min(94vw, 800px);
  max-height: 90vh;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: scale(0.96) translateY(14px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
#origin-popup.is-open .popup__panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.popup__close {
  position: absolute;
  top: var(--space-md);
  inset-inline-end: var(--space-md);
  z-index: 2;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  line-height: 1;
}
.popup__close:hover {
  background: rgba(0, 0, 0, 0.65);
  transform: scale(1.1);
}

.popup__media {
  flex: 0 0 45%;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.popup__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.popup__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-3xl) var(--space-2xl);
  overflow-y: auto;
}
.popup__body--full {
  align-items: center;
  text-align: center;
  padding: var(--space-3xl);
}
.popup__body::before {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: var(--accent);
  margin-bottom: var(--space-lg);
  flex-shrink: 0;
}
.popup__body--full::before {
  margin-inline: auto;
}

.popup__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 var(--space-md);
}
.popup__title:empty { display: none; }

.popup__subtitle {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0 0 var(--space-xl);
  max-width: 34ch;
}
.popup__body--full .popup__subtitle { max-width: 44ch; }

.popup__btn {
  display: inline-block;
  padding: 13px 32px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  align-self: flex-start;
}
.popup__body--full .popup__btn { align-self: center; }
.popup__btn:hover {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
  border-color: var(--btn-hover-bg);
}

@media (max-width: 640px) {
  .popup__panel {
    flex-direction: column;
    width: min(96vw, 480px);
    max-height: 88vh;
    overflow-y: auto;
  }
  .popup__media {
    flex: 0 0 200px;
    min-height: 200px;
  }
  .popup__body,
  .popup__body--full {
    padding: var(--space-2xl) var(--space-xl);
    align-items: flex-start;
    text-align: start;
  }
  .popup__body--full::before { margin-inline: 0; }
  .popup__subtitle { max-width: none; }
  .popup__btn { align-self: flex-start; }
}

/* ============================================================
   BEFORE & AFTER SECTION
   ============================================================ */
.before-after__slider {
  position: relative;
  width: 100%;
  max-width: var(--ba-width, 800px);
  aspect-ratio: var(--ba-ratio, 4 / 3);
  max-height: 80vh;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  user-select: none;
  direction: ltr;
}

@media (max-width: 767px) {
  .before-after__slider {
    max-height: 60vh;
  }
}

.before-after__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

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

.before-after__image--before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.before-after__tag {
  position: absolute;
  top: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.before-after__tag--before { inset-inline-start: var(--space-md); }
.before-after__tag--after { inset-inline-end: var(--space-md); }

.before-after__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.before-after__handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.before-after__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
}

.before-after__slider--empty {
  background: var(--bg-subtle, #f2f2f2);
}

.before-after__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0.4;
}

/* Themed dropdown for product custom options (replaces the browser's blue native option list; JS: initCustomSelects) */
.lune-select {
  position: relative;
}

.lune-select > select.custom-field__select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.lune-select__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  padding-inline-end: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: start;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* chevron (accent colour, flips when open) */
.lune-select__btn::after {
  content: "";
  position: absolute;
  inset-inline-end: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform var(--transition-fast);
}

.lune-select.is-open .lune-select__btn::after {
  margin-top: -2px;
  transform: rotate(225deg);
}

.lune-select__btn:hover {
  border-color: var(--accent);
}

.lune-select__btn:focus-visible,
.lune-select.is-open .lune-select__btn {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent);
}

/* a value has been chosen: accent border */
.lune-select:not(.is-placeholder) .lune-select__btn {
  border-color: var(--accent);
}

.lune-select.is-placeholder .lune-select__label {
  opacity: 0.7;
}

.lune-select__list {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: none;
  max-height: 260px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.lune-select.is-open .lune-select__list {
  display: block;
}

.lune-select__option {
  position: relative;
  padding: 10px 14px;
  padding-inline-end: 40px;
  border-radius: calc(var(--radius-md) - 2px);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}

.lune-select__option:hover {
  background: var(--surface-2);
  background: color-mix(in srgb, var(--accent) 15%, var(--surface));
}

/* selected row: stronger tint, bold, check mark */
.lune-select__option.is-selected {
  font-weight: 700;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--accent) 30%, var(--surface));
  color: color-mix(in srgb, var(--text) 55%, var(--text-muted));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, var(--surface));
}

.lune-select__option.is-selected::after {
  content: "";
  position: absolute;
  inset-inline-end: 16px;
  top: 50%;
  width: 6px;
  height: 11px;
  margin-top: -8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.lune-select__option.is-disabled {
  display: none;
}

