/* ============================================================
   NAWABI STORE — Shopee-style storefront (Islamic green)
   Mobile-first. Primary swap colour: deep emerald #0E7A4E.
   ============================================================ */
:root{
  --green:#0E7A4E; --green-dark:#0a5c3a; --green-2:#12925e;
  --green-light:#e8f5ee; --green-tint:#f2faf5;
  --gold:#c8a047; --gold-dark:#a5811f;
  --ink:#232a2f; --muted:#8b95a1; --line:#eef1f3; --line-2:#e3e8eb;
  --bg:#f3f4f6; --card:#ffffff; --price:#0E7A4E; --danger:#d5462f;
  --radius:12px; --shadow:0 1px 3px rgba(0,0,0,.06); --maxw:480px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  background:var(--bg); color:var(--ink); font-size:14px; line-height:1.45;
  max-width:var(--maxw); margin:0 auto; position:relative; min-height:100vh;
  -webkit-tap-highlight-color:transparent;
}
img{max-width:100%; display:block}
a{color:inherit; text-decoration:none}
h1,h2,h3{margin:0}
.has-bottomnav{padding-bottom:64px}
.has-actionbar{padding-bottom:70px}

/* ---------- Top bar ---------- */
.topbar{position:sticky; top:0; z-index:50;
  background:linear-gradient(180deg,var(--green-2),var(--green));
  color:#fff; padding:10px 12px calc(10px + env(safe-area-inset-top,0)); padding-top:10px;}
.topbar-inner{display:flex; align-items:center; gap:10px; max-width:var(--maxw); margin:0 auto}
.tb-search{flex:1; display:flex; align-items:center; gap:8px; background:#fff; border-radius:20px; padding:8px 14px; color:var(--muted)}
.tb-search-ic{display:flex; color:var(--green)}
.tb-search input{flex:1; border:none; outline:none; font-size:14px; color:var(--ink); background:transparent}
.tb-search input::placeholder{color:#a9b2ba}
.tb-back{display:flex; align-items:center; color:#fff; padding:2px}
.tb-title{flex:1; font-size:17px; font-weight:600; color:#fff; text-align:center; margin-right:36px}
.tb-actions{display:flex; align-items:center; gap:12px}
.tb-ic{position:relative; color:#fff; display:flex; align-items:center}
.tb-badge{position:absolute; top:-6px; right:-8px; background:var(--gold); color:#fff; font-size:11px; font-weight:700;
  min-width:17px; height:17px; border-radius:9px; display:flex; align-items:center; justify-content:center; padding:0 4px; border:1.5px solid var(--green)}
.tb-badge[hidden]{display:none}

/* ---------- Home ---------- */
.home{padding-bottom:12px}
/* [HP-02] top image banner (stacked) */
.home-banner{background:var(--card); margin-bottom:8px}
.home-banner img{width:100%; height:auto; display:block}
.home-banner-link{display:block} /* [HP-15] clickable banner */
.home-banner > * + *{margin-top:2px}
.cat-row{display:flex; gap:6px; overflow-x:auto; background:var(--card); padding:14px 12px; margin-bottom:8px; scrollbar-width:none}
.cat-row::-webkit-scrollbar{display:none}
.cat-item{flex:0 0 auto; width:64px; display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center}
.cat-ic{width:48px; height:48px; border-radius:50%; background:var(--green-light); display:flex; align-items:center; justify-content:center; font-size:22px}
.cat-label{font-size:11px; color:var(--ink); line-height:1.2}

/* Flash strip */
.flash-strip{background:var(--card); padding:12px; margin-bottom:8px}
.flash-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px}
.flash-logo{font-weight:800; color:var(--green); letter-spacing:.3px}
.flash-count{font-size:12px; color:var(--muted)}
.flash-count b{color:var(--danger); font-variant-numeric:tabular-nums}
.flash-scroll{display:flex; gap:10px; overflow-x:auto; scrollbar-width:none}
.flash-scroll::-webkit-scrollbar{display:none}
.flash-card{flex:0 0 auto; width:96px}
.flash-img{width:96px; height:96px; border-radius:8px; overflow:hidden; background:var(--bg)}
.flash-img img,.flash-img video{width:100%; height:100%; object-fit:cover}
.flash-img video{object-fit:contain} /* [HP-11] show full video, letterboxed */
.flash-price{color:var(--price); font-weight:700; font-size:13px; margin-top:5px}
.flash-bar{position:relative; height:15px; border-radius:8px; background:#ffe1c2; overflow:hidden; margin-top:3px}
.flash-bar span{position:absolute; inset:0; background:linear-gradient(90deg,#ff7a45,#ff5722); border-radius:8px}
.flash-bar em{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#fff; font-size:10px; font-weight:700; font-style:normal}

/* Product grid */
.grid-wrap{padding:0 8px}
.search-head{padding:12px 4px; font-weight:600}
.pgrid{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.pcard{background:var(--card); border-radius:10px; overflow:hidden; box-shadow:var(--shadow); display:flex; flex-direction:column}
.pcard-img{position:relative; aspect-ratio:1/1; background:var(--bg); overflow:hidden}
/* [HP-10] absolute-fill inside the 1:1 box (object-fit needs a real box)
   [COMPAT] top/left/right/bottom kept alongside inset for pre-2021 browsers */
.pcard-img img,.pcard-img video{position:absolute; top:0; left:0; right:0; bottom:0; inset:0; width:100%; height:100%; object-fit:cover; display:block}
/* [HP-11] video shows in full (letterboxed) within the square; images still fill */
.pcard-img video{object-fit:contain}
.disc-badge{position:absolute; top:0; right:0; background:rgba(255,215,140,.95); color:var(--green-dark); font-weight:800; font-size:11px}
.disc-badge span{display:block; padding:3px 6px 4px; background:var(--gold); color:#fff; border-bottom-left-radius:8px}
.pcard-body{padding:8px 9px 10px; display:flex; flex-direction:column; gap:4px}
.pcard-title{font-size:13px; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:34px}
.pcard-price{display:flex; align-items:baseline; gap:6px; flex-wrap:wrap}
.pcard-price .cur{color:var(--price); font-weight:800; font-size:16px}
.pcard-price .old{color:var(--muted); text-decoration:line-through; font-size:11px}
.pcard-meta{font-size:11px; color:var(--muted); display:flex; align-items:center; gap:4px}
.star-chip{color:var(--gold-dark); font-weight:700}
.pcard-ship{font-size:11px; color:var(--green); font-weight:600}
.empty-state{padding:40px 16px; text-align:center; color:var(--muted)}
.empty-state a{color:var(--green); font-weight:600}
.empty-state.big{display:flex; flex-direction:column; align-items:center; gap:14px; padding:70px 20px}
.empty-emoji{font-size:52px}

/* ---------- Bottom nav ---------- */
.bottomnav{position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:var(--maxw);
  background:#fff; border-top:1px solid var(--line-2); display:flex; z-index:50; padding-bottom:env(safe-area-inset-bottom,0)}
.bn-item{flex:1; padding:7px 0 6px; display:flex; flex-direction:column; align-items:center; gap:2px; color:var(--muted); font-size:10px}
.bn-item.on{color:var(--green)}

/* ---------- PDP ---------- */
.pdp-main{background:var(--bg)}
.pdp-gallery{position:relative; background:#fff; overflow:hidden}
.pdp-gallery .slides{display:flex; transition:transform .3s ease}
.pdp-gallery .slide{flex:0 0 100%; width:100%; aspect-ratio:1/1; object-fit:cover; display:block} /* [HP-10] img or video */
.pdp-gallery video.slide{object-fit:contain; background:#fff} /* [HP-11] show full video, letterboxed */
.pdp-gallery .dots{position:absolute; bottom:10px; left:0; right:0; display:flex; justify-content:center; gap:6px}
.pdp-gallery .dot{width:6px; height:6px; border-radius:50%; border:none; background:rgba(255,255,255,.6); padding:0}
.pdp-gallery .dot.active{background:#fff; width:16px; border-radius:4px}
.slide-count{position:absolute; bottom:10px; left:12px; background:rgba(0,0,0,.45); color:#fff; font-size:11px; padding:2px 9px; border-radius:11px}
/* [HP-16] video sound toggle (bottom-right of the gallery) */
.pdp-gallery .vid-sound{position:absolute; right:10px; bottom:10px; z-index:3; width:36px; height:36px; border-radius:50%; border:none; background:rgba(0,0,0,.5); color:#fff; display:flex; align-items:center; justify-content:center; cursor:pointer; backdrop-filter:blur(2px)}
.pdp-gallery .vid-sound:active{transform:scale(.94)}
.vid-sound .ic-muted,.vid-sound .ic-on{display:none}
.vid-sound.is-muted .ic-muted{display:block}
.vid-sound:not(.is-muted) .ic-on{display:block}
.pdp-info{background:#fff; padding:14px 14px 12px; margin-bottom:8px}
.pdp-price-row{display:flex; align-items:baseline; gap:8px; flex-wrap:wrap}
.pdp-price{color:var(--price); font-size:26px; font-weight:800}
.pdp-old{color:var(--muted); text-decoration:line-through; font-size:13px}
.pdp-disc{background:var(--green-light); color:var(--green); font-weight:800; font-size:12px; padding:2px 7px; border-radius:5px}
.pdp-substats{display:flex; gap:12px; margin-top:8px; font-size:12px; color:var(--muted)}
.pdp-rating{color:var(--gold-dark); font-weight:700}
/* [ST-01] Penanda stok di halaman produk + kartu produk */
.pdp-stock{font-weight:800; font-size:11.5px; padding:2px 8px; border-radius:20px; align-self:center}
.pdp-stock.out{background:#fdeaea; color:#9c2626}
.pdp-stock.low{background:#fff4e0; color:#8a5206}
.pdp-actionbar .ab-buy[disabled],
.pdp-actionbar .ab-cart[disabled]{opacity:.45; cursor:not-allowed; filter:grayscale(1)}
.card-out{position:relative}
.card-out::after{content:"STOK HABIS"; position:absolute; inset:0; display:flex; align-items:center;
  justify-content:center; background:rgba(255,255,255,.72); color:#9c2626; font-weight:800;
  font-size:13px; letter-spacing:.5px; border-radius:8px; pointer-events:none}
.pdp-title{font-size:16px; font-weight:600; line-height:1.35; margin-top:10px}
.pdp-rows{background:#fff; margin-bottom:8px}
.pdp-row{display:flex; gap:10px; padding:12px 14px; border-top:1px solid var(--line); align-items:flex-start}
.pdp-row:first-child{border-top:none}
.pr-ic{font-size:16px; line-height:1.3}
.pdp-row b{font-size:13px; display:block}
.pdp-row small{color:var(--muted); font-size:12px}
.pdp-variasi{background:#fff; padding:14px; margin-bottom:8px}
.pv-label{font-weight:600; margin-bottom:10px}
.pv-opts{display:flex; flex-wrap:wrap; gap:8px}
.pv-opt{border:1px solid var(--line-2); background:#fff; color:var(--ink); border-radius:8px; padding:8px 14px; font-size:13px}
.pv-opt.active{border-color:var(--green); background:var(--green-light); color:var(--green); font-weight:600}
.pdp-desc,.pdp-reviews,.pdp-faq,.pdp-garansi{background:#fff; padding:14px; margin-bottom:8px}
.pdp-desc h2,.pdp-reviews h2,.pdp-faq h2{font-size:15px; margin-bottom:8px}
.pdp-desc p{color:#414b52; font-size:13px}
/* [PDP-05] Collapsible product description (~5 lines, then "Selengkapnya") */
.desc-body{color:#414b52; font-size:13px; line-height:1.6; white-space:pre-line}
.desc-body.is-clamped{display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:5; overflow:hidden; max-height:8em}
.desc-more{margin-top:6px; padding:0; border:none; background:none; color:var(--green); font-size:13px; font-weight:600; cursor:pointer}
.desc-more[hidden]{display:none}
.desc-list{margin:10px 0 0; padding-left:18px; color:#414b52; font-size:13px}
.desc-list li{margin:4px 0}
/* [PDP-04] Review block — Shopee-style layout */
.rv-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:4px}
.rv-headline{display:flex; align-items:baseline; gap:6px}
.rv-avg{font-size:20px; font-weight:700; color:#222}
.rv-avg-star{color:var(--gold); font-size:15px}
.pdp-reviews .rv-headline h2{font-size:15px; font-weight:600; margin:0}
.rv-count{color:var(--muted); font-size:13px}
.rv-sold{color:var(--muted); font-size:12px}
.rv-item{border-top:1px solid var(--line); padding:14px 0}
.rv-item:first-of-type{border-top:none}
.rv-top{display:flex; align-items:center; gap:8px; margin-bottom:4px}
.rv-ava{width:24px; height:24px; border-radius:50%; background:var(--green-light); color:var(--green); font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; flex:0 0 auto}
.rv-name{font-size:13px; font-weight:600; color:#222; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rv-help{margin-left:auto; color:var(--muted); font-size:12px; flex:0 0 auto}
.rv-stars{color:var(--gold); font-size:13px; letter-spacing:1px; line-height:1.2}
.rv-var{color:var(--muted); font-size:12px; margin-top:3px}
.rv-text,.rv-item p{font-size:13px; color:#414b52; margin:6px 0 0; line-height:1.5; white-space:pre-line}
.rv-date{color:var(--muted); font-size:11px; margin-top:6px}
.rv-photo{width:120px; border-radius:8px}
/* [PDP-03/04] Review media grid + lightbox — 3 per row, contained; enlarge on tap */
.rv-media{display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-top:8px}
.rv-thumb{position:relative; aspect-ratio:1/1; width:100%; padding:0; border:1px solid var(--line); border-radius:6px; overflow:hidden; background:#f4f5f6; cursor:pointer}
.rv-thumb img,.rv-thumb video{position:absolute; inset:0; top:0; left:0; right:0; bottom:0; width:100%; height:100%; object-fit:cover; display:block}
.rv-play{position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:30px; height:30px; border-radius:50%; background:rgba(0,0,0,.5)}
.rv-play::after{content:''; position:absolute; left:12px; top:9px; border-style:solid; border-width:6px 0 6px 9px; border-color:transparent transparent transparent #fff}
.rv-dur{position:absolute; right:5px; bottom:4px; color:#fff; font-size:11px; line-height:1; padding:2px 4px; border-radius:3px; background:rgba(0,0,0,.55)}
.rv-lightbox{position:fixed; inset:0; z-index:1200; background:rgba(0,0,0,.9); display:flex; align-items:center; justify-content:center; padding:16px}
.rv-lightbox[hidden]{display:none}
.rv-lb-stage{max-width:100%; max-height:90vh; display:flex; align-items:center; justify-content:center}
.rv-lb-stage img,.rv-lb-stage video{max-width:100%; max-height:90vh; width:auto; height:auto; border-radius:8px; display:block}
.rv-lb-close{position:absolute; top:10px; right:12px; width:40px; height:40px; border:none; border-radius:50%; background:rgba(255,255,255,.15); color:#fff; font-size:26px; line-height:1; cursor:pointer}
body.rv-lb-open{overflow:hidden}
.pdp-faq details{border-bottom:1px solid var(--line); padding:10px 0}
.pdp-faq summary{font-weight:600; font-size:13px; cursor:pointer; list-style:none}
.pdp-faq summary::-webkit-details-marker{display:none}
.pdp-faq summary::before{content:"＋"; color:var(--green); margin-right:8px; font-weight:700}
.pdp-faq details[open] summary::before{content:"－"}
.pdp-faq .ans{margin-top:8px; color:#414b52; font-size:13px}
.garansi-box{display:flex; gap:12px; align-items:flex-start; background:var(--green-tint); border:1px solid var(--green-light); border-radius:10px; padding:12px}
.garansi-icon{font-size:26px}
.garansi-box h3{font-size:14px; color:var(--green-dark)}
.garansi-box p{font-size:12.5px; color:#414b52; margin:4px 0 0}

/* ---------- Action bar (bottom sticky) ---------- */
.actionbar{position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:var(--maxw);
  background:#fff; border-top:1px solid var(--line-2); display:flex; align-items:stretch; z-index:55; padding-bottom:env(safe-area-inset-bottom,0)}
/* [PDP-02] Beli Sekarang = half width; Chat & +Keranjang bigger (share other half). */
.pdp-actionbar .ab-chat{flex:1 1 0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; color:var(--green); font-size:12.5px; padding:9px 0; border-right:1px solid var(--line)}
.pdp-actionbar .ab-cart{flex:1 1 0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; color:var(--green); font-size:12.5px; padding:9px 0; background:none; border:none; border-right:1px solid var(--line)}
.pdp-actionbar .ab-buy{flex:0 0 50%; background:var(--green); color:#fff; border:none; font-size:16px; font-weight:800}
.actionbar button{cursor:pointer}

/* Cart / checkout action bars */
.cart-actionbar,.co-actionbar{padding:8px 12px; align-items:center; gap:10px}
.ca-total{flex:1; display:flex; flex-direction:column; line-height:1.2}
.ca-total span{font-size:11px; color:var(--muted)}
.ca-total b{color:var(--price); font-size:18px}
.ca-checkout{flex:0 0 auto; background:var(--green); color:#fff; border:none; border-radius:22px; padding:12px 30px; font-size:15px; font-weight:700; text-align:center}
.ca-checkout.disabled{opacity:.5}

/* ---------- Cart ---------- */
.cart-main{padding:8px}
.store-group{background:#fff; border-radius:10px; box-shadow:var(--shadow); margin-bottom:8px; overflow:hidden}
.store-head{display:flex; align-items:center; gap:8px; padding:12px 14px; border-bottom:1px solid var(--line)}
.store-badge{background:var(--green); color:#fff; font-size:10px; font-weight:700; padding:2px 6px; border-radius:4px}
.store-name{font-weight:600; font-size:13px}
.cart-line{display:flex; gap:10px; padding:12px 14px; border-bottom:1px solid var(--line); position:relative}
.cart-line:last-child{border-bottom:none}
.cl-img{width:74px; height:74px; border-radius:8px; object-fit:cover; background:var(--bg); flex:none}
.cl-body{flex:1; min-width:0; display:flex; flex-direction:column; gap:4px}
.cl-name{font-size:13px; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.cl-variant{font-size:11px; color:var(--muted); background:var(--bg); align-self:flex-start; padding:2px 7px; border-radius:4px}
.cl-bottom{display:flex; align-items:center; justify-content:space-between; margin-top:auto}
.cl-price .cur{color:var(--price); font-weight:800; font-size:15px}
.cl-price .old{color:var(--muted); text-decoration:line-through; font-size:11px; margin-left:5px}
.cl-remove{position:absolute; top:8px; right:10px; background:none; border:none; color:var(--muted); font-size:22px; line-height:1; cursor:pointer}
.qty{display:inline-flex; align-items:center; border:1px solid var(--line-2); border-radius:6px; overflow:hidden}
.qty button{width:28px; height:28px; background:#fafbfc; border:none; font-size:16px; color:var(--ink); cursor:pointer}
.qty input{width:36px; height:28px; text-align:center; border:none; border-left:1px solid var(--line-2); border-right:1px solid var(--line-2); font-size:13px; background:#fff}

/* ---------- Checkout ---------- */
.co-main{padding:8px}
.co-card{background:#fff; border-radius:10px; box-shadow:var(--shadow); padding:14px; margin-bottom:8px}
.co-card-title{font-weight:700; font-size:14px; margin-bottom:10px; display:flex; align-items:center; gap:6px}
.pin{color:var(--green)}
.field{margin-bottom:12px}
.field:last-child{margin-bottom:0}
.field label{display:block; font-size:12px; color:var(--muted); margin-bottom:5px}
.field input,.field textarea{width:100%; border:1px solid var(--line-2); border-radius:8px; padding:10px 12px; font-size:14px; font-family:inherit; outline:none; color:var(--ink)}
.field input:focus,.field textarea:focus{border-color:var(--green)}
.autocomplete{position:relative}
.suggestions{position:absolute; top:100%; left:0; right:0; background:#fff; border:1px solid var(--line-2); border-radius:8px; margin-top:4px; box-shadow:0 6px 20px rgba(0,0,0,.12); z-index:20; display:none; max-height:230px; overflow:auto}
.suggestions.show{display:block}
.suggestions div{padding:10px 12px; font-size:13px; border-bottom:1px solid var(--line); cursor:pointer}
.suggestions div:hover{background:var(--green-tint)}
.co-line{display:flex; gap:10px; padding:10px 0; border-top:1px solid var(--line)}
.co-products .store-head{border-bottom:none; padding:0 0 10px}
.co-line img{width:56px; height:56px; border-radius:8px; object-fit:cover; background:var(--bg); flex:none}
.co-line-img{flex:none; display:block}
.co-line-body{flex:1; min-width:0}
.co-line-name{font-size:13px; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:var(--ink); font-weight:500}
.co-line-variant{font-size:11px; color:var(--muted); margin-top:2px}
/* [CK-05] change-colour selector */
.co-color-wrap{display:inline-flex; align-items:center; gap:6px; font-size:11.5px; color:var(--muted); margin-top:5px}
.co-color{font-size:12px; padding:4px 8px; border:1px solid var(--line-2); border-radius:7px; background:#fff; color:var(--ink); font-weight:600}
.co-line-foot{display:flex; align-items:center; gap:10px; margin-top:8px}
.co-line-foot .cur{color:var(--price); font-weight:700; flex:1; min-width:0}
.qtyx{color:var(--muted); font-size:12px}
/* [CK-05] qty stepper + delete */
.qty-stepper{display:inline-flex; align-items:center; border:1px solid var(--line-2); border-radius:8px; overflow:hidden; flex:none}
.qs-btn{width:30px; height:30px; border:none; background:#fff; font-size:17px; line-height:1; color:var(--green); font-weight:800; cursor:pointer}
.qs-btn:disabled{color:var(--muted); background:var(--bg); cursor:not-allowed}
.qs-val{min-width:32px; text-align:center; font-size:13px; font-weight:700}
.co-del{border:none; background:none; font-size:16px; cursor:pointer; padding:6px; color:var(--muted); flex:none}
.co-del:active{transform:scale(.9)}
/* [CK-05] add-item button → homepage */
.co-additem{display:flex; align-items:center; justify-content:center; gap:6px; margin-top:12px; padding:11px; border:1px dashed var(--green); color:var(--green); font-weight:700; font-size:13px; border-radius:9px; background:var(--green-tint)}
.co-additem:active{background:var(--green-light)}

/* Shipping options */
.ship-opts{display:flex; flex-direction:column; gap:8px}
.ship-opt{display:flex; align-items:center; justify-content:space-between; border:1.5px solid var(--line-2); border-radius:10px; padding:11px 13px; cursor:pointer}
.ship-opt.selected{border-color:var(--green); background:var(--green-tint)}
.so-left b{font-size:14px}
.so-left small{display:block; color:var(--green); font-size:12px; margin-top:2px}
.so-right{text-align:right; font-weight:700}

/* Payment methods */
.co-pay .pm{display:flex; gap:10px; align-items:flex-start; padding:11px 0; border-top:1px solid var(--line); cursor:pointer}
.co-pay .pm:first-of-type{border-top:none}
.co-pay .pm input{margin-top:3px; accent-color:var(--green); width:18px; height:18px}
.pm-body b{font-size:14px; display:block}
.pm-body small{color:var(--muted); font-size:12px}

/* Totals */
.co-totals .row{display:flex; justify-content:space-between; padding:5px 0; font-size:13px}
.co-totals .grand{border-top:1px solid var(--line); margin-top:6px; padding-top:10px; font-weight:800; font-size:15px}
.co-totals .grand span:last-child{color:var(--price)}
.co-totals .disc{color:var(--danger)}
.was{text-decoration:line-through; color:var(--muted); font-weight:500; font-size:12px; margin-right:6px}
.now{color:var(--green); font-weight:800}
.free{color:var(--green); font-weight:800; text-transform:uppercase; letter-spacing:.3px}

/* [CO-01] inline order button + [CO-02] Shopee handoff.
   [CO-04] .btn-cta = one shared size/style for BOTH buttons; only colour differs.
   [CO-05] Shopee = solid brand orange, logo image optional. */
.co-actions,.co-shopee{padding:4px 4px 14px; display:flex; flex-direction:column; gap:10px; text-align:center}
.btn-cta{width:100%; border:none; border-radius:22px; padding:13px; font-size:15px; font-weight:800;
  line-height:1.2; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px}
.btn-order{background:var(--green); color:#fff}
.btn-shopee{background:#ee4d2d; color:#fff}
.btn-cta:disabled{opacity:.6}
.btn-shopee.disabled{opacity:.55}
.shopee-logo{height:18px; width:auto; display:block}
.shopee-note{font-size:11.5px; color:var(--muted); margin:0}

/* Flash promo banner (checkout) */
.flash-promo{border-radius:12px; padding:14px; margin:0 0 8px; color:#fff;
  background:linear-gradient(135deg,#c0392b,#e74c3c 55%,#f39c12 130%); box-shadow:0 6px 18px rgba(192,57,43,.25); position:relative; overflow:hidden}
.flash-promo .fp-top{display:flex; align-items:center; justify-content:space-between; gap:10px}
.flash-promo .fp-title{font-weight:800; font-size:14px; line-height:1.3}
.fp-chip{display:inline-block; margin:4px 8px 0 0; font-size:13px; font-weight:700}
.fp-chip b{font-size:15px}
.flash-promo .fp-timer{flex:none; background:#fff; color:#c0392b; border:2px solid #ffe08a; border-radius:10px; padding:7px 11px; font-weight:900; font-size:20px; font-variant-numeric:tabular-nums; min-width:74px; text-align:center}
.flash-promo .fp-timer.urgent{background:#7a0d0d; color:#fff; border-color:#ff5a5a}
.flash-promo.settled{background:linear-gradient(135deg,var(--green),var(--green-dark)); box-shadow:0 4px 14px rgba(11,92,61,.22)}
.flash-promo.settled .fp-timer{display:none}
.flash-promo.pulse::after{content:""; position:absolute; inset:0; border-radius:12px; pointer-events:none;
  background:radial-gradient(circle at 50% 0%, rgba(255,255,255,.28), transparent 70%); opacity:.15; animation:fpGlow 1.4s ease-in-out infinite}
@keyframes fpGlow{0%,100%{opacity:.12}50%{opacity:.4}}

/* ---------- Buttons / messages ---------- */
.btn-solid{background:var(--green); color:#fff; border:none; border-radius:22px; padding:12px 26px; font-size:15px; font-weight:700; text-align:center; display:inline-block}
.btn-ghost{background:#fff; color:var(--green); border:1.5px solid var(--green); border-radius:22px; padding:12px 26px; font-size:15px; font-weight:700; text-align:center; display:inline-block}
.msg{font-size:12.5px; color:var(--muted); padding:6px 0}
.msg.err{color:var(--danger)}
.msg-float{position:fixed; left:50%; bottom:82px; transform:translateX(-50%); background:#d5462f; color:#fff; padding:10px 16px; border-radius:8px; font-size:13px; max-width:88%; text-align:center; opacity:0; pointer-events:none; transition:opacity .2s; z-index:80}
.msg-float.show{opacity:1}
.spinner{display:inline-block; width:14px; height:14px; border:2px solid rgba(255,255,255,.5); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; vertical-align:-2px}
.co-ship .spinner,.msg .spinner{border-color:rgba(14,122,78,.3); border-top-color:var(--green)}
@keyframes spin{to{transform:rotate(360deg)}}
.toast{position:fixed; left:50%; bottom:82px; transform:translateX(-50%) translateY(10px); background:rgba(20,30,25,.94); color:#fff; padding:11px 18px; border-radius:22px; font-size:13px; opacity:0; pointer-events:none; transition:.25s; z-index:90; max-width:88%; text-align:center}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0)}

/* ---------- Thank you ---------- */
.thankspage{background:var(--bg)}
.thanks{max-width:var(--maxw); margin:0 auto; padding:36px 18px 60px; text-align:center}
.check{width:74px; height:74px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:38px; color:#fff; margin:0 auto 18px}
.check.ok{background:var(--green)}
.check.bad{background:var(--danger)}
.check.wait{background:var(--gold)}
.thanks h1{font-size:21px; margin-bottom:8px}
.thanks-text{color:#4b555c; font-size:14px; margin:0 auto 20px; max-width:340px}
.thanks-card{background:#fff; border-radius:12px; box-shadow:var(--shadow); padding:16px; text-align:left; max-width:400px; margin:0 auto}
.tc-row{display:flex; justify-content:space-between; font-size:13px; padding:5px 0}
.tc-row.grand{border-top:1px solid var(--line); margin-top:6px; padding-top:10px; font-weight:800; font-size:15px}
.tc-row.grand b{color:var(--price)}
.tc-items{border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:8px 0; margin:6px 0}
.tc-item{display:flex; justify-content:space-between; font-size:13px; padding:3px 0; color:#4b555c}
.tc-ship{margin-top:12px; padding-top:12px; border-top:1px solid var(--line); font-size:12.5px; color:#4b555c}
.tc-ship-title{font-weight:700; color:var(--ink); margin-bottom:4px}
.cod-note{background:var(--green-tint); border:1px solid var(--green-light); color:var(--green-dark); border-radius:10px; padding:12px; font-size:12.5px; max-width:400px; margin:14px auto 0}
.thanks-actions{display:flex; flex-direction:column; gap:10px; max-width:340px; margin:22px auto 0}

/* [CK-02][CK-03] BNI transfer card (success page) */
.bni-card{background:#fff; border:1px solid var(--line-2); border-radius:14px; max-width:400px; margin:0 auto 14px; text-align:left; overflow:hidden; box-shadow:0 6px 20px rgba(0,0,0,.09)}
.bni-card-head{display:flex; align-items:center; justify-content:space-between; padding:13px 16px; background:linear-gradient(135deg,#f4801f,#ec6a0e); color:#fff}
.bni-bank{display:flex; align-items:center; gap:8px; font-weight:800; font-size:15px; letter-spacing:.3px}
.bni-dot{width:20px; height:20px; border-radius:50%; background:#fff; position:relative}
.bni-dot::after{content:""; position:absolute; inset:5px; border-radius:50%; background:#00857a}
.bni-badge{background:rgba(255,255,255,.24); color:#fff; font-size:11px; font-weight:700; padding:3px 10px; border-radius:20px}
.bni-field{padding:13px 16px 0}
.bni-flabel{font-size:11.5px; color:var(--muted); margin-bottom:6px}
.bni-num{display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--green-tint); border:1px dashed var(--green); border-radius:10px; padding:11px 13px}
.bni-num span{font-size:23px; font-weight:800; letter-spacing:2px; color:var(--ink); font-variant-numeric:tabular-nums}
.bni-copy{background:var(--green); color:#fff; border:none; border-radius:8px; padding:8px 15px; font-size:12.5px; font-weight:700; cursor:pointer; flex:none; transition:background .15s}
.bni-copy:active{transform:translateY(1px)}
.bni-copy.is-copied{background:#0a5c3a}
.bni-hint{font-size:10.5px; font-weight:500; color:var(--muted)}
.bni-num-total{background:#fff7ed; border-color:#f0b27a}
.bni-num-total span{font-size:20px; letter-spacing:.5px; color:#ec6a0e}
.bni-name{font-size:15px; font-weight:700; color:var(--ink)}
.bni-total{display:flex; align-items:center; justify-content:space-between; margin:14px 16px 0; padding:12px 14px; background:#fff7ed; border-radius:10px}
.bni-total span{font-size:13px; color:var(--muted)}
.bni-total b{font-size:19px; color:#ec6a0e; font-weight:800}
.bni-steps{margin:14px 16px 18px; padding-left:20px; color:#414b52; font-size:12.5px; line-height:1.55}
.bni-steps li{margin:5px 0}
.bni-steps b{color:var(--ink)}

/* [HP-04][HP-07][HP-09][HP-14] Site footer — solid green, trust-focused, compact */
.site-footer{background:var(--green-dark); color:#d6ece0;
  padding:16px 14px calc(18px + env(safe-area-inset-bottom,0)); margin-top:14px; border-top:3px solid var(--gold)}
.ft-top{display:flex; align-items:center; justify-content:space-between; gap:10px; padding-bottom:12px; border-bottom:1px solid rgba(255,255,255,.14)}
.ft-brand{display:flex; align-items:center; gap:9px; min-width:0}
.ft-logo{width:34px; height:34px; border-radius:9px; background:#fff; padding:4px; flex:none; object-fit:contain; box-shadow:0 2px 6px rgba(0,0,0,.22)}
.ft-store{font-weight:800; color:#fff; font-size:14.5px; line-height:1.1}
.ft-tag{font-size:11px; color:#a7cdb9; margin-top:2px}
.ft-socials{display:flex; gap:7px; flex:none}
.ft-soc{width:31px; height:31px; border-radius:50%; background:rgba(255,255,255,.12); color:#fff; display:flex; align-items:center; justify-content:center; transition:background .15s,color .15s}
.ft-soc:hover{background:var(--gold); color:var(--green-dark)}
.ft-cols{display:flex; gap:16px; flex-wrap:wrap; padding:12px 0}
.ft-col{flex:1; min-width:150px}
.ft-h{font-size:10px; text-transform:uppercase; letter-spacing:.6px; color:#8fbfa8; margin-bottom:7px; font-weight:700}
.ft-badges{display:flex; flex-wrap:wrap; gap:6px}
.ft-badge{display:inline-flex; align-items:center; gap:0; background:#fff; border-radius:6px; overflow:hidden;
  box-shadow:0 1px 4px rgba(0,0,0,.2); height:22px}
.ft-badge-bar{width:4px; align-self:stretch; flex:none}
.ft-badge-txt{font-size:11px; font-weight:800; letter-spacing:.2px; padding:0 9px 0 7px; white-space:nowrap}
.ft-trust{display:grid; grid-template-columns:1fr 1fr; gap:9px 12px; padding:12px 0; margin-top:2px;
  border-top:1px solid rgba(255,255,255,.14); border-bottom:1px solid rgba(255,255,255,.14)}
.ft-trust-item{display:flex; align-items:center; gap:8px}
.ft-trust-ic{width:26px; height:26px; flex:none; display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.10); border-radius:8px; font-size:13px}
.ft-trust-item b{display:block; color:#fff; font-size:11.5px; font-weight:700; line-height:1.2}
.ft-trust-item small{display:block; color:#9dc4b2; font-size:10px; margin-top:1px}
.ft-legal{padding-top:11px; line-height:1.5; text-align:center}
.ft-owner{font-size:11.5px; color:#cfe6da}
.ft-owner b{color:#fff}
.ft-copy{font-size:10.5px; color:#87b39d; margin-top:4px}
@media (max-width:360px){.ft-trust{grid-template-columns:1fr}}

/* ============================================================
   [COMPAT] Older-device fallbacks (iOS < 15, Chrome < 88, etc.)
   aspect-ratio unsupported → recreate the square boxes with the
   padding-top / viewport-height tricks. Modern browsers skip this.
   ============================================================ */
@supports not (aspect-ratio: 1 / 1){
  /* product card: 1:1 box via padding hack (img inside is absolute-fill) */
  .pcard-img{height:0; padding-top:100%}
  /* PDP gallery slide: square = full viewport width, capped at the layout max */
  .pdp-gallery .slide{height:100vw; max-height:480px}
}
