/* ============================================================
   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}
.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{width:100%; height:100%; object-fit:cover}
.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)}
.pcard-img img{width:100%; height:100%; object-fit:cover}
.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}
.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; right:12px; background:rgba(0,0,0,.45); color:#fff; font-size:11px; padding:2px 9px; border-radius:11px}
.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}
.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}
.desc-list{margin:10px 0 0; padding-left:18px; color:#414b52; font-size:13px}
.desc-list li{margin:4px 0}
.rv-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px}
.rv-score{color:var(--gold-dark); font-weight:700; font-size:13px}
.rv-score small{color:var(--muted); font-weight:400}
.rv-item{border-top:1px solid var(--line); padding:12px 0}
.rv-item:first-of-type{border-top:none}
.rv-user{font-size:13px; font-weight:600; margin-bottom:4px}
.rv-stars{color:var(--gold); font-weight:400; margin-left:6px}
.rv-item p{font-size:13px; color:#414b52; margin:0 0 8px}
.rv-photo{width:120px; border-radius:8px}
.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-actionbar .ab-chat{flex:0 0 64px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:var(--green); font-size:11px; border-right:1px solid var(--line)}
.pdp-actionbar .ab-cart{flex:0 0 96px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:var(--green); font-size:12px; background:none; border:none; border-right:1px solid var(--line)}
.pdp-actionbar .ab-buy{flex:1; background:var(--green); color:#fff; border:none; font-size:15px; font-weight:700}
.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-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}
.co-line-variant{font-size:11px; color:var(--muted); margin-top:2px}
.co-line-foot{display:flex; justify-content:space-between; align-items:center; margin-top:6px}
.co-line-foot .cur{color:var(--price); font-weight:700}
.qtyx{color:var(--muted); font-size:12px}

/* 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}

/* Shopee handoff */
.co-shopee{padding:4px 4px 12px; text-align:center}
.btn-shopee{width:100%; background:#fff; color:#ee4d2d; border:1.5px solid #ee4d2d; border-radius:22px; padding:12px; font-size:15px; font-weight:700; cursor:pointer}
.btn-shopee.disabled{opacity:.55}
.shopee-note{font-size:11.5px; color:var(--muted); margin:8px 0 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}
