/* ==========================================================================
   CheapSnatch v2 — app.css
   Dark, single accent (#ff0000), Inter. Mobile-first, app-style shell.
   ========================================================================== */
:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #181818;
  --surface: #202020;
  --surface2: #2a2a2a;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .15);
  --text: #ececec;
  --muted: #9b9b9b;
  --dim: #666;
  --red: #ff0000;
  --red-hover: #e00000;
  --red-dim: rgba(255, 0, 0, .12);
  --red-line: rgba(255, 0, 0, .35);
  --radius: 14px;
  --radius-sm: 10px;
  --pill: 999px;
  --appbar: 58px;
  --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 18px 40px rgba(0, 0, 0, .5);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; color: #fff; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.red { color: var(--red); }
.small { font-size: .82rem; }
.tiny { font-size: .72rem; }
.bold { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap-row { flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hide-mobile { display: none !important; }
@media (min-width: 900px) { .hide-mobile { display: initial !important; } .hide-desktop { display: none !important; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--line2); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:hover { border-color: rgba(255, 255, 255, .28); }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hover); border-color: var(--red-hover); }
.btn-ghost { background: transparent; }
.btn-outline-red { background: transparent; border-color: var(--red-line); color: var(--red); }
.btn-outline-red:hover { background: var(--red-dim); border-color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .82rem; border-radius: 8px; }
.btn-lg { min-height: 54px; font-size: 1rem; padding: 0 26px; }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }
.icon-btn {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--text); font-size: 1.25rem; cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--bg3); }
.link-red { color: var(--red); font-weight: 600; }
.link-red:hover { text-decoration: underline; }

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 10, .92); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.appbar-in { height: var(--appbar); display: flex; align-items: center; gap: 8px; }
.brand { font-weight: 800; font-size: 1.28rem; letter-spacing: -.045em; color: #fff; white-space: nowrap; }
.brand em { font-style: normal; color: var(--red); }
.appbar-title { font-weight: 700; font-size: 1.02rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-spacer { flex: 1; }
.country-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: var(--pill); background: var(--bg3); border: 1px solid var(--line);
  font-size: .78rem; font-weight: 600; cursor: pointer; color: var(--text);
}
.country-pill .flag { font-size: 1rem; line-height: 1; }
.country-pill i { font-size: .7rem; color: var(--muted); }
.badge-dot {
  position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: .66rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg);
}
.badge-dot:empty, .badge-dot[data-count="0"] { display: none; }

