/* =========================================================================
   Zayranex — marketplace UI
   Built from the UX/UI teardown: keeps the strong patterns (sticky header,
   mega menu, facet sidebar, 3-column PDP, drawers, delivery cutoff) and
   applies the fixes (landmarks, AA contrast, Sponsored labels, Clear all,
   honest search states, collapsed "Ways to save", single token scale).
   ========================================================================= */

/* ---------- 1. Design tokens (one semantic set, 4/8 spacing) ---------- */
:root {
  /* brand */
  --brand: #ff6a00;
  --brand-soft: #fff3eb;
  --brand-strong: #d64000;

  /* text — all ≥ 4.5:1 on white */
  --text: #444444;          /* 9.57:1 */
  --text-strong: #222222;
  --text-muted: #666666;    /* ~6.2:1 (was #7e859b 3.67:1) */
  --text-was: #767676;      /* ~5:1  (was #989fb3 2.64:1) */
  --text-inverse: #ffffff;

  /* action + status */
  --action: #d64000;        /* one action blue */
  --action-hover: #b83600;
  --success: #0f7a3e;       /* discount green ~5.4:1 (was #05af25 2.93:1) */
  --success-bg: #e8f6ee;
  --danger: #c81e1e;
  --danger-bg: #fdecec;
  --warning-bg: #fff6d6;
  --express: #222222;
  --bestseller: #0a4f4a;
  --sponsored: #8a3a00;

  /* surfaces */
  --bg: #ffffff;
  --bg-page: #f4f4f4;
  --bg-muted: #f4f4f4;
  --border: #e5e5e5;
  --border-strong: #cccccc;
  --scrim: rgba(16, 22, 40, .55);

  /* type scale (1.4 line-height) */
  --font: "Inter", "SF Pro Text", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --fs-10: .625rem; --fs-12: .75rem; --fs-14: .875rem; --fs-16: 1rem;
  --fs-18: 1.125rem; --fs-22: 1.375rem; --fs-24: 1.5rem; --fs-32: 2rem;

  /* spacing (4/8) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 40px; --s-8: 48px;
  --gutter: 24px;

  /* radius (3 values only) */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 9999px;

  /* elevation */
  --shadow-1: 0 0 0 1px var(--border);
  --shadow-2: 0 4px 16px rgba(16, 22, 40, .08);
  --shadow-3: 0 12px 40px rgba(16, 22, 40, .18);

  /* layout */
  --max: 1440px;
  --header-h: 64px;
  --tabbar-h: 58px;

  /* z-index scale */
  --z-sticky: 50; --z-header: 60; --z-menu: 70; --z-drawer: 90; --z-modal: 100; --z-toast: 110;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-14);
  line-height: 1.4;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--action); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { color: var(--text-strong); line-height: 1.25; }
h1 { font-size: var(--fs-24); }
h2 { font-size: var(--fs-22); }
h3 { font-size: var(--fs-16); }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; border-radius: var(--r-sm); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -60px; z-index: 999;
  background: var(--text-strong); color: #fff; padding: var(--s-2) var(--s-4);
  border-radius: var(--r-md); font-weight: 600;
}
.skip-link:focus { top: var(--s-2); }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--text-muted); }
.hidden { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; flex: none; }

/* ---------- 3. Buttons, inputs, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5); border-radius: var(--r-md);
  font-weight: 700; font-size: var(--fs-14); text-transform: uppercase; letter-spacing: .02em;
  transition: background .15s, border-color .15s, color .15s; text-decoration: none !important;
}
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-hover); }
.btn-secondary { background: #fff; color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.btn-secondary:hover { background: #eef2fd; }
.btn-ghost { color: var(--text-strong); }
.btn-ghost:hover { background: var(--bg-muted); }
.btn-brand { background: #fff; color: var(--text-strong); }
.btn-brand:hover { background: #fff3eb; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: #f0f0f2; color: #8a8f9f; box-shadow: none; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: 0 var(--s-3); font-size: var(--fs-12); }
.link-btn { color: var(--action); font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill);
  color: var(--text-strong);
}
.icon-btn:hover { background: rgba(0, 0, 0, .06); }

.field { display: grid; gap: var(--s-1); }
.field label { font-size: var(--fs-12); font-weight: 600; color: var(--text-strong); }
.input, .select, textarea.input {
  width: 100%; min-height: 44px; padding: 0 var(--s-3); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); background: #fff;
}
textarea.input { padding: var(--s-3); min-height: 96px; resize: vertical; }
.input:focus, .select:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px rgba(255, 106, 0, .2); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: var(--fs-12); }

.chip {
  display: inline-flex; align-items: center; gap: var(--s-1); white-space: nowrap;
  min-height: 32px; padding: 0 var(--s-3); border-radius: var(--r-pill);
  border: 1px solid var(--border-strong); background: #fff; font-weight: 600; font-size: var(--fs-12);
  color: var(--text-strong);
}
.chip:hover { border-color: var(--text-strong); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--text-strong); color: #fff; border-color: var(--text-strong); }
.chip-remove { background: #fff3eb; border-color: #ffd2b3; color: var(--action); }
.chip-remove svg { width: 14px; height: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px var(--s-2);
  border-radius: var(--r-sm); font-size: var(--fs-10); font-weight: 700; text-transform: uppercase;
  letter-spacing: .02em; line-height: 1.6;
}
.badge-bestseller { background: var(--bestseller); color: #fff; }
.badge-pick { background: var(--text-strong); color: #fff; }
.badge-express { background: var(--express); color: #ffb37a; font-style: italic; }
.badge-sponsored { background: #fff; color: var(--sponsored); border: 1px solid #ffd2b3; }
.badge-deal { background: var(--danger); color: #fff; }
.badge-success { background: var(--success-bg); color: var(--success); }

/* ---------- 4. Header ---------- */
.site-header { position: sticky; top: 0; z-index: var(--z-header); background: var(--brand); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.header-main { display: flex; align-items: center; gap: var(--s-4); height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 24px; letter-spacing: -.04em; color: var(--text-strong); text-decoration: none !important; }
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-strong); }
.deliver-to {
  display: flex; align-items: center; gap: var(--s-2); padding: var(--s-1) var(--s-2);
  border-radius: var(--r-md); color: var(--text-strong); text-align: start; line-height: 1.2;
}
.deliver-to:hover { background: rgba(0, 0, 0, .06); }
.deliver-to small { display: block; font-size: var(--fs-10); color: var(--text); }
.deliver-to strong { font-size: var(--fs-12); }

.search { position: relative; flex: 1; min-width: 0; }
.search-form { display: flex; align-items: center; background: #fff; border-radius: var(--r-md); height: 44px; padding-inline: var(--s-3); gap: var(--s-2); }
.search-form:focus-within { box-shadow: 0 0 0 3px rgba(16, 22, 40, .25); }
.search-input { flex: 1; min-width: 0; border: 0; outline: 0; height: 100%; background: transparent; }
.search-clear { color: var(--text-muted); }
.search-panel {
  position: absolute; inset-inline: 0; top: calc(100% + 6px); background: #fff;
  border-radius: var(--r-md); box-shadow: var(--shadow-3); padding: var(--s-2) 0; max-height: 70vh; overflow: auto;
}
.search-panel h2 { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding: var(--s-2) var(--s-4); }
.search-option { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-4); cursor: pointer; color: var(--text-strong); }
.search-option[aria-selected="true"], .search-option:hover { background: var(--bg-muted); }
.search-option mark { background: none; font-weight: 700; color: inherit; }
.search-option .scope { color: var(--action); font-size: var(--fs-12); }
.search-thumb { width: 36px; height: 36px; border-radius: var(--r-sm); flex: none; }
.search-trending { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0 var(--s-4) var(--s-2); }

.header-actions { display: flex; align-items: center; gap: var(--s-1); }
.header-action {
  position: relative; display: inline-flex; align-items: center; gap: var(--s-2); padding: var(--s-2);
  border-radius: var(--r-md); color: var(--text-strong); font-weight: 600; text-decoration: none !important;
}
.header-action:hover { background: rgba(0, 0, 0, .06); }
.cart-count {
  position: absolute; top: 0; inset-inline-start: 22px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--danger); color: #fff; font-size: var(--fs-10);
  font-weight: 700; display: grid; place-items: center; border: 2px solid var(--brand);
}
.cart-count[hidden] { display: none; }
.account-menu { position: relative; }
.dropdown {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 220px; background: #fff;
  border-radius: var(--r-md); box-shadow: var(--shadow-3); padding: var(--s-2); z-index: var(--z-menu);
}
.dropdown a, .dropdown button { display: flex; width: 100%; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); color: var(--text-strong); text-align: start; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg-muted); text-decoration: none; }
.dropdown hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-1) 0; }

