/* =========================================================
   Raff — design tokens
   Neutral stone palette, one muted olive accent.
   All spacing uses logical properties so RTL/LTR mirror.

   Spacing scale (only these values):  4 · 8 · 12 · 16 · 20 · 24 · 32 · 40
     --gutter 20   screen edge → content, for every screen
     --gap-sec 32  between sections on a screen
     --gap-head 12 section heading → its content
     --gap-stack 12 between sibling cards / rows
     --pad-card 16 inside every card
   Type scale (only these sizes): 12 · 13 · 14 · 15 · 17 · 20 · 26 · 30
   Radius scale: 10 (icon tiles) · 14 (controls) · 20 (cards) · 28 (sheets, media)
   ========================================================= */
:root {
  --stage: #E7E7E2;
  --paper: #F6F6F3;
  --surface: #FFFFFF;
  --sunken: #EDEDE8;
  --ink: #22221F;
  --ink-2: #55554F;
  --muted: #8C8C85;
  --line: #E4E4DE;
  --line-2: #D6D6CF;
  --accent: #5B6152;
  --accent-soft: #E6E8E0;
  --on-ink: #F6F6F3;
  --ok: #4F6B4A;
  --danger: #A3483A;
  --star: #B08D57;
  --hero: #2F2F2B;
  --hero-ink: #F2F1EC;
  --hero-2: #DCDAD3;
  --tile-mix: 100%;
  --shadow-1: 0 1px 2px rgba(34, 34, 31, .05), 0 2px 8px rgba(34, 34, 31, .04);
  --shadow-2: 0 10px 30px -10px rgba(34, 34, 31, .25);
  --bezel: #1D1D1B;

  /* spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --gutter: var(--sp-5);
  --gap-sec: var(--sp-8);
  --gap-head: var(--sp-3);
  --gap-stack: var(--sp-3);
  --pad-card: var(--sp-4);
  --safe-bottom: 28px;

  /* type */
  --t-xs: 12px;   /* captions, meta, badges, nav labels */
  --t-sm: 13px;   /* field labels, chips, secondary lines */
  --t-md: 14px;   /* paragraphs, list subtitles */
  --t-base: 15px; /* body, list titles, buttons */
  --t-lg: 17px;   /* section titles, emphasized values */
  --t-xl: 20px;   /* app bar titles, sheet titles, step titles */
  --t-2xl: 26px;  /* page headlines */
  --t-3xl: 30px;  /* onboarding */

  /* radius */
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;

  --font: 'Readex Pro', 'Segoe UI', system-ui, sans-serif;
  --brand-font: 'Reem Kufi', 'Readex Pro', serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dir: 1;
  color-scheme: light;
}
[dir="rtl"] { --dir: -1; }

