/* =========================================================
   Sembakoin — Storefront / Katalog / Checkout / Scanner
   ========================================================= */

:root{
  --ink:#0B1030;
  --ink-2:#252B45;
  --muted:#6A6F85;
  --muted-2:#9499AB;
  --line:#E6E4DA;
  --line-2:#F0EEE6;
  --bg:#F8F7F2;
  --card:#FFFFFF;
  --tint:#F4F3EC;

  --brand-900:#0A0F45;
  --brand-800:#131B73;
  --brand-700:#182391;
  --brand-600:#1F2CA1;
  --brand-500:#3542C6;
  --brand-050:#EDEFFB;

  --gold:#C99F0F;
  --gold-600:#A57D0C;
  --gold-300:#E8C978;
  --gold-050:#FBF3D9;
  --red:#C0392B;
  --price:#A56A00;
  --price-tint:#FDF6E3;
  --red-050:#FDECEA;
  --wa:#128C7E;
  --wa-bright:#25D366;
  --wa-050:#E7F7F0;

  --r:14px;
  --r-lg:18px;
  --r-xl:24px;

  --sh-sm:0 1px 2px rgba(11,16,48,.04);
  --sh:0 2px 6px rgba(11,16,48,.04), 0 14px 30px -22px rgba(11,16,48,.4);
  --sh-lg:0 30px 60px -34px rgba(11,16,48,.45);

  --ff:"Plus Jakarta Sans","Segoe UI",system-ui,-apple-system,sans-serif;
  --maxw:1220px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body{
  margin:0; font-family:var(--ff); background:var(--bg); color:var(--ink);
  font-size:15px; line-height:1.55; -webkit-font-smoothing:antialiased; overflow-x:hidden;
}
h1,h2,h3,h4,p{ margin:0; }
h1,h2,h3,h4{ line-height:1.18; letter-spacing:-.025em; font-weight:800; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
svg{ display:block; }
ul{ margin:0; padding:0; list-style:none; }
.mono{ font-variant-numeric:tabular-nums; }
.muted{ color:var(--muted); }
.text-green{ color:var(--brand-600); }
.is-hidden{ display:none !important; }

.wrap{ width:100%; max-width:var(--maxw); margin:0 auto; padding:0 20px; }

/* ---------------- Buttons ---------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height:44px; padding:0 20px; border-radius:11px; border:1px solid transparent;
  font-size:14px; font-weight:700; letter-spacing:-.01em; white-space:nowrap;
  transition:transform .14s ease, background .18s ease, box-shadow .2s ease, border-color .18s;
}
.btn svg{ width:17px; height:17px; flex:none; }
.btn:active{ transform:translateY(1px); }
.btn-primary{
  background:linear-gradient(180deg,var(--brand-600),var(--brand-700)); color:#fff;
  box-shadow:0 8px 18px -12px rgba(10,83,52,.9), inset 0 1px 0 rgba(255,255,255,.14);
}
.btn-primary:hover{ background:linear-gradient(180deg,#3542C6,var(--brand-600)); }
.btn-primary:disabled{ opacity:.6; cursor:not-allowed; }
.btn-ghost{ background:var(--card); border-color:var(--line); color:var(--ink-2); }
.btn-ghost:hover{ border-color:#CFD3E4; }
.btn-wa{ background:var(--wa); color:#fff; }
.btn-wa:hover{ background:#0E7466; }
.btn-block{ width:100%; }
.btn-lg{ height:50px; font-size:15px; border-radius:12px; }
.btn-sm{ height:36px; padding:0 14px; font-size:12.5px; border-radius:9px; }
.btn-text{ border:0; background:transparent; color:var(--brand-600); font-weight:700; font-size:12.5px; padding:4px 6px; border-radius:6px; }

.icon-btn{
  position:relative; width:42px; height:42px; border-radius:12px; flex:none;
  display:grid; place-items:center; background:var(--card); border:1px solid var(--line); color:var(--ink-2);
  transition:.16s;
}
.icon-btn svg{ width:19px; height:19px; }
.icon-btn:hover{ border-color:#CFD3E4; color:var(--brand-700); }
.badge{
  position:absolute; top:-5px; right:-5px; min-width:19px; height:19px; padding:0 5px;
  border-radius:999px; background:var(--brand-600); color:#fff; font-size:10.5px; font-weight:800;
  display:none; place-items:center; border:2px solid var(--bg);
}
.badge.on{ display:grid; }

/* ---------------- Topbar ---------------- */
.topbar{
  position:sticky; top:0; z-index:60;
  background:rgba(246,249,246,.9); backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}
.topbar-inner{ display:flex; align-items:center; gap:16px; height:70px; }
#populer,#katalog,#promo{ scroll-margin-top:86px; }
.brand{ display:flex; align-items:center; gap:10px; flex:none; }
.brand-mark{
  width:42px; height:42px; border-radius:50%; display:grid; place-items:center; flex:none;
  background:#fff; border:1px solid var(--line); overflow:hidden;
  box-shadow:0 4px 12px -8px rgba(10,15,69,.6), inset 0 0 0 1px rgba(201,159,15,.14);
}
.brand-mark img{ width:100%; height:100%; object-fit:contain; display:block; }
.brand-mark svg{ width:21px; height:21px; }
.brand-text{ display:flex; flex-direction:column; font-weight:800; font-size:15px; letter-spacing:-.025em; line-height:1.12; white-space:nowrap; }
.brand-text small{ font-size:9px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--gold-600); margin-top:3px; }

.nav{ display:flex; align-items:center; gap:24px; margin-left:10px; }
.nav a{ font-size:14px; font-weight:600; color:var(--ink-2); position:relative; padding:4px 0; }
.nav a::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px; border-radius:2px;
  background:var(--brand-600); transform:scaleX(0); transform-origin:left; transition:transform .2s;
}
.nav a:hover{ color:var(--ink); }
.nav a:hover::after{ transform:scaleX(1); }
.nav-kasir{ color:var(--brand-700) !important; }

