/* ===================== tokens ===================== */
:root {
  /* dark — deep violet */
  --bg: #120819;
  --surface: #1e1029;
  --surface-2: #2b1839;
  --text: #f4ebfc;
  --muted: #b3a0c7;
  --primary: #a855f7;
  --primary-2: #d27bff;
  --on-primary: #ffffff;
  --blush: #d27bff;          /* accent: focus, switches, icons */
  --brass: #e3bcff;          /* price */
  --hot: #ff4f9a;            /* discount badge */
  --gold: #f3c667;
  --line: rgba(200, 140, 255, 0.14);
  --danger: #ff8fa3;
  --ok: #8fe0b5;
  --glass: rgba(30, 16, 41, 0.78);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 24px -16px rgba(0, 0, 0, 0.7);
  --shadow-float: 0 18px 40px -16px rgba(0, 0, 0, 0.7);
  --hero: radial-gradient(120% 90% at 100% 0%, #b44cf0 0%, transparent 55%), linear-gradient(150deg, #2a0b4a 0%, #4c158a 45%, #7a2bc0 100%);
  --btn-grad: linear-gradient(135deg, #9b3df0, #c45cf5);

  --font-ui: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'Markazi Text', 'Vazirmatn', serif;
  --r-card: 22px;
  --r-sheet: 30px;
  --r-input: 14px;
  --safe-top: max(var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px), env(safe-area-inset-top, 0px));
  --safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  --gutter: 16px;
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f4edfb;
  --surface: #ffffff;
  --surface-2: #efe4f9;
  --text: #23113a;
  --muted: #776590;
  --primary: #7b2cbf;
  --primary-2: #a445e8;
  --on-primary: #ffffff;
  --blush: #8e34d6;
  --brass: #6a1fb0;
  --hot: #e5397a;
  --gold: #c8901f;
  --line: rgba(123, 44, 191, 0.12);
  --danger: #c7354f;
  --ok: #23845a;
  --glass: rgba(255, 255, 255, 0.82);
  --card-shadow: 0 1px 2px rgba(60, 20, 100, 0.06), 0 12px 28px -18px rgba(90, 30, 150, 0.35);
  --shadow-float: 0 18px 40px -18px rgba(80, 20, 140, 0.45);
  --hero: radial-gradient(120% 90% at 100% 0%, #c467f5 0%, transparent 55%), linear-gradient(150deg, #3e0f6e 0%, #6a22b0 50%, #9b3ddc 100%);
  --btn-grad: linear-gradient(135deg, #7b2cbf, #a445e8);
  color-scheme: light;
}

/* ===================== base ===================== */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01';
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blush); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#app { padding-top: var(--safe-top); padding-bottom: calc(110px + var(--safe-bottom)); min-height: 100vh; }
.page { padding: 0 var(--gutter); }

/* splash */
.splash { display: grid; place-items: center; height: 80vh; }
.splash-mark { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blush); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== age gate ===================== */
.gate {
  min-height: calc(100vh - var(--safe-top));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 32px 24px calc(32px + var(--safe-bottom));
  background:
    radial-gradient(120% 70% at 85% 10%, color-mix(in oklab, var(--blush) 26%, transparent), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, color-mix(in oklab, var(--brass) 16%, transparent), transparent 60%);
}
.gate-badge {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--blush); color: var(--blush);
  font-weight: 800; font-size: 18px; margin-bottom: 28px;
}
.gate h1 { font-family: var(--font-display); font-size: 56px; line-height: 1.05; margin: 0 0 14px; font-weight: 700; }
.gate p { color: var(--muted); margin: 0 0 32px; max-width: 34ch; }
.gate .btn + .btn { margin-top: 10px; }

/* ===================== header ===================== */
.top { padding: 18px var(--gutter) 6px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1; margin: 0; letter-spacing: -0.2px; }
.tagline { color: var(--muted); font-size: 13px; margin-top: 6px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line);
  transition: background 0.2s, color 0.2s;
}
.icon-btn[aria-pressed='true'] { background: var(--blush); color: var(--on-primary); border-color: transparent; }
:root[data-theme='light'] .icon-btn[aria-pressed='true'] { color: #fff; }
.icon-btn svg { width: 20px; height: 20px; }

/* search */
.searchbar {
  position: sticky; top: 0; z-index: 20;
  padding: 10px var(--gutter);
  padding-top: calc(10px + var(--safe-top) * 0);
  background: linear-gradient(var(--bg) 70%, transparent);
}
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 16px; height: 48px;
}
.search svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; background: none; outline: none; font-size: 15px; min-width: 0; }
.search input::placeholder { color: var(--muted); }
.search .clear { color: var(--muted); font-size: 13px; }