:root[data-theme="dark"] {
  --stage: #0F0F0E;
  --paper: #191917;
  --surface: #22221F;
  --sunken: #2A2A26;
  --ink: #EDEDE8;
  --ink-2: #BDBDB5;
  --muted: #8E8E86;
  --line: #31312C;
  --line-2: #3D3D37;
  --accent: #AEB79E;
  --accent-soft: #2E3129;
  --on-ink: #191917;
  --ok: #9DB894;
  --danger: #E08B7C;
  --star: #D2B07A;
  --hero: #2B2B27;
  --hero-ink: #F2F1EC;
  --hero-2: #33332E;
  --tile-mix: 22%;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 10px 30px -10px rgba(0, 0, 0, .6);
  --bezel: #050505;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--stage);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: start; }
h1, h2, h3, p, dl { margin: 0; }
small { font-size: var(--t-xs); }
b { font-weight: 600; }
s { text-decoration-thickness: 1px; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.center { text-align: center; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.rot90 { transform: rotate(90deg) !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ltr-input { text-align: start; }
[dir="rtl"] .ltr-input { text-align: right; }
.ltr-inline { unicode-bidi: isolate; }

.wordmark { font-family: var(--brand-font); font-weight: 700; font-size: 26px; line-height: 1; color: var(--ink); }

/* =========================================================
   Stage: control panel + device
   ========================================================= */
.stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--sp-10);
  padding: var(--sp-8) var(--sp-10);
  align-items: center;
  max-width: 1100px;
  margin-inline: auto;
}
.panel { align-self: stretch; display: flex; flex-direction: column; gap: var(--sp-6); padding-block: var(--sp-2); }
.panel-brand { display: flex; gap: var(--sp-4); align-items: center; }
.panel-brand .wordmark { font-size: 40px; padding: var(--sp-3) var(--sp-4) var(--sp-4); background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.panel-brand b { font-size: var(--t-base); display: block; }
.panel-brand p { color: var(--muted); font-size: var(--t-sm); line-height: 1.5; }
.panel-controls { display: grid; gap: var(--sp-2); }
.seg-mini { display: grid; grid-template-columns: 1fr 1fr; background: var(--sunken); border-radius: var(--r-md); padding: var(--sp-1); }
.seg-mini button { text-align: center; padding: var(--sp-2); border-radius: var(--r-sm); font-size: var(--t-sm); color: var(--ink-2); transition: background .2s, color .2s; }
.seg-mini button.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 500; }
.panel-nav { display: flex; flex-direction: column; overflow-y: auto; }
.panel-nav h2 { font-size: var(--t-xs); font-weight: 500; color: var(--muted); margin-block: var(--sp-4) var(--sp-2); }
.panel-nav h2:first-child { margin-top: 0; }
.panel-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.panel-nav button { font-size: var(--t-sm); padding: var(--sp-1) var(--sp-3); border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); transition: background .15s, border-color .15s; }
.panel-nav button:hover { border-color: var(--ink-2); color: var(--ink); }
.panel-nav button.is-on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.panel-foot { color: var(--muted); font-size: var(--t-xs); margin-top: auto; }

.device-wrap { display: grid; place-items: center; }
.device {
  position: relative;
  width: 390px;
  height: 844px;
  border-radius: 56px;
  background: var(--paper);
  border: 11px solid var(--bezel);
  box-shadow: 0 0 0 1.5px #3a3a36, 0 40px 80px -30px rgba(0, 0, 0, .45);
  overflow: hidden;
  isolation: isolate;
}
.statusbar {
  position: absolute; inset-inline: 0; top: 0; height: 48px; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: 28px 24px; font-size: var(--t-base); font-weight: 600; color: var(--ink);
  direction: ltr; pointer-events: none;
}
.statusbar svg { fill: currentColor; }
.sb-icons { display: flex; gap: 6px; align-items: center; }
.sb-notch { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: 112px; height: 32px; border-radius: 20px; background: #000; }
.home-indicator { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 132px; height: 5px; border-radius: 3px; background: var(--ink); opacity: .85; z-index: 60; pointer-events: none; }
.app { position: absolute; inset: 0; }

/* =========================================================
   Screen scaffold
   ========================================================= */
.screen { position: absolute; inset: 0; padding-top: 48px; display: flex; flex-direction: column; background: var(--paper); }
.content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.content::-webkit-scrollbar { display: none; }
.pad { padding: var(--sp-2) var(--gutter) 0; }
.pad-x { padding-inline: var(--gutter); }
.spacer { height: var(--gap-sec); }
.spacer-lg { height: 112px; }
.enter-push { animation: push .32s var(--ease); }
.enter-pop { animation: pop .28s var(--ease); }
.enter-fade { animation: fade .3s var(--ease); }
@keyframes push { from { transform: translateX(calc(var(--dir) * 28px)); opacity: 0; } }
@keyframes pop { from { transform: translateX(calc(var(--dir) * -20px)); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* App bar — fixed 64px height; icon glyphs and title both sit on the 20px gutter.
   Icon buttons are 44px with an 8px inset, so the 22px glyph lands at 19–20px. */
.appbar { display: flex; align-items: center; gap: var(--sp-1); height: 64px; flex-shrink: 0; padding-inline: var(--sp-2); background: var(--paper); position: relative; z-index: 5; }
.appbar-gap { width: var(--sp-2); flex-shrink: 0; }
.appbar-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.appbar-title { font-size: var(--t-xl); font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-sub { font-size: var(--t-xs); color: var(--muted); line-height: 1.4; }
.appbar-actions { display: flex; align-items: center; }
.appbar-actions .link-btn { padding-inline: var(--sp-3); }

.icon-btn { position: relative; width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--ink); flex-shrink: 0; transition: background .15s; }
.icon-btn:hover { background: var(--sunken); }
.icon-btn.sm { width: 32px; height: 32px; color: var(--muted); }
.icon-btn.float { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); box-shadow: var(--shadow-1); }
.has-dot::after { content: ""; position: absolute; top: 10px; inset-inline-end: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--paper); }
.mini-badge { position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding-inline: var(--sp-1); border-radius: 9px; background: var(--ink); color: var(--on-ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--paper); line-height: 1; }

/* Buttons — two sizes only: 52 (primary actions) and 36 (inline) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); height: 52px; padding-inline: var(--sp-6); border-radius: var(--r-md); font-weight: 500; font-size: var(--t-base); transition: transform .12s, background .15s, opacity .15s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn.sm { height: 36px; padding-inline: var(--sp-4); font-size: var(--t-sm); border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn-primary, .btn-dark { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { opacity: .92; }
.btn-light { background: var(--hero-ink); color: #22221F; }
.btn-outline { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.btn-ghost { color: var(--ink-2); }
.link-btn { color: var(--accent); font-weight: 500; font-size: var(--t-sm); padding-block: var(--sp-1); }
.link-btn.light { color: #CFD6C1; }

/* Typography helpers */
.h1 { font-size: var(--t-2xl); font-weight: 600; line-height: 1.3; }
.lead { color: var(--ink-2); font-size: var(--t-base); }
.body-text { color: var(--ink-2); font-size: var(--t-md); line-height: 1.75; }
.sec-title { font-size: var(--t-lg); font-weight: 600; line-height: 1.4; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cur { font-size: .8em; font-weight: 500; opacity: .75; }
.old { color: var(--muted); font-size: var(--t-xs); font-weight: 400; margin-inline-start: var(--sp-2); }

/* Section heading — the ONLY place section rhythm lives.
   32px above, 12px to its content. Inside padded containers it loses the gutter. */
.sec-head { display: flex; align-items: center; justify-content: space-between; min-height: 28px; margin: var(--gap-sec) var(--gutter) var(--gap-head); }
.pad .sec-head, .pdp-body .sec-head { margin-inline: 0; }
.group-label { font-size: var(--t-sm); font-weight: 500; color: var(--muted); margin: var(--sp-6) 0 var(--sp-2); padding-inline: var(--sp-4); }

/* =========================================================
   Bottom navigation (Material 3 NavigationBar)
   ========================================================= */
.navbar { display: grid; grid-template-columns: repeat(5, 1fr); padding: var(--sp-2) var(--sp-2) var(--safe-bottom); background: var(--surface); border-top: 1px solid var(--line); position: relative; z-index: 6; flex-shrink: 0; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); color: var(--muted); font-size: var(--t-xs); text-align: center; }
.nav-pill { position: relative; width: 56px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background .25s var(--ease), color .2s; }
.nav-item.is-active { color: var(--ink); font-weight: 500; }
.nav-item.is-active .nav-pill { background: var(--accent-soft); color: var(--ink); }
.nav-badge { position: absolute; top: -4px; inset-inline-end: 6px; min-width: 18px; height: 18px; padding-inline: var(--sp-1); border-radius: 9px; background: var(--ink); color: var(--on-ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--surface); line-height: 1; }

/* =========================================================
   Shelf motif — the signature element
   ========================================================= */
.shelf { position: relative; }
.shelf-items { display: flex; align-items: flex-end; justify-content: center; position: relative; z-index: 1; }
.shelf-item .art { display: block; width: 100%; height: auto; }
.shelf-board { height: 10px; border-radius: 3px; background: linear-gradient(#C9BBA6, #B3A48D); box-shadow: 0 10px 18px -8px rgba(60, 50, 35, .45); margin-top: -14px; position: relative; z-index: 0; }
:root[data-theme="dark"] .shelf-board { background: linear-gradient(#6F6455, #585044); }

/* Splash */
.splash { justify-content: center; align-items: center; gap: var(--sp-4); text-align: center; cursor: pointer; }
.splash-lockup { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); animation: rise .8s var(--ease) both; }
.wordmark-xl { font-size: 92px; }
.splash-latin { font-family: var(--brand-font); font-size: var(--t-lg); color: var(--muted); letter-spacing: .3em; padding-inline-start: .3em; }
.splash-tag { color: var(--ink-2); font-size: var(--t-base); max-width: 260px; animation: rise .8s .15s var(--ease) both; }
.shelf-splash { width: 250px; margin-top: var(--sp-8); animation: rise .9s .3s var(--ease) both; }
.shelf-splash .shelf-item { width: 33%; }
.splash-hint { position: absolute; bottom: var(--sp-10); font-size: var(--t-xs); color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Onboarding */
.onboarding { padding-bottom: var(--safe-bottom); }
.ob-top { display: flex; align-items: center; justify-content: space-between; height: 64px; flex-shrink: 0; padding-inline: var(--gutter); }
.ob-stage { flex: 1; display: grid; place-items: center; margin-inline: var(--gutter); border-radius: var(--r-xl); background: color-mix(in srgb, #E4E1DB var(--tile-mix), var(--surface)); overflow: hidden; }
.shelf-ob { width: 330px; animation: rise .5s var(--ease) both; }
.shelf-ob .shelf-item { width: 34%; }
.shelf-ob .shelf-item:nth-child(2) { width: 40%; }
.ob-copy { padding: var(--sp-6) var(--gutter) 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.ob-title { font-size: var(--t-3xl); font-weight: 600; line-height: 1.3; margin-top: var(--sp-1); }
.ob-body { color: var(--ink-2); font-size: var(--t-base); line-height: 1.7; min-height: 52px; margin-bottom: var(--sp-3); }
.ob-copy .btn-ghost { margin-top: calc(var(--sp-1) * -1); }
.dots { display: flex; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 4px; background: var(--line-2); transition: width .3s var(--ease), background .3s; }
.dot.on { width: 22px; background: var(--ink); }

/* Auth */
.auth { display: flex; flex-direction: column; gap: var(--sp-2); }
.auth > .wordmark { font-size: 34px; margin-bottom: var(--sp-4); }
.form { display: flex; flex-direction: column; gap: var(--sp-4); margin-top: var(--sp-6); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field-label { font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); }
.field-box { display: flex; align-items: center; gap: var(--sp-3); height: 52px; padding-inline: var(--sp-4) var(--sp-2); border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-md); color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.field-box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent); }
.field-box input, .field-box textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); height: 100%; font-size: var(--t-base); }
.field-box.area { height: auto; align-items: flex-start; padding-block: var(--sp-3); }
.field-box textarea { height: auto; resize: none; }
::placeholder { color: var(--muted); opacity: .85; }
.cc { color: var(--ink); font-weight: 500; padding-inline-end: var(--sp-3); border-inline-end: 1px solid var(--line-2); }
.hint { color: var(--muted); font-size: var(--t-xs); }
.field + .hint { margin-top: calc(var(--sp-2) * -1); }
.check { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--t-md); color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.form .btn-block { margin-top: var(--sp-2); }
.divider { display: flex; align-items: center; gap: var(--sp-3); color: var(--muted); font-size: var(--t-sm); margin-block: var(--sp-4); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social { display: grid; gap: var(--sp-3); }
.foot-note { text-align: center; color: var(--ink-2); font-size: var(--t-md); margin-block: var(--sp-6) var(--sp-8); }
.otp-ic { width: 64px; height: 64px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-block: var(--sp-2) var(--sp-4); }
.otp { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.otp input { width: 100%; min-width: 0; height: 64px; text-align: center; font-size: var(--t-2xl); font-weight: 600; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); outline: 0; }
.otp input:focus { border-color: var(--ink); }

/* =========================================================
   Home
   ========================================================= */
.home-head { padding: var(--sp-2) var(--gutter) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); flex-shrink: 0; }
.hh-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.hh-row .icon-btn { margin-inline-end: -11px; }
.hh-hello { display: flex; flex-direction: column; gap: var(--sp-1); }
.hello { font-size: var(--t-xl); font-weight: 600; line-height: 1.3; }
.deliver { display: inline-flex; align-items: center; gap: var(--sp-1); color: var(--ink-2); font-size: var(--t-sm); }
.deliver b { color: var(--ink); font-weight: 500; }
.searchbar { display: flex; align-items: center; gap: var(--sp-3); height: 52px; padding-inline: var(--sp-4) var(--sp-2); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: var(--t-md); box-shadow: var(--shadow-1); }
.searchbar > span:first-of-type { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-filter { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--sunken); color: var(--ink); flex-shrink: 0; }

.hero-scroller { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--sp-3); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.hero-scroller::-webkit-scrollbar { display: none; }
.hero { flex: 0 0 calc(100% - var(--sp-6)); scroll-snap-align: start; position: relative; height: 196px; border-radius: var(--r-lg); background: var(--hero); color: var(--hero-ink); display: grid; grid-template-columns: 1fr 140px; gap: var(--sp-3); overflow: hidden; padding: var(--sp-5); }
.hero::before { content: ""; position: absolute; inset-inline-end: -40px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 236, 200, .18), transparent 65%); }
.hero-2 { background: var(--hero-2); color: var(--ink); }
.hero-2::before { background: radial-gradient(circle, rgba(255, 255, 255, .5), transparent 65%); }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); position: relative; z-index: 1; }
.hero-copy .btn { margin-top: auto; }
.hero-kicker { font-size: var(--t-xs); opacity: .75; }
.hero-title { font-size: var(--t-xl); font-weight: 600; line-height: 1.4; }
.shelf-hero { align-self: end; }
.shelf-hero .shelf-item { width: 34%; }
.shelf-hero .shelf-item:nth-child(2) { width: 40%; }
.shelf-hero .shelf-board { height: 7px; margin-top: -10px; }
.hero-dots { display: flex; justify-content: center; gap: 6px; margin-top: var(--sp-3); }
.hero-dots + .sec-head { margin-top: var(--sp-6); }

.cat-row { display: flex; gap: var(--sp-3); overflow-x: auto; padding-inline: var(--gutter); scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-chip { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); font-size: var(--t-xs); color: var(--ink-2); flex-shrink: 0; width: 68px; text-align: center; }
.cat-circle { width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--tile) var(--tile-mix), var(--surface)); display: grid; place-items: center; overflow: hidden; transition: transform .2s var(--ease); }
.cat-circle .art { width: 80%; }
.cat-chip:hover .cat-circle { transform: translateY(-2px); }

