/* Nazari Store — storefront styles. Brand colours come from the wordmark (aqua)
   and the mascot (teal shirt, red medal ribbon). Persian, right-to-left. */
@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --aqua: #90d3d9;
  --aqua-50: #eaf6f7;
  --aqua-100: #d6eef0;
  --teal: #0f5f6b;
  --teal-hover: #0c4f59;
  --ink: #0f262b;
  --ink-2: #47595d;
  --night: #0c2025;
  --ground: #f4f7f7;
  --surface: #ffffff;
  --surface-2: #eaf0f1;
  --red: #c9382e;
  --red-50: #fbeceb;
  --gold: #e2b33f;
  --green: #1d7a4e;
  --amber: #a5620a;
  /* Roles that change between themes */
  --brand: #0f5f6b;          /* big teal surfaces: hero, deals band, announcement */
  --on-teal: #fff;           /* text on var(--teal) controls */
  --inverse: #0f262b;        /* toast, helper, ribbon */
  --on-inverse: #fff;
  --ink-3: #6f8185;
  --ok-50: #e4f4ec;
  --ok-ink: #135c3a;
  --warn-50: #fdf3e1;
  --warn-ink: #7a4808;
  --err-ink: #8e231b;
  --side-active: #0f5f6b;
  --ground-rgb: 244 247 247;
  --shadow-rgb: 15 38 43;
  --card-shadow: 0 18px 36px -24px rgb(var(--shadow-rgb) / 0.45);
  color-scheme: light;

  --radius-card: 20px;
  --radius-banner: 28px;
  --gutter: 16px;
  --max: 1320px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* Dark theme: a deep teal night, not grey. Set on <html> by /js/theme.js
   (saved choice, else the system setting). */
:root[data-theme="dark"] {
  --aqua-50: #11313a;
  --aqua-100: #18414b;
  --teal: #6fc9d2;
  --teal-hover: #93d9df;
  --on-teal: #052a30;
  --ink: #e3eef0;
  --ink-2: #9eb4b8;
  --ink-3: #7b9397;
  --night: #061114;
  --ground: #0a171a;
  --surface: #11242a;
  --surface-2: #1a3138;
  --red: #ec584d;
  --red-50: #3a1d1c;
  --green: #5cc994;
  --amber: #e6a94b;
  --brand: #0c4a54;
  --inverse: #e3eef0;
  --on-inverse: #0a171a;
  --ok-50: #123528;
  --ok-ink: #9fe3bf;
  --warn-50: #3a2c13;
  --warn-ink: #f2c784;
  --err-ink: #ffb3ab;
  --side-active: #0f5f6b;
  --ground-rgb: 10 23 26;
  --shadow-rgb: 0 0 0;
  --card-shadow: 0 18px 40px -22px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}
.logo-night { display: none !important; }
:root[data-theme="dark"] .logo-day { display: none !important; }
:root[data-theme="dark"] .logo-night { display: block !important; }
.drawer-logo, .footer-logo, .auth-logo { display: block; }
.auth-logo { justify-self: center; }
:root[data-theme="dark"] .support-card p { color: #17393f; }
:root[data-theme="dark"] .support-card .btn-teal { background: #0f5f6b; color: #fff; }

/* Theme switch: a circle of the new theme grows from the button. */
.theme-switching::view-transition-old(root), .theme-switching::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-switching::view-transition-new(root) { animation: theme-reveal 560ms var(--ease-out); }
@keyframes theme-reveal { from { clip-path: circle(0 at var(--tx, 50%) var(--ty, 0)); } to { clip-path: circle(var(--tr, 150vmax) at var(--tx, 50%) var(--ty, 0)); } }
.theme-btn .icon-sun { display: none; }
:root[data-theme="dark"] .theme-btn .icon-sun { display: block; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: none; }
.theme-btn .icon { transition: transform 420ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .theme-btn:hover .icon { transform: rotate(-20deg); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h, 120px) + var(--quickbar-shown, 0px) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: "Vazirmatn", system-ui, sans-serif; font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, p { margin: 0; }
fieldset { min-width: 0; }
h1, h2, h3 { text-wrap: balance; line-height: 1.35; }
p { text-wrap: pretty; }
::selection { background: var(--aqua); color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 10px; }
/* `hidden` always wins over a component's own display value (the empty search box showed through). */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Contact-form trap: off screen for people, still a normal field for bots. */
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: calc(760px + var(--gutter) * 2); }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; top: -60px; right: 16px; z-index: 100; background: var(--inverse); color: var(--on-inverse); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 8px; }

/* Pressable things answer the thumb */
.press { transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, opacity 200ms ease; }
.press:active { transform: scale(0.97); }

/* ---------- Buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 99px; font-weight: 700; font-size: 16px; white-space: nowrap;
}
.btn .icon { width: 20px; height: 20px; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-teal { background: var(--teal); color: var(--on-teal); }
@media (hover: hover) and (pointer: fine) { .btn-teal:hover { background: var(--teal-hover); } }
.btn-light { background: #fff; color: var(--brand); }
@media (hover: hover) and (pointer: fine) { .btn-light:hover { background: var(--aqua-50); } }
.btn-ghost-dark { background: var(--surface-2); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .btn-ghost-dark:hover { background: var(--aqua-100); } }
.btn:disabled { opacity: 0.5; cursor: default; }
.link-btn { color: var(--teal); font-weight: 600; padding: 8px 0; }

.field { display: grid; gap: 6px; font-size: 15px; }
.field > span:first-child { font-weight: 600; }
.field input, .field select, .field textarea, .filter-form input, .coupon input {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 14px;
  background: var(--surface-2); border: 2px solid transparent; font-size: 16px;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-form input:focus, .coupon input:focus { outline: none; border-color: var(--teal); background: var(--surface); }
.field input:disabled { opacity: 0.6; }
.field-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } .field-half { max-width: calc(50% - 7px); } }
.field-error { color: var(--red); font-size: 14px; font-weight: 500; }
.check, .radio { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.check input, .radio input, .pay-method input, .radio-card input { accent-color: var(--teal); width: 20px; height: 20px; flex: none; }
::placeholder { color: var(--ink-3); }

/* Block, not flex: a message mixes words, bold codes and links, and flex would split them into columns. */
.flash { margin-block: 16px; padding: 14px 18px; border-radius: 16px; font-weight: 500; line-height: 1.85; }
.flash .icon, .demo-hint .icon { display: inline-block; vertical-align: -5px; margin-inline-end: 8px; }
.flash a { text-decoration: underline; text-underline-offset: 4px; }
.flash-success { background: var(--ok-50); color: var(--ok-ink); }
.flash-error { background: var(--red-50); color: var(--err-ink); }
.flash-warn { background: var(--warn-50); color: var(--warn-ink); }
.flash .icon { width: 20px; height: 20px; }

.panel { background: var(--surface); border-radius: var(--radius-card); padding: 22px; }
.panel + .panel { margin-top: 16px; }
.center { text-align: center; display: grid; gap: 14px; justify-items: center; }

/* Admin bar: shown only to a signed-in admin browsing the shop, so the panel is one tap away. */
.admin-bar { background: var(--night); color: #d9e7e9; font-size: 13.5px; font-weight: 600; }
.admin-bar-row { display: flex; align-items: center; gap: 4px; min-height: 40px; }
.admin-bar a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 10px; color: #d9e7e9; transition: background-color 160ms ease; }
.admin-bar a:active { background: rgb(255 255 255 / 0.1); }
@media (hover: hover) and (pointer: fine) { .admin-bar a:hover { background: rgb(255 255 255 / 0.08); color: #fff; } }
.admin-bar .admin-bar-main { color: var(--aqua); }
.admin-bar .icon { width: 17px; height: 17px; }
.admin-bar-who { margin-inline-start: auto; color: #8fb0b5; font-weight: 500; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Header ---------- */
.announce { background: var(--brand); color: #e7f6f7; font-size: 14px; font-weight: 500; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 7px var(--gutter); text-align: center; }
.announce .icon { width: 18px; height: 18px; color: var(--aqua); }
.header { position: sticky; top: 0; z-index: 40; background: var(--surface); transition: box-shadow 200ms ease; }
.header.is-scrolled { box-shadow: 0 6px 20px -12px rgb(var(--shadow-rgb) / 0.35); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 12px; }
.brand { margin-inline-end: auto; }
.brand img { height: 38px; width: auto; }
.menu-btn, .icon-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; }
.menu-btn { color: var(--teal); }
.menu-btn .icon { width: 30px; height: 30px; }
.icon-btn { background: var(--surface-2); color: var(--ink); position: relative; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--aqua-100); } }
.login { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding-inline: 16px; border-radius: 14px; background: var(--surface-2); font-weight: 500; font-size: 15px; max-width: 200px; }
@media (hover: hover) and (pointer: fine) { .login:hover { background: var(--aqua-100); } }
.login-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-count {
  position: absolute; top: 4px; left: 4px; min-width: 20px; height: 20px; padding-inline: 5px; border-radius: 99px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  transform: scale(0.6); opacity: 0; transition: transform 260ms var(--ease-out), opacity 200ms ease;
}
.cart-count.has-items { transform: scale(1); opacity: 1; }
.cart-count.bump { animation: bump 320ms var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.3); } }
.search-row { display: flex; gap: 10px; order: 10; flex-basis: 100%; }
.search { position: relative; flex: 1; display: flex; align-items: center; gap: 10px; height: 52px; padding-inline: 16px; border-radius: 16px; background: var(--surface-2); transition: background-color 200ms ease, box-shadow 200ms ease; }
.search:focus-within { background: var(--surface); box-shadow: 0 0 0 2px var(--teal); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; }
.search input::-webkit-search-cancel-button { display: none; }
.call-btn { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--aqua-50); color: var(--teal); flex: none; }
.suggest {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 50; background: var(--surface); border-radius: 18px; padding: 8px;
  box-shadow: 0 20px 40px -18px rgb(var(--shadow-rgb) / 0.45); display: grid; gap: 2px;
  transform-origin: top; animation: pop 180ms var(--ease-out);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.suggest a { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 12px; font-size: 14px; }
.suggest a:focus { background: var(--surface-2); outline: none; }
@media (hover: hover) and (pointer: fine) { .suggest a:hover { background: var(--surface-2); outline: none; } }
.suggest img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.suggest b { font-size: 13px; color: var(--teal); }
.catbar { background: var(--surface); border-top: 1px solid var(--surface-2); }
.catbar-row { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-block: 6px; font-size: 14px; font-weight: 500; }
.catbar-row::-webkit-scrollbar { display: none; }
.catbar-row > a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; color: var(--ink-2); transition: color 200ms ease, background-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .catbar-row > a:hover { color: var(--ink); background: var(--surface-2); } }
.catbar-row > a.is-hot { color: var(--red); font-weight: 700; }
.catbar-row .icon { width: 18px; height: 18px; }
.catbar-end { margin-inline-start: auto; }
.mega { display: none; }