/* department nav + mega menu */
.dept-nav { background: #fff; border-bottom: 1px solid var(--border); transition: transform .2s var(--ease); }
.site-header.is-compact .dept-nav { display: none; }
.dept-row { display: flex; align-items: center; gap: var(--s-2); height: 44px; }
.all-cats { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; color: var(--text-strong); padding: var(--s-2) var(--s-3); border-radius: var(--r-md); white-space: nowrap; }
.all-cats:hover { background: var(--bg-muted); }
.dept-list { display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; flex: 1; -webkit-mask-image: linear-gradient(to right, #000 92%, transparent); mask-image: linear-gradient(to right, #000 92%, transparent); }
[dir="rtl"] .dept-list { -webkit-mask-image: linear-gradient(to left, #000 92%, transparent); mask-image: linear-gradient(to left, #000 92%, transparent); }
.dept-list::-webkit-scrollbar { display: none; }
.dept-item > a {
  display: block; padding: var(--s-3) var(--s-3); white-space: nowrap; font-weight: 600; font-size: var(--fs-12);
  text-transform: uppercase; color: var(--text-strong); border-bottom: 3px solid transparent;
}
.dept-item > a:hover, .dept-item.is-open > a { border-color: var(--text-strong); text-decoration: none; }
.promo-pill { white-space: nowrap; font-size: var(--fs-12); font-weight: 700; color: var(--text-strong); background: var(--brand-soft); padding: var(--s-1) var(--s-3); border-radius: var(--r-pill); }
.mega {
  position: absolute; inset-inline: 0; top: 100%; background: #fff; box-shadow: var(--shadow-3);
  border-top: 1px solid var(--border); z-index: var(--z-menu); max-height: calc(100vh - 140px); overflow: auto;
}
.mega-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 260px; gap: var(--s-5); padding-block: var(--s-5); }
.mega-group h3 { font-size: var(--fs-14); margin-bottom: var(--s-2); }
.mega-group a { display: block; padding: 5px 0; color: var(--text); }
.mega-group a:hover { color: var(--action); }
.mega-group .tag { font-size: var(--fs-10); color: var(--sponsored); background: var(--brand-soft); padding: 0 6px; border-radius: var(--r-pill); margin-inline-start: 6px; }
.mega-promo { border-radius: var(--r-lg); padding: var(--s-5); min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; }
.mega-brands { grid-column: 1 / -1; display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; border-top: 1px solid var(--border); padding-top: var(--s-4); }
.mega-brands h3 { font-size: var(--fs-12); text-transform: uppercase; color: var(--text-muted); margin-inline-end: var(--s-2); }
.brand-logo { display: grid; place-items: center; min-width: 96px; height: 40px; padding: 0 var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); font-weight: 800; color: var(--text-strong); letter-spacing: -.02em; }

/* ---------- 5. Generic section + carousel ---------- */
main { display: block; padding-bottom: var(--s-8); }
.section { margin-top: var(--s-6); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.section-head p { color: var(--text-muted); }
.panel { background: #fff; border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-1); }
.rail-wrap { position: relative; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 196px; gap: var(--s-3);
  overflow-x: auto; scroll-snap-type: inline mandatory; scroll-behavior: smooth; padding-bottom: var(--s-2);
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.rail-btn {
  position: absolute; top: 40%; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-2); display: grid; place-items: center; color: var(--text-strong);
}
.rail-btn.prev { inset-inline-start: -16px; }
.rail-btn.next { inset-inline-end: -16px; }
.rail-btn[disabled] { opacity: 0; pointer-events: none; }
[dir="rtl"] .rail-btn svg { transform: scaleX(-1); }

/* ---------- 6. Homepage ---------- */
.home-intro { padding-top: var(--s-5); }
.home-intro h1 { font-size: var(--fs-18); font-weight: 700; }
.home-intro p { color: var(--text-muted); }
.hero { position: relative; margin-top: var(--s-4); border-radius: var(--r-lg); overflow: hidden; }
.hero-track { display: flex; transition: transform .5s var(--ease); }
.hero-slide {
  flex: 0 0 100%; min-height: 320px; padding: var(--s-7); display: flex; flex-direction: column; justify-content: center;
  gap: var(--s-3); color: #fff;
}
.hero-slide .eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: var(--fs-12); }
.hero-slide h2 { color: inherit; font-size: clamp(28px, 4vw, 48px); font-weight: 800; max-width: 14ch; letter-spacing: -.02em; }
.hero-slide p { max-width: 42ch; font-size: var(--fs-16); }
.hero-slide .btn { align-self: flex-start; }
.slide-yellow { background: linear-gradient(115deg, #ff4d00, #ff7226 55%, #ff9359); color: #fff; }
.slide-blue { background: linear-gradient(120deg, #2122b8, #3c5bff); }
.slide-dark { background: linear-gradient(120deg, #101628, #2b3350); }
.slide-green { background: linear-gradient(120deg, #0a4f4a, #12866f); }
.hero-controls { position: absolute; inset-inline-end: var(--s-4); bottom: var(--s-4); display: flex; align-items: center; gap: var(--s-2); background: rgba(255, 255, 255, .9); border-radius: var(--r-pill); padding: 4px 8px; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.hero-dot[aria-current="true"] { background: var(--text-strong); width: 20px; border-radius: 4px; }
.hero-controls .icon-btn { width: 32px; height: 32px; }

.cat-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 96px; gap: var(--s-3); overflow-x: auto; padding: var(--s-2) 0; scrollbar-width: none; }
.cat-tile { display: grid; justify-items: center; gap: var(--s-2); text-align: center; color: var(--text-strong); font-size: var(--fs-12); font-weight: 600; position: relative; }
.cat-tile:hover { text-decoration: none; }
.cat-tile:hover .cat-icon { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.cat-icon { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; transition: transform .15s, box-shadow .15s; }
.cat-icon svg { width: 34px; height: 34px; color: var(--text-strong); }
.cat-sticker { position: absolute; top: -4px; inset-inline-end: -2px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); }

.triad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.triad-card { border-radius: var(--r-lg); padding: var(--s-5); min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; color: var(--text-strong); }
.triad-card:hover { text-decoration: none; box-shadow: var(--shadow-2); }
.triad-card h3 { font-size: var(--fs-22); }
.deal-timer { display: inline-flex; gap: 4px; align-items: center; font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; }
.tabs-inline { display: flex; gap: var(--s-2); overflow-x: auto; }

.banner-row { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s-4); }
.banner { border-radius: var(--r-lg); padding: var(--s-6); min-height: 160px; display: flex; flex-direction: column; justify-content: center; gap: var(--s-2); color: var(--text-strong); position: relative; }
.banner .badge-sponsored { position: absolute; top: var(--s-3); inset-inline-end: var(--s-3); }
.banner h3 { font-size: var(--fs-24); }
.brand-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s-3); }
.brand-row a { position: relative; }
.brand-row .brand-logo { height: 64px; background: #fff; }
.brand-row .badge-sponsored { position: absolute; top: -8px; inset-inline-end: 4px; }
.popular { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- 7. Product card ---------- */
.card {
  position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--r-md);
  box-shadow: var(--shadow-1); padding: var(--s-2); transition: box-shadow .15s; min-width: 0;
}
.card:hover { box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-2); }
.card-link { color: inherit; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-link:hover { text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* whole card clickable */
.card-media { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-sm); overflow: hidden; display: grid; place-items: center; }
.card-media svg { width: 52%; height: auto; color: rgba(16, 22, 40, .75); }
.card-top { position: absolute; top: var(--s-2); inset-inline-start: var(--s-2); display: flex; gap: 4px; flex-wrap: wrap; z-index: 2; }
.wish-btn { position: absolute; top: var(--s-2); inset-inline-end: var(--s-2); z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-1); color: var(--text-strong); }
.wish-btn[aria-pressed="true"] { color: var(--danger); }
.wish-btn[aria-pressed="true"] svg { fill: currentColor; }
.quick-add { position: absolute; bottom: var(--s-2); inset-inline-end: var(--s-2); z-index: 2; width: 36px; height: 36px; border-radius: var(--r-md); background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-2); color: var(--text-strong); }
.quick-add:hover { background: var(--action); color: #fff; }
.card-title { font-size: var(--fs-14); font-weight: 500; color: var(--text-strong); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-12); font-weight: 600; color: var(--text-strong); }
.rating .star { color: #e8a500; width: 14px; height: 14px; }
.rating .count { color: var(--text-muted); font-weight: 400; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.price-now { font-size: var(--fs-18); font-weight: 700; color: var(--text-strong); }
.price-now .cur { font-size: var(--fs-12); font-weight: 600; margin-inline-end: 2px; }
.price-was { font-size: var(--fs-12); color: var(--text-was); text-decoration: line-through; }
.price-off { font-size: var(--fs-12); font-weight: 700; color: var(--success); }
.signal { font-size: var(--fs-12); color: var(--text-muted); }
.signal.is-urgent { color: var(--danger); font-weight: 600; }
.delivery-line { display: flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--text-strong); margin-top: auto; padding-top: 4px; padding-inline-end: 40px; min-height: 36px; flex-wrap: wrap; }
.delivery-line .fast { color: var(--express); font-weight: 700; }
.card.is-sponsored-slot { background: #fffef0; }

/* ---------- 8. Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-12); color: var(--text-muted); padding-block: var(--s-3); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb li + li::before { content: "›"; margin-inline-end: 6px; }
.breadcrumb [aria-current] { color: var(--text-strong); font-weight: 600; }

/* ---------- 9. Search / PLP ---------- */
.plp { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.facets { position: sticky; top: calc(var(--header-h) + var(--s-4)); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.facets-head { display: flex; justify-content: space-between; align-items: center; padding: var(--s-4); border-bottom: 1px solid var(--border); }
.facets-head h2 { font-size: var(--fs-16); }
.facet { border-bottom: 1px solid var(--border); }
.facet:last-child { border-bottom: 0; }
.facet-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: var(--s-3) var(--s-4); font-weight: 700; color: var(--text-strong); }
.facet-toggle svg { transition: transform .2s; }
.facet-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.facet-body { padding: 0 var(--s-4) var(--s-4); display: grid; gap: var(--s-2); }
.facet-body[hidden] { display: none; }
.check { display: flex; align-items: center; gap: var(--s-2); cursor: pointer; font-size: var(--fs-14); }
.check input { width: 18px; height: 18px; accent-color: var(--action); flex: none; }
.check small { color: var(--text-muted); margin-inline-start: auto; }
.check .hint { display: block; font-size: var(--fs-12); color: var(--text-muted); }
.price-range { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--s-2); align-items: end; }
.price-range .input { min-height: 38px; }
.range { width: 100%; accent-color: var(--action); }

.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.results-head h1 { font-size: var(--fs-18); }
.results-head h1 span { color: var(--text-muted); font-weight: 400; }
.sort { display: flex; align-items: center; gap: var(--s-2); }
.sort .select { min-height: 38px; width: auto; }
.applied { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
.applied:empty { display: none; }
.quick-filters { display: flex; gap: var(--s-2); overflow-x: auto; padding-bottom: var(--s-2); margin-bottom: var(--s-3); scrollbar-width: none; }
.notice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--warning-bg); color: var(--text-strong); margin-bottom: var(--s-3); }
.notice.info { background: #eef2fd; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-3); }
.sponsored-slot { margin-bottom: var(--s-4); padding: var(--s-3); border-radius: var(--r-lg); background: #fff8f3; border: 1px dashed #ffc29a; }
.sponsored-slot-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-2); font-size: var(--fs-12); color: var(--text-muted); }
.empty-state { text-align: center; padding: var(--s-8) var(--s-4); background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-1); display: grid; gap: var(--s-3); justify-items: center; }
.empty-state svg { width: 96px; height: 96px; color: var(--border-strong); }
.pagination { display: flex; justify-content: center; gap: var(--s-1); margin-top: var(--s-5); }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-md); border: 1px solid var(--border); background: #fff; color: var(--text-strong); font-weight: 600; }
.pagination [aria-current="page"] { border-color: var(--action); color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.filter-open-btn { display: none; }

/* ---------- 10. Product detail page ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) 320px; gap: var(--s-5); align-items: start; }
.gallery { position: sticky; top: calc(var(--header-h) + var(--s-4)); display: grid; grid-template-columns: 64px 1fr; gap: var(--s-3); }
.thumbs { display: grid; gap: var(--s-2); align-content: start; }
.thumb { width: 64px; height: 80px; border-radius: var(--r-md); border: 2px solid transparent; overflow: hidden; display: grid; place-items: center; }
.thumb svg { width: 60%; height: auto; }
.thumb[aria-current="true"] { border-color: var(--text-strong); }
.main-image { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; cursor: zoom-in; background: #fff; }
.main-image svg { width: 50%; height: auto; transition: transform .3s var(--ease); color: rgba(16, 22, 40, .8); }
.main-image.is-zoomed { cursor: zoom-out; }
.main-image.is-zoomed svg { transform: scale(1.8); }
.main-image .wish-btn { z-index: 3; }
.pdp-info { display: grid; gap: var(--s-4); }
.pdp-brand { font-weight: 700; color: var(--action); text-transform: uppercase; font-size: var(--fs-12); letter-spacing: .04em; }
.pdp-title { font-size: var(--fs-22); font-weight: 600; }
.pdp-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; font-size: var(--fs-12); color: var(--text-muted); }
.pdp-price .price-now { font-size: var(--fs-32); }
.pdp-price .vat { font-size: var(--fs-12); color: var(--text-muted); }
.pill-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.info-line { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); width: 100%; text-align: start; color: var(--text-strong); background: #fff; }
.info-line:hover { border-color: var(--border-strong); }
.info-line strong { font-weight: 700; }
.ways-to-save { border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; }
.ways-to-save summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: var(--s-3); font-weight: 700; color: var(--text-strong); }
.ways-to-save summary::-webkit-details-marker { display: none; }
.ways-to-save[open] summary svg { transform: rotate(180deg); }
.offer-list { display: grid; gap: var(--s-2); padding: 0 var(--s-3) var(--s-3); }
.offer { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--bg-muted); }
.offer code { font-weight: 700; color: var(--text-strong); background: #fff; border: 1px dashed var(--border-strong); padding: 2px 8px; border-radius: var(--r-sm); }
.variant-group { display: grid; gap: var(--s-2); }
.variant-group legend { font-weight: 700; color: var(--text-strong); margin-bottom: var(--s-2); padding: 0; }
.variant-group fieldset { border: 0; padding: 0; margin: 0; }
.swatches, .sizes { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.swatch { display: grid; gap: 4px; justify-items: center; padding: var(--s-2); border: 1px solid var(--border); border-radius: var(--r-md); min-width: 84px; font-size: var(--fs-12); color: var(--text-strong); background: #fff; }
.swatch .dot { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.swatch[aria-checked="true"], .size[aria-checked="true"] { border-color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--text-strong); }
.swatch[aria-disabled="true"], .size[aria-disabled="true"] { opacity: .5; cursor: not-allowed; background: repeating-linear-gradient(135deg, #fff 0 6px, var(--bg-muted) 6px 12px); }
.size { min-width: 56px; min-height: 40px; padding: 0 var(--s-3); border: 1px solid var(--border-strong); border-radius: var(--r-md); font-weight: 600; color: var(--text-strong); background: #fff; }
.variant-error { color: var(--danger); font-weight: 600; font-size: var(--fs-12); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-md); height: 44px; }
.qty button { width: 40px; height: 100%; display: grid; place-items: center; color: var(--text-strong); }
.qty button:disabled { color: var(--border-strong); cursor: not-allowed; }
.qty output, .qty input { width: 40px; text-align: center; font-weight: 700; border: 0; }
.buy-row { display: flex; gap: var(--s-2); }
.buy-row .btn { flex: 1; }

.rail-card { display: grid; gap: var(--s-3); }
.delivery-card .eta { font-size: var(--fs-16); font-weight: 700; color: var(--text-strong); }
.delivery-card .cutoff { color: var(--success); font-weight: 600; font-variant-numeric: tabular-nums; }
.seller-card .seller-name { font-weight: 700; color: var(--action); }
.seller-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); text-align: center; }
.seller-stats div { background: var(--bg-muted); border-radius: var(--r-md); padding: var(--s-2); }
.seller-stats strong { display: block; color: var(--text-strong); font-size: var(--fs-16); }
.seller-stats span { font-size: var(--fs-10); color: var(--text-muted); }
.promises { display: grid; gap: var(--s-3); }
.promise { display: flex; gap: var(--s-3); align-items: flex-start; }
.promise svg { color: var(--action); }
.promise strong { display: block; color: var(--text-strong); }

.pdp-tabs { position: sticky; top: var(--header-h); z-index: var(--z-sticky); background: #fff; border-bottom: 1px solid var(--border); margin-top: var(--s-7); }
.pdp-tabs ul { display: flex; gap: var(--s-5); }
.pdp-tabs a { display: block; padding: var(--s-4) 0; font-weight: 700; color: var(--text-muted); border-bottom: 3px solid transparent; }
.pdp-tabs a.is-active, .pdp-tabs a:hover { color: var(--text-strong); border-color: var(--text-strong); text-decoration: none; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: start; padding: var(--s-3); border-bottom: 1px solid var(--border); vertical-align: top; }
.spec-table th { width: 35%; color: var(--text-muted); font-weight: 600; background: var(--bg-muted); }
.ai-summary { background: linear-gradient(135deg, #f4f6ff, #fffde8); border-radius: var(--r-lg); padding: var(--s-4); border: 1px solid var(--border); }
.ai-summary h3 { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.fbt { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.fbt-item { display: flex; gap: var(--s-2); align-items: center; padding: var(--s-2); border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; }
.fbt-item .mini { width: 56px; height: 56px; border-radius: var(--r-sm); display: grid; place-items: center; }
.fbt-item .mini svg { width: 60%; height: auto; }
.fbt-plus { font-size: var(--fs-24); color: var(--text-muted); }

.reviews { display: grid; grid-template-columns: 300px 1fr; gap: var(--s-6); }
.review-summary .big { font-size: 48px; font-weight: 800; color: var(--text-strong); line-height: 1; }
.histo { display: grid; gap: 6px; margin-top: var(--s-3); }
.histo-row { display: grid; grid-template-columns: 34px 1fr 40px; gap: var(--s-2); align-items: center; font-size: var(--fs-12); }
.histo-bar { height: 8px; background: var(--bg-muted); border-radius: var(--r-pill); overflow: hidden; }
.histo-bar span { display: block; height: 100%; background: var(--success); border-radius: inherit; }
.review { padding: var(--s-4) 0; border-bottom: 1px solid var(--border); display: grid; gap: var(--s-2); }
.review-head { display: flex; align-items: center; gap: var(--s-3); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-muted); display: grid; place-items: center; font-weight: 700; color: var(--text-strong); }
.verified { color: var(--success); font-size: var(--fs-12); font-weight: 600; }
.segmented { display: inline-flex; background: var(--bg-muted); border-radius: var(--r-pill); padding: 3px; }
.segmented button { padding: 6px var(--s-3); border-radius: var(--r-pill); font-weight: 600; font-size: var(--fs-12); color: var(--text-muted); }
.segmented button[aria-pressed="true"] { background: #fff; color: var(--text-strong); box-shadow: var(--shadow-1); }

.sticky-atc {
  position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-sticky); background: #fff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .1); transform: translateY(110%); transition: transform .25s var(--ease);
}
.sticky-atc.is-visible { transform: translateY(0); }
.sticky-atc .container { display: flex; align-items: center; gap: var(--s-4); padding-block: var(--s-3); }
.sticky-atc .mini { width: 48px; height: 48px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; }
.sticky-atc .mini svg { width: 60%; height: auto; }
.sticky-atc .title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--text-strong); }

/* ---------- 11. Drawer, modal, toast ---------- */
.overlay { position: fixed; inset: 0; background: var(--scrim); z-index: var(--z-drawer); opacity: 0; transition: opacity .2s; }
.overlay.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(440px, 100%); background: #fff;
  z-index: calc(var(--z-drawer) + 1); display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform .28s var(--ease); box-shadow: var(--shadow-3);
}
[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.is-open { transform: translateX(0) !important; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: var(--fs-18); }
.drawer-body { flex: 1; overflow: auto; padding: var(--s-5); display: grid; gap: var(--s-4); align-content: start; }
.drawer-foot { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border); display: grid; gap: var(--s-2); }
.drawer-left { inset-inline-end: auto; inset-inline-start: 0; transform: translateX(-100%); }
[dir="rtl"] .drawer-left { transform: translateX(100%); }

.modal {
  position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--s-4);
}
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: var(--scrim); }
.modal-card { position: relative; background: #fff; border-radius: var(--r-lg); width: min(520px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow-3); animation: pop .2s var(--ease); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.modal-body { padding: var(--s-5); display: grid; gap: var(--s-4); }
.tabs { display: flex; border-bottom: 1px solid var(--border); }
.tabs [role="tab"] { flex: 1; padding: var(--s-3); font-weight: 700; color: var(--text-muted); border-bottom: 3px solid transparent; }
.tabs [role="tab"][aria-selected="true"] { color: var(--text-strong); border-color: var(--text-strong); }

.toast-region { position: fixed; bottom: var(--s-5); inset-inline-start: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: grid; gap: var(--s-2); }
.toast { display: flex; align-items: center; gap: var(--s-3); background: var(--text-strong); color: #fff; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); box-shadow: var(--shadow-3); animation: pop .2s var(--ease); }
.toast button { color: #ff9359; font-weight: 700; }

.compare-table { width: 100%; border-collapse: collapse; font-size: var(--fs-12); }
.compare-table th, .compare-table td { border: 1px solid var(--border); padding: var(--s-2); text-align: start; }
.seller-offer { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); }
.seller-offer.is-selected { border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.skeleton { background: linear-gradient(90deg, var(--bg-muted) 25%, #e9ebf2 50%, var(--bg-muted) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 12. Cart ---------- */
.ship-banner { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--success-bg); color: var(--success); border-radius: var(--r-md); font-weight: 600; margin-block: var(--s-4); }
.progress { height: 6px; background: rgba(15, 122, 62, .15); border-radius: var(--r-pill); overflow: hidden; margin-top: 6px; }
.progress span { display: block; height: 100%; background: var(--success); }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-5); align-items: start; }
.cart-items { display: grid; gap: var(--s-3); }
.line-item { display: grid; grid-template-columns: 112px 1fr auto; gap: var(--s-4); background: #fff; border-radius: var(--r-lg); padding: var(--s-4); box-shadow: var(--shadow-1); }
.line-media { width: 112px; height: 140px; border-radius: var(--r-md); display: grid; place-items: center; }
.line-media svg { width: 55%; height: auto; }
.line-info { display: grid; gap: 6px; align-content: start; }
.line-info h3 { font-weight: 600; font-size: var(--fs-14); }
.line-actions { display: flex; gap: var(--s-4); margin-top: var(--s-2); }
.line-side { display: grid; justify-items: end; align-content: space-between; gap: var(--s-3); }
.summary { position: sticky; top: calc(var(--header-h) + var(--s-4)); }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: var(--s-2); padding-top: var(--s-3); font-size: var(--fs-18); font-weight: 800; color: var(--text-strong); }
.summary-row .save { color: var(--success); font-weight: 600; }
.coupon-form { display: flex; gap: var(--s-2); }
.coupon-form .input { text-transform: uppercase; }
.trust-row { display: flex; gap: var(--s-4); flex-wrap: wrap; font-size: var(--fs-12); color: var(--text-muted); }
.trust-row span { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- 13. Checkout ---------- */
.checkout-header { background: #fff; border-bottom: 1px solid var(--border); }
.checkout-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.secure { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-weight: 700; font-size: var(--fs-12); }
.stepper { display: flex; gap: var(--s-2); margin-block: var(--s-5); counter-reset: step; }
.stepper li { flex: 1; display: flex; align-items: center; gap: var(--s-2); font-weight: 600; color: var(--text-muted); counter-increment: step; font-size: var(--fs-12); }
.stepper li::before { content: counter(step); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); flex: none; font-weight: 700; }
.stepper li::after { content: ""; flex: 1; height: 2px; background: var(--border); }
.stepper li:last-child::after { display: none; }
.stepper li.is-done, .stepper li.is-current { color: var(--text-strong); }
.stepper li.is-done::before { content: "✓"; background: var(--success); border-color: var(--success); color: #fff; }
.stepper li.is-current::before { border-color: var(--text-strong); background: var(--text-strong); color: #fff; }
.co-section { display: grid; gap: var(--s-4); }
.co-section + .co-section { margin-top: var(--s-4); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.form-grid .full { grid-column: 1 / -1; }
.choice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border: 1px solid var(--border-strong); border-radius: var(--r-md); cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action); background: #fff8f3; }
.choice input { margin-top: 3px; accent-color: var(--action); width: 18px; height: 18px; flex: none; }
.choice strong { display: block; color: var(--text-strong); }
.choice .aside { margin-inline-start: auto; font-weight: 700; color: var(--text-strong); white-space: nowrap; }
.choices { display: grid; gap: var(--s-2); }
.mini-line { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-2) 0; }
.mini-line .mini { width: 48px; height: 48px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; }
.mini-line .mini svg { width: 60%; height: auto; }
.mini-line .t { flex: 1; min-width: 0; font-size: var(--fs-12); }
.success-hero { text-align: center; display: grid; justify-items: center; gap: var(--s-3); padding: var(--s-7) var(--s-4); }
.success-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: grid; place-items: center; }
.success-icon svg { width: 36px; height: 36px; }

/* ---------- 14. Account ---------- */
.account-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--s-5); align-items: start; margin-top: var(--s-5); }
.account-nav { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: var(--s-3); position: sticky; top: calc(var(--header-h) + var(--s-4)); }
.account-user { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3); border-bottom: 1px solid var(--border); margin-bottom: var(--s-2); }
.account-nav a { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3); border-radius: var(--r-md); color: var(--text-strong); font-weight: 600; }
.account-nav a:hover { background: var(--bg-muted); text-decoration: none; }
.account-nav a[aria-current="page"] { background: var(--brand-soft); }
.order-card { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.order-card + .order-card { margin-top: var(--s-4); }
.order-head { display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; padding: var(--s-4) var(--s-5); background: var(--bg-muted); font-size: var(--fs-12); }
.order-head strong { display: block; color: var(--text-strong); font-size: var(--fs-14); }
.order-body { padding: var(--s-5); display: grid; gap: var(--s-4); }
.track { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.track li { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: var(--fs-12); color: var(--text-muted); position: relative; }
.track li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--border-strong); z-index: 1; }
.track li::after { content: ""; position: absolute; top: 7px; inset-inline-start: 50%; width: 100%; height: 3px; background: var(--border); }
.track li:last-child::after { display: none; }
.track li.is-done { color: var(--text-strong); font-weight: 600; }
.track li.is-done::before { background: var(--success); border-color: var(--success); }
.track li.is-done::after { background: var(--success); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px var(--s-2); border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: 700; }
.status-transit { background: #fff3eb; color: var(--action); }
.status-delivered { background: var(--success-bg); color: var(--success); }
.status-cancelled { background: var(--danger-bg); color: var(--danger); }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.stat-card { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: var(--s-4); }
.stat-card strong { display: block; font-size: var(--fs-24); color: var(--text-strong); }

/* ---------- 15. Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: var(--s-6) var(--s-4); }
.auth-card { width: min(440px, 100%); background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.auth-card .modal-body { gap: var(--s-4); }
.divider { display: flex; align-items: center; gap: var(--s-3); color: var(--text-muted); font-size: var(--fs-12); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- 16. Footer ---------- */
.pre-footer { background: #fff; border-top: 1px solid var(--border); padding-block: var(--s-6); margin-top: var(--s-7); }
.help-strip { display: flex; flex-wrap: wrap; gap: var(--s-5); justify-content: space-between; align-items: center; }
.help-strip .help { display: flex; gap: var(--s-3); align-items: center; }
.help-strip .help svg { width: 32px; height: 32px; padding: 6px; border-radius: 50%; background: var(--brand-soft); color: var(--text-strong); }
.site-footer { background: var(--bg-muted); padding-top: var(--s-6); font-size: var(--fs-12); }
.footer-cols { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-5); }
.footer-cols h2 { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .04em; margin-bottom: var(--s-3); }
.footer-cols a { display: block; padding: 4px 0; color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; align-items: center; border-top: 1px solid var(--border); margin-top: var(--s-6); padding-block: var(--s-4); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.footer-bottom a { color: var(--text); }
.store-badges { display: flex; gap: var(--s-2); }
.store-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--text-strong); color: #fff; padding: 6px var(--s-3); border-radius: var(--r-md); font-weight: 600; }
.pay-icons { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.pay-icons span { padding: 4px 8px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-sm); font-weight: 800; font-size: var(--fs-10); color: var(--text-strong); }
.back-to-top { position: fixed; bottom: var(--s-5); inset-inline-end: var(--s-5); z-index: var(--z-sticky); width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-2); display: grid; place-items: center; color: var(--text-strong); opacity: 0; pointer-events: none; transition: opacity .2s; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }

/* ---------- 17. Mobile bottom tab bar ---------- */
.tabbar { display: none; }

/* ---------- 18. Placeholder product colours ---------- */
.tone-1 { background: #fff7cc; } .tone-2 { background: #e6ecff; } .tone-3 { background: #e7f6ef; }
.tone-4 { background: #fde8ef; } .tone-5 { background: #efe9ff; } .tone-6 { background: #e5f4fb; }
.tone-7 { background: #fff0e0; } .tone-8 { background: #eef0f4; }

/* ---------- 19. Responsive ---------- */
@media (max-width: 1199px) {
  .pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pdp-rail { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
  .mega-inner { grid-template-columns: repeat(3, 1fr); }
  .mega-promo { display: none; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1023px) {
  .plp { grid-template-columns: minmax(0, 1fr); }
  .facets { position: fixed; inset: 0 auto 0 0; width: min(360px, 90vw); max-height: none; top: 0; border-radius: 0; z-index: calc(var(--z-drawer) + 1); transform: translateX(-100%); transition: transform .28s var(--ease); }
  [dir="rtl"] .facets { inset: 0 0 0 auto; transform: translateX(100%); }
  .facets.is-open { transform: none !important; }
  .filter-open-btn { display: inline-flex; }
  .cart-layout { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .reviews { grid-template-columns: 1fr; }
  .account-layout { grid-template-columns: 1fr; }
  .account-nav { position: static; display: flex; overflow-x: auto; padding: var(--s-2); gap: var(--s-1); }
  .account-user { display: none; }
  .account-nav a { white-space: nowrap; }
}
@media (max-width: 767px) {
  :root { --gutter: 16px; --header-h: 56px; }
  body { padding-bottom: var(--tabbar-h); }
  .header-main { flex-wrap: wrap; height: auto; padding-block: var(--s-2); gap: var(--s-2); }
  .header-main .search { order: 3; flex-basis: 100%; }
  .deliver-to { margin-inline-start: auto; }
  .header-action .label, .header-actions .hide-sm { display: none; }
  .dept-nav { display: none; }
  .hero-slide { min-height: 240px; padding: var(--s-5); }
  .triad, .banner-row { grid-template-columns: 1fr; }
  .rail { grid-auto-columns: 46%; }
  .rail-btn { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
  .card-title { font-size: var(--fs-12); }
  .price-now { font-size: var(--fs-16); }
  .pdp { grid-template-columns: minmax(0, 1fr); }
  .sort { flex-wrap: wrap; }
  .sort label { display: none; }
  .sponsored-slot-head span:last-child { display: none; }
  .gallery { position: static; grid-template-columns: 1fr; }
  .thumbs { grid-auto-flow: column; grid-auto-columns: 56px; order: 2; overflow-x: auto; }
  .thumb { width: 56px; height: 68px; }
  .pdp-rail { grid-template-columns: 1fr; }
  .pdp-tabs { top: 0; }
  .pdp-tabs ul { overflow-x: auto; gap: var(--s-4); }
  .line-item { grid-template-columns: 84px 1fr; }
  .line-media { width: 84px; height: 104px; }
  .line-side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .form-grid { grid-template-columns: 1fr; }
  .stepper li span { display: none; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: 1fr; }
  .track { grid-template-columns: 1fr; gap: var(--s-3); }
  .track li { grid-template-columns: 16px 1fr; justify-items: start; text-align: start; align-items: center; }
  .track li::after { display: none; }
  .back-to-top { bottom: calc(var(--tabbar-h) + var(--s-3)); }
  .sticky-atc { bottom: var(--tabbar-h); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; height: var(--tabbar-h);
    background: #fff; border-top: 1px solid var(--border); z-index: var(--z-header);
  }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 2px; font-size: var(--fs-10); font-weight: 600; color: var(--text-muted); position: relative; }
  .tabbar a[aria-current="page"] { color: var(--text-strong); }
  .tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 32px; height: 3px; background: var(--text-strong); border-radius: 0 0 3px 3px; }
  .tabbar .cart-count { top: 4px; inset-inline-start: calc(50% + 4px); border-color: #fff; }
  .toast-region { bottom: calc(var(--tabbar-h) + var(--s-3)); width: calc(100% - 32px); }
}
@media (max-width: 479px) {
  .logo { font-size: 20px; }
  .deliver-to small { display: none; }
  .seller-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1441px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (hover: none) and (pointer: coarse) {
  .rail-btn { display: none; }
  .size, .chip { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .tabbar, .site-footer, .pre-footer, .sticky-atc, .back-to-top { display: none !important; }
}

/* ---------- campaign strip ---------- */
.campaign-bar { background: linear-gradient(90deg, #ffe4ca, #ffd3d4); color: #4b1d1f; font-size: 13px; }
.campaign-bar .container { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; }
.campaign-bar a { color: inherit; }
.campaign-bar .cb-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.campaign-bar .icon-btn { color: #fff; margin-inline-start: auto; }

/* ---------- quick view ---------- */
.quick-view { position: absolute; z-index: 3; inset-inline: 12px; top: calc(12px + 50%); display: none; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.95); border: 1px solid var(--border-strong); font-size: 12px; font-weight: 600; cursor: pointer; }
.card:hover .quick-view, .quick-view:focus-visible { display: flex; }
@media (hover: none) { .quick-view { display: none !important; } }
.qv-media { aspect-ratio: 4/3; border-radius: var(--r-sm); display: grid; place-items: center; }
.qv-media svg { width: 40%; height: auto; color: rgba(16,22,40,.75); }

/* =========================================================================
   v3 — Alibaba-inspired professional theme layer
   orange accent (#ff6a00 / #d64000), neutral #222/#f4f4f4 surfaces,
   pill buttons, soft 8–16px radii, warm gradient hero, real product images
   ========================================================================= */
body { background: var(--bg-page); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--text-strong); }
a:hover { color: var(--action); }
p a, .muted a, .notice a, .field a { color: var(--action); }

/* buttons — Alibaba pill CTAs */
.btn { border-radius: var(--r-pill); font-weight: 600; transition: background-color .2s var(--ease), box-shadow .2s var(--ease), transform .1s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-hover); color: #fff; }
.btn-secondary { background: #fff; color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--text-strong); }
.btn-secondary:hover { background: var(--bg-muted); color: var(--text-strong); }
.btn-ghost:hover { color: var(--action); }
.chip { border-radius: var(--r-pill); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--text-strong); color: #fff; border-color: var(--text-strong); }
:focus-visible { outline-color: var(--brand); }

/* header — white, clean, orange accents */
.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, .06); }
.logo { color: var(--text-strong); }
.logo-dot { background: var(--brand); box-shadow: 0 0 0 3px #ffe4d1; }
.search-form { background: #fff; border: 2px solid var(--text-strong); border-radius: var(--r-pill); height: 46px; padding-inline: var(--s-4); }
.search-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 106, 0, .14); }
.search-panel { border-radius: var(--r-lg); box-shadow: var(--shadow-3); }
.deliver-to:hover, .header-action:hover { background: var(--bg-muted); color: var(--text-strong); }
.cart-count { background: var(--brand); color: #fff; }
.dept-nav { border-bottom: 0; }
.dept-list a { border-radius: var(--r-pill); }
.dept-list a:hover, .dept-item.is-open > a { color: var(--action); background: var(--brand-soft); text-decoration: none; }
.promo-pill { background: linear-gradient(90deg, #ffe4ca, #ffd3d4); color: #4b1d1f; }
.mega { box-shadow: 0 16px 40px rgba(0, 0, 0, .1); }
.mega-promo { border-radius: var(--r-lg); }

/* home hero — warm Alibaba gradient band */
body[data-page="home"] main { background: linear-gradient(180deg, transparent 0, transparent 520px, var(--bg-page) 520px), linear-gradient(115deg, #fff3ea, #fffaf5 45%, #fbeff5 72%, #f0fcff); }
.home-intro { padding-top: var(--s-6); text-align: center; }
.home-intro h1 { font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; color: var(--text-strong); letter-spacing: -.02em; }
.home-intro p { margin-top: 6px; }
.hero { border-radius: var(--r-lg); box-shadow: 0 12px 32px rgba(214, 64, 0, .10); }
.hero-slide { min-height: 320px; }
.hero-slide .btn { box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.slide-yellow .btn-primary { background: #fff; color: var(--action); }
.slide-blue { background: linear-gradient(115deg, #003762, #044c84); }
.slide-dark { background: linear-gradient(115deg, #222, #4b1d1f); }
.slide-green { background: linear-gradient(115deg, #0d5c3a, #0d8046); }

/* buyer benefits strip (Alibaba "buyer mind") */
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255, 255, 255, .75); backdrop-filter: blur(6px); border: 1px solid #fff; border-radius: var(--r-lg); margin-top: var(--s-4); box-shadow: 0 0 12px rgba(0, 0, 0, .05); }
.benefit { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); color: var(--text-strong); }
.benefit + .benefit { border-inline-start: 1px solid var(--border); }
.benefit:hover { text-decoration: none; color: var(--text-strong); background: #fff; }
.benefit-ic { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #ffe7db, #fff4f0); color: var(--action); }
.benefit-ic svg { width: 22px; height: 22px; }
.benefit strong { display: block; font-size: var(--fs-14); }
.benefit small { color: var(--text-muted); font-size: var(--fs-12); }

/* category strip */
.cat-icon { background: #fff !important; box-shadow: 0 0 0 1px var(--border); }
.cat-icon svg { color: var(--action); }
.cat-tile:hover { color: var(--action); }
.cat-tile:hover .cat-icon { box-shadow: 0 0 0 2px var(--brand), 0 6px 16px rgba(255, 106, 0, .15); }
.cat-sticker { background: var(--action); }

/* sections as white floors */
.section { margin-top: var(--s-6); }
.section-head h2 { font-size: var(--fs-22); font-weight: 800; letter-spacing: -.01em; color: var(--text-strong); }
.section-head a { font-weight: 600; }
.rail-wrap, .results-wrap { position: relative; }
.rail-btn { box-shadow: 0 0 8px rgba(0, 0, 0, .12); border: 0; background: #fff; }
.triad-card { border: 1px solid rgba(0, 0, 0, .04); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.triad-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .08); color: var(--text-strong); }
.triad-card.tone-1 { background: linear-gradient(120deg, #ffe4ca, #ffd3d4); }
.triad-card.tone-2 { background: linear-gradient(120deg, #e7edff, #f2e9fd); }
.triad-card.tone-3 { background: linear-gradient(120deg, #ebf9eb, #f0fcff); }
.banner.tone-5 { background: linear-gradient(110deg, #3b1a6b, #7a2e8c); color: #fff; }
.banner.tone-5 h3, .banner.tone-5 .link-btn, .banner.tone-5 .eyebrow { color: #fff; }
.banner.tone-7 { background: linear-gradient(110deg, #fff3eb, #ffe7db); }
.badge-deal { background: var(--action); color: #fff; }

/* product cards */
.card { background: #fff; border-radius: var(--r-md); border: 0; box-shadow: none; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .10); transform: translateY(-2px); }
.card-media { aspect-ratio: 1 / 1; background: #f8f8f8; border-radius: var(--r-sm); }
.card-media::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .025); pointer-events: none; }
.pimg { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s var(--ease); }
.card:hover .card-media .pimg { transform: scale(1.06); }
.card-title { font-weight: 400; color: var(--text-strong); }
.price-now { color: var(--text-strong); font-size: var(--fs-18); font-weight: 800; }
.price-off { color: var(--danger); font-weight: 700; }
.wish-btn { box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.wish-btn[aria-pressed="true"] { color: var(--action); }
.quick-add { box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.fast { color: var(--action); }

/* image containers elsewhere */
.main-image, .thumb, .mini, .line-media, .qv-media { background: #f8f8f8 !important; overflow: hidden; }
.main-image .pimg { width: 100%; height: 100%; object-fit: contain; transition: transform .4s var(--ease), object-position .4s; }
.main-image.is-zoomed .pimg { transform: scale(1.8); }
.main-image[data-view="1"] .pimg { transform: scale(1.5) translate(4%, 6%); }
.main-image[data-view="2"] .pimg { transform: scaleX(-1); }
.main-image[data-view="3"] .pimg { transform: scale(2.1) translate(-6%, -2%); }
.thumb .pimg, .mini .pimg, .line-media .pimg, .qv-media .pimg { width: 100%; height: 100%; object-fit: cover; }
.thumb[data-view="1"] .pimg { transform: scale(1.5) translate(4%, 6%); }
.thumb[data-view="2"] .pimg { transform: scaleX(-1); }
.thumb[data-view="3"] .pimg { transform: scale(2.1) translate(-6%, -2%); }
.thumb { width: 72px; height: 72px; border-color: var(--border); }
.thumb[aria-current="true"] { border-color: var(--action); }
.main-image { aspect-ratio: 1 / 1; border: 1px solid var(--border); }
.line-media { display: block; border-radius: var(--r-sm); }
.qv-media { aspect-ratio: 1 / 1; }
.pdp-brand { color: var(--action); }

/* panels, forms, misc */
.panel, .facet, .auth-card, .modal-card { border-radius: var(--r-lg); }
.input, .select { border-radius: var(--r-sm); }
.notice.info { background: #fff3eb; color: #4b1d1f; }
.notice.info svg { color: var(--action); }
.ship-banner { border-radius: var(--r-md); }
.summary .btn-primary, .buy-row .btn-primary { height: 48px; font-size: var(--fs-16); }
.pagination a:hover { color: var(--action); border-color: var(--action); }
.tabs [aria-selected="true"] { color: var(--text-strong); box-shadow: inset 0 -3px 0 var(--brand); }
.account-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--action); }
.help-strip .help svg { background: var(--brand-soft); color: var(--action); }
.pre-footer { background: #fff; }
.site-footer { background: #222; color: #b8b8b8; }
.site-footer h2 { color: #fff; }
.site-footer a { color: #dddddd; }
.site-footer a:hover { color: #ff9359; }
.footer-bottom { border-color: #444 !important; }
.pay-icons span { background: #333; color: #ddd; border-color: #444; }
.tabbar a[aria-current="page"] { color: var(--action); }
.checkout-header .logo-dot { background: var(--brand); }
.campaign-bar strong { color: #d64000; }
.campaign-bar .icon-btn { color: #4b1d1f; }
.back-to-top { background: #222; color: #fff; }
@media (max-width: 900px) {
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .benefit:nth-child(3) { border-inline-start: 0; }
  .benefit:nth-child(n+3) { border-top: 1px solid var(--border); }
  .search-form { border-width: 1.5px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) { .card, .pimg, .triad-card { transition: none !important; } .card:hover { transform: none; } }
.btn, .dept-list a, .seller-card .btn { text-transform: none; letter-spacing: 0; }
.card.is-sponsored-slot { background: #fff; }
.promoted, .sponsored-row { background: #fff8f3 !important; border-color: #ffd2b3 !important; }
@media (max-width: 600px) {
  .benefit { padding: var(--s-3); gap: var(--s-2); }
  .benefit small { display: none; }
  .benefit-ic { width: 36px; height: 36px; }
}

/* =========================================================================
   v4 — Zayranex: noon-style home floors + premium CTAs
   ========================================================================= */
/* CTA system */
.btn { position: relative; overflow: hidden; isolation: isolate; min-height: 44px; padding-inline: 22px; gap: 8px;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, background-position .4s ease, color .2s, background-color .2s; }
.btn-primary { background: linear-gradient(135deg, #ff8a3d 0%, #ff6a00 45%, #d64000 100%); background-size: 160% 160%; background-position: 0 0; color: #fff;
  box-shadow: 0 6px 16px -4px rgba(214, 64, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { background-position: 100% 100%; color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -6px rgba(214, 64, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s ease; }
.btn-primary:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: 0 3px 8px -3px rgba(0,0,0,.3); }
.btn-secondary { background: #fff; color: var(--text-strong); box-shadow: inset 0 0 0 1.5px var(--text-strong); }
.btn-secondary:hover { background: var(--text-strong); color: #fff; transform: translateY(-1px); }
.btn-dark { background: #222; color: #fff; }
.btn-dark:hover { background: #000; color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(0,0,0,.5); }
.btn:focus-visible { outline: 3px solid rgba(255, 106, 0, .45); outline-offset: 3px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; transform: none; box-shadow: none; cursor: not-allowed; }
.slide-yellow .btn-primary { background: #fff; color: var(--action); box-shadow: 0 8px 20px -6px rgba(0,0,0,.25); }
.slide-yellow .btn-primary::after { background: linear-gradient(110deg, transparent 30%, rgba(255,106,0,.15) 50%, transparent 70%); }
.quick-add { transition: transform .18s, background-color .2s, color .2s; }
.quick-add:hover { transform: scale(1.08); }
.see-all { font-weight: 700; font-size: var(--fs-14); color: var(--action); padding: 6px 14px; border-radius: var(--r-pill); background: var(--brand-soft); white-space: nowrap; transition: background-color .2s, color .2s; }
.see-all:hover { background: var(--action); color: #fff; text-decoration: none; }

/* Mega deals 4-up (noon-style promo tiles) */
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.mega-tile { border-radius: var(--r-lg); padding: var(--s-5); min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; color: var(--text-strong); overflow: hidden; position: relative; transition: transform .25s var(--ease), box-shadow .25s; }
.mega-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -10px rgba(0,0,0,.18); color: var(--text-strong); text-decoration: none; }
.mt-0 { background: linear-gradient(140deg, #ffe7db, #ffd3d4); } .mt-1 { background: linear-gradient(140deg, #e7edff, #f2e9fd); }
.mt-2 { background: linear-gradient(140deg, #ebf9eb, #e6f6ff); } .mt-3 { background: linear-gradient(140deg, #fff4e0, #ffe7f0); }
.mega-tile h3 { font-size: var(--fs-22); font-weight: 800; }
.mega-tile p { color: var(--danger); font-weight: 700; margin-top: 2px; }
.mt-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: var(--s-2); font-weight: 700; font-size: var(--fs-14); }
.mt-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); margin-top: var(--s-4); }
.mt-imgs .pimg { border-radius: var(--r-sm); aspect-ratio: 1; box-shadow: 0 4px 12px rgba(0,0,0,.08); transition: transform .3s var(--ease); }
.mega-tile:hover .mt-imgs .pimg { transform: translateY(-3px); }
.mega-tile:hover .mt-imgs .pimg:nth-child(2) { transition-delay: .05s; } .mega-tile:hover .mt-imgs .pimg:nth-child(3) { transition-delay: .1s; }

/* Store tiles */
.store-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.store-tile { border-radius: var(--r-lg); padding: var(--s-5) var(--s-6); min-height: 170px; display: flex; flex-direction: column; justify-content: center; gap: 6px; color: #fff; position: relative; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s; }
.store-tile::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; inset-inline-end: -60px; bottom: -90px; background: rgba(255,255,255,.12); }
.store-tile:hover { color: #fff; text-decoration: none; transform: translateY(-3px); box-shadow: 0 16px 32px -12px rgba(0,0,0,.35); }
.store-tile h3 { font-size: var(--fs-24); font-weight: 800; color: #fff; } .store-tile p { opacity: .9; }
.store-tile .badge { align-self: flex-start; }
.st-a { background: linear-gradient(120deg, #0d8046, #3ab36d); } .st-b { background: linear-gradient(120deg, #003762, #1c6fb8); } .st-c { background: linear-gradient(120deg, #d64000, #ff7a1a); }
.st-cta { font-weight: 700; margin-top: 4px; }

/* App banner */
.app-banner { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: var(--s-6); background: linear-gradient(115deg, #fff3ea, #fffaf5 45%, #fbeff5 72%, #f0fcff); border-radius: var(--r-lg); padding: var(--s-6) var(--s-7); overflow: hidden; }
.app-banner .eyebrow { color: var(--action); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: var(--fs-12); }
.app-banner h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; color: var(--text-strong); margin: 6px 0; }
.app-banner p { color: var(--text-muted); margin-bottom: var(--s-4); }
.app-visual { display: flex; justify-content: center; gap: var(--s-4); }
.app-visual img { width: 42%; max-width: 180px; border-radius: 24px; box-shadow: 0 20px 40px -14px rgba(0,0,0,.25); }
.app-visual img:last-child { transform: translateY(24px) rotate(4deg); }

@media (max-width: 1000px) { .mega-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .store-grid, .app-banner { grid-template-columns: 1fr; }
  .mega-grid { grid-template-columns: 1fr 1fr; gap: var(--s-3); }
  .mega-tile { min-height: 200px; padding: var(--s-4); }
  .mega-tile h3 { font-size: var(--fs-16); }
  .app-banner { padding: var(--s-5); } .app-visual { display: none; }
}
@media (prefers-reduced-motion: reduce) { .btn, .mega-tile, .store-tile { transition: none !important; } .btn-primary::after { display: none; } }

/* =========================================================================
   v5 — scrollbars, slide bars, side menu
   ========================================================================= */
/* page + panel scrollbars */
html { scrollbar-color: #c9c9c9 transparent; scrollbar-width: thin; scroll-behavior: smooth; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; transition: background-color .2s; }
::-webkit-scrollbar-thumb:hover { background-color: #ff8a3d; }
::-webkit-scrollbar-corner { background: transparent; }
.drawer-body, .search-panel, .mega, #facets { scrollbar-width: thin; scrollbar-color: #d6d6d6 transparent; overscroll-behavior: contain; }

/* rails: hide native bar, use custom slide bar */
.rail { scrollbar-width: none; padding-bottom: var(--s-1); scroll-padding-inline: 2px; }
.rail::-webkit-scrollbar { display: none; }
.rail-progress { position: relative; height: 4px; margin: var(--s-3) auto 0; width: min(220px, 40%); border-radius: 999px; background: #e6e6e6; cursor: pointer; touch-action: none; transition: height .2s, background-color .2s; }
.rail-progress::before { content: ""; position: absolute; inset: -8px 0; }
.rail-progress span { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; border-radius: inherit; background: linear-gradient(90deg, #ff8a3d, #d64000); transition: inset-inline-start .15s linear, width .2s; }
.rail-progress:hover, .rail-progress.is-drag { height: 6px; }
.rail-progress.is-drag span { transition: none; }
.rail-progress[hidden] { display: none; }
.rail-btn { width: 44px; height: 44px; top: 38%; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); box-shadow: 0 6px 18px rgba(0,0,0,.14); transition: transform .2s cubic-bezier(.2,.8,.2,1), opacity .25s, background-color .2s, color .2s; }
.rail-btn:hover { background: var(--action); color: #fff; transform: scale(1.08); }
.rail-btn:active { transform: scale(.96); }
.rail-wrap .rail-btn { opacity: 0; }
.rail-wrap:hover .rail-btn:not([disabled]), .rail-btn:focus-visible { opacity: 1; }
@media (hover: none) { .rail-wrap .rail-btn { display: none; } }
.cat-strip, .quick-filters { scroll-behavior: smooth; scroll-snap-type: inline proximity; }
.cat-strip > * { scroll-snap-align: start; }

/* hero slide bar — dots become timed progress pills */
.hero-controls { gap: 6px; padding: 6px 8px 6px 12px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.hero-dot { position: relative; width: 8px; height: 8px; border-radius: 999px; background: #d4d4d4; overflow: hidden; transition: width .35s cubic-bezier(.2,.8,.2,1), background-color .2s; }
.hero-dot:hover { background: #b8b8b8; }
.hero-dot[aria-current="true"] { width: 36px; background: #e5e5e5; }
.hero-dot[aria-current="true"]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #ff8a3d, #d64000); transform-origin: left; transform: scaleX(1); }
.hero-dot.is-playing::after { animation: heroFill 5s linear forwards; }
[dir="rtl"] .hero-dot[aria-current="true"]::after { transform-origin: right; }
.hero.is-paused .hero-dot::after { animation-play-state: paused; }
@keyframes heroFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-track { transition: transform .6s cubic-bezier(.65,0,.35,1); }

/* range slider (filters) */
.range { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--action) 0, #ff8a3d var(--fill, 0%), #e6e6e6 var(--fill, 0%)); }
[dir="rtl"] .range { background: linear-gradient(270deg, var(--action) 0, #ff8a3d var(--fill, 0%), #e6e6e6 var(--fill, 0%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--action); box-shadow: 0 2px 8px rgba(214,64,0,.3); transition: transform .15s, box-shadow .15s; }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--action); box-shadow: 0 2px 8px rgba(214,64,0,.3); }
.range:hover::-webkit-slider-thumb, .range:active::-webkit-slider-thumb { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(255,106,0,.15); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255,106,0,.35); }

/* drawers + side menu */
.overlay { background: rgba(17, 17, 17, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); transition: opacity .3s ease; }
.drawer { transition: transform .42s cubic-bezier(.32,.72,0,1), box-shadow .42s; box-shadow: none; }
.drawer.is-open { box-shadow: 0 0 60px rgba(0,0,0,.22); }
.drawer-head { padding: var(--s-4) var(--s-5); }
.drawer-head .icon-btn { border-radius: 50%; transition: background-color .2s, transform .25s; }
.drawer-head .icon-btn:hover { background: var(--bg-muted); transform: rotate(90deg); }
.drawer-left { width: min(360px, 88vw); border-start-end-radius: 20px; border-end-end-radius: 20px; }
[dir="rtl"] .drawer-left { border-radius: 20px 0 0 20px; }
#cat-drawer .drawer-head { background: linear-gradient(115deg, #fff3ea, #fffaf5 45%, #fbeff5 80%); border-bottom: 0; padding-block: var(--s-5); }
#cat-drawer .drawer-head h2 { font-size: var(--fs-22); font-weight: 800; }
#cat-drawer .drawer-head h2::before { content: "Zayranex"; display: block; font-size: var(--fs-12); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--action); margin-bottom: 2px; }
#cat-drawer .drawer-body { padding: var(--s-3) var(--s-3) var(--s-5); }
#cat-drawer .drawer-body > ul { gap: 2px !important; }
#cat-drawer .info-line { border: 0; border-radius: 14px; padding: 10px 12px; font-weight: 600; background: transparent; transition: background-color .2s, color .2s, transform .25s cubic-bezier(.2,.8,.2,1); }
#cat-drawer .info-line > span > svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--brand-soft); color: var(--action); flex: none; transition: background-color .2s, color .2s, transform .25s; }
#cat-drawer .info-line > svg { color: #bbb; transition: transform .25s, color .2s; }
#cat-drawer .info-line:hover, #cat-drawer .info-line:focus-visible { background: var(--bg-muted); color: var(--action); transform: translateX(4px); text-decoration: none; }
[dir="rtl"] #cat-drawer .info-line:hover { transform: translateX(-4px); }
#cat-drawer .info-line:hover > span > svg { background: var(--action); color: #fff; transform: scale(1.05); }
#cat-drawer .info-line:hover > svg { color: var(--action); transform: translateX(3px); }
#cat-drawer.is-open .drawer-body li { animation: menuIn .45s cubic-bezier(.2,.8,.2,1) both; }
#cat-drawer.is-open .drawer-body li:nth-child(1) { animation-delay: .04s } #cat-drawer.is-open .drawer-body li:nth-child(2) { animation-delay: .07s }
#cat-drawer.is-open .drawer-body li:nth-child(3) { animation-delay: .10s } #cat-drawer.is-open .drawer-body li:nth-child(4) { animation-delay: .13s }
#cat-drawer.is-open .drawer-body li:nth-child(5) { animation-delay: .16s } #cat-drawer.is-open .drawer-body li:nth-child(6) { animation-delay: .19s }
#cat-drawer.is-open .drawer-body li:nth-child(7) { animation-delay: .22s } #cat-drawer.is-open .drawer-body li:nth-child(8) { animation-delay: .25s }
#cat-drawer.is-open .drawer-body li:nth-child(n+9) { animation-delay: .28s }
@keyframes menuIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
[dir="rtl"] #cat-drawer.is-open .drawer-body li { animation-name: menuInR; }
@keyframes menuInR { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.drawer-foot { box-shadow: 0 -8px 20px rgba(0,0,0,.04); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drawer, .overlay, .hero-track, .rail-btn, #cat-drawer .info-line { transition: none !important; }
  #cat-drawer.is-open .drawer-body li, .hero-dot::after { animation: none !important; }
}
.card-media .quick-view { top: auto; bottom: 10px; inset-inline: 10px; opacity: 0; transform: translateY(8px); display: flex; transition: opacity .25s, transform .25s cubic-bezier(.2,.8,.2,1), background-color .2s, color .2s; backdrop-filter: blur(6px); }
.card:hover .card-media .quick-view, .card-media .quick-view:focus-visible { opacity: 1; transform: none; }
.card-media .quick-view:hover { background: #222; color: #fff; border-color: #222; }
@media (hover: none) { .card-media .quick-view { display: none !important; } }
/* quick-view fix: media rules were stretching the button + icon */
.card-media .quick-view { top: auto !important; height: 36px; min-height: 0; padding: 0 14px; gap: 6px; font-size: 13px; line-height: 1; color: var(--text-strong); background: rgba(255,255,255,.94); border: 1px solid rgba(0,0,0,.08); border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.12); white-space: nowrap; }
.card-media .quick-view svg { width: 16px !important; height: 16px !important; color: currentColor; flex: none; }
.card-media .quick-view:hover svg { color: #fff; }

/* =========================================================================
   v6 — KSA checkout
   ========================================================================= */
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.co-hint { font-size: var(--fs-12); margin: -4px 0 var(--s-3); background: #fff8f3; border: 1px solid #ffe2cc; padding: 10px 12px; border-radius: var(--r-sm); color: #4b1d1f; }
.hint { color: var(--text-muted); font-size: var(--fs-12); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.input-group:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px rgba(255,106,0,.18); }
.input-group .input { border: 0; box-shadow: none !important; flex: 1; min-width: 0; border-radius: 0; }
.ig-prefix, .ig-suffix { display: flex; align-items: center; padding: 0 12px; background: var(--bg-muted); color: var(--text-strong); font-weight: 600; font-size: var(--fs-14); white-space: nowrap; }
.ig-prefix { border-inline-end: 1px solid var(--border); }
.ig-suffix { background: #fff; padding-inline: 8px; }
.ig-suffix:empty { display: none; }
.sub-fields { padding: 4px 4px 10px; animation: menuIn .3s ease both; }
.form-grid.full { grid-column: 1 / -1; }
.input[aria-invalid="true"], .input-group:has([aria-invalid="true"]) { border-color: var(--danger); }
/* payment marks (text badges, not official logos) */
.pay-logos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-3); }
.pl { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .02em; border: 1px solid var(--border); background: #fff; color: #222; white-space: nowrap; }
.pl-mada { background: #fff; color: #1a6aa9; border-color: #cfe2f2; text-transform: lowercase; }
.pl-mada::before { content: ""; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: 4px; background: linear-gradient(180deg, #84b740 50%, #259bd6 50%); }
.pl-visa { color: #1a1f71; font-style: italic; }
.pl-mc { color: #222; }
.pl-mc::before { content: ""; width: 16px; height: 10px; margin-inline-end: 4px; background: radial-gradient(circle at 30% 50%, #eb001b 5px, transparent 5.5px), radial-gradient(circle at 70% 50%, #f79e1b 5px, transparent 5.5px); }
.pl-apple { background: #000; color: #fff; border-color: #000; }
.pl-stc { background: #4f008c; color: #fff; border-color: #4f008c; }
.pl-tabby { background: #3effa8; color: #111; border-color: #3effa8; }
.pl-tamara { background: linear-gradient(90deg, #f9c8b6, #d3b8f5); color: #111; border-color: transparent; }
.choice .aside.pl { margin-inline-start: auto; }
.secure-note { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-12); color: var(--text-muted); margin-top: var(--s-3); }
.secure-note svg { color: var(--success); flex: none; margin-top: 1px; }
.vat-row { font-size: var(--fs-12); color: var(--text-muted); border-top: 0 !important; padding-top: 0 !important; }
.btn-applepay { background: #000 !important; color: #fff !important; box-shadow: 0 6px 16px -4px rgba(0,0,0,.45) !important; }
.btn-applepay::after { display: none; }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.inv-grid h3 { font-size: var(--fs-14); color: var(--text-muted); font-weight: 700; margin-bottom: 4px; }
@media (max-width: 600px) { .inv-grid { grid-template-columns: 1fr; } }
/* checkout field alignment fix */
.co-section .form-grid { align-items: start; }
.co-section .field { align-content: start; grid-template-rows: auto auto; }
.co-section .field > .input, .co-section .field > .select, .input-group { height: 46px; min-height: 46px; box-sizing: border-box; }
.input-group .input { height: 100%; min-height: 0; padding-inline: 12px; }
.ig-prefix { gap: 6px; padding: 0 14px; font-variant-numeric: tabular-nums; }
.ig-prefix::before { content: ""; width: 18px; height: 12px; border-radius: 2px; flex: none; background: #006c35 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'%3E%3Crect x='4' y='8' width='10' height='1' rx='.5' fill='%23fff'/%3E%3Cpath d='M5 5h8' stroke='%23fff' stroke-width='.8' stroke-dasharray='1 .6'/%3E%3C/svg%3E") center/100% no-repeat; }
#stc-fields .ig-prefix::before { display: none; }

/* hero photo slides */
.hero-slide.has-photo { background-size: cover; background-position: center; position: relative; color: #fff; }
.hero-slide.has-photo > * { position: relative; z-index: 1; }
.hero-slide.slide-green { background-image: linear-gradient(90deg, rgba(8, 60, 36, .92) 0%, rgba(8, 60, 36, .72) 38%, rgba(8, 60, 36, .15) 75%), image-set(url("../img/hero/boxes.webp") type("image/webp"), url("../img/hero/boxes.jpg") type("image/jpeg")); }
.hero-slide.slide-dark { background-image: linear-gradient(90deg, rgba(20, 14, 10, .92) 0%, rgba(40, 20, 10, .7) 40%, rgba(214, 64, 0, .18) 100%), image-set(url("../img/hero/warehouse.webp") type("image/webp"), url("../img/hero/warehouse.jpg") type("image/jpeg")); background-position: center 60%; }
[dir="rtl"] .hero-slide.slide-green { background-image: linear-gradient(270deg, rgba(8, 60, 36, .92) 0%, rgba(8, 60, 36, .72) 38%, rgba(8, 60, 36, .15) 75%), url("../img/hero/boxes.jpg"); }
[dir="rtl"] .hero-slide.slide-dark { background-image: linear-gradient(270deg, rgba(20, 14, 10, .92) 0%, rgba(40, 20, 10, .7) 40%, rgba(214, 64, 0, .18) 100%), url("../img/hero/warehouse.jpg"); }
.hero-slide.has-photo h2, .hero-slide.has-photo p { text-shadow: 0 2px 12px rgba(0,0,0,.35); }
@media (max-width: 720px) {
  .hero-slide.slide-green { background-image: linear-gradient(0deg, rgba(8,60,36,.95) 20%, rgba(8,60,36,.55)), url("../img/hero/boxes.jpg"); }
  .hero-slide.slide-dark { background-image: linear-gradient(0deg, rgba(20,14,10,.95) 20%, rgba(20,14,10,.5)), url("../img/hero/warehouse.jpg"); }
}
.hero-slide.slide-yellow { background-image: linear-gradient(90deg, rgba(255, 77, 0, .96) 0%, rgba(255, 106, 0, .82) 40%, rgba(255, 140, 60, .25) 80%), image-set(url("../img/hero/boxes.webp") type("image/webp"), url("../img/hero/boxes.jpg") type("image/jpeg")); background-position: center 35%; }
.hero-slide.slide-blue { background-image: linear-gradient(90deg, rgba(0, 40, 80, .94) 0%, rgba(0, 55, 98, .75) 40%, rgba(4, 76, 132, .2) 80%), image-set(url("../img/hero/warehouse.webp") type("image/webp"), url("../img/hero/warehouse.jpg") type("image/jpeg")); background-position: center 40%; }
[dir="rtl"] .hero-slide.slide-yellow { background-image: linear-gradient(270deg, rgba(255,77,0,.96) 0%, rgba(255,106,0,.82) 40%, rgba(255,140,60,.25) 80%), url("../img/hero/boxes.jpg"); }
[dir="rtl"] .hero-slide.slide-blue { background-image: linear-gradient(270deg, rgba(0,40,80,.94) 0%, rgba(0,55,98,.75) 40%, rgba(4,76,132,.2) 80%), url("../img/hero/warehouse.jpg"); }
@media (max-width: 720px) {
  .hero-slide.slide-yellow { background-image: linear-gradient(0deg, rgba(255,77,0,.96) 25%, rgba(255,106,0,.6)), url("../img/hero/boxes.jpg"); }
  .hero-slide.slide-blue { background-image: linear-gradient(0deg, rgba(0,40,80,.96) 25%, rgba(0,55,98,.55)), url("../img/hero/warehouse.jpg"); }
}

/* =========================================================================
   v7 — Quick view redesign
   ========================================================================= */
#drawer.is-qv { width: min(480px, 100%); }
#drawer.is-qv .drawer-body { padding: 0; display: block; }
.qv { display: flex; flex-direction: column; }
.qv-hero { position: relative; margin: var(--s-4) var(--s-5) 0; aspect-ratio: 1 / 1; max-height: 360px; border-radius: var(--r-lg); overflow: hidden; display: block; background: #f8f8f8; }
.qv-hero .pimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: qvZoom .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes qvZoom { from { transform: scale(1.06); opacity: 0; } to { transform: none; opacity: 1; } }
.qv-off { position: absolute; top: 12px; inset-inline-start: 12px; background: var(--danger); color: #fff; font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 999px; z-index: 1; }
.qv-wish { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 1; }
.qv-info { padding: var(--s-4) var(--s-5) var(--s-5); display: grid; gap: 10px; }
.qv-info > * { animation: menuIn .45s cubic-bezier(.2,.8,.2,1) both; }
.qv-info > *:nth-child(2) { animation-delay: .04s } .qv-info > *:nth-child(3) { animation-delay: .08s } .qv-info > *:nth-child(4) { animation-delay: .12s } .qv-info > *:nth-child(n+5) { animation-delay: .16s }
.qv-brand { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--action); justify-self: start; }
.qv-title { font-size: 19px; line-height: 1.35; font-weight: 700; color: var(--text-strong); margin: 0; }
.qv-rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); justify-self: start; }
.qv-rating strong { color: var(--text-strong); }
.qv-rating span { text-decoration: underline; text-underline-offset: 2px; }
.qv-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.qv-now .price-now { font-size: 26px; }
.qv-save { background: #ebf9eb; color: var(--success); font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.qv-vat { font-size: 12px; color: var(--text-muted); margin: -4px 0 0; }
.qv-opt { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 12px; }
.qv-label { font-size: 13px; color: var(--text-muted); margin: 0; display: flex; gap: 8px; align-items: center; }
.qv-label strong { color: var(--text-strong); }
.qv-req { font-size: 11px; font-weight: 700; color: var(--action); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; }
.qv-req.is-ok { background: #ebf9eb; color: var(--success); }
.qv-req.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.qv-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.qv-sw { width: 34px; height: 34px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 0 0 3px #fff, 0 0 0 4px var(--border); transition: box-shadow .2s, transform .15s; }
.qv-sw:hover { transform: scale(1.06); }
.qv-sw[aria-checked="true"] { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 0 0 3px #fff, 0 0 0 5px var(--action); }
.qv-sw:disabled { opacity: .35; cursor: not-allowed; background-image: linear-gradient(135deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%); }
.qv-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.qv-chip { min-width: 48px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: #fff; font-weight: 600; font-size: 13px; color: var(--text-strong); transition: border-color .2s, background-color .2s, color .2s, transform .15s; }
.qv-chip:hover { border-color: var(--text-strong); }
.qv-chip[aria-checked="true"] { border-color: var(--action); background: var(--brand-soft); color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.qv-facts { list-style: none; padding: 12px 14px; margin: 6px 0 0; display: grid; gap: 10px; background: var(--bg-muted); border-radius: var(--r-md); font-size: 13px; }
.qv-facts li { display: flex; gap: 10px; align-items: center; color: var(--text); }
.qv-facts svg { color: var(--action); flex: none; }
.qv-facts .is-urgent, .qv-facts .is-urgent svg { color: var(--danger); font-weight: 700; }
.qv-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; color: var(--text-strong); justify-self: start; padding: 6px 0; }
.qv-more:hover { color: var(--action); }
.qv-more svg { transition: transform .2s; }
.qv-more:hover svg { transform: translateX(3px); }
#drawer.is-qv .drawer-foot { padding: 12px var(--s-5); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
.qv-foot { display: flex; gap: 10px; align-items: center; }
.qv-qty { height: 48px; border-radius: 999px; flex: none; }
.qv-qty output { min-width: 28px; text-align: center; font-weight: 700; }
.qv-foot .btn { flex: 1; height: 48px; font-size: 15px; }
#qv-add.is-added { background: var(--success) !important; box-shadow: 0 6px 16px -4px rgba(13,128,70,.45); }
@media (max-width: 520px) { .qv-hero { margin: 12px 12px 0; max-height: 300px; } .qv-info { padding: 14px 16px 18px; } }
@media (prefers-reduced-motion: reduce) { .qv-hero .pimg, .qv-info > * { animation: none !important; } }
.qv-rating svg { width: 16px !important; height: 16px !important; color: #f5a623; flex: none; }
.qv-foot .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .qv-foot .btn { font-size: 14px; padding-inline: 14px; } .qv-qty button { width: 34px; } }

/* =========================================================================
   v8 — Top brands + Popular searches
   ========================================================================= */
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.brand-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-4); }
.brand-grid li { animation: riseIn .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d); }
.brand-tile { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "mark name" "mark meta" "pics pics" "go go"; column-gap: 12px; row-gap: 2px; padding: 16px; background: #fff; border-radius: var(--r-lg); color: var(--text-strong); border: 1px solid transparent; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s; overflow: hidden; }
.brand-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #ff8a3d, #d64000); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.brand-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -12px rgba(0,0,0,.18); border-color: #ffe2cc; color: var(--text-strong); text-decoration: none; }
.brand-tile:hover::before { transform: scaleX(1); }
.bt-mark { grid-area: mark; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 6px 14px -6px var(--c1); }
.bt-name { grid-area: name; font-weight: 800; font-size: 16px; align-self: end; }
.bt-meta { grid-area: meta; font-size: 12px; color: var(--text-muted); align-self: start; }
.bt-meta b { color: var(--danger); font-weight: 700; }
.bt-pics { grid-area: pics; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; min-height: 0; }
.bt-pics:empty { display: none; }
.bt-img { width: 100%; aspect-ratio: 1; height: auto; border-radius: 10px; object-fit: cover; background: #f8f8f8; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.brand-tile:hover .bt-img { transform: translateY(-2px); }
.brand-tile:hover .bt-img:nth-child(2) { transition-delay: .04s; } .brand-tile:hover .bt-img:nth-child(3) { transition-delay: .08s; }
.bt-go { grid-area: go; display: inline-flex; align-items: center; gap: 2px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--action); opacity: .85; transition: gap .2s, opacity .2s; }
.brand-tile:hover .bt-go { gap: 6px; opacity: 1; }
.bt-ad { position: absolute; top: 10px; inset-inline-end: 10px; font-size: 10px; padding: 1px 6px; }

.pop-panel { background: linear-gradient(115deg, #fff3ea, #fffaf5 45%, #fbeff5 72%, #f0fcff); border-radius: var(--r-lg); padding: var(--s-6); border: 1px solid #fff; box-shadow: 0 0 12px rgba(0,0,0,.04); }
.pop-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--success); background: #fff; padding: 6px 12px; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.06); white-space: nowrap; }
.pop-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(13,128,70,.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(13,128,70,0); } 100% { box-shadow: 0 0 0 0 rgba(13,128,70,0); } }
.pop-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; counter-reset: none; }
.pop-grid li { animation: riseIn .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d); }
.pop-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; background: rgba(255,255,255,.85); backdrop-filter: blur(4px); border-radius: 14px; color: var(--text-strong); border: 1px solid rgba(0,0,0,.04); transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s, background-color .2s; }
.pop-item:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(0,0,0,.25); color: var(--text-strong); text-decoration: none; }
.pop-rank { width: 22px; font-size: 13px; font-weight: 800; color: var(--text-muted); text-align: center; font-variant-numeric: tabular-nums; flex: none; }
.pop-item.is-hot .pop-rank { color: var(--action); }
.pop-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-muted); color: var(--text-strong); flex: none; transition: background-color .2s, color .2s; }
.pop-item.is-hot .pop-ic { background: linear-gradient(135deg, #ffe7db, #ffd3d4); color: var(--action); }
.pop-item:hover .pop-ic { background: var(--action); color: #fff; }
.pop-t { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-up { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 800; color: var(--success); background: #ebf9eb; padding: 2px 6px; border-radius: 6px; }
.pop-up svg { width: 11px; height: 11px; }
.pop-s { color: #bbb; flex: none; transition: color .2s, transform .2s; }
.pop-item:hover .pop-s { color: var(--action); transform: scale(1.1); }
@media (max-width: 1100px) { .brand-grid { grid-template-columns: repeat(4, 1fr); } .pop-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .brand-grid { grid-template-columns: repeat(3, 1fr); } .pop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .brand-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: inline mandatory; scrollbar-width: none; padding-bottom: 4px; }
  .brand-grid::-webkit-scrollbar { display: none; }
  .brand-grid li { scroll-snap-align: start; }
  .pop-panel { padding: var(--s-4); }
  .pop-panel .section-head { flex-wrap: wrap; }
  .pop-grid { grid-template-columns: 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .brand-grid li, .pop-grid li, .pop-dot { animation: none !important; } }
@media (max-width: 560px) {
  .pop-grid { grid-template-columns: 1fr 1fr; }
  .pop-item { padding: 8px 10px 8px 6px; gap: 6px; }
  .pop-up, .pop-s { display: none; }
  .pop-ic { width: 30px; height: 30px; }
  .pop-rank { width: 16px; font-size: 12px; }
  .pop-t { font-size: 13px; }
}

/* real product photos */
.pimg.is-photo { object-fit: cover; }
.card-media.has-alt .pimg-alt { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease, transform .35s; }
.card:hover .card-media.has-alt .pimg-alt { opacity: 1; }
.main-image.has-photo .pimg { object-fit: contain; background: #fff; }
.main-image.has-photo { background: #fff !important; }
.main-image .pimg.fade-in { animation: qvZoom .4s ease both; }
.qv-hero .pimg.is-photo { object-fit: cover; }