.promo { display: flex; align-items: center; gap: var(--sp-3); margin: var(--gap-sec) var(--gutter) 0; padding: var(--pad-card); border-radius: var(--r-lg); background: var(--accent-soft); color: var(--ink); width: calc(100% - var(--gutter) * 2); }
.promo-ic { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--surface); display: grid; place-items: center; color: var(--accent); flex-shrink: 0; }
.promo-text { flex: 1; display: flex; flex-direction: column; }
.promo-text b { font-size: var(--t-md); }
.promo-text small { color: var(--ink-2); }

/* Product card — media→text 12, rows 24 apart (≥2× inner gap) */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6) var(--sp-3); padding-inline: var(--gutter); }
.pad .grid, .pad-x .grid { padding-inline: 0; }
.h-scroll { display: flex; gap: var(--sp-3); overflow-x: auto; padding-inline: var(--gutter); scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.pcard { display: flex; flex-direction: column; gap: var(--sp-3); cursor: pointer; min-width: 0; outline-offset: 4px; }
.pcard-h { flex: 0 0 152px; scroll-snap-align: start; }
.pcard-media { position: relative; aspect-ratio: 1 / 1.08; border-radius: var(--r-lg); background: color-mix(in srgb, var(--tile) var(--tile-mix), var(--surface)); display: grid; place-items: center; overflow: hidden; }
.pcard-media .art { width: 82%; transition: transform .45s var(--ease); }
.pcard:hover .pcard-media .art { transform: scale(1.04) translateY(-2px); }
.badge { position: absolute; top: var(--sp-3); inset-inline-start: var(--sp-3); padding: 2px var(--sp-2); border-radius: 999px; font-size: var(--t-xs); font-weight: 500; background: var(--ink); color: var(--on-ink); line-height: 1.5; }
.badge-soft { background: var(--surface); color: var(--ink); }
.addr-name .badge, .pdp-price .badge { position: static; }
.wish-btn { position: absolute; top: var(--sp-2); inset-inline-end: var(--sp-2); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--ink-2); transition: transform .2s var(--ease), color .2s; }
.wish-btn.is-on { color: var(--danger); }
.wish-btn:active { transform: scale(.85); }
.wish-btn.float { position: static; width: 44px; height: 44px; box-shadow: var(--shadow-1); backdrop-filter: blur(8px); }
.pcard-body { display: flex; flex-direction: column; }
.pcard-brand { font-size: var(--t-xs); color: var(--muted); line-height: 1.5; }
.pcard-name { font-size: var(--t-md); font-weight: 500; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-2); }
.pcard-price { font-weight: 600; font-size: var(--t-base); display: flex; align-items: baseline; flex-wrap: wrap; }
.add-btn { width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink); flex-shrink: 0; transition: background .15s, color .15s; }
.add-btn:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* =========================================================
   Categories
   ========================================================= */