/* category rail */
.rail { display: flex; gap: 8px; overflow-x: auto; padding: 4px var(--gutter) 12px; scrollbar-width: none; scroll-padding: var(--gutter); }
.rail::-webkit-scrollbar { display: none; }
.chip {
  flex: none; white-space: nowrap;
  height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.18s, color 0.18s;
}
.chip small { color: var(--muted); font-size: 12px; }
.chip[aria-pressed='true'] { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.chip[aria-pressed='true'] small { color: inherit; opacity: 0.7; }

.listbar { display: flex; align-items: center; justify-content: space-between; padding: 6px var(--gutter) 12px; }
.listbar h2 { margin: 0; font-size: 15px; font-weight: 700; }
.listbar h2 span { color: var(--muted); font-weight: 400; font-size: 13px; margin-inline-start: 6px; }
.sort { position: relative; }
.sort select {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font-size: 13px; padding: 4px 18px 4px 0; outline: none;
}
.sort::after { content: ''; position: absolute; right: 2px; top: 50%; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }

/* featured */
.featured { display: flex; gap: 12px; overflow-x: auto; padding: 4px var(--gutter) 20px; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding: var(--gutter); }
.featured::-webkit-scrollbar { display: none; }
.feat {
  flex: none; width: 78%; scroll-snap-align: start;
  position: relative; border-radius: 28px; overflow: hidden;
  aspect-ratio: 5 / 4; background: var(--surface-2); text-align: start;
}
.feat img { width: 100%; height: 100%; object-fit: cover; }
.feat-body {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px;
  background: linear-gradient(transparent, rgba(20, 8, 24, 0.82));
  color: #f6eaf0;
}
.feat-body b { font-family: var(--font-display); font-size: 26px; line-height: 1.15; display: block; font-weight: 700; }
.feat-body span { color: #f2d3a2; font-weight: 600; font-size: 14px; }
.feat-tag { position: absolute; top: 14px; right: 14px; background: rgba(20, 8, 24, 0.55); backdrop-filter: blur(8px); color: #f6eaf0; font-size: 12px; padding: 3px 10px; border-radius: 999px; }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; padding: 0 var(--gutter); }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { position: relative; text-align: start; display: block; }
.card .ph { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-card); overflow: hidden; background: var(--surface-2); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.35s ease, transform 0.35s ease; }
.card .name { font-size: 14px; font-weight: 500; line-height: 1.55; margin: 10px 2px 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.card .price { margin: 0 2px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price b { color: var(--brass); font-weight: 700; font-size: 15px; }
.price s { color: var(--muted); font-size: 12px; }
.price .unit { font-size: 11px; color: var(--muted); font-weight: 400; }
.badge { position: absolute; top: 10px; right: 10px; background: var(--brass); color: #2a1630; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.badge.out { background: rgba(20, 8, 24, 0.7); color: #f6eaf0; backdrop-filter: blur(6px); }
.quick {
  position: absolute; bottom: 10px; left: 10px;
  min-width: 38px; height: 38px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4);
  color: var(--text); display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); font-weight: 700;
}
.quick svg { width: 18px; height: 18px; }
.quick.has { background: var(--primary); color: var(--on-primary); padding: 0 4px; gap: 2px; border-color: transparent; }
.quick.has button { width: 30px; height: 30px; display: grid; place-items: center; color: inherit; font-size: 18px; }
.quick.has span { min-width: 18px; text-align: center; font-size: 14px; }

/* privacy mode: the signature — images stay veiled until tapped */
body.privacy .veil img { filter: blur(22px) saturate(0.6); transform: scale(1.12); }
body.privacy .veil::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3 3l18 18M10.6 10.6a2 2 0 002.8 2.8M9.9 5.2A10 10 0 0112 5c5 0 9 4.5 10 7-0.4 1-1.2 2.3-2.4 3.5M6.3 6.3C4.3 7.6 2.8 9.6 2 12c1 2.5 5 7 10 7 1.7 0 3.3-.5 4.7-1.3'/%3E%3C/svg%3E") center / 26px no-repeat;
  opacity: 0.75;
}
body.privacy .veil.revealed img { filter: none; transform: none; }
body.privacy .veil.revealed::after { display: none; }

.empty { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty h3 { font-family: var(--font-display); font-size: 30px; color: var(--text); margin: 0 0 6px; font-weight: 600; }
.loader-row { display: flex; justify-content: center; padding: 24px; }
.loader-row .splash-mark { width: 28px; height: 28px; border-width: 2.5px; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-card); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===================== product ===================== */
.gallery { position: relative; margin-top: calc(var(--safe-top) * -1); }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track .slide { flex: none; width: 100%; aspect-ratio: 4 / 5; scroll-snap-align: center; position: relative; overflow: hidden; background: var(--surface-2); }
.gallery-track img { width: 100%; height: 100%; object-fit: cover; }
.dots { position: absolute; bottom: 44px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.45); transition: width 0.25s, background 0.25s; }
.dots i.on { width: 20px; background: #fff; }
.floating-back {
  position: absolute; top: calc(var(--safe-top) + 12px); right: 14px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(20, 8, 24, 0.45); backdrop-filter: blur(10px); color: #fff;
  display: grid; place-items: center;
}
.floating-back svg { width: 20px; height: 20px; }
.tg .floating-back { display: none; }

.sheet {
  position: relative; margin-top: -28px; z-index: 2;
  background: var(--bg); border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 26px var(--gutter) 8px;
}
.crumb { color: var(--muted); font-size: 13px; }
.p-title { font-family: var(--font-display); font-weight: 700; font-size: 38px; line-height: 1.15; margin: 4px 0 12px; }
.p-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.p-price b { font-size: 24px; color: var(--brass); font-weight: 800; }
.p-price s { color: var(--muted); }
.p-price .off { background: color-mix(in oklab, var(--brass) 22%, transparent); color: var(--brass); padding: 1px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.stock-note { margin-top: 6px; font-size: 13px; color: var(--danger); }
.lede { font-size: 16px; margin: 18px 0 0; }
.desc { color: var(--muted); white-space: pre-line; margin: 10px 0 0; max-width: 62ch; }

.assure { list-style: none; margin: 24px 0 8px; padding: 0; border-top: 1px solid var(--line); }
.assure li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.assure svg { width: 22px; height: 22px; color: var(--blush); flex: none; }
.assure small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }

.section-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin: 28px var(--gutter) 10px; }
.hrail { display: flex; gap: 12px; overflow-x: auto; padding: 0 var(--gutter) 8px; scrollbar-width: none; }
.hrail::-webkit-scrollbar { display: none; }
.hrail .card { width: 42%; flex: none; }

/* bottom action bar */
.actionbar {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  padding: 12px var(--gutter) calc(12px + var(--safe-bottom));
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; align-items: center;
}
.actionbar .meta { flex: 1; min-width: 0; line-height: 1.35; }
.actionbar .meta small { color: var(--muted); font-size: 12px; display: block; }
.actionbar .meta b { font-size: 17px; }

.btn {
  height: 54px; border-radius: 999px; padding: 0 24px;
  background: var(--primary); color: var(--on-primary);
  font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.12s ease, opacity 0.2s;
  width: 100%;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.auto { width: auto; flex: none; }
.btn .spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }

.stepper { display: inline-flex; align-items: center; height: 54px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); flex: none; }
.stepper button { width: 48px; height: 100%; display: grid; place-items: center; font-size: 22px; color: var(--text); }
.stepper span { min-width: 26px; text-align: center; font-weight: 700; font-size: 17px; }
.stepper.sm { height: 36px; }
.stepper.sm button { width: 34px; font-size: 18px; }
.stepper.sm span { font-size: 14px; min-width: 18px; }

/* ===================== cart ===================== */
.page-title { font-family: var(--font-display); font-size: 44px; font-weight: 700; margin: 22px 0 4px; line-height: 1.1; }
.page-sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.ship-progress { background: var(--surface); border-radius: 18px; padding: 14px 16px; margin-bottom: 18px; font-size: 13px; }
.ship-progress .bar { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 10px; overflow: hidden; }
.ship-progress .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass), var(--blush)); border-radius: 3px; transition: width 0.5s ease; }
.line-item { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line-item .ph { position: relative; width: 84px; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.line-item .ph img { width: 100%; height: 100%; object-fit: cover; }
.line-item .info { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.line-item .t { font-size: 14px; font-weight: 500; line-height: 1.5; }
.line-item .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.line-item .warn { color: var(--danger); font-size: 12px; }
.remove { color: var(--muted); font-size: 13px; padding: 4px 0; }

.summary { margin-top: 18px; }
.summary div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--muted); }
.summary div.total { color: var(--text); font-size: 17px; font-weight: 800; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; }
.cod-note { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border-radius: 18px; padding: 14px 16px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.cod-note svg { width: 20px; height: 20px; color: var(--brass); flex: none; margin-top: 2px; }

/* ===================== checkout form ===================== */
.form-group { margin: 0 0 26px; }
.form-group > h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 10px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field label em { font-style: normal; color: var(--muted); font-weight: 400; }
.input {
  width: 100%; height: 52px; border-radius: var(--r-input);
  background: var(--surface); border: 1.5px solid var(--line);
  padding: 0 14px; outline: none; font-size: 16px;
  transition: border-color 0.2s;
}
textarea.input { height: auto; min-height: 92px; padding: 12px 14px; resize: none; line-height: 1.7; }
.input:focus { border-color: var(--blush); }
.input.ltr { direction: ltr; text-align: right; letter-spacing: 0.5px; }
.field.err .input { border-color: var(--danger); }
.field .msg { color: var(--danger); font-size: 12px; margin-top: 5px; display: none; }
.field.err .msg { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.select-wrap { position: relative; }
.select-wrap select.input { appearance: none; padding-left: 36px; }
.select-wrap::after { content: ''; position: absolute; left: 16px; top: 50%; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.link-btn { color: var(--blush); font-size: 13px; font-weight: 600; margin-top: 6px; }

.toggle-card { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px; width: 100%; text-align: start; }
.toggle-card[aria-checked='true'] { border-color: var(--blush); }
.toggle-card .tx { flex: 1; }
.toggle-card .tx b { display: block; font-size: 15px; }
.toggle-card .tx small { color: var(--muted); font-size: 12px; line-height: 1.6; display: block; margin-top: 2px; }
.switch { width: 48px; height: 28px; border-radius: 14px; background: var(--surface-2); position: relative; flex: none; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.22s cubic-bezier(0.3, 1.4, 0.6, 1); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
[aria-checked='true'] .switch { background: var(--blush); }
[aria-checked='true'] .switch::after { transform: translateX(-20px); }
.form-error { background: color-mix(in oklab, var(--danger) 15%, transparent); color: var(--danger); border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }

/* ===================== success ===================== */
.done { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.done svg.check { width: 112px; height: 112px; margin-bottom: 22px; }
.check circle { stroke: var(--blush); stroke-width: 2.5; fill: none; stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 0.7s ease-out forwards; }
.check path { stroke: var(--blush); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw 0.4s 0.55s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done h1 { font-family: var(--font-display); font-size: 46px; margin: 0; line-height: 1.1; }
.done .code { margin: 10px 0 6px; font-size: 15px; color: var(--muted); }
.done .code b { color: var(--text); letter-spacing: 1px; }
.done p { color: var(--muted); max-width: 32ch; margin: 6px 0 28px; }
.done .btn + .btn { margin-top: 10px; }
.done .actions { width: 100%; max-width: 360px; }

/* ===================== orders ===================== */
.order { background: var(--surface); border-radius: 22px; padding: 16px; margin-bottom: 12px; }
.order-head { display: flex; justify-content: space-between; align-items: center; }
.order-head b { letter-spacing: 0.5px; }
.status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); }
.status.pending { color: var(--brass); }
.status.confirmed, .status.shipped { color: var(--blush); }
.status.delivered { color: var(--ok); }
.status.canceled { color: var(--muted); text-decoration: line-through; }
.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 14px 0 6px; }
.track i { height: 4px; border-radius: 2px; background: var(--surface-2); }
.track i.on { background: var(--blush); }
.track-labels { display: grid; grid-template-columns: repeat(4, 1fr); font-size: 11px; color: var(--muted); }
.track-labels span:last-child { text-align: left; }
.order-items { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.8; }
.order-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }

/* ===================== tab bar ===================== */
.tabbar {
  position: fixed; z-index: 30;
  left: 50%; transform: translateX(-50%);
  bottom: calc(14px + var(--safe-bottom));
  display: flex; gap: 4px; padding: 6px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-float);
}
.tabbar[hidden] { display: none; }
.tab {
  position: relative; height: 48px; padding: 0 18px; border-radius: 999px;
  display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.tab svg { width: 21px; height: 21px; }
.tab span.lbl { display: none; }
.tab[aria-current='page'] { background: var(--primary); color: var(--on-primary); }
.tab[aria-current='page'] span.lbl { display: inline; }
.tab .count { position: absolute; top: 5px; left: 8px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--brass); color: #2a1630; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
.tab[aria-current='page'] .count { position: static; }

/* toast */
.toast {
  position: fixed; z-index: 100; left: 50%; top: calc(var(--safe-top) + 14px);
  transform: translate(-50%, -150%); opacity: 0;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; transition: transform 0.35s cubic-bezier(0.2, 1.2, 0.4, 1), opacity 0.25s;
  max-width: calc(100% - 32px); text-align: center; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.about-box { color: var(--muted); font-size: 13px; padding: 26px var(--gutter) 0; line-height: 1.9; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.18s; }

/* fixes */
.card, .feat, .line-item .ph { text-decoration: none; color: inherit; }
.remove { align-self: flex-start; }
#app:has(.gate) { padding-bottom: 0; }


/* ===================== v2: purple redesign ===================== */
.btn { background: var(--btn-grad); color: var(--on-primary); box-shadow: 0 10px 24px -12px color-mix(in oklab, var(--primary) 70%, transparent); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: none; }

/* hero header */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: calc(var(--safe-top) * -1);
  padding: calc(var(--safe-top) + 20px) var(--gutter) 18px;
  background: var(--hero);
  border-radius: 0 0 32px 32px;
  color: #fff;
}
.hero::before, .hero::after {
  content: ''; position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px);
}
.hero::before { width: 260px; height: 260px; left: -90px; bottom: -120px; background: radial-gradient(circle, rgba(255, 120, 200, 0.35), transparent 70%); }
.hero::after { width: 180px; height: 180px; right: -40px; top: 40%; background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%); }
.hero-mark { position: absolute; z-index: -1; left: -30px; top: 6px; width: 190px; opacity: 0.12; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo {
  width: 50px; height: 50px; flex: none; border-radius: 16px;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22);
  display: grid; place-items: center; backdrop-filter: blur(6px);
}
.logo svg { width: 34px; height: 34px; }
.hero .brand { font-size: 34px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero .tagline { color: rgba(255, 255, 255, 0.78); margin-top: 4px; }
.hero .icon-btn { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.25); color: #fff; backdrop-filter: blur(6px); }
:root .hero .icon-btn[aria-pressed='true'] { background: #fff; color: var(--primary); }
.hero .search { margin-top: 18px; background: #fff; border: 0; box-shadow: 0 14px 30px -16px rgba(20, 0, 50, 0.55); color: #23113a; }
.hero .search input { color: #23113a; }
.hero .search input::placeholder, .hero .search svg, .hero .search .clear { color: #8a78a3; }
:root:not([data-theme='light']) .hero .search { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.18); }
:root:not([data-theme='light']) .hero .search input { color: #fff; }
:root:not([data-theme='light']) .hero .search input::placeholder, :root:not([data-theme='light']) .hero .search svg, :root:not([data-theme='light']) .hero .search .clear { color: rgba(255, 255, 255, 0.65); }
.perks { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 6px; }
.perks li {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  padding: 8px 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.92);
}
.perks svg { width: 16px; height: 16px; flex: none; }

/* sticky category rail */
.rail.sticky {
  position: sticky; top: 0; z-index: 20;
  padding-top: calc(12px + var(--safe-top)); margin-top: calc(var(--safe-top) * -1);
  background: linear-gradient(var(--bg) 78%, transparent);
}
.chip { background: var(--surface); box-shadow: var(--card-shadow); border-color: transparent; }
.chip[aria-pressed='true'] { background: var(--btn-grad); color: #fff; }
.listbar { padding-top: 2px; }

/* product cards */
.grid { gap: 14px 12px; }
.card { background: var(--surface); border-radius: var(--r-card); padding: 6px 6px 12px; box-shadow: var(--card-shadow); }
.card .ph { border-radius: 17px; background: #fff; }
:root:not([data-theme='light']) .card .ph { background: var(--surface-2); }
.card .name { margin: 10px 6px 4px; font-weight: 600; color: var(--text); }
.card .price { margin: 0 6px; }
.price b { color: var(--brass); font-weight: 800; }
.badge { background: var(--hot); color: #fff; box-shadow: 0 6px 14px -6px var(--hot); }
.badge.out { background: rgba(35, 17, 58, 0.72); }
.quick { background: var(--btn-grad); color: #fff; border: 0; box-shadow: 0 8px 18px -8px var(--primary); }
.quick.has { background: var(--btn-grad); color: #fff; }
.hrail .card { width: 44%; }

/* featured */
.feat { box-shadow: var(--card-shadow); }
.feat-tag { background: var(--gold); color: #2a1300; font-weight: 700; }
.feat-body span { color: #ffd98f; }

/* tab bar */
.tab[aria-current='page'] { background: var(--btn-grad); color: #fff; }
.tab .count { background: var(--hot); color: #fff; }

/* product page */
.p-price b { color: var(--brass); }
.p-price .off { background: color-mix(in oklab, var(--hot) 16%, transparent); color: var(--hot); }
.assure { border: 0; background: var(--surface); border-radius: 20px; padding: 2px 16px; box-shadow: var(--card-shadow); }
.assure li:last-child { border-bottom: 0; }
.assure svg { color: var(--primary); }
.stepper { background: var(--surface); }

/* cart / checkout / orders surfaces */
.line-item { background: var(--surface); border: 0; border-radius: 20px; padding: 10px; margin-bottom: 10px; box-shadow: var(--card-shadow); }
.ship-progress, .cod-note, .order, .toggle-card { box-shadow: var(--card-shadow); }
.ship-progress .bar i { background: var(--btn-grad); }
.summary { background: var(--surface); border-radius: 20px; padding: 10px 16px; box-shadow: var(--card-shadow); }
.page-title { color: var(--text); }
.status.confirmed, .status.shipped { color: var(--primary); }
.track i.on { background: var(--btn-grad); }
.input { border-color: var(--line); }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 14%, transparent); }

/* age gate */
.gate { background: var(--hero); color: #fff; }
.gate p { color: rgba(255, 255, 255, 0.8); }
.gate-badge { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.gate .btn { background: #fff; color: #4c158a; }
.gate .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.about-box { text-align: center; }
.tab { white-space: nowrap; }
:root[data-theme='light'] .gallery-track .slide, :root[data-theme='light'] .line-item .ph { background: #fff; }