/* Mega menu (desktop) */
@media (min-width: 1024px) {
  .catbar-row { overflow: visible; }
  .mega { display: block; position: static; }
  .mega-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding-inline: 14px 16px; border-radius: 12px; font-weight: 800; font-size: 15px; color: var(--ink); position: relative; transition: background-color 200ms ease, color 200ms ease; }
  .mega-btn .icon { width: 20px; height: 20px; color: var(--teal); }
  .mega-btn::after { content: ""; position: absolute; inset-inline: 14px; bottom: -6px; height: 3px; border-radius: 3px 3px 0 0; background: var(--teal); transform: scaleX(0); transition: transform 260ms var(--ease-out); }
  .mega.is-open .mega-btn { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .mega-btn:hover { background: var(--surface-2); } }
  .mega.is-open .mega-btn::after { transform: scaleX(1); }
  .mega + a { margin-inline-start: 6px; position: relative; }
  .mega + a::before { content: ""; position: absolute; inset-inline-start: -5px; top: 9px; bottom: 9px; width: 1px; background: var(--surface-2); }
  .mega-panel {
    position: absolute; z-index: 45; top: 100%; inset-inline: max(var(--gutter), calc((100vw - var(--max)) / 2));
    display: grid; grid-template-columns: 250px minmax(0, 1fr); max-height: min(560px, calc(100vh - 170px));
    background: var(--surface); border-radius: 0 0 var(--radius-card) var(--radius-card); overflow: hidden;
    box-shadow: 0 30px 60px -30px rgb(var(--shadow-rgb) / 0.55), 0 1px 0 var(--surface-2) inset;
    opacity: 0; visibility: hidden; transform: translateY(-6px); clip-path: inset(0 0 100% 0 round 0 0 var(--radius-card) var(--radius-card));
    transition: opacity 180ms ease, transform 260ms var(--ease-out), clip-path 320ms var(--ease-out), visibility 0s 320ms;
  }
  .mega.is-open .mega-panel { opacity: 1; visibility: visible; transform: none; clip-path: inset(0 0 0 0 round 0 0 var(--radius-card) var(--radius-card)); transition: opacity 180ms ease, transform 260ms var(--ease-out), clip-path 380ms var(--ease-out); }
  .mega-cats { list-style: none; margin: 0; padding: 10px 8px; background: var(--ground); overflow-y: auto; scrollbar-width: thin; }
  .mega-cats a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; font-weight: 600; font-size: 14.5px; color: var(--ink); transition: background-color 160ms ease, color 160ms ease; }
  .mega-cats img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; flex: none; }
  .mega-cats a .icon { width: 16px; height: 16px; margin-inline-start: auto; opacity: 0; transform: translateX(4px); transition: opacity 160ms ease, transform 200ms var(--ease-out); }
  .mega-cats a.is-active { background: var(--surface); color: var(--teal); box-shadow: 0 6px 16px -12px rgb(var(--shadow-rgb) / 0.5); }
  .mega-cats a.is-active .icon { opacity: 1; transform: none; }
  .mega-body { position: relative; overflow-y: auto; padding: 18px 26px 24px; }
  .mega-pane { display: none; }
  .mega-pane.is-active { display: block; animation: pane-in 260ms var(--ease-out); }
  @keyframes pane-in { from { opacity: 0; transform: translateX(-8px); } }
  .mega-all { display: inline-flex; align-items: center; gap: 4px; color: var(--teal); font-weight: 800; font-size: 15px; margin-bottom: 14px; }
  .mega-all small { color: var(--ink-2); font-weight: 500; }
  .mega-all .icon { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
  @media (hover: hover) and (pointer: fine) { .mega-all:hover .icon { transform: translateX(-3px); } }
  .mega-cols { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.1fr) minmax(250px, 1.5fr); gap: 28px; }
  .mega-col h3 { font-size: 14.5px; font-weight: 800; padding-inline-start: 10px; border-inline-start: 3px solid var(--red); line-height: 1.3; margin: 0 0 10px; }
  .mega-col h3:not(:first-child) { margin-top: 18px; }
  .mega-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
  .mega-col li a { display: block; padding: 5px 0; font-size: 14px; color: var(--ink-2); transition: color 160ms ease, transform 200ms var(--ease-out); }
  @media (hover: hover) and (pointer: fine) { .mega-col li a:hover { color: var(--teal); transform: translateX(-3px); } }
  .mega-top { display: grid; gap: 6px; align-content: start; }
  .mega-prod { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; padding: 6px; border-radius: 14px; transition: background-color 160ms ease; }
  @media (hover: hover) and (pointer: fine) { .mega-prod:hover { background: var(--ground); } }
  .mega-prod img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
  .mega-prod span { display: grid; font-size: 13.5px; font-weight: 600; line-height: 1.6; }
  .mega-prod b { font-size: 13.5px; color: var(--teal); }
  .mega-prod small { color: var(--ink-2); font-weight: 500; font-size: 13px; }
  .mega-scrim { position: fixed; inset: 0; z-index: 35; background: rgb(8 24 28 / 0.35); opacity: 0; pointer-events: none; transition: opacity 240ms ease; }
  body.mega-on .mega-scrim { opacity: 1; }
}
@media (max-width: 440px) {
  .login-long { display: none; }
  .brand img { height: 34px; }
  .header-row { gap: 8px; }
  .menu-btn { width: 40px; }
  .login { padding-inline: 10px; max-width: 120px; height: 44px; gap: 6px; }
  /* Signed in: the person icon alone, name kept for screen readers, so the cart stays on the row. */
  .login:has(.login-text) { width: 44px; padding: 0; justify-content: center; }
  .login-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .header-row { gap: 6px; }
  .header-row > .icon-btn { width: 42px; height: 44px; }
  .brand img { height: 30px; }
}
@media (min-width: 1024px) {
  .menu-btn { display: none; }
  .brand { margin-inline-end: 0; }
  .brand img { height: 44px; }
  .search-row { order: 0; flex: 1 1 auto; flex-basis: auto; max-width: 600px; margin-inline: auto; }
}

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgb(8 24 28 / 0.45); opacity: 0; transition: opacity 240ms ease; }
.drawer.is-open { opacity: 1; }
.drawer-panel {
  position: absolute; inset-block: 0; right: 0; width: min(340px, 86vw); background: var(--surface); padding: 16px; overflow-y: auto;
  transform: translateX(100%); transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.drawer-nav { display: grid; gap: 2px; }
.drawer-nav a { display: flex; align-items: center; gap: 10px; padding: 12px 12px; border-radius: 12px; font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .drawer-nav a:hover { background: var(--surface-2); } }
.drawer-nav a span { margin-inline-start: auto; color: var(--ink-2); font-size: 13px; }
.drawer-nav a[aria-current="page"] { background: var(--surface-2); color: var(--teal); font-weight: 700; }
.drawer-nav a.is-hot { color: var(--red); font-weight: 700; }
.drawer-nav .icon { width: 20px; height: 20px; }
.drawer-label { font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 14px 12px 4px; }
.drawer-cat summary { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.drawer-cat summary::-webkit-details-marker { display: none; }
@media (hover: hover) and (pointer: fine) { .drawer-cat summary:hover { background: var(--surface-2); } }
.drawer-cat summary img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.drawer-cat summary .icon { margin-inline-start: auto; width: 18px; height: 18px; color: var(--ink-2); transition: transform 260ms var(--ease-out); }
.drawer-cat[open] summary { background: var(--surface-2); }
.drawer-cat[open] summary .icon { transform: rotate(180deg); }
.drawer-sub { display: grid; gap: 8px; padding: 10px 12px 14px; font-size: 14px; }
.drawer-sub b { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.drawer-nav .drawer-all { padding: 6px 0; color: var(--teal); font-weight: 700; }
.drawer-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-nav .drawer-chips a { padding: 5px 12px; border-radius: 99px; background: var(--ground); font-size: 13.5px; font-weight: 500; }
@media (prefers-reduced-motion: no-preference) { .drawer-cat[open] .drawer-sub { animation: pop 220ms var(--ease-out); } }

/* ---------- Sections ---------- */
main > section { padding-block: 28px; }
@media (min-width: 1024px) { main > section { padding-block: 44px; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(21px, 2.3vw, 30px); font-weight: 800; letter-spacing: -0.01em; }
.section-head p { color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.section-head .tools { display: flex; align-items: center; gap: 14px; }
.see-all { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--teal); font-weight: 600; font-size: 15px; padding: 6px 2px; white-space: nowrap; }
.see-all .icon { width: 18px; height: 18px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .see-all:hover .icon { transform: translateX(-3px); } }
.tinted { background: var(--aqua-50); }

/* Category stories */
.cat-stories { padding-block: 14px 4px !important; }
.story-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: 4px 8px; }
.story-row::-webkit-scrollbar { display: none; }
.story { flex: none; width: 80px; scroll-snap-align: start; text-align: center; font-size: 13px; font-weight: 500; line-height: 1.5; }
.story-ring { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; padding: 3px; background: var(--teal); margin-bottom: 6px; transition: transform 200ms var(--ease-out); }
.story-ring.is-deal { background: var(--red); color: #fff; }
.story-ring.is-deal .icon { width: 34px; height: 34px; }
@media (hover: hover) and (pointer: fine) { .story:hover .story-ring { transform: scale(1.05); } }
.story-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--ground); }
@media (min-width: 1024px) { .story-row { justify-content: safe center; gap: 18px; } }

/* Ticket banners (the brand's notched card) */
.ticket {
  --notch: 18px; position: relative; overflow: hidden; border-radius: var(--radius-banner);
  -webkit-mask: radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}
@media (min-width: 768px) { .ticket { --notch: 24px; } }

/* Hero slider */
.hero { padding-top: 10px !important; overflow-x: clip; }
.slider { position: relative; --slide-gap: 96px; --slide-ease: cubic-bezier(0.65, 0, 0.15, 1); --slide-dur: 950ms; }
/* The viewport reaches 40px past the card so the mascot can step out of it. */
.slides { display: grid; grid-template-columns: minmax(0, 1fr); clip-path: inset(-40px); }
/* Resting slides wait just past the leading edge (RTL: the left); the active one
   slides in while the old one leaves the other way. */
.slide { grid-area: 1 / 1; visibility: hidden; transform: translateX(calc(-100% - var(--slide-gap))); }
.slide.is-active, .slide.is-leaving { visibility: visible; transition: transform var(--slide-dur) var(--slide-ease); }
.slide.is-active { transform: none; }
.slide.is-leaving { transform: translateX(calc(100% + var(--slide-gap))); }
.slider.is-back .slide:not(.is-active):not(.is-leaving) { transform: translateX(calc(100% + var(--slide-gap))); }
.slider.is-back .slide.is-leaving { transform: translateX(calc(-100% - var(--slide-gap))); }
/* Depth: the photo lags behind its card, then settles. */
.slide .hero-photo img { transition: transform var(--slide-dur) var(--slide-ease); }
.slide:not(.is-active) .hero-photo img { transform: translateX(-18%) scale(1.08); }
.slider.is-back .slide:not(.is-active) .hero-photo img { transform: translateX(18%) scale(1.08); }
.slide.is-entering .hero-copy > * { animation: copy-in 700ms var(--ease-out) both; }
.slide.is-entering .hero-copy > :nth-child(2) { animation-delay: 90ms; }
.slide.is-entering .hero-copy > :nth-child(3) { animation-delay: 170ms; }
.slide.is-entering .hero-copy > :nth-child(4) { animation-delay: 240ms; }
@keyframes copy-in { from { opacity: 0; transform: translateX(-28px); filter: blur(6px); } }
.slider.is-back .slide.is-entering .hero-copy > * { animation-name: copy-in-back; }
@keyframes copy-in-back { from { opacity: 0; transform: translateX(28px); filter: blur(6px); } }
.hero-card { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--brand); color: #fff; border-radius: var(--radius-banner); height: 100%; }
.hero-visual { position: relative; }
.hero-photo { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-banner) var(--radius-banner) 0 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-copy { position: relative; z-index: 2; padding: 24px 22px 26px; display: flex; flex-direction: column; }
.hero h1, .hero .h1 { font-size: clamp(28px, 4.2vw, 60px); font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; max-width: 14ch; }
.hero-lede { margin-top: 10px; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.8; color: #dff1f3; max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.promise { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 22px 0 0; padding: 16px 0 0; list-style: none; font-size: 14px; font-weight: 500; color: #e9f6f7; }
.promise li { display: flex; align-items: center; gap: 8px; }
.promise .icon { width: 22px; height: 22px; color: var(--aqua); }
.hero-mascot { position: absolute; z-index: 3; pointer-events: none; left: 10px; bottom: 0; width: 30%; max-width: 160px; }
.hero-mascot img { filter: drop-shadow(0 16px 16px rgb(0 0 0 / 0.3)); }
.bubble { position: absolute; z-index: 4; top: 4px; left: 82%; background: #fff; color: #0f262b; font-weight: 700; font-size: 13px; line-height: 1.5; padding: 8px 12px; border-radius: 16px 16px 16px 4px; white-space: nowrap; }
.bubble b { color: #0f5f6b; }
.dots { position: absolute; z-index: 5; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; background: rgb(8 24 28 / 0.4); backdrop-filter: blur(8px); }
/* Each dot is a thin bar with a 24px-tall invisible hit area around it. The active one fills
   (background-size) while the slide is on screen. */
.dots button[data-dot] { position: relative; width: 8px; height: 8px; border-radius: 99px; background: linear-gradient(#fff, #fff) right / 0% 100% no-repeat, rgb(255 255 255 / 0.5); transition: width 400ms var(--ease-out), background-color 200ms ease; }
.dots button[data-dot]::before { content: ""; position: absolute; inset: -9px -4px; }
@media (hover: hover) and (pointer: fine) { .dots button[data-dot]:hover { background-color: rgb(255 255 255 / 0.8); } }
.dots button[data-dot].is-active { width: 34px; background-color: rgb(255 255 255 / 0.35); background-image: linear-gradient(#fff, #fff); animation: dot-fill var(--slide-every, 6s) linear forwards; }
.slider.is-paused .dots button[data-dot].is-active { animation-play-state: paused; }
.slider.no-autoplay .dots button[data-dot].is-active { animation: none; background-size: 100% 100%; }
@keyframes dot-fill { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
@media (max-width: 767px) { .dots { bottom: auto; top: 12px; } }
@media (min-width: 768px) {
  .hero-card { grid-template-columns: 1.05fr 1fr; min-height: 500px; }
  .hero-visual { order: 2; }
  .hero-photo { aspect-ratio: auto; height: 100%; border-radius: var(--radius-banner) 0 0 var(--radius-banner); }
  .hero-copy { order: 1; padding: 52px 52px 44px 36px; justify-content: center; }
  .promise { grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 22px; }
  .hero-mascot { left: auto; right: -36px; bottom: -24px; width: 230px; max-width: none; }
  .bubble { top: 20px; left: auto; right: 190px; font-size: 15px; padding: 10px 16px; border-radius: 20px 20px 4px 20px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-card { min-height: 420px; }
  .hero-copy { padding: 36px 32px 32px 24px; }
  .promise { grid-template-columns: repeat(2, auto); }
  .hero-mascot { width: 160px; right: -20px; bottom: -16px; }
  .bubble { right: 130px; top: 14px; font-size: 13px; padding: 8px 12px; }
}
@media (min-width: 1200px) { .hero-mascot { width: 270px; } .bubble { right: 225px; } }

/* Category grid */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 639px) {
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .cat { padding: 6px 4px 8px; border-radius: 16px; }
  .cat-media { border-radius: 12px; margin-bottom: 4px; }
  .cat-name { font-size: 13px; line-height: 1.45; }
  .cat small { display: none; }
}
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(7, 1fr); } }
.cat { display: grid; justify-items: center; text-align: center; gap: 2px; background: var(--surface); border-radius: var(--radius-card); padding: 10px 8px 12px; }
.cat-media { width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--aqua-50); margin-bottom: 6px; }
.cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 320ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .cat:hover .cat-media img { transform: scale(1.05); } }
.cat-name { font-weight: 600; font-size: 14px; line-height: 1.5; }
.cat small { font-size: 13px; color: var(--ink-2); }

/* Shelves */
.shelf-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 46%); gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: 4px var(--gutter) 12px; margin-inline: calc(var(--gutter) * -1); scrollbar-width: none;
}
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track > * { scroll-snap-align: start; }
@media (min-width: 640px) { .shelf-track { grid-auto-columns: minmax(200px, 31%); } }
@media (min-width: 1024px) { .shelf-track { grid-auto-columns: calc((100% - 5 * 14px - var(--gutter) * 2) / 5.5); gap: 14px; } }
.shelf-nav { display: none; }
@media (min-width: 1024px) {
  .shelf-nav { display: flex; gap: 8px; }
  .shelf-nav button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); }
  @media (hover: hover) and (pointer: fine) { .shelf-nav button:hover { background: var(--aqua-100); } }
  .shelf-nav button:disabled { opacity: 0.35; cursor: default; }
  .tinted .shelf-nav button { background: var(--surface); }
}

/* Product card */
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-card); padding: 10px; transition: transform 260ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .card:hover { transform: translateY(-3px); } }
.card-media { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #fff; }
.card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform 360ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .card:hover .card-media img { transform: scale(1.04); } }
.card.is-out .card-media img { filter: grayscale(0.7); opacity: 0.7; }
.ribbon { position: absolute; top: 10px; right: 10px; background: var(--inverse); color: var(--on-inverse); font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 10px 4px 2px; }
.card-brand { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); min-height: 22px; }
.card h3 { font-size: 14.5px; font-weight: 600; line-height: 1.7; margin-top: 2px; min-height: calc(1.7em * 2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-foot { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; }
.card-foot form { position: relative; z-index: 2; }
.stars { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--ink); font-weight: 600; }
.stars .icon { width: 15px; height: 15px; fill: var(--gold); stroke: var(--gold); }
.stars small { color: var(--ink-2); font-weight: 400; }
.price { display: flex; flex-direction: column; line-height: 1.4; }
.price .was { display: flex; align-items: center; gap: 6px; }
.price del { color: var(--ink-2); font-size: 13px; text-decoration-color: var(--red); }
.price .off { background: var(--red); color: #fff; font-size: 13px; font-weight: 800; padding: 0 7px; border-radius: 99px; }
.price strong { font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; }
.price small { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-inline-start: 3px; }
.price-big strong { font-size: 26px; }
.price-big del { font-size: 15px; }
.add { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--aqua-50); color: var(--teal); }
@media (hover: hover) and (pointer: fine) { .add:hover { background: var(--teal); color: var(--on-teal); } }
.add .icon { width: 20px; height: 20px; }
.add .icon-check { display: none; }
.add.is-added { background: var(--teal); color: var(--on-teal); }
.add.is-added .icon-plus { display: none; }
.add.is-added .icon-check { display: block; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1300px) { main .product-grid:not(.listing .product-grid) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Deals band */
.deals { background: var(--brand); color: #fff; }
.deals-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.deals-intro { display: grid; gap: 12px; align-content: start; }
.deals-intro h2 { font-size: clamp(24px, 2.8vw, 36px); font-weight: 800; line-height: 1.3; }
.deals-intro p { color: #d7eef0; }
.deals-intro .btn { justify-self: start; }
/* Reads like a digital clock (hours on the left, seconds on the right); screen
   readers still hear hours, minutes, seconds in order. */
.clock { display: flex; gap: 8px; direction: ltr; }
.clock span { display: grid; place-items: center; min-width: 62px; height: 62px; border-radius: 16px; background: rgb(255 255 255 / 0.12); font-size: 24px; font-weight: 800; }
.clock span small { display: block; font-size: 13px; font-weight: 500; color: #cfe9ec; margin-top: -10px; }
.clock-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.clock-label { font-size: 14px; color: #d7eef0; }
.deals-shelf { position: relative; }
/* The arrows sit beside «همه‌ی شگفت‌انگیزها» in the intro column, not floating over the
   section above. */
.deals-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.deals-actions .shelf-nav button { width: 44px; height: 44px; }
.shelf-nav.on-dark button { background: rgb(255 255 255 / 0.14); color: #fff; }
@media (hover: hover) and (pointer: fine) { .shelf-nav.on-dark button:hover { background: rgb(255 255 255 / 0.26); } }
.deals .card { color: var(--ink); }
@media (min-width: 1024px) {
  .deals-grid { grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: center; }
  .clock-wrap { flex-direction: column; align-items: flex-start; }
  .deals .shelf-track { grid-auto-columns: calc((100% - 3 * 14px) / 4); margin-inline: 0; padding-inline: 0; }
}

/* Photo banners */
.banner { display: block; position: relative; color: #fff; isolation: isolate; }
.banner img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 700ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .banner:hover img.bg { transform: scale(1.03); } }
.banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(8 24 28 / 0.88), rgb(8 24 28 / 0.5) 55%, rgb(8 24 28 / 0.1)); }
.banner-copy { padding: 24px 26px 26px; max-width: 30rem; min-height: 230px; display: flex; flex-direction: column; justify-content: end; gap: 6px; }
.banner h3 { font-size: clamp(21px, 2.4vw, 32px); font-weight: 800; line-height: 1.35; }
.banner p { color: #e4f1f2; font-size: 15px; }
.banner .chip { align-self: flex-start; margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding-inline: 18px; border-radius: 99px; background: #fff; color: #0f262b; font-weight: 700; font-size: 14px; transition: background-color 200ms ease, transform 260ms var(--ease-out); }
.banner .chip .icon { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) { .banner:hover .chip { background: var(--aqua); } }
.banner-light { color: var(--ink); }
.banner-light::before { background: linear-gradient(to top, rgb(var(--ground-rgb) / 0.97), rgb(var(--ground-rgb) / 0.82) 55%, rgb(var(--ground-rgb) / 0.1)); }
.banner-light p { color: var(--ink-2); }
.banner-light .chip { background: var(--teal); color: var(--on-teal); }
@media (hover: hover) and (pointer: fine) { .banner-light:hover .chip { background: var(--teal-hover); } }
.pair { display: grid; gap: 14px; }
@media (min-width: 900px) {
  .pair { grid-template-columns: 1fr 1fr; }
  .banner::before { background: linear-gradient(to left, rgb(8 24 28 / 0.8), rgb(8 24 28 / 0.15) 72%); }
  .banner.banner-light::before { background: linear-gradient(to left, rgb(var(--ground-rgb) / 0.95), rgb(var(--ground-rgb) / 0) 75%); }
  .banner-copy { padding: 40px 48px; min-height: 280px; }
  .banner-wide .banner-copy { min-height: 340px; }
  .banner-end .banner-copy { margin-inline-start: auto; }
  .banner.banner-end::before { background: linear-gradient(to right, rgb(8 24 28 / 0.8), rgb(8 24 28 / 0.15) 72%); }
  .banner.banner-light.banner-end::before { background: linear-gradient(to right, rgb(var(--ground-rgb) / 0.95), rgb(var(--ground-rgb) / 0) 75%); }
}

/* Brands */
.brand-row { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-chip { display: inline-flex; align-items: baseline; gap: 8px; background: var(--surface); padding: 10px 18px; border-radius: 99px; font-weight: 700; }
.brand-chip small { color: var(--ink-2); font-weight: 500; font-size: 13px; }
@media (hover: hover) and (pointer: fine) { .brand-chip:hover { background: var(--aqua-100); } }

/* Posts */
.posts { display: grid; gap: 14px; }
@media (min-width: 768px) { .posts { grid-template-columns: repeat(3, 1fr); } }
.post { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-card); padding: 12px; position: relative; }
.post-media { aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .post:hover .post-media img { transform: scale(1.04); } }
.post h3 { font-size: 17px; font-weight: 700; padding: 12px 6px 0; line-height: 1.6; }
.post h3 a::after { content: ""; position: absolute; inset: 0; }
.post p { padding: 6px 6px 0; color: var(--ink-2); font-size: 15px; }
.post-meta { display: flex; gap: 16px; padding: 12px 6px 4px; margin-top: auto; font-size: 14px; color: var(--ink-2); }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .icon { width: 18px; height: 18px; }

/* Support band */
.support-card { position: relative; background: var(--aqua); color: #0f262b; border-radius: var(--radius-banner); display: grid; padding: 28px 24px 0; overflow: hidden; }
.support-card h2 { font-size: clamp(23px, 2.8vw, 36px); font-weight: 800; }
.support-card p { color: #17393f; margin-top: 4px; }
.support-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.support-card .mascot { width: 150px; justify-self: end; margin-top: 4px; margin-bottom: -40px; }
@media (min-width: 900px) {
  .support-card { grid-template-columns: 1fr auto; padding: 44px 52px 0; align-items: end; }
  .support-card .copy { padding-bottom: 44px; }
  .support-card .mascot { width: 190px; margin: -10px 0 -70px; }
}

/* ---------- Listing ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--ink-2); padding-block: 14px 0; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--teal); } }
.listing-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 18px; }
.listing-head h1 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; }
.listing-head p { color: var(--ink-2); }
.listing-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 1024px) { .listing-grid { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } }
.filters { background: var(--surface); border-radius: var(--radius-card); padding: 6px 16px; }
.filters summary { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 10px 0; cursor: pointer; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filter-form { display: grid; gap: 16px; padding-bottom: 16px; }
.filter-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.filter-form legend { font-weight: 700; margin-bottom: 6px; }
.filter-form fieldset label small { color: var(--ink-2); }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 1024px) { .filters { position: sticky; top: calc(var(--header-h, 130px) + 16px); } }
.filter-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--teal); color: var(--on-teal); font-size: 13px; }
.filter-actions { display: grid; gap: 10px; }
.sheet-head, .sheet-backdrop { display: none; }
/* Phones and tablets: a full-width filter button; open, the filters rise as a sheet
   from the bottom with the apply button always in reach. */
@media (max-width: 1023px) {
  .filters { padding: 0; background: none; }
  .filters summary { justify-content: center; padding: 12px 16px; border-radius: var(--radius-card); background: var(--surface); min-height: 48px; }
  .filters[open] .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(8, 22, 25, 0.45); }
  .filters[open] .filter-form { position: fixed; inset: auto 0 0; z-index: 91; max-height: 85svh; overflow-y: auto; overscroll-behavior: contain;
    padding: 0 var(--gutter) 0; background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(8, 22, 25, 0.18); animation: sheet-up 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .sheet-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1; padding: 14px 0 10px; background: var(--surface); font-size: 17px; }
  .sheet-head::before { content: ""; position: absolute; top: 6px; inset-inline: 0; margin: auto; width: 40px; height: 4px; border-radius: 4px; background: var(--surface-2); }
  .sheet-close { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); }
  .filter-actions { grid-template-columns: 1fr auto; position: sticky; bottom: 0; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--surface-2); }
  html:has(.filters[open]) { overflow: hidden; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .filters[open] .filter-form { animation: none; } }
.sorts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 14px; }
.sorts span { color: var(--ink-2); margin-inline-end: 4px; }
.sorts a { padding: 6px 12px; border-radius: 99px; background: var(--surface); font-weight: 500; }
.sorts a.is-active { background: var(--teal); color: var(--on-teal); }
/* Phones: one row that scrolls sideways instead of wrapping onto a second line. */
@media (max-width: 767px) {
  .sorts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); overscroll-behavior-x: contain; }
  .sorts::-webkit-scrollbar { display: none; }
  .sorts > * { flex: none; white-space: nowrap; }
}
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 26px; }
.pager a { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); font-weight: 600; }
.pager a.is-current { background: var(--teal); color: var(--on-teal); }
.pager .gap { align-self: center; color: var(--ink-2); }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 16px; }
.empty img { width: 110px; }
.empty h2 { font-size: 22px; font-weight: 800; }
.empty p { color: var(--ink-2); max-width: 40ch; }

/* ---------- Product page ---------- */
.pdp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 1024px) { .pdp-grid { grid-template-columns: 1fr 1.1fr 340px; align-items: start; } }
/* Product photos are shown whole (never cropped) on white, the colour most product shots
   are taken on, in light and dark theme alike. */