.cat-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-stack); }
.cat-card { position: relative; height: 148px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--tile) var(--tile-mix), var(--surface)); overflow: hidden; padding: var(--pad-card); display: flex; }
.cat-card-wide { grid-column: span 2; height: 136px; }
.cat-card-text { display: flex; flex-direction: column; position: relative; z-index: 1; }
.cat-card-text b { font-size: var(--t-base); }
.cat-card-text small { color: var(--ink-2); }
.cat-card-art { position: absolute; bottom: -12px; inset-inline-end: -8px; width: 108px; transition: transform .35s var(--ease); }
.cat-card-wide .cat-card-art { width: 136px; inset-inline-end: var(--sp-4); }
.cat-card:hover .cat-card-art { transform: translateY(-4px); }

/* =========================================================
   Product list toolbar / chips
   ========================================================= */
.toolbar { display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--gutter) var(--sp-4); overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.toolbar::-webkit-scrollbar { display: none; }
.toolbar-sep { width: 1px; height: 20px; background: var(--line-2); flex-shrink: 0; margin-inline: var(--sp-1); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: var(--sp-4); border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: var(--t-sm); color: var(--ink-2); white-space: nowrap; flex-shrink: 0; transition: background .15s, color .15s, border-color .15s; }
.chip.is-on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip-tool { color: var(--ink); font-weight: 500; }
.chip-count { min-width: 18px; height: 18px; border-radius: 9px; background: var(--on-ink); color: var(--ink); font-size: 11px; display: grid; place-items: center; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* Search */
.appbar-search { gap: var(--sp-1); padding-inline-end: var(--gutter); }
.search-input { flex: 1; display: flex; align-items: center; gap: var(--sp-2); height: 44px; padding-inline: var(--sp-3) var(--sp-1); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--ink); color: var(--muted); }
.search-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: var(--t-base); }
.search-input input::-webkit-search-cancel-button { display: none; }
#searchBody > .sec-head:first-child { margin-top: var(--sp-2); }
.pop-list { display: flex; flex-direction: column; }
.pop-item { display: flex; align-items: center; gap: var(--sp-3); padding-block: var(--sp-3); border-bottom: 1px solid var(--line); color: var(--ink); font-size: var(--t-md); }
.pop-item .ic { color: var(--muted); }
.pop-rank { width: 16px; color: var(--muted); font-weight: 600; text-align: center; }
.result-count { margin-block: var(--sp-2) var(--sp-4); font-size: var(--t-sm); }