.top-actions{ display:flex; align-items:center; gap:8px; margin-left:auto; }
.search-mini{
  display:flex; align-items:center; gap:8px; width:260px; height:42px; padding:0 14px;
  background:var(--card); border:1px solid var(--line); border-radius:12px; transition:.16s;
}
.search-mini:focus-within{ border-color:#C2C6DC; box-shadow:0 0 0 4px rgba(31,44,161,.09); }
.search-mini svg{ width:17px; height:17px; color:var(--muted-2); flex:none; }
.search-mini input{ border:0; outline:0; background:transparent; font-family:inherit; font-size:13.5px; width:100%; color:var(--ink); }
.search-mini input::placeholder{ color:#A3A7BD; }
.burger{ display:none; }

/* ---------------- Hero ---------------- */
.hero{ padding:22px 0 0; }
.hero-card{
  position:relative; overflow:hidden; border-radius:var(--r-xl);
  background:linear-gradient(115deg,var(--brand-900) 0%,#101773 55%,#182391 100%);
  color:#fff; padding:clamp(22px,3.4vw,38px);
  display:grid; grid-template-columns:1.35fr 1fr; gap:28px; align-items:center;
  box-shadow:0 30px 60px -40px rgba(10,15,69,.9);
}
.hero-card::before{
  content:""; position:absolute; right:-140px; top:-180px; width:460px; height:460px; border-radius:50%;
  background:radial-gradient(circle,rgba(163,230,53,.16),transparent 65%);
}
.hero-card::after{
  content:""; position:absolute; left:32%; bottom:-160px; width:320px; height:320px; border-radius:50%;
  background:radial-gradient(circle,rgba(37,211,102,.12),transparent 70%);
}
.hero-copy{ position:relative; z-index:1; }
.hero-tag{
  display:inline-flex; align-items:center; gap:7px; font-size:11.5px; font-weight:700;
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.14);
  padding:5px 11px; border-radius:999px; color:#D6DAEE;
}
.hero-tag .live{ width:6px; height:6px; border-radius:50%; background:#E8C978; box-shadow:0 0 0 3px rgba(201,159,15,.22); }
.hero h1{ font-size:clamp(24px,3.1vw,38px); margin:14px 0 10px; letter-spacing:-.035em; }
.hero h1 em{
  font-style:normal;
  background:linear-gradient(100deg,#F0D98A,#E8C978 60%,#E8C978);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero p{ font-size:13.5px; color:#C3C9E0; max-width:44ch; line-height:1.65; }
.hero-actions{ display:flex; align-items:center; gap:10px; margin-top:18px; flex-wrap:wrap; }
.hero-actions .btn-primary{ background:#fff; color:var(--brand-800); box-shadow:0 10px 22px -14px rgba(0,0,0,.6); }
.hero-actions .btn-primary:hover{ background:#F2F1E6; }
.hero-actions .segmented{ background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.16); }
.hero-actions .seg{ color:#C3C9E0; }
.hero-actions .seg.active{ background:#fff; color:var(--brand-800); }

.hero-side{ position:relative; z-index:1; display:grid; gap:8px; }
.hero-stat{
  display:flex; align-items:baseline; gap:10px; padding:10px 14px;
  background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1); border-radius:12px;
}
.hero-stat b{ font-size:17px; letter-spacing:-.03em; }
.hero-stat span{ font-size:11.5px; color:#B9BFDA; }

.trust-row{ display:flex; flex-wrap:wrap; gap:8px 22px; padding:14px 4px 0; }
.trust-row span{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--muted); }
.trust-row svg{ width:15px; height:15px; color:var(--brand-600); }

/* ---------------- Quick actions ---------------- */
.quick-wrap{ padding:18px 0 4px; }
.quick-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.quick{
  display:flex; align-items:center; gap:11px; padding:12px 14px; text-align:left;
  background:var(--card); border:1px solid var(--line); border-radius:var(--r);
  transition:.18s; color:var(--ink);
}
.quick:hover{ border-color:#C6CAE0; box-shadow:var(--sh); transform:translateY(-1px); }
.q-ico{
  width:38px; height:38px; border-radius:11px; flex:none; display:grid; place-items:center;
  font-size:15px; font-weight:800;
}
.q-ico svg{ width:19px; height:19px; }
.q-ico.green{ background:var(--brand-050); color:var(--brand-700); }
.q-ico.gold{ background:var(--gold-050); color:var(--gold-600); }
.q-ico.red{ background:var(--gold-050); color:var(--gold-600); }
.q-ico.wa{ background:var(--wa-050); color:var(--wa); }
.quick b{ display:block; font-size:13px; font-weight:700; letter-spacing:-.01em; }
.quick small{ font-size:11px; color:var(--muted); }

/* ---------------- Sections ---------------- */
.section{ padding:30px 0; }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:16px; flex-wrap:wrap; }
.eyebrow{ display:block; font-size:10.5px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:var(--brand-600); margin-bottom:6px; }
.section-head h2{ font-size:clamp(20px,2.2vw,26px); letter-spacing:-.03em; }
.link{ display:inline-flex; align-items:center; gap:2px; font-size:12.5px; font-weight:700; color:var(--brand-600); }
.link svg{ width:14px; height:14px; }

.catalog-meta{ display:flex; align-items:center; gap:10px; }
.catalog-meta > span{ font-size:12px; color:var(--muted); font-weight:600; }
.select-wrap{ position:relative; display:inline-flex; align-items:center; }
.select-wrap select{
  appearance:none; height:38px; padding:0 32px 0 12px; border-radius:10px;
  border:1px solid var(--line); background:var(--card); color:var(--ink-2);
  font-family:inherit; font-size:12.5px; font-weight:600; cursor:pointer; outline:0;
}
.select-wrap .chev{ position:absolute; right:9px; width:14px; height:14px; color:var(--muted-2); transform:rotate(90deg); pointer-events:none; }

/* segmented control */
.segmented{
  display:inline-grid; grid-auto-flow:column; gap:3px; padding:3px;
  background:var(--tint); border:1px solid var(--line); border-radius:999px;
}
.seg{ border:0; background:transparent; padding:7px 16px; border-radius:999px; font-size:12.5px; font-weight:700; color:var(--muted); transition:.18s; }
.seg.active{ background:var(--card); color:var(--brand-800); box-shadow:0 1px 3px rgba(11,16,48,.12); }

/* ---------------- Popular row ---------------- */
.section-pop{ background:var(--tint); border-top:1px solid var(--line-2); border-bottom:1px solid var(--line-2); }
.pop-row{
  display:grid; grid-auto-flow:column; grid-auto-columns:190px; gap:12px;
  overflow-x:auto; padding:2px 2px 10px; scroll-snap-type:x mandatory; scrollbar-width:thin;
}
.pop-row::-webkit-scrollbar{ height:6px; }
.pop-row::-webkit-scrollbar-thumb{ background:#D8DBEA; border-radius:99px; }
.pop-card{
  scroll-snap-align:start; position:relative; text-align:left; padding:12px;
  background:var(--card); border:1px solid var(--line); border-radius:var(--r);
  display:flex; flex-direction:column; gap:4px; transition:.18s;
}
.pop-card:hover{ border-color:#C6CAE0; box-shadow:var(--sh); transform:translateY(-2px); }
.pop-rank{
  position:absolute; top:10px; left:10px; z-index:2; width:22px; height:22px; border-radius:7px;
  background:var(--brand-800); color:#fff; font-size:10.5px; font-weight:800; display:grid; place-items:center;
}
.pop-card:nth-child(1) .pop-rank{ background:var(--gold); }
.pop-emoji{
  position:relative; height:96px; border-radius:10px; display:grid; place-items:center; font-size:38px;
  background:linear-gradient(160deg,#FAF9F4,#F1EFE5); border:1px solid var(--line-2);
}
.pop-disc{
  position:absolute; top:0; right:0; padding:3px 5px; line-height:1; border-radius:0 9px 0 7px;
  font-size:9.5px; font-weight:900; color:#B3261E; background:linear-gradient(180deg,#F5D76E,#E8C978);
}
.pop-card b{
  font-size:12.5px; font-weight:700; line-height:1.35; margin-top:6px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; min-height:2.7em;
}
.pop-rate{ display:flex; align-items:center; gap:3px; font-size:10.5px; color:var(--muted); }
.pop-rate svg{ width:10px; height:10px; color:#C99F0F; flex:none; }
.pop-rate i{ font-style:normal; color:#C7CADC; }
.pop-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:4px; }
.pop-price{ font-size:13.5px; font-weight:800; color:var(--price); font-variant-numeric:tabular-nums; }
.pop-add{ width:26px; height:26px; border-radius:8px; border:1px solid var(--line); background:var(--tint); color:var(--brand-700); display:grid; place-items:center; }
.pop-add svg{ width:14px; height:14px; }
.pop-add:hover{ background:var(--brand-800); color:#fff; border-color:var(--brand-800); }

/* ---------------- Catalog ---------------- */
.section-catalog{ padding-top:26px; }
.catalog-bar{
  position:sticky; top:70px; z-index:40; display:flex; align-items:center; gap:10px;
  padding:8px 0 10px; background:var(--bg); margin-bottom:6px;
}
.chips{ display:flex; gap:7px; overflow-x:auto; scrollbar-width:none; flex:1; padding:2px 0; }
.chips::-webkit-scrollbar{ display:none; }
.chip{
  flex:none; border:1px solid var(--line); background:var(--card); color:var(--ink-2);
  border-radius:999px; padding:8px 15px; font-size:12.5px; font-weight:600; transition:.16s;
}
.chip:hover{ border-color:#CFD3E4; }
.chip.active{ background:var(--brand-800); border-color:var(--brand-800); color:#fff; }
.chip-promo{ color:var(--gold-600); border-color:#EFE2B8; background:var(--gold-050); }
.chip-promo.active{ background:var(--brand-800); border-color:var(--brand-800); color:#fff; }
.scan-inline{ display:none; }

.product-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.product{
  position:relative; background:var(--card); border:1px solid var(--line); border-radius:12px;
  overflow:hidden; display:flex; flex-direction:column; cursor:pointer;
  transition:transform .18s ease, box-shadow .22s ease, border-color .18s;
}
.product:hover{ transform:translateY(-2px); box-shadow:0 12px 26px -18px rgba(10,15,60,.45); border-color:#D8DBEA; }
.p-media{
  position:relative; aspect-ratio:1/1; display:grid; place-items:center; font-size:46px;
  background:linear-gradient(160deg,#FBFAF6,#F3F1E7); border-bottom:1px solid var(--line-2);
}
.p-emoji{ filter:drop-shadow(0 8px 12px rgba(10,15,60,.12)); transition:transform .25s; }
.product:hover .p-emoji{ transform:scale(1.06) rotate(-2deg); }

/* corner discount tab, marketplace style */
.p-disc{
  position:absolute; top:0; right:0; z-index:2; padding:4px 6px 3px; line-height:1;
  font-size:10.5px; font-weight:900; letter-spacing:-.02em; color:#B3261E;
  background:linear-gradient(180deg,#F5D76E,#E8C978); border-radius:0 11px 0 8px;
}
.p-tag{
  position:absolute; top:8px; left:8px; z-index:2; font-size:9px; font-weight:800; letter-spacing:.04em;
  padding:3px 7px; border-radius:999px; background:rgba(255,255,255,.95); color:var(--brand-700);
  border:1px solid var(--line); text-transform:uppercase;
}
.p-tag.promo{ background:var(--brand-800); color:#fff; border-color:var(--brand-800); }
.p-tag.gold{ background:var(--gold-050); color:#A57D0C; border-color:#EFE2B8; }

.p-body{ padding:10px 11px 11px; display:flex; flex-direction:column; flex:1; }
.p-name{
  font-size:12.5px; font-weight:600; line-height:1.4; letter-spacing:0; color:var(--ink-2);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.8em;
}
.p-price-row{ display:flex; align-items:baseline; gap:5px; margin-top:7px; flex-wrap:wrap; }
.p-price{ font-size:15px; font-weight:800; letter-spacing:-.03em; color:var(--price); font-variant-numeric:tabular-nums; }
.p-old{ font-size:10.5px; color:#A7ABC0; text-decoration:line-through; font-variant-numeric:tabular-nums; }
.p-meta{ display:flex; align-items:center; gap:4px; margin-top:4px; font-size:10.5px; color:var(--muted); }
.p-rate{ display:inline-flex; align-items:center; gap:2px; color:#A57D0C; font-weight:800; }
.p-rate svg{ width:11px; height:11px; }
.p-dot{ color:#C7CADC; }
.p-foot{ display:flex; align-items:center; justify-content:space-between; gap:6px; margin-top:auto; padding-top:8px; }
.p-grosir{ font-size:10px; font-weight:800; color:var(--gold-600); letter-spacing:-.01em; }
.p-acts{ display:flex; gap:5px; flex:none; }
.p-ask,.p-add{
  width:28px; height:28px; border-radius:8px; display:grid; place-items:center; transition:.16s;
  border:1px solid var(--line); background:var(--tint); color:var(--brand-700);
}
.p-ask svg,.p-add svg{ width:14px; height:14px; }
.p-ask{ background:#fff; color:var(--muted); }
.p-ask:hover{ background:var(--wa-050); border-color:#C7CBEA; color:var(--wa); }
.p-add{ background:var(--brand-800); border-color:var(--brand-800); color:#fff; }
.p-add:hover{ background:var(--brand-600); border-color:var(--brand-600); }

.catalog-foot{ display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:22px; flex-wrap:wrap; }
.catalog-foot p{ font-size:12px; }

/* ---------------- Store info ---------------- */
.section-store{ padding-bottom:44px; }
.store-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.store-card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg); padding:22px;
}
.store-card h3{ font-size:16px; margin-bottom:8px; }
.store-card p{ font-size:13px; color:var(--muted); line-height:1.65; margin-bottom:14px; }
.store-meta{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--ink-2); margin-top:8px; }
.store-meta svg{ width:16px; height:16px; color:var(--brand-600); flex:none; }
.store-card.accent{ background:linear-gradient(140deg,#0A0F45,#131B73); color:#fff; border-color:transparent; }
.store-card.accent h3{ color:#fff; }
.store-card.accent p{ color:#B9BFDA; }
.store-card.accent .btn-wa{ background:var(--wa-bright); color:#0A0F45; font-weight:800; }
.store-card.accent .btn-wa:hover{ background:#3BE07C; }

/* ---------------- Footer ---------------- */
.footer{ background:var(--brand-900); color:#D6D9E8; padding-top:40px; }
.footer-grid{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1.2fr; gap:28px; padding-bottom:30px; }
.footer .brand-mark{ background:#fff; border-color:rgba(255,255,255,.16); box-shadow:none; }
.footer .brand-text{ color:#fff; }
.footer-brand p{ font-size:13px; color:#A9ADC4; margin-top:14px; max-width:36ch; line-height:1.7; }
.socials{ display:flex; gap:8px; margin-top:16px; }
.socials a{
  width:34px; height:34px; border-radius:10px; display:grid; place-items:center;
  background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1);
  font-size:11px; font-weight:800; color:#D6D9E8; transition:.16s;
}
.socials a:hover{ background:rgba(255,255,255,.14); color:#fff; }
.footer-col h4{ font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:#9A9EB6; margin-bottom:12px; }
.footer-col a{ display:block; font-size:13px; color:#CED2E2; padding:4px 0; transition:.14s; }
.footer-col a:hover{ color:#fff; }
.footer-contact p{ font-size:12.5px; color:#A9ADC4; line-height:1.7; margin-bottom:6px; }
.pay-logos{ display:flex; gap:6px; margin-top:12px; flex-wrap:wrap; }
.pay-logos span{
  font-size:9px; font-weight:800; letter-spacing:.06em; padding:4px 7px; border-radius:5px;
  background:rgba(255,255,255,.09); border:1px solid rgba(255,255,255,.12); color:#D6D9E8;
}
.footer-bottom{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  border-top:1px solid rgba(255,255,255,.08); padding:16px 0 20px; font-size:11.5px; color:#878CA6;
}

/* ---------------- Cart drawer ---------------- */
.scrim{
  position:fixed; inset:0; z-index:90; background:rgba(8,12,52,.44);
  opacity:0; pointer-events:none; transition:opacity .26s; backdrop-filter:blur(2px);
}
.scrim.on{ opacity:1; pointer-events:auto; }
.cart{
  position:fixed; top:0; right:0; bottom:0; z-index:100; width:min(420px,100%);
  background:var(--card); display:flex; flex-direction:column;
  transform:translateX(102%); transition:transform .32s cubic-bezier(.4,0,.2,1);
  box-shadow:-30px 0 60px -30px rgba(8,12,52,.4);
}
.cart.on{ transform:none; }
.cart-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 18px; border-bottom:1px solid var(--line); }
.cart-head h3{ font-size:17px; }
.cart-head small{ font-size:11px; color:var(--muted); font-weight:600; }
.cart-body{ flex:1; overflow-y:auto; padding:14px 18px; display:flex; flex-direction:column; gap:12px; }
.cart-empty{ margin:auto; text-align:center; padding:26px 10px; }
.cart-empty span{ font-size:38px; display:block; margin-bottom:10px; }
.cart-empty b{ font-size:14px; display:block; }
.cart-empty p{ font-size:12.5px; color:var(--muted); margin:6px 0 14px; }

.c-item{ display:flex; gap:11px; padding-bottom:12px; border-bottom:1px solid var(--line-2); }
.c-item:last-child{ border-bottom:0; padding-bottom:0; }
.c-thumb{ width:54px; height:54px; border-radius:11px; display:grid; place-items:center; font-size:23px; background:var(--tint); border:1px solid var(--line-2); flex:none; }
.c-main{ flex:1; min-width:0; }
.c-main b{ font-size:12.5px; font-weight:700; display:block; line-height:1.35; }
.c-main small{ font-size:11px; color:var(--muted); }
.c-line{ display:flex; align-items:center; justify-content:space-between; margin-top:7px; gap:8px; }
.qty{ display:flex; align-items:center; gap:1px; border:1px solid var(--line); border-radius:999px; padding:2px; }
.qty button{ width:24px; height:24px; border-radius:50%; border:0; background:transparent; color:var(--ink-2); display:grid; place-items:center; }
.qty button:hover{ background:var(--tint); }
.qty svg{ width:13px; height:13px; }
.qty span{ min-width:22px; text-align:center; font-size:12px; font-weight:800; font-variant-numeric:tabular-nums; }
.c-price{ font-size:12.5px; font-weight:800; color:var(--brand-800); font-variant-numeric:tabular-nums; }

.cart-foot{ border-top:1px solid var(--line); padding:14px 18px 18px; background:var(--card); }
.sum-row{ display:flex; align-items:center; justify-content:space-between; font-size:12.5px; padding:3px 0; color:var(--muted); }
.sum-row b{ color:var(--ink); font-weight:700; font-variant-numeric:tabular-nums; }
.sum-row.total{ margin-top:6px; padding-top:10px; border-top:1px dashed var(--line); font-size:14px; color:var(--ink); font-weight:700; }
.sum-row.total b{ font-size:19px; letter-spacing:-.03em; }
.cart-foot .btn{ margin-top:12px; }
.cart-note{ font-size:10.5px; color:var(--muted); text-align:center; margin-top:8px; }

/* ---------------- Product detail ---------------- */
.detail{ padding:16px 0 44px; }
.detail-crumb{ display:flex; align-items:center; gap:9px; font-size:12.5px; color:var(--muted); margin-bottom:16px; }
.detail-crumb .back-link{ margin:0; }
.crumb-sep{ color:#CDD1E0; }
.crumb-now{ color:var(--ink-2); font-weight:700; }

.detail-grid{ display:grid; grid-template-columns:minmax(0,430px) minmax(0,1fr); gap:28px; align-items:start; }

.detail-media{
  position:sticky; top:92px; aspect-ratio:1/1; border-radius:16px; overflow:hidden;
  background:linear-gradient(160deg,#FBFAF6,#F0EEE4); border:1px solid var(--line);
  display:grid; place-items:center;
}
.dm-emoji{
  font-size:118px; line-height:1; filter:drop-shadow(0 14px 22px rgba(10,15,60,.14)); position:relative;
}
.detail-media::before{
  content:''; position:absolute; width:62%; aspect-ratio:1; border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.95),rgba(255,255,255,0) 68%);
}
.dm-badges{ position:absolute; top:0; right:0; display:flex; align-items:flex-start; z-index:2; }
.dm-badges .p-disc{ position:static; font-size:12px; padding:6px 9px; border-radius:0 15px 0 10px; }
.dm-badges .p-tag{ position:static; margin:10px 0 0 10px; }
.dm-note{
  position:absolute; bottom:12px; left:12px; right:12px; display:flex; align-items:center; gap:6px;
  font-size:11px; font-weight:600; color:var(--brand-700); background:rgba(255,255,255,.9);
  border:1px solid var(--line); border-radius:9px; padding:7px 10px; backdrop-filter:blur(6px);
}
.dm-note svg{ width:14px; height:14px; flex:none; }

.d-cat{ font-size:10px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; color:var(--muted-2); }
.d-title{ font-size:clamp(20px,2.3vw,27px); line-height:1.25; letter-spacing:-.03em; margin-top:7px; }
.d-stats{ display:flex; align-items:center; gap:9px; margin-top:11px; font-size:12px; color:var(--muted); flex-wrap:wrap; }
.d-rate{ display:inline-flex; align-items:center; gap:3px; color:#A57D0C; font-weight:800; }
.d-rate svg{ width:13px; height:13px; }
.d-rate small{ font-weight:600; color:var(--muted); }
.d-div{ width:1px; height:11px; background:#D6E1DA; }

.d-price-box{
  margin-top:15px; padding:14px 16px; border-radius:13px;
  background:var(--price-tint); border:1px solid #F7E7C2;
}
.d-price-main{ display:flex; align-items:baseline; gap:9px; flex-wrap:wrap; }
.d-price-main b{ font-size:29px; font-weight:900; letter-spacing:-.045em; color:var(--price); font-variant-numeric:tabular-nums; }
.d-price-main s{ font-size:13px; color:#A7ABC0; font-variant-numeric:tabular-nums; }
.d-off{ font-size:11px; font-weight:900; color:#B3261E; background:#F5D76E; padding:2px 7px; border-radius:6px; }
.d-price-sub{ display:flex; align-items:center; gap:12px; font-size:11.5px; color:var(--muted); margin-top:5px; }
.d-save{ color:#B3261E; font-weight:800; }

.d-tiers{ display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:14px; }
.d-tier{
  display:flex; flex-direction:column; gap:2px; text-align:left; padding:11px 13px;
  border:1.5px solid var(--line); border-radius:11px; background:var(--card); transition:.16s;
}
.d-tier span{ font-size:10px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--muted-2); }
.d-tier b{ font-size:14.5px; color:var(--ink); letter-spacing:-.02em; }
.d-tier small{ font-size:10px; color:var(--muted); }
.d-tier:hover{ border-color:#CFD3E4; }
.d-tier.on{ border-color:var(--brand-600); background:var(--brand-050); }
.d-tier.on span{ color:var(--brand-700); }
.d-tier.on b{ color:var(--brand-800); }

.d-qty{ margin-top:16px; }
.d-qty-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; font-size:12px; font-weight:800; }
.d-qty-head small{ font-weight:600; color:var(--muted); font-size:11px; }
.qty-lg{ display:inline-flex; }
.qty-lg button{ width:32px; height:32px; }
.qty-lg svg{ width:15px; height:15px; }
.qty-lg span{ min-width:34px; font-size:14px; }

.d-actions{ display:grid; grid-template-columns:1fr 1fr 1.25fr; gap:9px; margin-top:18px; }
.d-actions .btn{ width:100%; }
.d-actions .btn-wa{ background:var(--wa); color:#fff; }
.d-actions .btn-wa:hover{ background:#0E7466; }

.d-barcode{
  display:flex; align-items:center; gap:6px; margin-top:13px; font-size:11px; color:var(--muted-2);
}
.d-barcode svg{ width:14px; height:14px; }

.detail-extra{ display:grid; grid-template-columns:1.55fr 1fr; gap:16px; margin-top:28px; align-items:start; }
.detail-desc h3, .detail-seller h3{ font-size:15px; margin-bottom:9px; }
.detail-desc p{ font-size:13.5px; color:var(--ink-2); line-height:1.75; }
.d-specs{ list-style:none; padding:0; margin:16px 0 0; display:grid; grid-template-columns:1fr 1fr; gap:0 22px; }
.d-specs li{
  display:flex; justify-content:space-between; gap:12px; font-size:12px;
  padding:7px 0; border-bottom:1px dashed var(--line);
}
.d-specs span{ color:var(--muted); }
.d-specs b{ font-weight:700; text-align:right; }

.seller-head{ display:flex; align-items:center; gap:10px; }
.seller-ava{ width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:var(--brand-050); color:var(--brand-700); flex:none; }
.seller-ava svg{ width:20px; height:20px; }
.seller-id{ flex:1; display:flex; flex-direction:column; line-height:1.3; }
.seller-id b{ font-size:14px; }
.seller-id small{ font-size:11px; color:var(--muted); }
.seller-badge{ font-size:9px; font-weight:800; letter-spacing:.04em; padding:3px 8px; border-radius:999px; background:var(--brand-800); color:#fff; text-transform:uppercase; }
.seller-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:14px 0; text-align:center; }
.seller-stats div{ background:var(--tint); border-radius:10px; padding:9px 4px; }
.seller-stats b{ display:block; font-size:13px; letter-spacing:-.02em; }
.seller-stats small{ font-size:9.5px; color:var(--muted); }

/* sticky buy bar (mobile only) */
.detail-bar{ display:none; }

/* ---------------- Checkout ---------------- *//* ---------------- Checkout ---------------- */
.checkout{ padding:20px 0 50px; }
.back-link{
  display:inline-flex; align-items:center; gap:6px; border:0; background:transparent;
  font-size:12.5px; font-weight:700; color:var(--muted); padding:6px 0; margin-bottom:8px;
}
.back-link svg{ width:16px; height:16px; }
.back-link:hover{ color:var(--ink); }
.ck-head{ margin-bottom:18px; }
.ck-head h1{ font-size:clamp(22px,2.6vw,30px); letter-spacing:-.035em; }
.ck-head p{ font-size:13px; color:var(--muted); margin-top:4px; }

.ck-grid{ display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:16px; align-items:start; }
.ck-main{ display:flex; flex-direction:column; gap:14px; min-width:0; }
.card{ background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg); padding:18px; min-width:0; }
.card-head{ display:flex; align-items:flex-start; gap:10px; margin-bottom:14px; }
.card-head h2{ font-size:14.5px; }
.card-head p{ font-size:11.5px; color:var(--muted); margin-top:2px; }
.step-num{
  width:24px; height:24px; border-radius:8px; flex:none; display:grid; place-items:center;
  background:var(--brand-050); color:var(--brand-700); font-size:11.5px; font-weight:800;
}

.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.field{ display:flex; flex-direction:column; gap:5px; }
.field.span-2{ grid-column:span 2; }
.field > span{ font-size:11px; font-weight:700; color:var(--muted); }
.field input{
  height:42px; border-radius:10px; border:1px solid var(--line); background:var(--card);
  padding:0 12px; font-family:inherit; font-size:13px; color:var(--ink); outline:0; width:100%;
}
.field input:focus{ border-color:#C4C8DE; box-shadow:0 0 0 3px rgba(31,44,161,.08); }
.field input::placeholder{ color:#A9ADC2; }

.opt-list{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.opt{ position:relative; cursor:pointer; }
.opt input{ position:absolute; opacity:0; pointer-events:none; }
.opt-body{
  display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:12px;
  border:1px solid var(--line); background:var(--card); transition:.16s;
}
.opt input:checked + .opt-body{ border-color:var(--brand-600); background:var(--brand-050); box-shadow:0 0 0 3px rgba(31,44,161,.07); }
.opt-ico{ width:34px; height:34px; border-radius:9px; background:var(--tint); display:grid; place-items:center; flex:none; color:var(--brand-700); }
.opt-ico svg{ width:17px; height:17px; }
.opt-text b{ display:block; font-size:12.5px; }
.opt-text small{ font-size:10.5px; color:var(--muted); }
.opt-price{ margin-left:auto; font-size:11.5px; font-weight:800; color:var(--brand-700); white-space:nowrap; }
#addressField{ margin-top:12px; }

.pay-list{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:14px; }
.pay-opt{
  display:flex; align-items:center; gap:9px; padding:12px; border-radius:12px; text-align:left;
  border:1px solid var(--line); background:var(--card); transition:.16s; position:relative;
}
.pay-opt:hover{ border-color:#CFD3E4; }
.pay-opt.active{ border-color:var(--brand-600); background:var(--brand-050); box-shadow:0 0 0 3px rgba(31,44,161,.07); }
.pay-ico{ width:34px; height:34px; border-radius:9px; display:grid; place-items:center; flex:none; }
.pay-ico svg{ width:18px; height:18px; }
.pay-ico.qris{ background:#FDECEA; color:#C0392B; }
.pay-ico.debit{ background:#EDEFFB; color:#1F2CA1; }
.pay-ico.cash{ background:var(--gold-050); color:var(--gold-600); }
.pay-text b{ display:block; font-size:12px; }
.pay-text small{ font-size:10px; color:var(--muted); }
.pay-check{
  position:absolute; top:8px; right:8px; width:16px; height:16px; border-radius:50%;
  background:var(--brand-600); color:#fff; display:none; place-items:center;
}
.pay-check svg{ width:10px; height:10px; }
.pay-opt.active .pay-check{ display:grid; }

.pay-panel{ border-top:1px dashed var(--line); padding-top:14px; }
.pay-panel h4{ font-size:12.5px; margin-bottom:10px; }
.pay-panel p{ font-size:11.5px; color:var(--muted); line-height:1.6; }

/* QRIS panel */
.qr-wrap{ display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
.qr-card{
  width:196px; padding:12px; background:#fff; border:1px solid var(--line); border-radius:14px;
  box-shadow:var(--sh); text-align:center; flex:none;
}
.qr-brand{ display:flex; align-items:center; justify-content:center; gap:5px; font-size:11px; font-weight:800; color:#C0392B; letter-spacing:.06em; margin-bottom:8px; }
.qb-mark{ display:inline-flex; gap:2px; }
.qb-mark i{ width:4px; height:11px; border-radius:1px; background:#C0392B; }
.qb-mark i:last-child{ background:transparent; border:1px solid #C0392B; }
.qr-pattern{ width:168px; height:168px; margin:0 auto; background:#fff; }
.qr-pattern svg{ width:100%; height:100%; }
.qr-merchant{ font-size:9.5px; color:var(--muted); margin-top:8px; line-height:1.4; }
.qr-info{ flex:1; min-width:180px; }
.qr-amount{ font-size:22px; font-weight:800; letter-spacing:-.03em; margin-bottom:4px; }
.qr-timer{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:700; color:var(--red); background:var(--red-050); padding:4px 10px; border-radius:999px; margin-bottom:10px; }
.qr-timer svg{ width:13px; height:13px; }
.qr-steps{ font-size:11.5px; color:var(--muted); line-height:1.8; }
.qr-demo{ font-size:10.5px; color:var(--muted-2); margin-top:8px; }

/* card panel */
.card-form{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.card-form .span-2{ grid-column:span 2; }
.card-preview{
  grid-column:span 2; border-radius:14px; padding:16px; color:#fff; position:relative; overflow:hidden;
  background:linear-gradient(120deg,#0A0F45,#182391 65%,#182391);
}
.card-preview::after{
  content:""; position:absolute; right:-40px; top:-50px; width:160px; height:160px; border-radius:50%;
  background:radial-gradient(circle,rgba(37,211,102,.25),transparent 65%);
}
.cp-chip{ width:30px; height:22px; border-radius:5px; background:linear-gradient(135deg,#E8C978,#C99F0F); margin-bottom:14px; }
.cp-num{ font-size:14.5px; letter-spacing:.14em; font-family:ui-monospace,monospace; }
.cp-row{ display:flex; justify-content:space-between; margin-top:10px; font-size:10px; color:#C3C9E0; letter-spacing:.06em; text-transform:uppercase; }
.cp-row b{ color:#fff; font-size:11px; letter-spacing:.02em; }

/* cash panel */
.cash-box{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.cash-input{ flex:1; min-width:180px; }
.cash-quick{ display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.cash-quick button{
  border:1px solid var(--line); background:var(--card); border-radius:999px; padding:6px 12px;
  font-size:11px; font-weight:700; color:var(--ink-2);
}
.cash-quick button:hover{ border-color:var(--brand-600); color:var(--brand-700); }
.change-box{ margin-top:12px; padding:12px 14px; border-radius:12px; background:var(--brand-050); display:flex; justify-content:space-between; align-items:center; }
.change-box span{ font-size:12px; color:#2B3363; font-weight:600; }
.change-box b{ font-size:17px; color:var(--brand-800); letter-spacing:-.02em; }
.change-box.neg{ background:var(--red-050); }
.change-box.neg span, .change-box.neg b{ color:#A93226; }

/* WA card */
.wa-card{
  display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:var(--r-lg);
  background:var(--wa-050); border:1px solid #D5D9EC; transition:.16s;
}
.wa-card:hover{ border-color:#A9DCC6; background:#DFF3EA; }
.wa-ico{ width:38px; height:38px; border-radius:11px; background:var(--wa); color:#fff; display:grid; place-items:center; flex:none; }
.wa-ico svg{ width:20px; height:20px; }
.wa-text b{ display:block; font-size:13px; color:#131B73; }
.wa-text small{ font-size:11.5px; color:#4A5290; }
.wa-arrow{ width:16px; height:16px; margin-left:auto; color:#4A5290; flex:none; }

/* summary */
.ck-side{ position:sticky; top:86px; min-width:0; }
.summary{ padding:18px; }
.sum-items{ display:flex; flex-direction:column; gap:10px; max-height:240px; overflow-y:auto; margin-bottom:14px; }
.si{ display:flex; gap:9px; align-items:center; }
.si-thumb{ width:38px; height:38px; border-radius:9px; display:grid; place-items:center; font-size:17px; background:var(--tint); border:1px solid var(--line-2); flex:none; }
.si-info{ flex:1; min-width:0; }
.si-info b{ display:block; font-size:11.5px; font-weight:700; line-height:1.3; }
.si-info small{ font-size:10.5px; color:var(--muted); }
.si-price{ font-size:11.5px; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
.sum-rows{ border-top:1px dashed var(--line); padding-top:10px; display:flex; flex-direction:column; gap:5px; }
.sum-rows .row{ display:flex; justify-content:space-between; font-size:12px; color:var(--muted); gap:10px; }
.sum-rows .row b{ color:var(--ink-2); font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; }
.sum-total{ display:flex; align-items:baseline; justify-content:space-between; margin-top:10px; padding-top:10px; border-top:1px solid var(--line); }
.sum-total span{ font-size:13px; font-weight:700; }
.sum-total b{ font-size:22px; letter-spacing:-.04em; color:var(--brand-800); }
.sum-note{ font-size:10.5px; color:var(--muted); margin:4px 0 12px; }
.summary .btn{ margin-bottom:8px; }

.sum-edit{
  border:1px solid var(--line); background:var(--card); color:var(--brand-700);
  font-size:11px; font-weight:800; padding:5px 11px; border-radius:999px; transition:.16s; flex:none;
}
.sum-edit:hover{ background:var(--tint); border-color:#CFD3E4; }

.sum-cta{ display:flex; flex-direction:column; gap:8px; }
.ck-bar{ display:none; }

/* primary action: send the whole order to the admin on WhatsApp */
.wa-checkout{
  display:flex; align-items:center; gap:11px; padding:11px 13px; border-radius:13px;
  background:linear-gradient(135deg,#1FAF54,#128C7E); color:#fff; text-decoration:none;
  box-shadow:0 10px 22px -14px rgba(18,140,126,.85); transition:.18s;
}
.wa-checkout:hover{ transform:translateY(-1px); box-shadow:0 14px 26px -14px rgba(18,140,126,.95); }
.wc-ico{
  width:38px; height:38px; border-radius:11px; flex:none; display:grid; place-items:center;
  background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.25);
}
.wc-ico svg{ width:21px; height:21px; }
.wc-text{ flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.25; }
.wc-text b{ font-size:13.5px; font-weight:800; letter-spacing:-.01em; }
.wc-text small{ font-size:10.5px; color:rgba(255,255,255,.82); }
.wc-arrow{ width:16px; height:16px; opacity:.75; flex:none; }

/* preview of the message the admin receives */
.wa-preview{ margin-top:10px; border:1px solid var(--line); border-radius:11px; background:#FBFAF6; }
.wa-preview summary{
  cursor:pointer; list-style:none; padding:9px 12px; font-size:11px; font-weight:800;
  color:var(--brand-700); display:flex; align-items:center; gap:6px;
}
.wa-preview summary::-webkit-details-marker{ display:none; }
.wa-preview summary::before{ content:'+'; font-size:13px; line-height:1; }
.wa-preview[open] summary::before{ content:'–'; }
.wa-preview pre{
  margin:0; padding:0 12px 12px; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:10.5px; line-height:1.55; color:var(--ink-2); white-space:pre-wrap; word-break:break-word;
}
.sum-perks{ display:flex; gap:12px; margin-top:6px; flex-wrap:wrap; }
.sum-perks li{ display:flex; align-items:center; gap:4px; font-size:10.5px; color:var(--muted); }
.sum-perks svg{ width:13px; height:13px; color:var(--brand-600); }

/* ---------------- Success ---------------- */
.success{ padding:40px 0 60px; }
.success-card{
  max-width:520px; margin:0 auto; background:var(--card); border:1px solid var(--line);
  border-radius:var(--r-xl); padding:32px 24px; text-align:center; box-shadow:var(--sh);
}
.success-ico{
  width:64px; height:64px; border-radius:50%; margin:0 auto 16px; display:grid; place-items:center;
  background:var(--brand-050); color:var(--brand-600); border:1px solid #D4D8EA;
}
.success-ico svg{ width:30px; height:30px; }
.success-card h2{ font-size:22px; letter-spacing:-.03em; }
.success-card > p{ font-size:13px; color:var(--muted); margin-top:6px; }
.success-box{
  display:grid; grid-template-columns:1fr 1fr; gap:12px; text-align:left;
  background:var(--tint); border-radius:14px; padding:16px; margin:20px 0;
}
.success-box span{ display:block; font-size:10.5px; color:var(--muted); }
.success-box b{ font-size:13px; letter-spacing:-.01em; }
.success-box b.ok{ color:var(--brand-600); }
.success-actions{ display:flex; flex-direction:column; gap:8px; }
.success-note{ font-size:10.5px; color:var(--muted); margin-top:12px; }

/* ---------------- Scanner ---------------- */
.scanner{
  position:fixed; inset:0; z-index:120; display:grid; place-items:center; padding:16px;
  background:rgba(8,12,52,.62); backdrop-filter:blur(3px); opacity:0; pointer-events:none; transition:.24s;
}
.scanner.on{ opacity:1; pointer-events:auto; }
.scanner-card{
  width:min(420px,100%); background:var(--card); border-radius:20px; overflow:hidden;
  box-shadow:var(--sh-lg); transform:translateY(10px) scale(.98); transition:.24s;
}
.scanner.on .scanner-card{ transform:none; }
.scanner-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:16px 18px 12px; }
.scanner-head h3{ font-size:15px; }
.scanner-head small{ font-size:11px; color:var(--muted); }

.scan-stage{
  position:relative; margin:0 18px; border-radius:14px; overflow:hidden; background:#0B1030;
  aspect-ratio:4/3; display:grid; place-items:center;
}
.scan-stage video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.scan-frame{
  position:relative; width:66%; aspect-ratio:16/9; border-radius:10px;
  box-shadow:0 0 0 2000px rgba(8,12,52,.42);
}
.scan-frame::before, .scan-frame::after{
  content:""; position:absolute; width:26px; height:26px; border:3px solid #E8C978; border-radius:4px;
}
.scan-frame::before{ top:-2px; left:-2px; border-right:0; border-bottom:0; }
.scan-frame::after{ bottom:-2px; right:-2px; border-left:0; border-top:0; }
.scan-line{
  position:absolute; left:6%; right:6%; top:10%; height:2px; border-radius:2px;
  background:linear-gradient(90deg,transparent,#E8C978,transparent);
  box-shadow:0 0 12px rgba(201,159,15,.8);
  animation:scanmove 2.2s ease-in-out infinite;
}
@keyframes scanmove{ 0%,100%{ top:12%; } 50%{ top:86%; } }
.scan-status{
  position:absolute; left:0; right:0; bottom:0; padding:8px 12px; font-size:11px; text-align:center;
  color:#D8DBEA; background:linear-gradient(180deg,transparent,rgba(8,12,52,.8));
}

.scan-manual{ padding:14px 18px 18px; }
.scan-input{ display:flex; gap:8px; margin-top:6px; }
.scan-input input{
  flex:1; min-width:0; height:42px; border-radius:10px; border:1px solid var(--line); padding:0 12px;
  font-family:inherit; font-size:13px; outline:0;
}
.scan-input input:focus{ border-color:#C4C8DE; box-shadow:0 0 0 3px rgba(31,44,161,.08); }
.scan-hint{ font-size:11px; color:var(--muted); margin:12px 0 8px; }
.scan-demo{ display:flex; gap:6px; flex-wrap:wrap; }
.scan-demo button{
  border:1px solid var(--line); background:var(--tint); border-radius:999px; padding:6px 11px;
  font-size:11px; font-weight:700; color:var(--ink-2);
}
.scan-demo button:hover{ border-color:var(--brand-600); color:var(--brand-700); background:var(--brand-050); }

/* ---------------- Mobile bar ---------------- */
.mobile-bar{
  position:fixed; left:0; right:0; bottom:0; z-index:70;
  display:none; align-items:center; gap:12px; padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.97); backdrop-filter:blur(12px); border-top:1px solid var(--line);
}
.mb-info{ flex:1; min-width:0; }
.mb-info small{ display:block; font-size:10.5px; color:var(--muted); }
.mb-info b{ font-size:16px; letter-spacing:-.03em; }
.mobile-bar .btn{ height:44px; padding:0 18px; }

/* ---------------- Toast ---------------- */
.toast{
  position:fixed; left:50%; bottom:28px; transform:translate(-50%,16px); z-index:130;
  background:var(--brand-900); color:#fff; font-size:12.5px; font-weight:600;
  padding:11px 18px; border-radius:999px; box-shadow:var(--sh-lg);
  opacity:0; pointer-events:none; transition:.26s; max-width:calc(100% - 32px); text-align:center;
}
.toast.on{ opacity:1; transform:translate(-50%,0); }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* ---------- Tablet ---------- */
@media (max-width:1080px){
  .nav{ gap:16px; }
  .search-mini{ width:200px; }
  .product-grid{ grid-template-columns:repeat(3,1fr); }
  .ck-grid{ grid-template-columns:minmax(0,1fr) 330px; }
  .detail-grid{ grid-template-columns:minmax(0,340px) minmax(0,1fr); gap:22px; }
  .dm-emoji{ font-size:96px; }
  .footer-grid{ grid-template-columns:1.4fr 1fr 1fr; row-gap:26px; }
  .footer-contact{ grid-column:span 3; }
}

@media (max-width:900px){
  .nav{ display:none; }
  .burger{ display:grid; }

  /* search moves to its own row under the brand — header is exactly 100px tall */
  .topbar-inner{ flex-wrap:wrap; height:auto; padding:8px 0; row-gap:8px; }
  .brand{ order:1; height:38px; }
  .brand-mark{ width:38px; height:38px; }
  .top-actions{ order:2; flex:1 1 100%; margin-left:0; height:38px; }
  .icon-btn{ width:38px; height:38px; }
  .search-mini{ display:flex; flex:1 1 auto; width:auto; min-width:0; height:38px; }
  .catalog-bar{ top:100px; }
  #populer,#katalog,#promo{ scroll-margin-top:110px; }
  .nav.open{
    display:flex; flex-direction:column; align-items:stretch; gap:2px;
    position:absolute; top:100%; left:12px; right:12px; margin:0;
    background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg);
    padding:10px; box-shadow:var(--sh-lg);
  }
  .nav.open a{ padding:11px 14px; border-radius:9px; font-size:14.5px; }
  .nav.open a:hover{ background:var(--tint); }
  .nav.open a::after{ display:none; }

  .detail-grid{ grid-template-columns:1fr; gap:18px; }
  .detail-media{ position:relative; top:auto; aspect-ratio:1.35/1; }
  .dm-emoji{ font-size:96px; }
  .detail-extra{ grid-template-columns:1fr; }
  .d-actions{ display:none; }
  .detail-bar{
    display:flex; align-items:center; gap:8px; position:fixed; left:0; right:0; bottom:0; z-index:90;
    padding:9px 12px calc(9px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.97); border-top:1px solid var(--line);
    backdrop-filter:blur(12px); box-shadow:0 -8px 24px -20px rgba(10,15,60,.5);
  }
  .db-price{ display:flex; flex-direction:column; line-height:1.15; margin-right:auto; }
  .db-price small{ font-size:9.5px; color:var(--muted); font-weight:600; }
  .db-price b{ font-size:15.5px; font-weight:900; color:var(--price); letter-spacing:-.03em; }
  .db-ask{
    width:40px; height:40px; border-radius:10px; flex:none; display:grid; place-items:center;
    background:var(--wa); color:#fff;
  }
  .db-ask svg{ width:19px; height:19px; }
  .db-cart{
    height:40px; padding:0 13px; border-radius:10px; border:1px solid var(--line);
    background:var(--card); font-size:12px; font-weight:700; color:var(--ink);
  }
  .db-buy{
    height:40px; padding:0 17px; border-radius:10px; border:0;
    background:var(--brand-800); color:#fff; font-size:12.5px; font-weight:800;
  }
  .detail{ padding-bottom:84px; }

  .ck-bar{
    display:flex; align-items:center; gap:10px; position:fixed; left:0; right:0; bottom:0; z-index:90;
    padding:9px 12px calc(9px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.97); border-top:1px solid var(--line);
    backdrop-filter:blur(12px); box-shadow:0 -8px 24px -20px rgba(10,15,60,.5);
  }
  .cb-total{ display:flex; flex-direction:column; line-height:1.15; flex:none; }
  .cb-total small{ font-size:9.5px; color:var(--muted); font-weight:600; }
  .cb-total b{ font-size:15.5px; font-weight:900; color:var(--brand-800); letter-spacing:-.03em; }
  .cb-wa{
    flex:1; height:42px; border-radius:11px; display:flex; align-items:center; justify-content:center; gap:7px;
    background:linear-gradient(135deg,#1FAF54,#128C7E); color:#fff; font-size:12.5px; font-weight:800;
    text-decoration:none; box-shadow:0 8px 18px -12px rgba(18,140,126,.9);
  }
  .cb-wa svg{ width:17px; height:17px; }
  .checkout{ padding-bottom:96px; }

  .hero-card{ grid-template-columns:1fr; gap:18px; }
  .hero-side{ grid-template-columns:repeat(3,1fr); gap:8px; }
  .hero-stat{ flex-direction:column; align-items:flex-start; gap:2px; padding:9px 12px; }
  .hero-stat b{ font-size:15px; }
  .ck-grid{ grid-template-columns:1fr; }
  .ck-side{ position:static; }
  .store-grid{ grid-template-columns:1fr; }
}

/* ---------- Mobile ---------- */
@media (max-width:640px){
  body{ font-size:14.5px; padding-bottom:76px; }
  .wrap{ padding:0 14px; }
  .topbar-inner{ padding:8px 0; gap:8px; row-gap:8px; }
  #populer,#katalog,#promo{ scroll-margin-top:110px; }
  .brand-mark{ width:38px; height:38px; border-radius:10px; }
  .brand-mark svg{ width:19px; height:19px; }
  .brand-text{ font-size:15.5px; }
  .brand-text small{ font-size:8.5px; }
  .icon-btn{ width:38px; height:38px; border-radius:10px; }
  .icon-btn svg{ width:18px; height:18px; }

  .hero{ padding:12px 0 0; }
  .hero-card{ padding:18px; border-radius:18px; }
  .hero h1{ font-size:24px; }
  .hero p{ font-size:12.5px; }
  .hero-actions{ gap:8px; }
  .hero-actions .segmented{ flex:1; }
  .hero-actions .seg{ flex:1; padding:8px 10px; font-size:12px; }
  .hero-actions .btn{ flex:1 1 100%; }
  .hero-side{ grid-template-columns:1fr 1fr 1fr; }
  .hero-stat{ padding:8px 10px; }
  .hero-stat b{ font-size:13.5px; }
  .hero-stat span{ font-size:10px; }
  .trust-row{ gap:6px 14px; padding:12px 2px 0; }
  .trust-row span{ font-size:10.5px; }

  .quick-grid{ grid-template-columns:1fr 1fr; gap:8px; }
  .quick{ padding:10px; gap:9px; border-radius:12px; }
  .q-ico{ width:32px; height:32px; border-radius:9px; }
  .q-ico svg{ width:17px; height:17px; }
  .quick b{ font-size:11.5px; }
  .quick small{ font-size:9.5px; }

  .section{ padding:22px 0; }
  .section-head{ margin-bottom:12px; gap:10px; }
  .section-head h2{ font-size:19px; }
  .catalog-meta{ width:100%; justify-content:space-between; }
  .pop-row{ grid-auto-columns:150px; }
  .pop-emoji{ height:82px; font-size:32px; }
  .pop-card b{ font-size:11.5px; }

  .catalog-bar{ top:100px; padding:6px 0 8px; }
  .scan-inline{ display:grid; width:38px; height:38px; }
  .product-grid{ grid-template-columns:1fr 1fr; gap:10px; }
  .p-media{ font-size:38px; }
  .p-body{ padding:9px 10px 10px; }
  .p-name{ font-size:12px; }
  .p-price{ font-size:14.5px; }
  .p-old{ font-size:9.5px; }
  .p-meta{ font-size:9.5px; }
  .p-grosir{ font-size:9px; }
  .p-ask,.p-add{ width:26px; height:26px; border-radius:8px; }
  .p-ask svg,.p-add svg{ width:13px; height:13px; }

  .detail{ padding:12px 0 84px; }
  .detail-media{ aspect-ratio:1.5/1; }
  .dm-emoji{ font-size:76px; }
  .d-price-main b{ font-size:25px; }
  .d-tiers{ gap:7px; }
  .d-specs{ grid-template-columns:1fr; }
  .catalog-foot{ justify-content:center; text-align:center; }
  .catalog-foot .btn{ width:100%; }

  .store-card{ padding:18px; }
  .footer{ padding-top:30px; }
  .footer-grid{ grid-template-columns:1fr 1fr; gap:22px; }
  .footer-brand, .footer-contact{ grid-column:span 2; }
  .footer-bottom{ flex-direction:column; align-items:flex-start; gap:4px; }

  .checkout{ padding:12px 0 40px; }
  .ck-head h1{ font-size:22px; }
  .card{ padding:15px; border-radius:14px; }
  .form-grid{ grid-template-columns:1fr; }
  .field.span-2{ grid-column:span 1; }
  .opt-list{ grid-template-columns:1fr; }
  .pay-list{ grid-template-columns:1fr; }
  .pay-opt{ padding:11px 12px; }
  .qr-wrap{ flex-direction:column; align-items:stretch; gap:14px; }
  .qr-card{ margin:0 auto; }
  .card-form{ grid-template-columns:1fr; }
  .card-form .span-2, .card-preview{ grid-column:span 1; }
  .summary{ padding:15px; }
  .sum-total b{ font-size:20px; }

  .success{ padding:20px 0 40px; }
  .success-card{ padding:24px 18px; border-radius:18px; }
  .success-box{ grid-template-columns:1fr; gap:10px; }

  .mobile-bar{ display:flex; }
  .mobile-bar.is-hidden{ display:none; }
  .toast{ bottom:92px; }
}

@media (max-width:359px){
  .product-grid{ grid-template-columns:1fr; }
  .quick-grid{ grid-template-columns:1fr; }
}

/* ---------- Desktop ---------- */
@media (min-width:1560px){
  :root{ --maxw:1340px; }
  .product-grid{ grid-template-columns:repeat(5,1fr); }
}

@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; scroll-behavior:auto; }
}
