/* ============ Chaitech Electronics — design system ============ */
:root {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --ink: #0d0f14;
  --ink-2: #2b2f3a;
  --muted: #6b7082;
  --line: #e5e7ee;
  --brand: #3a5bff;
  --brand-ink: #ffffff;
  --brand-1: #5b3dff;
  --brand-2: #00c8ff;
  --grad: linear-gradient(135deg, #5b3dff 0%, #3a6bff 55%, #00c8ff 100%);
  --deal: #ff3b5c;
  --ok: #0fa968;
  --verified: #2d6bff;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(13,15,20,.05);
  --shadow: 0 1px 2px rgba(13,15,20,.04), 0 6px 24px rgba(13,15,20,.06);
  --shadow-lg: 0 2px 6px rgba(13,15,20,.05), 0 24px 60px rgba(13,15,20,.12);
  --hdr-h: 72px;
  --tabbar-h: 0px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
html, body { margin: 0; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
  -webkit-font-smoothing: antialiased; padding-bottom: var(--tabbar-h);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
img { display: block; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(14px, 3vw, 28px); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
:focus-visible { outline: 3px solid rgba(58,91,255,.45); outline-offset: 2px; border-radius: 8px; }

/* ---------- top bar & header ---------- */
.topbar { background: var(--ink); color: #c9ccd6; font-size: 12.5px; }
.topbar-inner { display: flex; justify-content: center; gap: 28px; padding-top: 8px; padding-bottom: 8px; white-space: nowrap; }
.topbar b { color: #fff; font-weight: 600; }

.hdr { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.hdr-inner { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 32px); height: var(--hdr-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.brand-text small { font-size: 9px; font-weight: 700; letter-spacing: .38em; color: var(--brand); margin-top: 4px; }

.search { position: relative; flex: 1; max-width: 640px; display: flex; align-items: center; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 14px; padding-left: 14px; transition: border-color .15s, box-shadow .15s, background .15s; }
.search:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(58,91,255,.12); }
.search > svg { color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: none; background: none; outline: none; font: inherit; font-size: 15px; padding: 12px 10px; color: var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }
.search-btn { border: none; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; border-radius: 10px; padding: 8px 16px; margin: 4px; }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px; z-index: 70; max-height: 70vh; overflow: auto; }
.suggest a { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.suggest a:hover, .suggest a.on { background: var(--surface-2); }
.suggest img { width: 48px; height: 48px; object-fit: contain; }
.suggest b { display: block; font-size: 14px; font-weight: 600; }
.suggest span { font-size: 12px; color: var(--muted); }
.suggest .sp { font-weight: 700; font-size: 14px; white-space: nowrap; }
.suggest .all { display: block; text-align: center; padding: 10px; font-size: 13.5px; font-weight: 600; color: var(--brand); }
.suggest .none { padding: 14px; color: var(--muted); font-size: 14px; }

.hdr-actions { display: flex; gap: 6px; flex: none; }
.hdr-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hdr-btn:hover, .hdr-btn.active { background: var(--surface-2); color: var(--ink); }
.hdr-btn.cart { background: var(--ink); color: #fff; }
.hdr-btn.cart:hover { background: #262a35; color: #fff; }
.badge-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--deal); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; line-height: 1; }
.badge-count.zero { display: none; }

.catbar { border-top: 1px solid var(--line); }
.catbar-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 6px; padding-bottom: 6px; scroll-snap-type: x proximity; }
.catbar-inner::-webkit-scrollbar { display: none; }
.catlink { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); scroll-snap-align: start; white-space: nowrap; }
.catlink svg { width: 18px; height: 18px; color: var(--muted); }
.catlink:hover { background: var(--surface-2); }
.catlink.active { background: #eef1ff; color: var(--brand); font-weight: 600; }
.catlink.active svg { color: var(--brand); }
.catlink.deal { color: var(--deal); font-weight: 600; }
.catlink.deal svg { color: var(--deal); }

/* ---------- buttons, pills ---------- */
.btn { border: none; border-radius: 14px; padding: 0 22px; height: 50px; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s, background .2s, box-shadow .2s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(58,91,255,.28); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(58,91,255,.38); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #262a35; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: #c9cdd8; }
.btn-light { background: #fff; color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.grow { flex: 1; }

.verified { display: inline-flex; align-items: center; gap: 5px; background: #fff; color: var(--verified); font-size: 11.5px; font-weight: 700; padding: 4px 9px 4px 6px; border-radius: 99px; box-shadow: 0 1px 6px rgba(13,15,20,.1); letter-spacing: .01em; }
.verified svg { flex: none; }
.pill { font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.pill.sale { background: var(--deal); color: #fff; }
.pill.dark { background: var(--ink); color: #fff; }
.pill.soft { background: #eef1ff; color: var(--brand); }
.pill.low { background: #fff0f2; color: var(--deal); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; margin: 22px 0 18px; border-radius: 28px; background: #0b0d13; color: #fff; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 28px; padding: clamp(28px, 5vw, 64px); min-height: 440px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto 35%; height: 160%; background: radial-gradient(closest-side, rgba(91,61,255,.55), transparent 70%); z-index: -1; }
.hero::after { content: ""; position: absolute; inset: auto 45% -60% -20%; height: 120%; background: radial-gradient(closest-side, rgba(0,200,255,.28), transparent 70%); z-index: -1; }
.hero-grid { position: absolute; inset: 0; z-index: -1; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 99px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #dfe3ff; }
.eyebrow svg { color: #7ea2ff; }
.hero h1 { font-size: clamp(34px, 5.2vw, 64px); line-height: 1.02; letter-spacing: -.045em; font-weight: 900; margin: 18px 0 16px; }
.grad-text { background: linear-gradient(90deg, #8f7bff, #4da3ff 50%, #3fe0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #aeb3c6; font-size: clamp(15px, 1.5vw, 17.5px); max-width: 520px; margin: 0 0 28px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.hero-stats { display: flex; gap: clamp(18px, 3vw, 36px); margin-top: 34px; }
.hero-stats b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.hero-stats span { font-size: 12.5px; color: #8d93a8; }

.showcase { position: relative; height: 380px; }
.show-card { position: absolute; background: #fff; color: var(--ink); border-radius: 22px; padding: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.45); display: flex; flex-direction: column; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.show-card img { width: 100%; height: calc(100% - 46px); object-fit: contain; }
.show-card .sc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.show-card .sc-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-card .sc-price { font-size: 13px; font-weight: 800; color: var(--brand); white-space: nowrap; }
.show-card.c1 { width: 46%; height: 82%; left: 27%; top: 0; z-index: 3; }
.show-card.c2 { width: 36%; height: 64%; left: 0; top: 22%; transform: rotate(-7deg); z-index: 2; }
.show-card.c3 { width: 36%; height: 64%; right: 0; top: 30%; transform: rotate(6deg); z-index: 2; }
.showcase:hover .c2 { transform: rotate(-9deg) translateX(-6px); }
.showcase:hover .c3 { transform: rotate(8deg) translateX(6px); }
.float-badge { position: absolute; z-index: 4; background: #fff; color: var(--ink); border-radius: 14px; padding: 10px 14px; box-shadow: 0 14px 30px rgba(0,0,0,.35); font-size: 12.5px; display: flex; align-items: center; gap: 10px; }
.float-badge b { display: block; font-size: 14px; }
.float-badge .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #e9fbf2; color: var(--ok); }
.float-badge.fb1 { left: 4%; bottom: 0; }
.float-badge.fb2 { right: 2%; top: 2%; }
.float-badge.fb2 .ico { background: #fff0f2; color: var(--deal); }

/* ---------- trust ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 40px; }
.trust-item { background: var(--surface); border-radius: 18px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.trust-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: #eef1ff; color: var(--brand); flex: none; }
.trust-item b { display: block; font-size: 14.5px; }
.trust-item span { font-size: 12.5px; color: var(--muted); }

/* ---------- section heads ---------- */
.sec { margin-bottom: 44px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sec-head h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.03em; margin: 0; font-weight: 800; }
.sec-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.see-all { font-size: 14px; font-weight: 600; color: var(--brand); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.see-all:hover { text-decoration: underline; }

/* ---------- category tiles ---------- */
.cats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.cat { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 12px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden; }
.cat::before { content: ""; position: absolute; inset: auto 15% 34% 15%; height: 40%; background: radial-gradient(closest-side, rgba(58,91,255,.12), transparent); border-radius: 50%; }
.cat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.cat-img { position: relative; height: 104px; width: 100%; display: grid; place-items: center; margin-bottom: 10px; }
.cat-img img { max-height: 104px; max-width: 92%; object-fit: contain; transition: transform .3s; }
.cat:hover .cat-img img { transform: scale(1.07); }
.cat b { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.cat span { font-size: 12px; color: var(--muted); }

/* ---------- product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 16px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(228px, calc((100% - 64px) / 5)); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 12px; margin: -4px -2px 0; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-wrap { position: relative; }
.rail-btn { position: absolute; top: 38%; z-index: 5; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; }
.rail-btn.prev { left: -14px; } .rail-btn.next { right: -14px; }
.rail-btn[hidden] { display: none; }

.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease, border-color .25s; min-width: 0; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-media { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; background: #fff; padding: 14%; }
.card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.06); }
.media-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; z-index: 2; pointer-events: none; }
.card-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-cat { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.card-name { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card-meta { font-size: 12.5px; color: var(--muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.5em; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.price { font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; white-space: nowrap; }
.price small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.strike { color: var(--muted); text-decoration: line-through; font-size: 13px; white-space: nowrap; }
.quick-add { flex: none; width: 42px; height: 42px; border-radius: 12px; border: none; background: var(--ink); color: #fff; display: grid; place-items: center; transition: background .2s, transform .1s; }
.quick-add:hover { background: var(--brand); }
.quick-add:active { transform: scale(.94); }
.ship-line { font-size: 12px; color: var(--ok); display: flex; gap: 6px; align-items: center; font-weight: 500; }

/* ---------- promo band ---------- */
.promo { position: relative; overflow: hidden; border-radius: 24px; background: var(--grad); color: #fff; padding: clamp(24px, 4vw, 40px); display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 44px; flex-wrap: wrap; }
.promo::after { content: "−30%"; position: absolute; right: -10px; bottom: -40px; font-size: 180px; font-weight: 900; letter-spacing: -.06em; opacity: .12; line-height: 1; pointer-events: none; }
.promo h3 { margin: 0 0 6px; font-size: clamp(20px, 2.6vw, 30px); letter-spacing: -.03em; }
.promo p { margin: 0; opacity: .9; }
.promo .btn { position: relative; z-index: 1; }

/* ---------- listing page ---------- */
.crumbs { font-size: 13px; color: var(--muted); margin: 20px 0 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.035em; margin: 0; font-weight: 800; }
.page-head .count { color: var(--muted); font-size: 14px; }
.filters { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.chip:hover { border-color: #c9cdd8; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.select { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 9px 34px 9px 14px; font: inherit; font-size: 14px; color: var(--ink); appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7082' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.empty { text-align: center; padding: 64px 20px; }
.empty .big { font-size: 46px; }
.empty h3 { margin: 8px 0 4px; }

/* ---------- product detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; margin-bottom: 40px; }
.gallery { position: sticky; top: calc(var(--hdr-h) + 70px); min-width: 0; }
.stage { position: relative; aspect-ratio: 1 / 1; max-height: 620px; width: 100%; border-radius: 28px; display: grid; place-items: center; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.stage img { width: 78%; height: 78%; object-fit: contain; animation: pop .35s ease; }
.stage .media-badges { top: 18px; left: 18px; right: 18px; }
.stage-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.9); display: grid; place-items: center; z-index: 2; }
.stage-nav.prev { left: 14px; } .stage-nav.next { right: 14px; }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: none; width: 78px; height: 78px; border-radius: 14px; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; padding: 6px; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.on { border-color: var(--brand); }
.info { min-width: 0; }
.info-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.info h1 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.035em; margin: 12px 0 4px; line-height: 1.1; font-weight: 800; }
.info .sub { color: var(--muted); margin: 0 0 18px; font-size: 15px; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; }
.price-big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-big .price { font-size: clamp(28px, 3.4vw, 36px); }
.save { color: var(--ok); font-weight: 700; font-size: 14px; background: #e9fbf2; padding: 3px 8px; border-radius: 8px; }
.opt { margin-top: 22px; }
.opt-label { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.opt-label span { font-weight: 500; color: var(--muted); }
.color-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.color-opt { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 5px 12px 5px 5px; font-size: 13.5px; font-weight: 500; }
.color-opt img { width: 38px; height: 38px; object-fit: contain; border-radius: 9px; background: var(--surface-2); }
.color-opt.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(58,91,255,.14); }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.size { border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); padding: 10px 12px; text-align: left; transition: border-color .15s; }
.size b { display: block; font-size: 14.5px; }
.size span { font-size: 12.5px; color: var(--muted); }
.size.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(58,91,255,.14); }
.size:not(.on):not([disabled]):hover { border-color: #c4c9d6; }
.size[disabled] { opacity: .45; cursor: not-allowed; }
.buy-row { display: flex; gap: 10px; margin-top: 22px; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); flex: none; }
.qty button { width: 42px; height: 48px; border: none; background: none; font-size: 20px; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.delivery { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; }
.delivery-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.delivery-head b { font-size: 15px; display: inline-flex; gap: 8px; align-items: center; }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; top: 9px; left: 16%; right: 16%; height: 2px; background: linear-gradient(90deg, var(--brand), #cfd8ff); }
.tl-step { text-align: center; position: relative; font-size: 12.5px; }
.tl-step i { display: block; width: 20px; height: 20px; margin: 0 auto 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.tl-step:first-child i { background: var(--brand); }
.tl-step b { display: block; font-size: 13px; }
.tl-step span { color: var(--muted); }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.perk { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; font-size: 13px; color: var(--muted); }
.perk b { display: block; color: var(--ink); font-size: 13.5px; }
.perk .trust-icon { width: 36px; height: 36px; border-radius: 10px; }

.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 30px); margin-bottom: 18px; }
.section h3 { margin: 0 0 16px; font-size: 21px; letter-spacing: -.02em; }
.hl { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.hl div { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; font-size: 14.5px; font-weight: 700; }
.hl div span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec th, .spec td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec th { width: 40%; color: var(--muted); font-weight: 500; padding-right: 16px; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: none; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details:last-child { border-bottom: none; }
summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 10px 0 0; font-size: 14.5px; }

.buybar { display: none; }

/* ---------- cart & checkout ---------- */
.page-title { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.035em; margin: 26px 0 18px; font-weight: 800; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 56px; }
.line-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-item:first-child { padding-top: 0; }
.line-item:last-child { border-bottom: none; padding-bottom: 0; }
.li-thumb { width: 92px; height: 92px; border-radius: 16px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); padding: 8px; }
.li-thumb img { width: 100%; height: 100%; object-fit: contain; }
.li-name { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.li-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.li-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.li-actions .qty button { width: 34px; height: 36px; font-size: 17px; }
.li-price { text-align: right; }
.link { color: var(--deal); background: none; border: none; padding: 0; font-size: 13px; font-weight: 600; }
.summary { position: sticky; top: calc(var(--hdr-h) + 70px); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; padding: 6px 0; }
.sum-row.total { font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; letter-spacing: -.02em; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 16px; outline: none; background: var(--surface); color: var(--ink); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(58,91,255,.12); }
.field .err { color: var(--deal); font-size: 12.5px; display: none; }
.field.bad input { border-color: var(--deal); }
.field.bad .err { display: block; }
.pay-opts { display: grid; gap: 10px; }
.pay { display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; }
.pay input { accent-color: var(--brand); width: 18px; height: 18px; }
.pay:has(input:checked) { border-color: var(--brand); background: #f5f7ff; }
.pay b { display: block; font-size: 14.5px; }
.pay span { font-size: 13px; color: var(--muted); }
.note { background: #fff8e6; color: #6b4a00; border-radius: 14px; padding: 14px 16px; font-size: 13.5px; margin-top: 16px; }

/* ---------- success & orders ---------- */
.success { text-align: center; max-width: 640px; margin: 40px auto 56px; }
.success .check { width: 76px; height: 76px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; animation: pop .5s ease; box-shadow: 0 12px 30px rgba(15,169,104,.35); }
.success h1 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.03em; margin: 0 0 8px; }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 26px); margin-bottom: 14px; text-align: left; }
.order-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.order-head b { font-size: 17px; }
.status { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: #eef1ff; color: var(--brand); }
.track { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0 10px; }
.track-step { text-align: center; font-size: 12px; color: var(--muted); position: relative; padding: 0 2px; }
.track-step::before { content: ""; position: absolute; top: 8px; left: -50%; right: 50%; height: 3px; background: var(--line); }
.track-step:first-child::before { display: none; }
.track-step.done::before { background: var(--brand); }
.track-step i { position: relative; z-index: 1; display: block; width: 19px; height: 19px; border-radius: 50%; background: var(--line); margin: 0 auto 6px; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.track-step.done i { background: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.track-step.done { color: var(--ink); font-weight: 600; }
.oi { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.oi img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--line); padding: 3px; flex: none; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #c9ccd6; padding: 36px 0 24px; margin-top: 32px; }
.footer-promo { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--grad); border-radius: 20px; padding: 22px 26px; color: #fff; margin-bottom: 36px; }
.footer-promo b { display: block; font-size: 18px; letter-spacing: -.01em; }
.footer-promo span { font-size: 13.5px; opacity: .9; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer .brand-text b { color: #fff; }
.footer .brand-text small { color: #7ea2ff; }
.footer p { max-width: 300px; margin-top: 14px; color: #8d93a8; }
.footer h4 { margin: 4px 0 12px; font-size: 13px; color: #fff; }
.footer-grid > div > a:not(.brand), .footer-grid > div > span, .footer-grid #footCats a { display: block; font-size: 13.5px; color: #8d93a8; margin-bottom: 8px; transition: color .15s; }
.footer-grid > div > a:not(.brand):hover, .footer-grid #footCats a:hover { color: #fff; }
.footer-promo span { display: block; color: #fff; }
.footer-promo .btn { flex: none; }
.footer-bottom { border-top: 1px solid #23262f; margin-top: 28px; padding-top: 18px; font-size: 12.5px; color: #6b7082; }

/* ---------- mobile tab bar & toast ---------- */
.tabbar { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--tabbar-h)); transform: translate(-50%, 150%); opacity: 0; visibility: hidden; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; z-index: 100; transition: transform .35s cubic-bezier(.2,.9,.3,1.2), opacity .2s; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast a { color: #8fb0ff; font-weight: 700; white-space: nowrap; }

/* ================= responsive ================= */
@media (max-width: 1180px) {
  .cats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 148px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 10px; margin: -4px -2px 0; }
  .cats::-webkit-scrollbar { display: none; }
  .cat { scroll-snap-align: start; }
  .hdr-btn-label { display: none; }
  .hdr-btn { padding: 0 12px; }
  .rail { grid-auto-columns: minmax(220px, calc((100% - 48px) / 4)); }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .showcase { height: 300px; max-width: 560px; width: 100%; margin: 0 auto; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .detail, .two-col { grid-template-columns: 1fr; }
  .gallery, .summary { position: static; }
  .stage { max-height: 480px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .rail { grid-auto-columns: minmax(200px, calc((100% - 32px) / 3)); }
  .rail-btn { display: none; }
}
@media (max-width: 760px) {
  :root { --hdr-h: 60px; --tabbar-h: calc(64px + env(safe-area-inset-bottom)); }
  .topbar-inner { justify-content: space-between; gap: 12px; font-size: 11.5px; }
  .hide-sm { display: none; }
  .hdr-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .brand { order: 1; }
  .hdr-actions { order: 2; margin-left: auto; }
  .hdr-actions .hdr-btn[data-nav="orders"] { display: none; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search input { padding: 10px 8px; }
  .search-btn { display: none; }
  .brand img { width: 36px; height: 36px; }
  .brand-text b { font-size: 20px; }
  .catbar { display: none; }

  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: rgba(255,255,255,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 4px 0; }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar a.active { color: var(--brand); }
  .tab-ico { position: relative; display: block; height: 24px; }
  .tab-ico .badge-count { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; font-size: 10px; }

  .hero { margin-top: 14px; border-radius: 22px; padding: 26px 20px 22px; gap: 18px; }
  .hero h1 { margin: 14px 0 12px; }
  .hero p { margin-bottom: 20px; }
  .hero-ctas .btn { flex: 1; }
  .hero-stats { margin-top: 22px; justify-content: space-between; }
  .hero-stats b { font-size: 18px; }
  .showcase { height: 240px; }
  .float-badge { padding: 8px 10px; font-size: 11px; }
  .float-badge b { font-size: 12.5px; }
  .float-badge .ico { width: 28px; height: 28px; }
  .trust { gap: 8px; margin-bottom: 30px; }
  .trust-item { padding: 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .trust-icon { width: 38px; height: 38px; }
  .sec { margin-bottom: 32px; }
  .cats { grid-auto-columns: 124px; gap: 10px; }
  .cat-img, .cat-img img { height: 80px; max-height: 80px; }
  .cat b { font-size: 13px; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rail { grid-auto-columns: 46%; gap: 10px; }
  .card { border-radius: 16px; }
  .card-media { padding: 12%; }
  .media-badges { top: 8px; left: 8px; right: 8px; }
  .verified { font-size: 10.5px; padding: 3px 7px 3px 5px; }
  .verified svg { width: 12px; height: 12px; }
  .pill { font-size: 10.5px; padding: 3px 7px; }
  .card-body { padding: 2px 12px 12px; }
  .card-cat { font-size: 10.5px; }
  .card-name { font-size: 13.5px; }
  .card-meta { font-size: 11.5px; }
  .price { font-size: 16.5px; }
  .strike { font-size: 11.5px; }
  .quick-add { width: 36px; height: 36px; border-radius: 10px; }
  .ship-line { font-size: 11px; }

  .filters { flex-direction: column; align-items: stretch; }
  .filters .select { width: 100%; }
  .stage { border-radius: 20px; }
  .thumb { width: 64px; height: 64px; }
  .perks { grid-template-columns: 1fr; }
  .spec th { width: 45%; }
  .buy-row.main-buy { display: none; }
  .buybar { display: flex; position: fixed; left: 0; right: 0; bottom: var(--tabbar-h); z-index: 75; gap: 10px; align-items: center; background: rgba(255,255,255,.97); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 10px 14px; box-shadow: 0 -8px 24px rgba(13,15,20,.06); }
  .buybar .bb-price { flex: 1; min-width: 0; }
  .buybar .bb-price b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
  .buybar .bb-price span { font-size: 11.5px; color: var(--muted); text-decoration: line-through; }
  .buybar .btn { height: 46px; padding: 0 16px; font-size: 14.5px; }
  body.has-buybar { padding-bottom: calc(var(--tabbar-h) + 70px); }

  .form { grid-template-columns: 1fr; }
  .line-item { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .li-thumb { width: 72px; height: 72px; }
  .li-price { grid-column: 2; text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .footer { padding-top: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .toast { bottom: calc(14px + var(--tabbar-h)); }
}
@media (max-width: 400px) {
  .hide-xs { display: none; }
  .topbar-inner { justify-content: center; }
  .hero-stats span { font-size: 11px; }
  .showcase { height: 210px; }
  .float-badge.fb2 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 760px) {
  .float-badge { display: none; }
  .show-card { padding: 10px; border-radius: 18px; }
  .show-card .sc-name { display: none; }
  .show-card .sc-foot { justify-content: center; margin-top: 6px; }
  .show-card img { height: calc(100% - 30px); }
  .show-card.c1 { width: 44%; left: 28%; height: 92%; }
  .show-card.c2, .show-card.c3 { width: 34%; height: 70%; top: 18%; }
}

/* loading state while the catalog loads from Neon */
.boot { min-height: 60vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 15px; }
.boot-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