/* Thumbnails */
.thumb { display: grid; place-items: center; width: 88px; height: 96px; border-radius: var(--r-md); background: color-mix(in srgb, var(--tile) var(--tile-mix), var(--surface)); flex-shrink: 0; overflow: hidden; }
.thumb .art { width: 86%; }
.thumb.sm { width: 52px; height: 52px; border-radius: var(--r-sm); }
.thumb.xs { width: 44px; height: 44px; border-radius: var(--r-sm); }

/* =========================================================
   Product details
   ========================================================= */
.pdp { padding-top: 0; }
.pdp-media { position: relative; height: 420px; background: color-mix(in srgb, var(--tile) var(--tile-mix), var(--surface)); border-end-start-radius: var(--r-xl); border-end-end-radius: var(--r-xl); display: grid; place-items: center; padding-top: 48px; }
.pdp-top { position: absolute; top: 56px; inset-inline: var(--gutter); display: flex; gap: var(--sp-2); z-index: 2; }
.pdp-art { width: 78%; touch-action: pan-y; cursor: grab; }
.pdp-art .art { width: 100%; animation: fade .35s var(--ease); }
.dots-media { position: absolute; bottom: var(--sp-5); left: 50%; transform: translateX(-50%); }
.pdp-body { padding: var(--sp-6) var(--gutter) 0; display: flex; flex-direction: column; }
.pdp-brand { color: var(--muted); font-size: var(--t-sm); }
.rating-pill { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--t-xs); color: var(--ink-2); text-decoration: none; padding: var(--sp-1) var(--sp-3); border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.rating-pill .ic { color: var(--star); }
.pdp-title { font-size: var(--t-2xl); font-weight: 600; line-height: 1.35; margin-top: var(--sp-2); }
.pdp-price { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--t-xl); font-weight: 600; margin-top: var(--sp-3); flex-wrap: wrap; }
.pdp-price .old { font-size: var(--t-base); margin: 0; }
.vat-note { color: var(--muted); font-size: var(--t-xs); margin-top: var(--sp-1); }
.pdp-opts { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-4); margin-top: var(--sp-6); padding-top: var(--sp-6); border-top: 1px solid var(--line); }
.opt { display: flex; flex-direction: column; gap: var(--sp-3); }
.opt-label { font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); }
.swatches { display: flex; gap: var(--sp-3); padding: 5px; margin: -5px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); position: relative; transition: transform .15s; }
.swatch.is-on::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--ink); }
.qty { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: var(--sp-1); border-radius: var(--r-md); background: var(--sunken); }
.qty-btn { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--ink); }
.qty-btn:hover { background: var(--surface); }
.qty-val { min-width: 28px; text-align: center; font-weight: 600; font-size: var(--t-base); }
.assure { display: flex; flex-direction: column; margin-top: var(--sp-6); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.assure > div { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); color: var(--accent); }
.assure > div + div { border-top: 1px solid var(--line); }
.assure span { flex: 1; display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); color: var(--ink); font-size: var(--t-md); }
.assure small { color: var(--muted); white-space: nowrap; }
.pdp::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 48px; background: var(--paper); z-index: 4; opacity: 0; transition: opacity .2s; pointer-events: none; }
.pdp.is-scrolled::before { opacity: 1; }
.pdp-sec { display: flex; flex-direction: column; gap: var(--gap-head); margin-top: var(--gap-sec); }
.pdp-sec > .sec-head { margin: 0; }
.pdp-body + .h-scroll { margin-top: var(--gap-head); }
.specs { display: grid; border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; }
.specs div { display: flex; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); font-size: var(--t-md); background: var(--surface); }
.specs div + div { border-top: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 500; }
.rev-summary { display: flex; gap: var(--sp-5); align-items: center; padding: var(--pad-card); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.rev-score { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); }
.rev-score > b { font-size: 36px; line-height: 1; font-weight: 600; }
.rev-score small { color: var(--muted); }
.rev-bars { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.rev-bar { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--t-xs); color: var(--muted); line-height: 1; }
.rev-bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.rev-bar em { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.stars { display: inline-flex; gap: 1px; }
.star { color: var(--line-2); display: inline-flex; }
.star.on { color: var(--star); }
.review { padding-block: var(--sp-4); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--sp-2); }
.review:last-child { border-bottom: 0; padding-bottom: 0; }
.review-head { display: flex; align-items: center; gap: var(--sp-3); }
.review-head .grow { display: flex; flex-direction: column; line-height: 1.4; font-size: var(--t-md); }
.review-head small { color: var(--muted); }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: var(--t-xl); flex-shrink: 0; }
.avatar.sm { width: 36px; height: 36px; font-size: var(--t-base); }