.gallery-main { aspect-ratio: 1; border-radius: var(--radius-card); overflow: hidden; background: #fff; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main { position: relative; display: block; cursor: zoom-in; }
.zoom-hint { position: absolute; inset-inline-start: 12px; bottom: 12px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: #17393f; box-shadow: 0 1px 4px rgba(16, 41, 45, 0.14); pointer-events: none; }
.zoom-hint .icon { width: 18px; height: 18px; }

/* Full-screen photo viewer: always on white, like the photos themselves. */
.viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #fff; color: #10292d; }
.viewer::backdrop { background: #fff; }
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
html:has(.viewer[open]) { overflow: hidden; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px; font-weight: 700; }
.viewer-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #eef3f3; color: #10292d; }
.viewer-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-slide { flex: 0 0 100%; display: flex; overflow: hidden; direction: ltr; scroll-snap-align: center; scroll-snap-stop: always; cursor: zoom-in; }
.viewer-slide img { flex-shrink: 0; margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.viewer-slide.is-zoomed { overflow: auto; overscroll-behavior: contain; scrollbar-width: none; cursor: zoom-out; }
.viewer-slide.is-zoomed img { max-width: none; max-height: none; }
.viewer-nav { display: none; position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: #fff; color: #10292d; box-shadow: 0 2px 10px rgba(16, 41, 45, 0.16); }
.viewer-prev { inset-inline-start: 20px; }
.viewer-next { inset-inline-end: 20px; }
@media (hover: hover) and (pointer: fine) { .viewer-nav { display: grid; } }
.viewer-help { text-align: center; color: #47595d; font-size: 13px; padding: 8px var(--gutter) max(12px, env(safe-area-inset-bottom)); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs button { width: 72px; height: 72px; border-radius: 14px; overflow: hidden; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color 200ms ease; }
.thumbs button.is-active { outline-color: var(--teal); }
.thumbs button { background: #fff; }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pdp-brand { color: var(--teal); font-weight: 700; }
.pdp-info h1 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 800; margin-top: 4px; }
.pdp-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 8px; font-size: 14px; }
.pdp-short { margin-top: 14px; font-size: 16.5px; }
.pdp-keyspecs { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.pdp-keyspecs li { display: flex; justify-content: space-between; gap: 12px; background: var(--surface); padding: 10px 14px; border-radius: 12px; font-size: 15px; }
.pdp-keyspecs span { color: var(--ink-2); }
.buybox { background: var(--surface); border-radius: var(--radius-card); padding: 20px; display: grid; gap: 14px; }
@media (min-width: 1024px) { .buybox { position: sticky; top: calc(var(--header-h, 130px) + 16px); } }
.buy-row { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.buy-row .icon { color: var(--teal); }
.hot { color: var(--red); }
.snapp-note { display: flex; align-items: center; gap: 10px; background: var(--aqua-50); padding: 10px 14px; border-radius: 14px; font-size: 14.5px; }
.snapp-note .icon { color: var(--teal); }
.buy-form { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.qty { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 14px; padding: 4px; }
.qty button { width: 40px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: var(--teal); }
@media (hover: hover) and (pointer: fine) { .qty button:hover:not(:disabled) { background: var(--surface); } }
.qty button:disabled { opacity: 0.35; cursor: default; }
.qty button .icon { width: 20px; height: 20px; }
.qty input, .qty span { width: 36px; text-align: center; border: 0; background: none; font-weight: 700; font-size: 17px; }
.out-note { background: var(--surface-2); padding: 14px; border-radius: 14px; }
.inquiry-price { font-size: 18px; } .inquiry-price b { font-size: 22px; font-weight: 800; color: var(--teal); }
.sticky-buy .inquiry-price { font-size: 14px; white-space: nowrap; } .sticky-buy .inquiry-price b { font-size: 17px; }
.buybox .out-note + .btn { margin-top: 12px; }
.wish { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.wish.is-on { color: var(--red); }
.wish.is-on .icon { fill: currentColor; }
.tabs { display: flex; gap: 6px; position: sticky; top: calc(var(--header-h, 120px) + var(--quickbar-shown, 0px)); z-index: 5; transition: top 280ms var(--ease-out); scrollbar-width: none; background: var(--ground); padding-block: 8px; margin-bottom: 8px; overflow-x: auto; }
.tabs a { padding: 8px 16px; border-radius: 99px; background: var(--surface); font-weight: 600; white-space: nowrap; }
.prose, .specs, .reviews { background: var(--surface); border-radius: var(--radius-card); padding: 22px; margin-bottom: 16px; }
.prose h2, .specs h2, .reviews h2 { font-size: 21px; font-weight: 800; margin-bottom: 10px; }
.prose p { margin-bottom: 14px; max-width: 75ch; font-size: 16.5px; line-height: 2; }
.prose h2:not(:first-child) { margin-top: 18px; }
.specs table { width: 100%; border-collapse: collapse; font-size: 15px; }
.specs th, .specs td { text-align: start; padding: 12px 10px; border-bottom: 1px solid var(--surface-2); }
.specs th { width: 34%; color: var(--ink-2); font-weight: 500; }
.review-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 14px; }
.review-list li { background: var(--ground); padding: 14px 16px; border-radius: 14px; }
.review-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 4px; font-size: 14px; }
.review-form { display: grid; gap: 14px; background: var(--ground); padding: 18px; border-radius: 16px; }
.review-form h3 { font-size: 17px; font-weight: 700; }
.review-form .field input, .review-form .field select, .review-form .field textarea { background: var(--surface); }
.sticky-buy { display: none; }
@media (max-width: 1023px) {
  .sticky-buy { display: flex; position: fixed; z-index: 30; inset-inline: 0; bottom: 0; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 24px -18px rgb(var(--shadow-rgb) / 0.5); }
  .sticky-buy:empty { display: none; }
  .sticky-buy { transition: transform 280ms var(--ease-out), visibility 0s; }
  .sticky-buy.is-tucked { transform: translateY(110%); visibility: hidden; transition: transform 220ms ease-in, visibility 0s 220ms; }
  .gallery-main { aspect-ratio: 1; max-height: 62svh; }
  .thumbs button { width: 60px; height: 60px; border-radius: 12px; }
  body:has(.sticky-buy:not(:empty)) .helper { bottom: 84px; }
  body:has(.sticky-buy:not(:empty)) { padding-bottom: 80px; }
}

/* ---------- Cart & checkout ---------- */
.cart h1, .checkout h1 { font-size: 26px; font-weight: 800; margin-bottom: 14px; }
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 1024px) { .cart-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .sticky-col { position: sticky; top: calc(var(--header-h, 130px) + 16px); } }
.sticky-col { display: grid; gap: 12px; }
/* Phones: the cart total and the way on stay in reach at the bottom of the screen. */
.cart-bar { display: none; }
@media (max-width: 1023px) {
  .cart-bar { display: flex; position: fixed; z-index: 30; inset-inline: 0; bottom: 0; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 24px -18px rgb(var(--shadow-rgb) / 0.5); }
  .cart-bar > div { display: grid; line-height: 1.4; }
  .cart-bar small { color: var(--ink-2); font-size: 13px; }
  .cart-bar b { font-size: 17px; font-weight: 800; }
  .cart-bar .btn { flex: none; min-width: 150px; }
  body:has(.cart-bar) { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
}
.cart-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 96px 1fr; gap: 14px; background: var(--surface); padding: 12px; border-radius: var(--radius-card); align-items: center; }
.cart-thumb img { width: 96px; height: 96px; border-radius: 14px; object-fit: contain; background: #fff; }
.cart-info { display: grid; gap: 2px; }
.cart-name { font-weight: 700; line-height: 1.6; }
.cart-qty { grid-column: 2; justify-self: start; }
@media (min-width: 640px) { .cart-item { grid-template-columns: 110px 1fr auto; } .cart-thumb img { width: 110px; height: 110px; } .cart-qty { grid-column: auto; } }
.summary { background: var(--surface); border-radius: var(--radius-card); padding: 20px; }
.summary h2 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.summary dl, .kv { margin: 0; display: grid; gap: 8px; }
.summary dl > div, .kv > div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.summary dt, .kv dt { color: var(--ink-2); }
.summary dd, .kv dd { margin: 0; font-weight: 600; text-align: start; white-space: nowrap; }
.summary dl > div { align-items: baseline; }
.summary .save dd { color: var(--red); }
.summary .total { padding-top: 10px; margin-top: 4px; font-size: 17px; }
.summary .total dt { color: var(--ink); font-weight: 700; }
.summary .total dd { font-weight: 800; }
.coupon { display: flex; gap: 8px; margin-top: 14px; }
.coupon .btn { min-height: 50px; }
.steps { list-style: none; padding: 0; margin: 4px 0 20px; display: flex; gap: 8px; font-size: 14px; counter-reset: s; overflow-x: auto; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); white-space: nowrap; }
.steps li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); font-weight: 700; }
.steps li + li::after { order: -1; content: ""; width: 24px; height: 2px; background: var(--surface-2); border-radius: 2px; }
.steps li.done::before { content: "✓"; background: var(--teal); color: var(--on-teal); }
.steps li.is-current { color: var(--ink); font-weight: 700; }
.steps li.is-current::before { background: var(--teal); color: var(--on-teal); }
@media (max-width: 480px) {
  .steps { gap: 6px; overflow: visible; }
  .steps li:not(.is-current) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .steps li + li::after { width: 16px; }
}
fieldset.panel { border: 0; margin: 0 0 16px; display: grid; gap: 14px; }
fieldset.panel legend { float: right; width: 100%; font-size: 18px; font-weight: 800; margin-bottom: 4px; padding: 0; }
.address-pick { display: grid; gap: 10px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--ground); cursor: pointer; font-size: 15px; outline: 2px solid transparent; transition: outline-color 200ms ease, background-color 200ms ease; }
.radio-card:has(input:checked) { outline-color: var(--teal); background: var(--aqua-50); }
.radio-card .icon { width: 18px; height: 18px; vertical-align: -4px; margin-inline-end: 4px; }
.new-address { display: grid; gap: 14px; }
.new-address[data-collapsed] { display: none; }
.pay-methods { display: grid; gap: 10px; }
@media (min-width: 700px) { .pay-methods { grid-template-columns: 1fr 1fr; } }
.pay-method { position: relative; display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--ground); cursor: pointer; outline: 2px solid transparent; transition: outline-color 200ms ease, background-color 200ms ease; }
.pay-method:has(input:checked) { outline-color: var(--teal); background: var(--aqua-50); }
.pay-method.is-disabled { opacity: 0.55; cursor: not-allowed; }
.pay-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; color: var(--teal); flex: none; }
.pay-text { display: grid; line-height: 1.5; }
.pay-text small { color: var(--ink-2); font-size: 13px; }
.pay-text .instal { color: var(--teal); font-weight: 700; }
.pay-tag { position: absolute; top: 8px; left: 10px; font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.ship-method .pay-text small { display: block; }
.ship-price { margin-inline-start: auto; font-weight: 800; white-space: nowrap; }
.ship-method:has(.pay-tag:not([hidden])) .ship-price { display: none; }
.ship-eta { color: var(--ink-2); }
.ship-cod { color: var(--teal); font-weight: 700; }
.ship-method .pay-text { flex: 1 1 0; min-width: 0; }
@media (max-width: 640px) {
  .ship-method { flex-wrap: wrap; row-gap: 6px; }
  .ship-price { flex-basis: 100%; text-align: left; }
  .ship-method [data-ship-reason] { position: static; order: 5; flex-basis: 100%; white-space: normal; border-radius: 10px; }
}
.pay-tag-demo { background: var(--warn-50); color: var(--amber); position: static; }
.pay-method .pay-tag-demo { position: absolute; }
.mini-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; background: var(--surface); border-radius: var(--radius-card); padding: 12px; }
.mini-items li { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.mini-items img { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: #fff; }
.terms { background: var(--surface); padding: 12px 14px; border-radius: 14px; }
.terms a { color: var(--teal); font-weight: 600; }

.result-card, .sim-card, .auth-card { background: var(--surface); border-radius: var(--radius-banner); padding: 28px 22px; display: grid; gap: 14px; justify-items: center; text-align: center; margin-block: 20px; }
.result-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; }
.result-icon .icon { width: 36px; height: 36px; stroke-width: 2.4; }
.is-ok .result-icon { background: var(--ok-50); color: var(--green); }
.is-fail .result-icon { background: var(--red-50); color: var(--red); }
.result-card h1, .auth-card h1 { font-size: 24px; font-weight: 800; }
.result-actions, .sim-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.transfer-box { background: var(--aqua-50); border-radius: 16px; padding: 16px; display: grid; gap: 6px; }
.card-no { font-size: 24px; font-weight: 800; letter-spacing: 0.06em; }
.order-detail { display: grid; gap: 16px; text-align: start; }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.status { font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.status-processing, .status-shipped { background: var(--aqua-100); color: var(--teal); }
.status-delivered { background: var(--ok-50); color: var(--green); }
.status-pending_payment, .status-awaiting_confirmation { background: var(--warn-50); color: var(--amber); }
.status-cancelled, .status-refunded { background: var(--red-50); color: var(--red); }
.track-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 13px; font-weight: 600; text-align: center; }
.track-steps li { padding-top: 14px; position: relative; color: var(--ink-2); }
.track-steps li::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 6px; border-radius: 6px; background: var(--surface-2); }
.track-steps li.done { color: var(--teal); }
.track-steps li.done::before { background: var(--teal); }
.tx { padding-inline-start: 18px; font-size: 14px; color: var(--ink-2); }
.track-form { display: grid; gap: 14px; }
.sim-head { display: flex; gap: 10px; align-items: center; font-size: 20px; }
.kv { width: 100%; text-align: start; }

/* Auth */
.auth-card { max-width: 440px; margin-inline: auto; text-align: start; justify-items: stretch; }
.auth-card > img { justify-self: center; }
.auth-card form { display: grid; gap: 14px; }
.otp { text-align: center; letter-spacing: 0.5em; font-size: 26px !important; font-weight: 800; }
.demo-hint { line-height: 1.85; background: var(--warn-50); color: var(--warn-ink); padding: 10px 14px; border-radius: 14px; font-size: 14.5px; }

/* Account */
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 900px) { .account-grid { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } .account-nav { position: sticky; top: calc(var(--header-h, 130px) + 16px); } }
.account-who { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.account-who > div { display: grid; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--aqua-100); color: var(--teal); display: grid; place-items: center; }
.account-nav nav { display: grid; gap: 2px; }
.account-nav nav a, .account-nav nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-weight: 500; width: 100%; text-align: start; }
.account-nav nav a.is-active { background: var(--aqua-50); color: var(--teal); font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .account-nav nav a:hover, .account-nav nav button:hover { background: var(--surface-2); } }
.account-nav .icon { width: 20px; height: 20px; }
.account-main { display: grid; gap: 16px; align-content: start; }
.account-main h1 { font-size: 24px; font-weight: 800; }
.account-main h2 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border-radius: var(--radius-card); padding: 16px; display: grid; }
.stat b { font-size: 28px; font-weight: 800; }
.stat span { color: var(--ink-2); font-size: 14px; }
.order-list { display: grid; gap: 6px; }
.order-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--ground); font-size: 14.5px; }
@media (hover: hover) and (pointer: fine) { .order-row:hover { background: var(--aqua-50); } }
.order-row .icon { display: none; }
@media (min-width: 700px) { .order-row { grid-template-columns: 130px 1fr 1fr auto 24px; } .order-row .icon { display: block; width: 18px; } }
/* Account: phone hub and sub-pages */
.account-hub, .account-back { display: none; }
a.stat { color: inherit; transition: transform 140ms var(--ease-out), background-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { a.stat:hover { background: var(--aqua-50); } }
a.stat:active { transform: scale(0.97); }
.order-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.order-tabs::-webkit-scrollbar { display: none; }
.order-tabs a { flex: none; min-height: 38px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 99px; background: var(--surface); font-weight: 600; font-size: 14px; color: var(--ink-2); transition: background-color 160ms ease, color 160ms ease; }
.order-tabs a.is-active { background: var(--teal); color: var(--on-teal); }
@media (max-width: 899px) {
  .crumbs:has(~ .account), .account-nav { display: none; }
  .account { padding-top: 12px !important; }
  .account-hub { display: grid; gap: 12px; }
  .account.is-hub .account-main > .panel { order: 3; }
  .hub-hello { display: none; }
  .account-main { gap: 14px; }
  /* Who you are: one tappable card that opens the profile. */
  .account-hub.hub-me { display: flex; }
  .hub-me { align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius-card); background: var(--brand); color: #fff; }
  .hub-me .avatar { width: 52px; height: 52px; background: rgb(255 255 255 / 0.14); color: #fff; }
  .hub-me .hub-text small { color: #cfe9ec; }
  .hub-edit { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--aqua); }
  .hub-edit .icon { width: 16px; height: 16px; }
  .hub-group { display: grid; background: var(--surface); border-radius: var(--radius-card); padding: 4px; margin: 0; }
  .hub-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 12px; border-radius: 16px; text-align: start; color: var(--ink); transition: background-color 140ms ease, transform 120ms var(--ease-out); }
  .hub-row + .hub-row { box-shadow: 0 -1px 0 var(--surface-2); }
  .hub-row:active { background: var(--surface-2); transform: scale(0.99); box-shadow: none; }
  .hub-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--aqua-50); color: var(--teal); flex: none; }
  .hub-icon .icon { width: 21px; height: 21px; }
  .hub-text { display: grid; line-height: 1.55; min-width: 0; }
  .hub-text b { font-size: 15.5px; font-weight: 700; }
  .hub-text small { font-size: 13px; color: var(--ink-2); }
  .hub-row > .icon { margin-inline-start: auto; width: 18px; height: 18px; color: var(--ink-3); }
  .hub-logout { color: var(--red); }
  .hub-logout .hub-icon { background: var(--red-50); color: var(--red); }
  /* Order status tiles: compact, three across */
  .stat { padding: 12px; border-radius: 16px; text-align: center; }
  .stat b { font-size: 22px; }
  .stat span { font-size: 13px; line-height: 1.5; }
  /* Sub-pages: a back bar to the hub instead of the whole menu again. */
  .account-back { display: inline-flex; align-items: center; gap: 4px; justify-self: start; min-height: 44px; padding-inline: 4px 12px; margin-bottom: -6px; border-radius: 12px; font-weight: 700; color: var(--teal); }
  .account-back .icon { width: 20px; height: 20px; }
  .account-back:active { background: var(--surface-2); }
  .account-main h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out 160ms ease-in both; }
  ::view-transition-new(root) { animation: vt-in 260ms var(--ease-out) both; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
}
.cancel-order { display: grid; gap: 6px; justify-items: start; }
.address-list { display: grid; gap: 10px; }
.address { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }

.article h1 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; margin-top: 8px; }
.article-cover { border-radius: var(--radius-card); margin-block: 18px; width: 100%; }
.article .prose { margin-top: 14px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.contact-grid h1 { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.contact-grid form { display: grid; gap: 14px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ---------- Footer ---------- */
.footer { background: var(--surface); margin-top: 36px; }
.perks-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; padding-block: 28px; }
@media (min-width: 900px) { .perks-row { grid-template-columns: repeat(4, 1fr); } }
.perk { display: flex; gap: 12px; align-items: center; }
.perk > div { display: grid; line-height: 1.6; }
.perk b { font-size: 15px; }
.perk span:not(.perk-icon) { font-size: 13.5px; color: var(--ink-2); }
.perk-icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--aqua-50); color: var(--teal); flex: none; }
.footer-grid { display: grid; gap: 28px; padding-block: 28px 32px; }
@media (min-width: 640px) and (max-width: 899px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 24px; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.3fr 0.8fr 0.8fr 1.3fr; gap: 36px; } }
.footer h2 { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.footer-about img { width: 150px; margin-bottom: 10px; }
.footer-about p { color: var(--ink-2); font-size: 15px; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 15px; }
.links a { display: inline-block; padding: 4px 0; color: var(--ink-2); transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .links a:hover { color: var(--teal); } }
.footer-contact { display: grid; gap: 14px; align-content: start; }
.footer-contact h2 { margin-bottom: 0; }
.phone-list { list-style: none; margin: 0; padding: 4px; display: grid; background: var(--ground); border-radius: 18px; }
.phone-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 14px; font-size: 14.5px; transition: background-color 180ms ease; }
.phone-list li + li a { box-shadow: 0 -1px 0 var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .phone-list a:hover { background: var(--surface); box-shadow: none; } }
.phone-list span { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.phone-list .icon { width: 18px; height: 18px; color: var(--teal); }
.phone-list b { font-weight: 700; letter-spacing: 0.02em; color: var(--ink); }
.phone-list li:first-child b { font-size: 16px; color: var(--teal); }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.info-list li { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start; }
.info-list .icon { width: 36px; height: 36px; padding: 8px; border-radius: 12px; background: var(--aqua-50); color: var(--teal); }
.info-list div { display: grid; line-height: 1.6; }
.info-list small { font-size: 13px; color: var(--ink-2); }
.info-list span { font-size: 14.5px; font-weight: 500; }
.footer-contact .seals { margin-top: 2px; }
.contact-page { margin-top: 18px; max-width: 460px; }
.contact-page .phone-list { background: var(--surface); }
@media (hover: hover) and (pointer: fine) { .contact-page .phone-list a:hover { background: var(--ground); } }
.contact { margin: 0; display: grid; gap: 8px; font-size: 14.5px; }
.contact dt { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; margin-inline-end: 6px; }
.contact dt .icon { width: 18px; height: 18px; color: var(--teal); }
.contact dd { display: inline; margin: 0; color: var(--ink-2); }
.contact dd a { color: var(--ink); font-weight: 600; }
.contact.big { font-size: 17px; margin-top: 18px; }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--ground); color: var(--teal); }
@media (hover: hover) and (pointer: fine) { .socials a:hover { background: var(--aqua-100); } }
.seals { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.seal { width: 104px; height: 104px; border-radius: 18px; background: var(--ground); display: grid; place-items: center; text-align: center; padding: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.5; }
.seal > span { display: grid; justify-items: center; gap: 2px; }
.seal small { font-size: 13px; font-weight: 400; }
.seal .icon { width: 28px; height: 28px; color: var(--teal); }
.seal-live { background: #fff; }
.seal-live img { width: 88px; height: 88px; object-fit: contain; }
.signoff { background: var(--ground); }
.signoff .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-block: 18px 22px; font-size: 14px; color: var(--ink-2); }
/* Link groups: plain lists from tablet up; folding sections on phones (site.js closes
   them there; without script they stay open). */
.foot-group > summary { list-style: none; cursor: default; }
.foot-group > summary::-webkit-details-marker { display: none; }
.foot-group > summary .icon { display: none; }

/* Phones: one column of tidy blocks, like the big Iranian shops. */
@media (max-width: 639px) {
  .perks-row { gap: 10px; padding-block: 18px; }
  .perk { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 16px; background: var(--ground); }
  .perk-icon { width: 40px; height: 40px; border-radius: 12px; }
  .perk-icon .icon { width: 20px; height: 20px; }
  .perk b { font-size: 14px; }
  .perk span:not(.perk-icon) { font-size: 12.5px; line-height: 1.6; }

  .footer-grid { gap: 0; padding-block: 4px 18px; }
  .footer-about { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding-block: 16px; }
  .footer-about img { width: 132px; margin: 0; }
  .footer-about p { grid-column: 1 / -1; grid-row: 2; font-size: 14px; line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .footer-about .socials { margin: 0; grid-column: 2; grid-row: 1; }
  .footer-about .socials a { width: 40px; height: 40px; border-radius: 12px; }

  .foot-group { border-top: 1px solid var(--surface-2); }
  .foot-group > summary { display: flex; align-items: center; justify-content: space-between; min-height: 54px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .foot-group > summary h2 { margin: 0; font-size: 15px; }
  .foot-group > summary .icon { display: block; width: 20px; height: 20px; color: var(--ink-2); transition: transform 220ms var(--ease-out); }
  .foot-group[open] > summary .icon { transform: rotate(180deg); }
  .foot-group .links { grid-template-columns: 1fr 1fr; gap: 0 12px; padding-bottom: 14px; font-size: 14px; }
  .foot-group .links a { padding: 7px 0; }

  .footer-contact { border-top: 1px solid var(--surface-2); padding-top: 16px; gap: 12px; }
  .footer-contact h2 { font-size: 15px; }
  .footer-contact .phone-list li:first-child a { background: var(--teal); color: var(--on-teal); border-radius: 14px; padding: 13px 14px; }
  .footer-contact .phone-list li:first-child span, .footer-contact .phone-list li:first-child .icon, .footer-contact .phone-list li:first-child b { color: inherit; }
  .footer-contact .phone-list li:nth-child(2) a { box-shadow: none; }
  .info-list li { grid-template-columns: 32px 1fr; }
  .info-list .icon { width: 32px; height: 32px; padding: 7px; }
  .info-list span { font-size: 14px; }
  .seals { justify-content: center; margin-top: 4px; }
  .seal { width: 100px; height: auto; min-height: 100px; }

  .signoff .wrap { flex-direction: column; align-items: stretch; text-align: center; gap: 10px; padding-block: 14px calc(84px + env(safe-area-inset-bottom, 0px)); font-size: 12.5px; }
  .signoff .pay-logos { min-width: 0; max-width: calc(100% + 2 * var(--gutter)); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .signoff .pay-logos::-webkit-scrollbar { display: none; }
  .signoff .pay-logos span { flex: none; font-size: 12px; white-space: nowrap; }
}
.pay-logos { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-logos span { background: var(--surface); padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--ink); }

/* Floating helper & toast */
.helper { position: fixed; z-index: 30; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding-inline: 16px 18px; border-radius: 99px; background: var(--inverse); color: var(--on-inverse); font-weight: 700; font-size: 14px; }
.helper .icon { color: var(--aqua); }
.toast { position: fixed; z-index: 70; left: 50%; bottom: 84px; transform: translate(-50%, 16px); opacity: 0; background: var(--inverse); color: var(--on-inverse); font-size: 15px; font-weight: 600; padding: 12px 18px; border-radius: 16px; display: flex; align-items: center; gap: 10px; transition: transform 260ms var(--ease-out), opacity 200ms ease; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error .icon { color: #ffb4ad; }
.toast .icon { color: var(--aqua); }

/* ---------- Phones: native feel ---------- */
/* Taps fire at once (no double-tap-zoom wait); control labels aren't selectable
   by a long press, but content text still is. */
button, a, label, summary, [role="button"] { touch-action: manipulation; }
button, .btn, .chip, .chip-opt, .swatch, .story, .add, .dots, .tabs a, .sorts a, .pager a, .catbar-row > a, .quickbar-row a, .mega-btn, .theme-btn {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.drawer-panel { overscroll-behavior: contain; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.suggest { max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

/* Quick links: inside the sticky header on desktop, a strip that scrolls away on phones
   so the pinned header stays small. */
.quickbar { display: none; }
@media (max-width: 1023px) {
  .catbar { display: none; }
  /* Its own sticky bar tucked under the header (lower z-index): it slides up behind the
     header while scrolling down and back out when scrolling up, so it is never left half-cut.
     transform only, so nothing below it moves. */
  .quickbar { display: block; position: sticky; top: var(--header-h, 110px); z-index: 39; background: var(--surface); transition: transform 280ms var(--ease-out), box-shadow 200ms ease; }
  .quickbar.is-tucked { transform: translateY(-100%); transition-duration: 220ms; }
  .header.is-scrolled + .mega-scrim + .quickbar:not(.is-tucked) { box-shadow: 0 6px 20px -12px rgb(var(--shadow-rgb) / 0.35); }
  .header.is-scrolled:has(+ .mega-scrim + .quickbar:not(.is-tucked)) { box-shadow: none; }
  .quickbar-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 2px 10px; font-size: 14px; font-weight: 500; scroll-snap-type: x proximity; }
  .quickbar-row::-webkit-scrollbar { display: none; }
  .quickbar-row a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 99px; background: var(--surface-2); color: var(--ink); scroll-snap-align: start; transition: background-color 160ms ease, transform 120ms var(--ease-out); }
  .quickbar-row a:active { transform: scale(0.96); background: var(--aqua-100); }
  .quickbar-row a.is-hot { color: var(--red); font-weight: 700; }
  .quickbar-row .icon { width: 17px; height: 17px; }
  .header-row { padding-block: 8px; row-gap: 8px; }
  .header-row > .icon-btn, .login { height: 44px; }
  .header-row > .icon-btn { width: 44px; }
  .search { height: 46px; border-radius: 14px; }
  .call-btn { width: 46px; height: 46px; border-radius: 14px; }
  /* Support: a round button that doesn't sit on top of prices and buttons. */
  .helper { width: 50px; height: 50px; padding: 0; justify-content: center; left: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 10px 24px -12px rgb(var(--shadow-rgb) / 0.6); }
  .helper span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body:has(.sticky-buy:not(:empty)) .helper { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  /* Section heading: title and "see all" share the first line, the note runs full width below. */
  .section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
  .section-head > div { display: contents; }
  .section-head h2 { grid-column: 1; grid-row: 1; }
  .section-head p { grid-column: 1 / -1; grid-row: 2; }
  .section-head .see-all, .section-head .tools { grid-column: 2; grid-row: 1; }
  /* Footer promises: icon above the words so two columns fit. */
  .perk { flex-direction: column; align-items: flex-start; gap: 8px; }
  .perk-icon { width: 44px; height: 44px; border-radius: 14px; }
  /* Press feedback for cards on touch */
  .card:active, .cat:active, .post:active, .mega-prod:active { transform: scale(0.985); transition-duration: 120ms; }
}

/* ---------- Motion: hover ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn-teal:hover, .btn-light:hover { box-shadow: 0 10px 22px -12px rgb(var(--shadow-rgb) / 0.55); }
  .btn { transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, box-shadow 260ms var(--ease-out); }
  .btn .icon { transition: transform 260ms var(--ease-out); }
  .btn:hover .icon-left, .btn:hover use[href="#i-left"] { transform: translateX(-4px); }
  .btn:hover > .icon:last-child { transform: translateX(-3px); }
  .card { transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out); }
  .card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow); }
  .add { transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out); }
  .add .icon-plus { transition: transform 300ms var(--ease-out); }
  .add:hover .icon-plus { transform: rotate(90deg); }
  .cat { transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out); }
  .cat:hover { transform: translateY(-3px); box-shadow: var(--card-shadow); }
  .cat-name { transition: color 200ms ease; }
  .cat:hover .cat-name { color: var(--teal); }
  .story-ring { transition: transform 300ms var(--ease-out), padding 300ms var(--ease-out); }
  .story:hover .story-ring { transform: translateY(-2px); padding: 5px; }
  .story-ring img { transition: transform 400ms var(--ease-out); }
  .story:hover .story-ring img { transform: scale(1.08); }
  .post { transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out); }
  .post:hover { transform: translateY(-3px); box-shadow: var(--card-shadow); }
  .post h3 { transition: color 200ms ease; }
  .post:hover h3 { color: var(--teal); }
  .banner .chip .icon { transition: transform 260ms var(--ease-out); }
  .banner:hover .chip .icon { transform: translateX(-4px); }
  .brand-chip { transition: background-color 200ms ease, transform 260ms var(--ease-out); }
  .brand-chip:hover { transform: translateY(-2px); }
  .links a { transition: color 200ms ease, transform 260ms var(--ease-out); }
  .links a:hover { transform: translateX(-4px); }
  .perk-icon { transition: transform 300ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
  .perk:hover .perk-icon { transform: rotate(-8deg) scale(1.06); background: var(--teal); color: var(--on-teal); }
  .icon-btn, .login, .call-btn { transition: background-color 200ms ease, transform 160ms var(--ease-out); }
  .helper { transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out); }
  .helper:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -14px rgb(var(--shadow-rgb) / 0.6); }
  .helper:hover .icon { animation: ring 700ms var(--ease-out); }
  @keyframes ring { 20% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 70% { transform: rotate(-5deg); } }
  .thumbs button { transition: outline-color 200ms ease, transform 200ms var(--ease-out); }
  .thumbs button:hover { transform: translateY(-2px); }
  .catbar-row > a { position: relative; }
  .catbar-row > a::after { content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 260ms var(--ease-out); }
  .catbar-row > a:hover::after { transform: scaleX(1); }
}

/* ---------- Motion: scroll ----------
   Content is visible by default; browsers with scroll-driven animations add the
   entrance, others simply show it. Lists arrive as lists; banners unveil. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .shelf-track, .product-grid > *, .cat-grid > *, .posts > *, .brand-row > *, .perks-row > * {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%;
    }
    @keyframes rise { from { opacity: 0; transform: translateY(26px) scale(0.98); } }
    /* A shelf is its own sideways scroller, so the row rises as one. */
    .banner, .support-card {
      animation: unveil linear both; animation-timeline: view(); animation-range: entry 5% cover 35%;
    }
    @keyframes unveil { from { clip-path: inset(10% 6% round var(--radius-banner)); opacity: 0.4; } to { clip-path: inset(0 round var(--radius-banner)); opacity: 1; } }
    .banner img.bg { animation: banner-drift linear both; animation-timeline: view(); animation-range: cover; }
    @keyframes banner-drift { from { translate: 0 -6%; scale: 1.12; } to { translate: 0 6%; scale: 1.12; } }
    .section-head h2 { animation: head-in linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
    @keyframes head-in { from { opacity: 0; clip-path: inset(0 0 0 100%); } to { opacity: 1; clip-path: inset(0); } }
    .header { animation: header-shrink linear both; animation-timeline: scroll(root); animation-range: 0 140px; }
    @keyframes header-shrink { to { box-shadow: 0 8px 24px -14px rgb(var(--shadow-rgb) / 0.4); } }
  }
  /* The seconds digit ticks over */
  .clock b { display: inline-block; }
  .clock b.tick { animation: tick 420ms var(--ease-out); }
  @keyframes tick { from { transform: translateY(-40%); opacity: 0; filter: blur(2px); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
@media print {
  .header, .footer, .helper, .toast, .announce, .sticky-buy { display: none !important; }
}

/* ---------- Variants ---------- */
.price .from { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-inline-end: 4px; margin-inline-start: 0; }
.dots-row { display: flex; align-items: center; gap: 4px; margin-top: 4px; min-height: 14px; }
.dots-row i { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(var(--shadow-rgb) / 0.18); }
.dots-row small { font-size: 13px; color: var(--ink-2); }
a.add { text-decoration: none; }
.opt { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; grid-column: 1 / -1; }
.opt legend { font-size: 15px; color: var(--ink-2); padding: 0; margin-bottom: 8px; }
.opt legend b { color: var(--ink); }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; cursor: pointer; }
.swatch input, .chip-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch i { display: block; width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(var(--shadow-rgb) / 0.2); outline: 2px solid transparent; outline-offset: 3px; transition: outline-color 160ms ease, transform 160ms var(--ease-out); }
.swatch:active i { transform: scale(0.94); }
.swatch input:checked + i { outline-color: var(--teal); }
.swatch input:focus-visible + i, .chip-opt input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 3px; }
.chip-opt { cursor: pointer; }
.chip-opt span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 12px; background: var(--surface-2); font-weight: 600; font-size: 14.5px; outline: 2px solid transparent; transition: outline-color 160ms ease, background-color 160ms ease; }
.chip-opt input:checked + span { outline-color: var(--teal); background: var(--aqua-50); color: var(--teal); }
.chip-opt span i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(var(--shadow-rgb) / 0.2); }
.is-unavailable { opacity: 0.4; }
.is-unavailable span, .is-unavailable i { text-decoration: line-through; }
.buy-form.has-options { grid-template-columns: auto 1fr; row-gap: 16px; }
.color-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.color-filter .chip-opt span { min-height: 34px; font-size: 13.5px; padding: 0 10px; }
.variant-tag { display: block; font-size: 13px; color: var(--teal); font-weight: 600; }

/* Rows dragged with a mouse: no snapping or smooth scrolling while the hand moves them. */
@media (hover: hover) and (pointer: fine) {
  .shelf-track, .story-row, .catbar-row, .quickbar-row, .sorts, .order-tabs { cursor: grab; }
}
.is-dragging { scroll-snap-type: none !important; scroll-behavior: auto !important; cursor: grabbing !important; user-select: none; }
.is-dragging * { cursor: grabbing !important; }

/* Five stars filled to the score (product page, reviews). The gold row is clipped to
   the score from the right, the way a Persian reader reads it. */
.stars-full { gap: 6px; }
.star-row { position: relative; display: inline-flex; line-height: 0; }
.star-row .icon { width: 16px; height: 16px; }
.star-base .icon { fill: color-mix(in srgb, var(--ink) 16%, transparent); stroke: none; }
.star-top { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--fill); overflow: hidden; display: inline-flex; white-space: nowrap; }
.star-top .icon { flex: none; fill: var(--gold); stroke: none; }
.stars-full b { font-weight: 800; }

/* Picking a score: five stars; the chosen one and the ones before it light up. */
.star-pick { border: 0; padding: 0; margin: 0 0 14px; }
.star-pick legend { font-weight: 700; font-size: 15px; margin-bottom: 8px; padding: 0; }
.star-pick-row { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-pick-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick-row label { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; cursor: pointer; transition: transform 140ms var(--ease-out); -webkit-tap-highlight-color: transparent; }
.star-pick-row label .icon { width: 32px; height: 32px; fill: color-mix(in srgb, var(--ink) 14%, transparent); stroke: none; transition: fill 140ms ease; }
.star-pick-row label:active { transform: scale(0.9); }
.star-pick-row input:checked ~ label .icon { fill: var(--gold); }
@media (hover: hover) and (pointer: fine) {
  .star-pick-row:hover label .icon { fill: color-mix(in srgb, var(--ink) 14%, transparent); }
  .star-pick-row label:hover .icon, .star-pick-row label:hover ~ label .icon { fill: var(--gold); }
}
.star-pick-row input:focus-visible + label { outline: 2px solid var(--teal); outline-offset: 2px; }
.star-pick-word { display: block; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--ink-2); min-height: 1.5em; }
.star-pick-word [data-word] { display: none; }
.star-pick-word [data-word="0"] { display: inline; }
.star-pick:has(input:checked) .star-pick-word [data-word="0"] { display: none; }
.star-pick:has(#rate-1:checked) [data-word="1"], .star-pick:has(#rate-2:checked) [data-word="2"], .star-pick:has(#rate-3:checked) [data-word="3"],
.star-pick:has(#rate-4:checked) [data-word="4"], .star-pick:has(#rate-5:checked) [data-word="5"] { display: inline; color: var(--teal); }