.search-bar { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px;
  background: var(--bg3); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.search-bar:focus-within { border-color: var(--red-line); }
.search-bar i { color: var(--muted); }
.search-bar input { flex: 1; min-width: 0; height: 100%; padding: 0; -webkit-appearance: none; appearance: none; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: .92rem; }
.search-bar input::placeholder { color: var(--dim); }
.search-row { padding-bottom: 12px; }

.desk-nav { display: none; }
.cat-strip { display: none; }

@media (min-width: 900px) {
  :root { --appbar: 68px; }
  .appbar-in { gap: 18px; }
  .brand { font-size: 1.45rem; }
  .appbar .search-bar { flex: 1; max-width: 520px; height: 44px; }
  .search-row { display: none; }
  .desk-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
  .desk-nav a { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); font-size: .86rem; font-weight: 500; color: var(--muted); position: relative; }
  .desk-nav a:hover, .desk-nav a.on { color: #fff; background: var(--bg3); }
  .desk-nav a.cart-link { background: var(--red); color: #fff; font-weight: 700; }
  .desk-nav a.cart-link:hover { background: var(--red-hover); }
  .desk-nav .badge-dot { top: -5px; right: -6px; border-color: var(--bg); background: #fff; color: #000; }
  .cat-strip { display: block; border-top: 1px solid var(--line); }
  .cat-strip .wrap { display: flex; gap: 4px; height: 42px; align-items: center; overflow-x: auto; scrollbar-width: none; }
  .cat-strip a { font-size: .8rem; font-weight: 500; color: var(--muted); padding: 6px 12px; border-radius: 8px; white-space: nowrap; }
  .cat-strip a:hover, .cat-strip a.on { color: var(--red); background: var(--red-dim); }
}

/* ---------- Page ---------- */
.page { min-height: calc(100vh - var(--appbar)); padding-bottom: calc(var(--tabbar) + var(--safe-b) + 24px); }
.page.has-actionbar { padding-bottom: calc(var(--tabbar) + var(--safe-b) + 96px); }
.page.no-tabs { padding-bottom: calc(var(--safe-b) + 110px); }
@media (min-width: 900px) { .page, .page.has-actionbar, .page.no-tabs { padding-bottom: 56px; } }
.section { padding: 22px 0; }
@media (min-width: 900px) { .section { padding: 36px 0; } }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-size: 1.2rem; font-weight: 800; }
.sec-head h2 em { font-style: normal; color: var(--red); }
.sec-head a { font-size: .82rem; font-weight: 600; color: var(--red); white-space: nowrap; }
@media (min-width: 900px) { .sec-head h2 { font-size: 1.6rem; } .sec-head { margin-bottom: 20px; } }
.page-title { font-size: 1.5rem; font-weight: 800; margin: 18px 0 4px; }
@media (min-width: 900px) { .page-title { font-size: 2rem; margin-top: 30px; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ''; position: absolute; top: -200px; left: -160px; width: 560px; height: 560px; background: radial-gradient(circle, rgba(255, 0, 0, .09), transparent 62%); pointer-events: none; }
.hero-in { position: relative; display: grid; gap: 22px; padding-top: 26px; padding-bottom: 26px; }
.kicker { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: var(--pill); background: var(--red-dim); border: 1px solid var(--red-line); color: var(--red); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2rem, 8.5vw, 3.7rem); font-weight: 900; letter-spacing: -.045em; line-height: 1.03; margin: 14px 0 12px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p.lead { color: var(--muted); font-size: .95rem; max-width: 480px; }
.hero-cta { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 20px; font-size: .78rem; color: var(--muted); }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust i { color: var(--red); }
.hero-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-tiles a { aspect-ratio: 1; border-radius: var(--radius); background: var(--bg3); border: 1px solid var(--line); overflow: hidden; position: relative; }
.hero-tiles img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.hero-tiles a span { position: absolute; left: 8px; bottom: 8px; font-size: .66rem; font-weight: 700; background: rgba(10, 10, 10, .85); padding: 3px 7px; border-radius: 6px; }
@media (min-width: 900px) {
  .hero-in { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; padding-top: 64px; padding-bottom: 64px; }
  .hero-tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-tiles a:first-child { grid-row: span 2; aspect-ratio: auto; }
}

/* ---------- Category bubbles ---------- */
.bubbles { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; }
.bubbles::-webkit-scrollbar, .rail::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.bubble { flex-shrink: 0; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 7px; scroll-snap-align: start; }
.bubble .ic { width: 62px; height: 62px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--text); transition: border-color .15s; }
.bubble:hover .ic, .bubble.on .ic { border-color: var(--red); color: var(--red); }
.bubble span { font-size: .72rem; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; }
@media (min-width: 900px) { .bubbles { margin: 0; padding: 2px 0; gap: 16px; } .bubble { width: 92px; } .bubble .ic { width: 76px; height: 76px; font-size: 1.6rem; } }

/* ---------- Chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chip { flex-shrink: 0; height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border-radius: var(--pill); border: 1px solid var(--line2); background: transparent; font-size: .8rem; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.chip:hover { color: #fff; }
.chip.on { background: #fff; border-color: #fff; color: #000; }
@media (min-width: 900px) { .chips { margin: 0; padding: 0; flex-wrap: wrap; } }

/* ---------- Product grid & card ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1180px) { .grid.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 10px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 640px) { .rail { grid-auto-columns: 31%; } }
@media (min-width: 900px) { .rail { grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; margin: 0; padding: 0; } }

.pcard { position: relative; display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .18s, transform .18s; }
.pcard:hover { border-color: rgba(255, 0, 0, .3); }
@media (hover: hover) { .pcard:hover { transform: translateY(-3px); } }
.pcard .pimg { position: relative; aspect-ratio: 1; background: radial-gradient(circle at 50% 40%, #262626, #161616 70%); }
.pcard .pimg img { width: 100%; height: 100%; object-fit: contain; padding: 7%; transition: transform .3s; }
@media (hover: hover) { .pcard:hover .pimg img { transform: scale(1.04); } }
.ptag { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: .64rem; font-weight: 800; letter-spacing: .03em; padding: 3px 7px; border-radius: 6px; background: var(--red); color: #fff; }
.ptag.soft { background: rgba(10, 10, 10, .85); color: var(--text); border: 1px solid var(--line2); font-weight: 600; }
.ptag.out { background: var(--surface2); color: var(--muted); }
.wish { position: absolute; top: 6px; right: 6px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(10, 10, 10, .7); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .95rem; }
.wish.on, .wish.on i { color: var(--red); }
.pbody { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pname { font-size: .84rem; font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; min-height: 2.6em; }
.pmeta { font-size: .7rem; color: var(--dim); display: flex; align-items: center; gap: 5px; }
.prow { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 4px; }
.pprice { font-weight: 800; font-size: .95rem; color: #fff; letter-spacing: -.01em; line-height: 1.1; }
.pold { font-size: .72rem; color: var(--dim); text-decoration: line-through; display: block; font-weight: 500; }
.padd { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--red); border: 0; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; cursor: pointer; transition: transform .1s; }
.padd:active { transform: scale(.9); }
.padd[disabled] { background: var(--surface2); color: var(--dim); }
.stars { color: #fff; font-size: .7rem; letter-spacing: 1px; }
.stars i { color: var(--red); }
@media (min-width: 900px) { .pname { font-size: .9rem; } .pprice { font-size: 1.02rem; } .pbody { padding: 12px 14px 14px; } }

/* ---------- Promo strips ---------- */
.perks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.perk { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--bg2); border: 1px solid var(--line); }
.perk i { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--red-dim); color: var(--red); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.perk b { display: block; font-size: .8rem; color: #fff; }
.perk span { font-size: .7rem; color: var(--muted); line-height: 1.3; display: block; }
@media (min-width: 900px) { .perks { grid-template-columns: repeat(4, 1fr); gap: 14px; } .perk { padding: 16px; } }

.banner { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg2); border: 1px solid var(--line); padding: 22px; display: grid; gap: 14px; }
.banner::after { content: ''; position: absolute; right: -80px; bottom: -120px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(255, 0, 0, .16), transparent 65%); }
.banner h3 { font-size: 1.3rem; font-weight: 800; position: relative; z-index: 1; }
.banner p { color: var(--muted); font-size: .88rem; position: relative; z-index: 1; max-width: 520px; }
.banner .row { position: relative; z-index: 1; }
@media (min-width: 900px) { .banner { padding: 36px; grid-template-columns: 1fr auto; align-items: center; } .banner h3 { font-size: 1.7rem; } }
.markets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.market { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg2); cursor: pointer; text-align: left; width: 100%; }
.market .flag { font-size: 1.5rem; }
.market b { display: block; font-size: .86rem; color: #fff; }
.market span { font-size: .72rem; color: var(--muted); }
.market.on { border-color: var(--red); background: var(--red-dim); }
@media (min-width: 900px) { .markets { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span, .label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--bg3); border: 1px solid var(--line2); color: var(--text);
  font: inherit; font-size: 16px; outline: none; transition: border-color .15s;
}
.field textarea { padding: 12px 14px; min-height: 110px; resize: vertical; line-height: 1.5; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.field input[type=file] { width: 100%; font-size: .85rem; color: var(--muted); padding: 10px; border: 1px dashed var(--line2); border-radius: var(--radius-sm); background: var(--bg3); }
.field small { display: block; margin-top: 5px; font-size: .72rem; color: var(--dim); }
.field .err { color: var(--red); font-size: .75rem; margin-top: 4px; display: block; }
.grid-2 { display: grid; gap: 0 12px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix > span { display: flex; align-items: center; padding: 0 12px; background: var(--surface); border: 1px solid var(--line2); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-size: .9rem; color: var(--muted); }
.input-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
.check { display: flex; align-items: center; gap: 10px; font-size: .88rem; cursor: pointer; margin-bottom: 12px; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }

.options { display: grid; gap: 8px; }
.option { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--bg3); cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .oi { width: 38px; height: 38px; border-radius: 10px; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex-shrink: 0; }
.option b { display: block; font-size: .9rem; color: #fff; font-weight: 600; }
.option small { display: block; font-size: .74rem; color: var(--muted); }
.option .tick { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); flex-shrink: 0; }
.option:has(input:checked) { border-color: var(--red); background: var(--red-dim); }
.option:has(input:checked) .tick { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 3px var(--bg3); }
.option:has(input:checked) .oi { color: var(--red); }

/* ---------- Cards, lists ---------- */
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 12px; }
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
@media (min-width: 900px) { .card { padding: 22px; } }
.list { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list > a, .list > div.li, .list > button.li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; }
.list > :last-child { border-bottom: 0; }
.list > a:hover { background: var(--bg3); }
.list .li-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--bg3); display: flex; align-items: center; justify-content: center; color: var(--text); flex-shrink: 0; }
.list .li-main { flex: 1; min-width: 0; }
.list .li-main b { display: block; font-size: .9rem; font-weight: 600; color: #fff; }
.list .li-main span { display: block; font-size: .76rem; color: var(--muted); }
.list .chev { color: var(--dim); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .9rem; }
.kv span:first-child { color: var(--muted); }
.kv.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 1.05rem; font-weight: 800; color: #fff; }
.kv.total span:first-child { color: #fff; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--pill); font-size: .7rem; font-weight: 700; border: 1px solid var(--line2); color: var(--text); white-space: nowrap; }
.badge.red { background: var(--red-dim); border-color: var(--red-line); color: var(--red); }
.badge.solid { background: #fff; border-color: #fff; color: #000; }
.badge.mute { color: var(--muted); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg3); border: 1px solid var(--line2); font-size: .86rem; margin-bottom: 14px; }
.alert i { margin-top: 2px; }
.alert.error { border-color: var(--red-line); background: var(--red-dim); }
.alert.error i { color: var(--red); }

.empty { text-align: center; padding: 56px 20px; }
.empty .em-ic { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--muted); }
.empty h3 { font-size: 1.15rem; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: .88rem; margin-bottom: 18px; }

/* ---------- Product page ---------- */
.pd { display: grid; gap: 18px; padding-top: 8px; }
@media (min-width: 900px) { .pd { grid-template-columns: 1.05fr 1fr; gap: 48px; padding-top: 32px; align-items: start; } }
.gallery-main { aspect-ratio: 1; border-radius: var(--radius); background: radial-gradient(circle at 50% 40%, #272727, #141414 72%); border: 1px solid var(--line); overflow: hidden; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
@media (min-width: 900px) { .gallery-main { margin: 0; border-radius: var(--radius); border: 1px solid var(--line); position: sticky; top: 130px; } }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.thumbs button { width: 64px; height: 64px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg3); padding: 4px; cursor: pointer; }
.thumbs button.on { border-color: var(--red); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd h1 { font-size: 1.4rem; font-weight: 800; margin: 6px 0 8px; }
@media (min-width: 900px) { .pd h1 { font-size: 2rem; } }
.pd-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.pd-price b { font-size: 1.7rem; font-weight: 900; color: #fff; letter-spacing: -.02em; }
.pd-price s { color: var(--dim); font-size: .95rem; }
.pd-desc { color: #c9c9c9; font-size: .92rem; line-height: 1.7; white-space: pre-line; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--bg3); height: 46px; }
.qty button { width: 42px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 1.1rem; color: var(--text); }
.qty input { width: 40px; text-align: center; background: none; border: 0; color: #fff; font: inherit; font-weight: 700; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty.sm { height: 36px; } .qty.sm button { width: 34px; } .qty.sm input { width: 30px; font-size: .88rem; }
.facts { display: grid; gap: 8px; margin-top: 18px; }
.fact { display: flex; gap: 12px; align-items: center; font-size: .84rem; color: var(--muted); }
.fact i { color: var(--red); font-size: 1rem; width: 20px; }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review .who { font-weight: 600; font-size: .86rem; color: #fff; }

/* ---------- Bottom action bar ---------- */
.actionbar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + var(--safe-b)); z-index: 40; background: rgba(17, 17, 17, .97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 10px 16px; display: flex; gap: 10px; align-items: center; }
.no-tabs .actionbar, .actionbar.flush { bottom: 0; padding-bottom: calc(10px + var(--safe-b)); }
.actionbar .ab-total { flex: 1; min-width: 0; line-height: 1.2; }
.actionbar .ab-total small { display: block; font-size: .7rem; color: var(--muted); }
.actionbar .ab-total b { font-size: 1.05rem; color: #fff; }
@media (min-width: 900px) { .actionbar { position: static; background: none; border: 0; padding: 0; backdrop-filter: none; margin-top: 18px; } .actionbar.desk-hide { display: none; } }

/* ---------- Cart ---------- */
.cart-layout { display: grid; gap: 16px; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1fr 380px; gap: 28px; align-items: start; } .cart-layout .summary { position: sticky; top: 130px; } }
.cline { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cline:last-child { border-bottom: 0; }
.cline .cimg { width: 84px; height: 84px; flex-shrink: 0; border-radius: 12px; background: var(--bg3); border: 1px solid var(--line); overflow: hidden; }
.cline .cimg img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cline .cinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cline .cname { font-size: .88rem; font-weight: 600; color: #fff; line-height: 1.3; }
.cline .cbot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.cline .cprice { font-weight: 800; color: #fff; white-space: nowrap; }
.cline.unavail { opacity: .55; }
.free-meter { font-size: .8rem; color: var(--muted); }
.free-meter .bar { height: 6px; border-radius: 3px; background: var(--surface); margin-top: 8px; overflow: hidden; }
.free-meter .bar i { display: block; height: 100%; background: var(--red); border-radius: 3px; }

/* ---------- Checkout steps / tracking ---------- */
.steps { display: flex; gap: 6px; margin: 4px 0 18px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--surface2); }
.steps span.on { background: var(--red); }
.timeline { position: relative; padding-left: 4px; }
.tl { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--surface2); }
.tl:last-child::before { display: none; }
.tl .dot { width: 36px; height: 36px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--line2); color: var(--dim); display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; z-index: 1; }
.tl.done .dot { background: var(--red); border-color: var(--red); color: #fff; }
.tl.done::before { background: var(--red); }
.tl.now .dot { box-shadow: 0 0 0 5px var(--red-dim); }
.tl b { display: block; font-size: .9rem; color: #fff; }
.tl span { font-size: .76rem; color: var(--muted); }
.tl.todo b { color: var(--dim); }
.success-ic { width: 84px; height: 84px; border-radius: 50%; margin: 10px auto 16px; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; box-shadow: 0 0 0 10px var(--red-dim); }

/* ---------- Account ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; padding: 20px 0 16px; }
.avatar { width: 58px; height: 58px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.order-row { display: flex; gap: 12px; align-items: center; }
.order-row .thumbs-mini { display: flex; }
.order-row .thumbs-mini img { width: 44px; height: 44px; border-radius: 10px; background: var(--bg3); border: 2px solid var(--bg2); object-fit: contain; padding: 3px; margin-left: -10px; }
.order-row .thumbs-mini img:first-child { margin-left: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px 14px; font-size: .86rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: #fff; border-bottom-color: var(--red); }

/* ---------- Auth ---------- */
.auth { max-width: 440px; margin: 0 auto; padding: 26px 0; }
.auth h1 { font-size: 1.7rem; font-weight: 800; margin-bottom: 6px; }
.auth .lead { color: var(--muted); margin-bottom: 22px; font-size: .92rem; }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.role-pick label { position: relative; padding: 12px 6px; text-align: center; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--bg3); cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--muted); }
.role-pick label i { display: block; font-size: 1.3rem; margin-bottom: 4px; color: var(--text); }
.role-pick input { position: absolute; opacity: 0; }
.role-pick label:has(input:checked) { border-color: var(--red); background: var(--red-dim); color: #fff; }
.role-pick label:has(input:checked) i { color: var(--red); }

/* ---------- Tab bar (mobile) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(12, 12, 12, .97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .66rem; font-weight: 600; color: var(--dim); position: relative; }
.tabbar a i { font-size: 1.3rem; line-height: 1; }
.tabbar a.on { color: #fff; }
.tabbar a.on i { color: var(--red); }
.tabbar .badge-dot { top: 6px; right: calc(50% - 22px); }
@media (min-width: 900px) { .tabbar { display: none; } }
.no-tabs .tabbar { display: none; }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .6); opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; max-height: 88vh; overflow-y: auto; background: var(--bg2); border-top: 1px solid var(--line2); border-radius: 20px 20px 0 0; padding: 10px 16px calc(20px + var(--safe-b)); transform: translateY(105%); visibility: hidden; transition: transform .26s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .26s; }
.sheet::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--surface2); margin: 0 auto 14px; }
.sheet h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.sheet.open { transform: none; visibility: visible; transition-delay: 0s; }
.sheet.open + .sheet-backdrop, .sheet-backdrop.open { opacity: 1; pointer-events: auto; }
@media (min-width: 900px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 520px; border-radius: 18px; border: 1px solid var(--line2); transform: translate(-50%, -46%); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; padding: 24px; }
  .sheet::before { display: none; }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
}

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 0; right: 0; top: calc(var(--appbar) + 10px); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 440px; width: 100%; padding: 12px 14px; border-radius: 12px; background: #fff; color: #0a0a0a; font-size: .86rem; font-weight: 600; box-shadow: var(--shadow); animation: toastIn .22s ease; }
.toast i { font-size: 1.05rem; }
.toast.error { background: var(--red); color: #fff; }
.toast a { margin-left: auto; font-weight: 800; color: var(--red); white-space: nowrap; }
.toast.error a { color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg2); padding: 30px 0 calc(var(--tabbar) + var(--safe-b) + 24px); margin-top: 10px; }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
.site-footer .about { grid-column: 1 / -1; }
.site-footer h4 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.site-footer li { margin-bottom: 9px; }
.site-footer li a { font-size: .86rem; color: #cfcfcf; }
.site-footer li a:hover { color: var(--red); }
.site-footer .legal { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px; font-size: .76rem; color: var(--dim); }
.pay-logos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pay-logos span { font-size: .68rem; font-weight: 700; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line2); color: var(--muted); }
@media (min-width: 900px) { .site-footer { padding-bottom: 30px; margin-top: 30px; } .site-footer .cols { grid-template-columns: 2fr 1fr 1fr 1fr; } .site-footer .about { grid-column: auto; } }
.no-tabs .site-footer { display: none; }

/* ---------- Shop / filters ---------- */
.shop-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin: 14px 0 12px; }
.shop-head h1 { font-size: 1.3rem; font-weight: 800; }
.shop-tools { display: flex; gap: 8px; }
.shop-layout { display: grid; gap: 18px; }
.filters-side { display: none; }
@media (min-width: 900px) {
  .shop-layout { grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
  .filters-side { display: block; position: sticky; top: 130px; }
  .filters-side .list > a.on { color: var(--red); }
  .filters-side .list > a.on .li-ic { color: var(--red); }
}
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 26px; }
.pager a, .pager span { min-width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line2); font-size: .86rem; font-weight: 600; }
.pager span.on { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Content pages ---------- */
.prose { max-width: 760px; color: #cfcfcf; font-size: .95rem; line-height: 1.75; }
.prose h2 { font-size: 1.15rem; margin: 26px 0 8px; }
.prose p, .prose ul { margin-bottom: 12px; }
.prose ul { padding-left: 20px; list-style: disc; }
.prose a { color: var(--red); }
details.faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
details.faq summary { cursor: pointer; font-weight: 600; color: #fff; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.faq summary::after { content: '+'; color: var(--red); font-weight: 800; font-size: 1.2rem; line-height: 1; }
details.faq[open] summary::after { content: '–'; }
details.faq p { color: var(--muted); font-size: .9rem; margin-top: 8px; }

/* ==========================================================================
   Portals (seller / driver / admin)
   ========================================================================== */
.portal { display: block; }
.portal-side { display: none; }
.portal-main { min-width: 0; padding-bottom: calc(var(--tabbar) + var(--safe-b) + 24px); }
.portal-top { position: sticky; top: 0; z-index: 50; background: rgba(10, 10, 10, .94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.portal-top .wrap { height: 58px; display: flex; align-items: center; gap: 10px; }
.portal-top .who { margin-left: auto; font-size: .8rem; color: var(--muted); }
.portal-body { padding-top: 18px; }
.portal-body h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.side-label { display: inline-block; margin-left: 6px; font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); border: 1px solid var(--red-line); padding: 2px 6px; border-radius: 5px; vertical-align: middle; }
@media (min-width: 900px) {
  .portal { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
  .portal-side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--bg2); border-right: 1px solid var(--line); padding: 20px 14px; }
  .portal-side .brand { padding: 4px 10px 22px; display: block; }
  .portal-side nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-size: .88rem; font-weight: 500; margin-bottom: 2px; }
  .portal-side nav a:hover { background: var(--bg3); color: #fff; }
  .portal-side nav a.on { background: var(--red-dim); color: #fff; }
  .portal-side nav a.on i { color: var(--red); }
  .portal-side .side-foot { margin-top: auto; font-size: .78rem; color: var(--dim); padding: 10px 12px; }
  .portal-main { padding-bottom: 48px; }
  .portal-top .brand { display: none; }
  .portal-body { padding-top: 28px; }
  .portal-body h1 { font-size: 1.8rem; }
}
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat span { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.stat b { display: block; font-size: 1.35rem; font-weight: 800; color: #fff; margin-top: 4px; letter-spacing: -.02em; }
.stat.accent b { color: var(--red); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; } .stat { padding: 18px; } .stat b { font-size: 1.6rem; } }
.table-wrap { overflow-x: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); }
table.t { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.t th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: var(--bg3); }
table.t .thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--bg3); object-fit: contain; padding: 3px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.toolbar .input, .toolbar select.input { min-height: 40px; width: auto; flex: 1; min-width: 160px; font-size: .88rem; }
.toolbar select.input { flex: 0 1 auto; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form select, .inline-form input { min-height: 36px; padding: 0 10px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line2); color: var(--text); font: inherit; font-size: .82rem; }
.mcards { display: grid; gap: 10px; }
.mcard { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.mcard .row + .row { margin-top: 8px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bars i { display: block; width: 100%; max-width: 34px; background: var(--red); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bars span { font-size: .64rem; color: var(--dim); }
.wish-inline.on i { color: var(--red); }