/* Bottom action bar */
.buybar { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--gutter) var(--safe-bottom); background: var(--surface); border-top: 1px solid var(--line); position: relative; z-index: 6; flex-shrink: 0; }
.pdp .buybar { position: absolute; inset-inline: 0; bottom: 0; box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, .12); }
.buybar.above-nav { padding-bottom: var(--sp-3); }
.buybar-total { display: flex; flex-direction: column; line-height: 1.3; font-weight: 600; font-size: var(--t-lg); }
.buybar-total small { color: var(--muted); font-weight: 400; }

/* =========================================================
   Cart
   ========================================================= */
.ship-progress { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--accent-soft); font-size: var(--t-sm); display: flex; flex-direction: column; gap: var(--sp-2); }
.ship-progress p { display: flex; align-items: center; gap: 6px; }
.ship-progress i { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 20%, transparent); overflow: hidden; }
.ship-progress em { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .4s var(--ease); }
.cart-list { display: flex; flex-direction: column; margin-top: var(--sp-2); }
.cart-item { display: flex; gap: var(--sp-4); padding-block: var(--sp-4); border-bottom: 1px solid var(--line); }
.ci-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ci-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-2); }
.ci-top h3 { font-size: var(--t-base); font-weight: 500; line-height: 1.4; }
.ci-top .icon-btn { margin-block: -6px; margin-inline-end: -8px; }
.ci-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--t-xs); }
.sw-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.ci-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price-strong { font-weight: 600; font-size: var(--t-base); }
.ci-row .qty { height: 36px; }
.ci-row .qty-btn { width: 28px; height: 28px; }
.coupon { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-6); padding: var(--sp-1); padding-inline-start: var(--sp-4); border-radius: var(--r-md); border: 1px dashed var(--line-2); background: var(--surface); color: var(--muted); }
.coupon input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); height: 44px; }
.coupon + .hint { margin-top: var(--sp-2); padding-inline: var(--sp-1); }
.summary { margin-top: var(--sp-6); padding: var(--pad-card); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--sp-3); font-size: var(--t-md); }
.summary > div { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); }
.summary > div > span:first-child { color: var(--ink-2); }
.summary .ok { color: var(--ok); font-weight: 500; }
.summary .code { font-size: var(--t-xs); padding: 0 6px; border-radius: 6px; background: var(--sunken); margin-inline-start: var(--sp-1); }
.sum-total { padding-top: var(--sp-3); border-top: 1px dashed var(--line-2); font-weight: 600; font-size: var(--t-lg); }
.sum-total > span:first-child { display: flex; flex-direction: column; color: var(--ink) !important; line-height: 1.3; }
.sum-total small { font-weight: 400; color: var(--muted); }

/* Empty states */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-2); padding: 72px var(--sp-5) var(--sp-8); }
.empty-art { width: 96px; height: 96px; border-radius: var(--r-xl); display: grid; place-items: center; background: var(--sunken); color: var(--muted); margin-bottom: var(--sp-4); transform: rotate(-4deg); }
.empty-title { font-size: var(--t-xl); font-weight: 600; }
.empty-body { color: var(--ink-2); max-width: 280px; font-size: var(--t-md); margin-bottom: var(--sp-4); }

/* =========================================================
   Checkout
   ========================================================= */
.steps { list-style: none; margin: 0; padding: 0 var(--gutter) var(--sp-4); display: grid; grid-template-columns: repeat(4, 1fr); flex-shrink: 0; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--muted); position: relative; text-align: center; }
.steps li::before { content: ""; position: absolute; top: 13px; inset-inline-end: 50%; width: 100%; height: 2px; background: var(--line-2); z-index: 0; }
.steps li:first-child::before { display: none; }
.steps li.done::before, .steps li.now::before { background: var(--ink); }
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--line-2); font-weight: 600; font-size: var(--t-xs); position: relative; z-index: 1; transition: background .25s, border-color .25s; }
.steps li.now { color: var(--ink); font-weight: 500; }
.steps li.now .step-dot { border-color: var(--ink); color: var(--ink); }
.steps li.done .step-dot { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.step-body { display: flex; flex-direction: column; gap: var(--gap-stack); animation: fade .3s var(--ease); }
.step-title { font-size: var(--t-xl); font-weight: 600; margin-block: var(--sp-2) var(--sp-1); }
.step-body .summary, .step-body .field { margin-top: var(--sp-3); }
.rcard { display: flex; align-items: center; gap: var(--sp-3); padding: var(--pad-card); border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.rcard input { position: absolute; opacity: 0; pointer-events: none; }
.rcard:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rcard.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.rcard-ic { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--sunken); color: var(--ink); flex-shrink: 0; }
.rcard-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.45; font-size: var(--t-base); }
.rcard-text small { color: var(--muted); }
.rcard-aside { font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.radio-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex-shrink: 0; position: relative; transition: border-color .15s; }
.rcard.is-on .radio-dot { border-color: var(--ink); }
.rcard.is-on .radio-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--ink); }
.add-dashed { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); height: 52px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); color: var(--ink-2); font-size: var(--t-md); font-weight: 500; width: 100%; }
.card-form { display: flex; flex-direction: column; gap: var(--gap-stack); }
.bank-card { position: relative; height: 152px; border-radius: var(--r-lg); padding: var(--sp-5); color: #F2F1EC; background: linear-gradient(135deg, #3A3A35, #23231F 70%); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; font-size: var(--t-sm); }
.bank-card::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 24px solid rgba(255, 255, 255, .05); }
.bc-chip { width: 36px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #CDBB98, #A99573); }
.bc-num { font-size: var(--t-lg); letter-spacing: .08em; font-weight: 500; }
.bc-row { display: flex; justify-content: space-between; opacity: .85; }
.secure { display: flex; align-items: center; gap: 6px; justify-content: center; color: var(--muted); font-size: var(--t-xs); margin-top: var(--sp-2); }
.review-block { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.rv-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); color: var(--ink-2); }
.rv-row + .rv-row { border-top: 1px solid var(--line); }
.rv-row .grow { display: flex; flex-direction: column; line-height: 1.4; }
.rv-row small { color: var(--muted); }
.rv-row b { color: var(--ink); font-size: var(--t-md); display: flex; flex-direction: column; }
.rv-row b small { font-weight: 400; }
.mini-items { display: flex; flex-direction: column; }
.mini-item { display: flex; align-items: center; gap: var(--sp-3); padding-block: var(--sp-2); font-size: var(--t-md); width: 100%; color: var(--ink); }
.mini-item .grow { display: flex; flex-direction: column; line-height: 1.4; }
.mini-item small { color: var(--muted); }

/* Success */
.success .content { display: flex; }
.center-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--sp-3); padding-bottom: var(--sp-10); }
.success-mark { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); margin-bottom: var(--sp-4); animation: pop-in .6s var(--ease) both; box-shadow: 0 0 0 10px var(--accent-soft); }
.success-mark .ic { stroke-width: 2.4; }
@keyframes pop-in { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); } }
.success-card { width: 100%; display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); margin-block: var(--sp-3) var(--sp-4); }
.success-card > div { display: flex; flex-direction: column; padding: var(--pad-card); gap: 2px; font-size: var(--t-md); }
.success-card > div + div { border-inline-start: 1px solid var(--line); }
.success-card small { color: var(--muted); }
.center-col .btn-ghost { margin-top: calc(var(--sp-1) * -1); }

/* =========================================================
   Orders & tracking
   ========================================================= */
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--sunken); padding: var(--sp-1); border-radius: var(--r-md); margin-bottom: var(--sp-2); }
.segmented button { text-align: center; height: 36px; border-radius: var(--r-sm); font-size: var(--t-md); color: var(--ink-2); display: inline-flex; justify-content: center; align-items: center; gap: 6px; }
.segmented button.is-on { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-1); }
.seg-count { min-width: 20px; height: 20px; border-radius: 10px; background: var(--ink); color: var(--on-ink); font-size: 11px; display: grid; place-items: center; }
.order-card { width: 100%; display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--pad-card); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.order-card + .order-card { margin-top: var(--gap-stack); }
.oc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-3); }
.oc-head > span:first-child { display: flex; flex-direction: column; line-height: 1.4; }
.oc-head small { color: var(--muted); }
.status { font-size: var(--t-xs); font-weight: 500; padding: 2px var(--sp-3); border-radius: 999px; }
.status-shipped { background: var(--accent-soft); color: var(--accent); }
.status-delivered { background: var(--sunken); color: var(--ink-2); }
.status-cancelled { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.oc-thumbs { display: flex; gap: var(--sp-2); }
.oc-foot { display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); font-size: var(--t-sm); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.eta-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-5); border-radius: var(--r-lg); background: var(--hero); color: var(--hero-ink); overflow: hidden; }
.eta-text { display: flex; flex-direction: column; }
.eta-text small { opacity: .7; }
.eta-text b { font-size: var(--t-xl); }
.eta-ic { width: 52px; height: 52px; border-radius: var(--r-md); display: grid; place-items: center; background: rgba(255, 255, 255, .1); }
.eta-track { position: absolute; bottom: 0; inset-inline: 0; height: 4px; background: rgba(255, 255, 255, .1); }
.eta-track em { display: block; height: 100%; background: #CFD6C1; }
.timeline { list-style: none; margin: var(--sp-6) 0 0; padding: 0 var(--sp-1); }
.timeline li { position: relative; display: flex; gap: var(--sp-4); padding-bottom: var(--sp-5); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; top: 24px; bottom: 0; inset-inline-start: calc(var(--sp-1) + 7px); width: 2px; background: var(--line-2); }
.timeline li:last-child::before { display: none; }
.timeline li.done::before { background: var(--ink); }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--line-2); flex-shrink: 0; position: relative; z-index: 1; color: var(--on-ink); margin-inline-start: -4px; }
.timeline li.done .tl-dot, .timeline li.now .tl-dot { background: var(--ink); border-color: var(--ink); }
.timeline li.now .tl-dot { box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-text { display: flex; flex-direction: column; line-height: 1.4; font-size: var(--t-md); }
.tl-text small { color: var(--muted); }
.timeline li:not(.done):not(.now) .tl-text b { color: var(--muted); font-weight: 400; }
.timeline ~ .sec-title { margin-block: var(--gap-sec) var(--sp-1); }
.addr-box { display: flex; gap: var(--sp-3); padding: var(--pad-card); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin-top: var(--sp-2); color: var(--accent); }
.addr-box span { display: flex; flex-direction: column; color: var(--ink); font-size: var(--t-md); line-height: 1.5; }
.addr-box small { color: var(--ink-2); }

/* Notifications */
.notif { width: 100%; display: flex; gap: var(--sp-3); padding: var(--pad-card); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); position: relative; }
.notif + .notif { margin-top: var(--gap-stack); }
.notif.unread { background: var(--accent-soft); border-color: transparent; }
.notif.unread::after { content: ""; position: absolute; top: 22px; inset-inline-end: var(--sp-4); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.notif-ic { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface); color: var(--accent); flex-shrink: 0; border: 1px solid var(--line); }
.notif-text { display: flex; flex-direction: column; gap: 2px; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.5; padding-inline-end: var(--sp-4); }
.notif-text b { color: var(--ink); font-size: var(--t-md); }
.notif-text small { color: var(--muted); margin-top: 2px; }
.content > .group-label:first-child, .pad > .group-label:first-child { margin-top: var(--sp-2); }

/* =========================================================
   Account
   ========================================================= */
.profile { display: flex; align-items: center; gap: var(--sp-4); padding: var(--pad-card); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.profile .grow { display: flex; flex-direction: column; font-size: var(--t-lg); line-height: 1.4; }
.profile small { color: var(--muted); font-size: var(--t-sm); text-align: start; }
[dir="rtl"] .profile small { text-align: right; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-stack); margin-top: var(--gap-stack); }
.stats button { display: flex; flex-direction: column; align-items: center; padding: var(--sp-3) var(--sp-2); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-align: center; }
.stats b { font-size: var(--t-xl); line-height: 1.4; }
.stats small { color: var(--muted); }
.tiles { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.tile { width: 100%; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); min-height: 60px; transition: background .15s; }
.tile:hover { background: var(--sunken); }
.tile + .tile { border-top: 1px solid var(--line); }
.tile-ic { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--sunken); color: var(--ink); flex-shrink: 0; }
.tile-text { flex: 1; display: flex; flex-direction: column; font-size: var(--t-base); line-height: 1.4; }
.tile-text small { color: var(--muted); }
.tile-value { color: var(--muted); font-size: var(--t-md); }
.tile-chev { color: var(--muted); }
.tile.is-danger, .tile.is-danger .tile-ic { color: var(--danger); }
.tile.is-danger .tile-ic { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--line-2); position: relative; transition: background .2s; flex-shrink: 0; }
.switch i { position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: inset-inline-start .25s var(--ease); }
.switch.on { background: var(--ink); }
.switch.on i { inset-inline-start: 21px; background: var(--paper); }
.version { text-align: center; color: var(--muted); font-size: var(--t-xs); margin-top: var(--sp-6); }
.addr-card { padding: var(--pad-card); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--sp-2); }
.addr-card + .addr-card, .addr-card + .add-dashed { margin-top: var(--gap-stack); }
.addr-card .row-between .icon-btn { margin-block: -6px; margin-inline-end: -6px; }
.addr-card.is-default { border-color: var(--ink); }
.addr-name { display: flex; align-items: center; gap: var(--sp-2); }
.addr-card .muted { font-size: var(--t-sm); text-align: start; }
[dir="rtl"] .addr-card .muted { text-align: right; }

/* =========================================================
   Bottom sheet & snackbar
   ========================================================= */
.sheet-layer { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.sheet-layer.open { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(20, 20, 18, .42); opacity: 0; transition: opacity .25s; }
.sheet-layer.open .scrim { opacity: 1; }
.sheet { position: absolute; inset-inline: 0; bottom: 0; max-height: 86%; overflow-y: auto; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: var(--sp-3) var(--gutter) var(--safe-bottom); transform: translateY(100%); transition: transform .32s var(--ease); scrollbar-width: none; }
.sheet-layer.open .sheet { transform: none; }
.grabber { display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto var(--sp-3); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.sheet-head h2 { font-size: var(--t-xl); font-weight: 600; }
.sheet-list { display: flex; flex-direction: column; gap: var(--gap-stack); }
.sheet-sec { display: flex; flex-direction: column; gap: var(--sp-3); padding-block: var(--sp-4); border-bottom: 1px solid var(--line); }
.sheet-sec:first-of-type { padding-top: 0; }
.sheet-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-6); }
.sheet .form { margin-top: var(--sp-4); }
input[type="range"] { width: 100%; accent-color: var(--ink); margin: 0; }
.map-mock { height: 128px; border-radius: var(--r-lg); display: grid; place-items: center; color: var(--ink);
  background:
    linear-gradient(90deg, transparent 48%, var(--line-2) 48%, var(--line-2) 52%, transparent 52%) 0 0 / 80px 100%,
    linear-gradient(0deg, transparent 46%, var(--line-2) 46%, var(--line-2) 54%, transparent 54%) 0 0 / 100% 60px,
    var(--sunken); }
.map-pin { animation: rise .6s var(--ease) both; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .2)); }

.toast { position: absolute; inset-inline: var(--sp-4); bottom: 100px; z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: #2B2B27; color: #F2F1EC; font-size: var(--t-md); box-shadow: var(--shadow-2); transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .3s; }
.toast.show { transform: none; opacity: 1; pointer-events: auto; }
:root[data-theme="dark"] .toast { background: #EDEDE8; color: #22221F; }
:root[data-theme="dark"] .toast .link-btn.light { color: var(--on-ink); }

/* =========================================================
   Responsive & motion preferences
   ========================================================= */
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; padding: var(--sp-6) var(--sp-4); gap: var(--sp-6); }
  .panel { order: 2; max-width: 430px; margin-inline: auto; width: 100%; }
  .panel-foot { margin-top: 0; }
}
@media (max-width: 500px) {
  .stage { padding: 0; gap: 0; }
  .device-wrap { display: block; }
  .device { width: 100%; height: 100svh; border: 0; border-radius: 0; box-shadow: none; }
  .home-indicator, .sb-notch { display: none; }
  .panel { padding: var(--sp-6) var(--sp-4) var(--sp-10); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
