/* Kopi Senja — etalase toko online
   Palet sama dengan kasir: navy espresso, krem kertas, karamel. */
:root{
  --navy:#182635; --navy-2:#22384d; --cream:#f5f1ea; --paper:#fffdfa; --card:#fff;
  --ink:#1d2733; --muted:#7c8794; --line:#e8e1d6; --line-soft:#f0ebe3;
  --caramel:#b07a4a; --caramel-soft:#f1dfcd; --green:#2f7d5d; --green-soft:#e3f3ea;
  --red:#b3452f; --red-soft:#fbe8e4;
  --shadow:0 10px 30px rgba(24,38,53,.08); --shadow-sm:0 3px 10px rgba(24,38,53,.06);
  --r:18px;
}
*{box-sizing:border-box}
[hidden]{display:none !important}
html{scroll-behavior:smooth}
body{margin:0;background:var(--cream);color:var(--ink);font-family:'Segoe UI',Roboto,-apple-system,system-ui,sans-serif;
  font-size:14px;-webkit-font-smoothing:antialiased;min-height:100dvh}
h1,h2,h3,p{margin:0}
a{color:var(--caramel);text-decoration:none}
img{max-width:100%}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}
input,textarea,select{font:inherit;color:inherit}

/* ---------- header ---------- */
.top{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:14px;padding:12px 18px;
  background:rgba(245,241,234,.92);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink)}
.brand-mark{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;color:#fff2e3;
  background:linear-gradient(135deg,#b07a4a,#8c5a32);box-shadow:0 8px 18px rgba(0,0,0,.18);flex:0 0 auto}
.brand-txt b{display:block;font-size:15px;letter-spacing:.1px}
.brand-txt small{display:block;font-size:10.5px;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);margin-top:1px}
.cart-btn{position:relative;margin-left:auto;width:44px;height:44px;border-radius:13px;border:1px solid var(--line);
  background:var(--card);display:grid;place-items:center;color:var(--ink)}
.cart-btn svg{width:20px;height:20px}
.cart-count{position:absolute;top:-5px;right:-5px;min-width:20px;height:20px;border-radius:999px;background:var(--caramel);
  color:#fff;font-size:10.5px;font-weight:800;display:grid;place-items:center;padding:0 5px;box-shadow:0 3px 8px rgba(176,122,74,.4)}

/* ---------- hero ---------- */
main{max-width:1180px;margin:0 auto;padding:0 18px 40px}
.hero{padding:34px 0 26px;max-width:640px}
.eyebrow{display:inline-flex;align-items:center;gap:7px;font-size:10.5px;font-weight:800;letter-spacing:.12em;
  text-transform:uppercase;color:var(--green);background:var(--green-soft);padding:6px 11px;border-radius:999px}
.eyebrow.tutup{color:var(--red);background:var(--red-soft)}
.hero h1{font-size:clamp(26px,6vw,38px);line-height:1.15;letter-spacing:-.8px;margin:14px 0 10px}
.hero-sub{color:var(--muted);font-size:13px;line-height:1.6;max-width:46ch}
.hero-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}
.hero-notes{display:flex;flex-wrap:wrap;gap:16px;margin-top:18px;font-size:11.5px;color:var(--muted)}
.hero-notes b{color:var(--ink)}

/* ---------- tombol ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:0 18px;
  border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--ink);font-size:13px;font-weight:700;
  transition:.15s}
.btn:hover{border-color:#d8cfc2}
.btn.primary{background:var(--navy);border-color:var(--navy);color:#fff}
.btn.primary:hover{background:var(--navy-2)}
.btn.ghost{background:transparent}
.btn.block{width:100%}
.btn:disabled{opacity:.45;cursor:not-allowed}

/* ---------- menu ---------- */
.menu-head{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}
.menu-head h2{font-size:19px;letter-spacing:-.3px}
.search{position:relative;min-width:220px;flex:1;max-width:320px}
.search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:#98a4b1}
.search input{width:100%;height:42px;border-radius:12px;border:1px solid var(--line);background:var(--card);
  padding:0 14px 0 38px;font-size:13px;outline:none}
.search input:focus{border-color:var(--caramel);box-shadow:0 0 0 3px rgba(176,122,74,.12)}
.cats{display:flex;gap:7px;overflow-x:auto;padding:2px 0 12px;scrollbar-width:none}
.cats::-webkit-scrollbar{display:none}
.cat{flex:0 0 auto;padding:9px 14px;border-radius:999px;border:1px solid var(--line);background:var(--card);
  font-size:12px;font-weight:700;color:#5d6a76;white-space:nowrap}
.cat.active{background:var(--navy);border-color:var(--navy);color:#fff}

.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(min-width:720px){.grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}}
@media(min-width:1024px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.card{position:relative;text-align:left;background:var(--card);border:1px solid var(--line);border-radius:16px;
  padding:10px;display:flex;flex-direction:column;gap:8px;transition:.16s}
.card:hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:#ddcfbf}
.card .gbr{width:100%;aspect-ratio:1/1;border-radius:12px;overflow:hidden;display:grid;place-items:center;
  background:linear-gradient(135deg,#f7efe5,#efe3d4);font-size:34px;position:relative}
.card .gbr img{width:100%;height:100%;object-fit:cover;display:block}
.card b{font-size:13px;line-height:1.3;padding-right:26px}
.card .ket{font-size:10.5px;color:var(--muted);line-height:1.4;min-height:15px}
.card .harga{font-size:13px;font-weight:800;color:var(--caramel);margin-top:auto}
.card .plus{position:absolute;right:9px;bottom:9px;width:28px;height:28px;border-radius:9px;background:var(--cream);
  display:grid;place-items:center;font-size:17px;font-weight:700;color:var(--navy)}
.card.habis{opacity:.55}
.card.habis .gbr::after{content:'Habis';position:absolute;top:8px;left:8px;background:var(--red-soft);color:var(--red);
  font-size:9.5px;font-weight:800;padding:3px 7px;border-radius:999px}
.empty{padding:40px 8px;text-align:center;color:var(--muted);font-size:12.5px}

/* ---------- footer ---------- */
.foot{max-width:1180px;margin:0 auto;padding:26px 18px 40px;border-top:1px solid var(--line);
  display:flex;flex-wrap:wrap;gap:14px;justify-content:space-between;font-size:11.5px;color:var(--muted)}
.foot b{color:var(--ink);font-size:12.5px}
.foot-links{display:flex;gap:14px;align-items:center}
.foot .muted{color:#9aa4ae;font-size:11px}

/* ---------- sheet (keranjang / checkout) ---------- */
.sheet-backdrop{position:fixed;inset:0;background:rgba(16,25,34,.45);backdrop-filter:blur(3px);z-index:60;
  opacity:0;pointer-events:none;transition:.18s}
.sheet-backdrop.show{opacity:1;pointer-events:auto}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:70;background:var(--paper);border-radius:22px 22px 0 0;
  max-height:90dvh;display:none;flex-direction:column;box-shadow:0 -20px 60px rgba(10,18,26,.28)}
.sheet.show{display:flex;animation:up .22s ease-out}
@media(min-width:700px){
  .sheet{left:auto;right:24px;bottom:24px;top:24px;width:420px;border-radius:20px;max-height:none}
}
@keyframes up{from{transform:translateY(18px);opacity:.7}to{transform:none;opacity:1}}
.sheet-head{display:flex;gap:12px;align-items:flex-start;padding:18px 18px 12px;border-bottom:1px solid var(--line-soft)}
.sheet-head h3{font-size:15.5px}
.sheet-head p{font-size:11.5px;color:var(--muted);margin-top:3px}
.sheet-head .x{margin-left:auto;width:32px;height:32px;border-radius:10px;background:#f2ede6;color:#596673;
  font-size:18px;display:grid;place-items:center}
.sheet-body{padding:14px 18px;overflow-y:auto;flex:1}
.sheet-foot{padding:12px 18px calc(16px + env(safe-area-inset-bottom));border-top:1px solid var(--line-soft);
  background:#fffdf9;display:flex;flex-direction:column;gap:8px}
.sheet-foot .btn{min-height:46px}
.sum{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:700}
.sum b{font-size:17px}
.hint{font-size:11px;color:var(--muted);line-height:1.5}
.err{background:var(--red-soft);color:var(--red);font-size:11.5px;font-weight:600;padding:9px 11px;border-radius:10px;margin-top:10px}

/* item keranjang */
.ci{display:flex;gap:11px;padding:11px 0;border-bottom:1px dashed var(--line-soft)}
.ci:last-child{border-bottom:0}
.ci .foto{width:46px;height:46px;border-radius:12px;background:var(--cream);overflow:hidden;display:grid;
  place-items:center;font-size:20px;flex:0 0 auto}
.ci .foto img{width:100%;height:100%;object-fit:cover}
.ci .nm{flex:1;min-width:0}
.ci .nm b{font-size:12.5px;display:block}
.ci .nm small{display:block;color:var(--muted);font-size:10.5px;margin-top:2px;line-height:1.4}
.ci .nm .h{font-size:12px;font-weight:700;margin-top:4px}
.qty{display:flex;align-items:center;gap:3px;background:var(--cream);border-radius:9px;padding:3px;height:30px;align-self:center}
.qty button{width:24px;height:24px;border-radius:7px;background:var(--card);font-weight:800;color:var(--navy);
  display:grid;place-items:center;font-size:14px}
.qty span{min-width:18px;text-align:center;font-size:11.5px;font-weight:800}
.cart-empty{padding:34px 10px;text-align:center;color:var(--muted);font-size:12px;line-height:1.7}
.cart-empty .big{font-size:32px;display:block;margin-bottom:8px;opacity:.6}

/* form */
.field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}
.field label{font-size:11px;font-weight:800;color:#5d6a76}
.field .opt{font-weight:600;color:var(--muted);text-transform:none}
.field input,.field textarea{width:100%;border:1px solid var(--line);border-radius:11px;background:#fff;
  padding:11px 12px;font-size:13px;outline:none}
.field input:focus,.field textarea:focus{border-color:var(--caramel);box-shadow:0 0 0 3px rgba(176,122,74,.1)}
.field textarea{resize:vertical;min-height:64px}
.seg{display:flex;background:var(--cream);border-radius:12px;padding:3px;gap:3px}
.seg button{flex:1;padding:9px;border-radius:9px;font-size:12px;font-weight:700;color:#6b7683}
.seg button.active{background:var(--card);color:var(--ink);box-shadow:var(--shadow-sm)}
.ringkas{background:var(--cream);border-radius:12px;padding:12px 13px;font-size:12px;margin-top:4px}
.ringkas .row{display:flex;justify-content:space-between;padding:3px 0;color:#596673}
.ringkas .row b{color:var(--ink)}
.ringkas .row.total{border-top:1px dashed var(--line);margin-top:6px;padding-top:8px;font-size:14px}

/* pilih varian */
.opt-group{margin-bottom:14px}
.opt-group .lbl{display:flex;justify-content:space-between;font-size:11px;font-weight:800;color:#5d6a76;margin-bottom:7px}
.opt-group .lbl span{font-weight:600;color:var(--muted)}
.opts{display:flex;flex-wrap:wrap;gap:7px}
.opt{padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:11.5px;font-weight:600}
.opt.active{background:var(--navy);border-color:var(--navy);color:#fff}
.opt small{display:block;font-size:9.5px;opacity:.7;margin-top:1px}
.m-foto{height:150px;border-radius:12px;overflow:hidden;margin-bottom:10px;background:#e9dfd2}
.m-foto img{width:100%;height:100%;object-fit:cover}

/* sukses */
.okmark{width:56px;height:56px;border-radius:50%;background:var(--green-soft);color:var(--green);font-size:26px;
  display:grid;place-items:center;margin:6px auto 12px;font-weight:800}
.pesan{background:#fff;border:1px dashed #cfc5b7;border-radius:10px;padding:12px;font-size:11px;line-height:1.6;
  white-space:pre-wrap;font-family:'Courier New',ui-monospace,monospace;max-height:240px;overflow:auto;margin-top:10px}

/* toast */
.toast-wrap{position:fixed;right:14px;top:calc(14px + env(safe-area-inset-top));z-index:90;display:flex;
  flex-direction:column;gap:8px;align-items:flex-end;pointer-events:none;max-width:calc(100vw - 28px)}
.toast{background:var(--navy);color:#fff;padding:10px 16px;border-radius:11px;font-size:12px;font-weight:600;
  box-shadow:0 12px 30px rgba(10,18,26,.3);animation:up .2s ease-out}

/* Pilihan cara bayar */
.bayar-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.bayar-opt{display:flex;flex-direction:column;gap:2px;align-items:flex-start;text-align:left;
  background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 12px;cursor:pointer;
  font-family:inherit;color:var(--navy);transition:border-color .15s,box-shadow .15s}
.bayar-opt .em{font-size:16px;line-height:1}
.bayar-opt b{font-size:13px}
.bayar-opt small{font-size:10.5px;color:var(--muted);line-height:1.35}
.bayar-opt.active{border-color:var(--navy);box-shadow:0 0 0 2px rgba(24,38,53,.08)}
.bayar-opt#optCod{grid-column:1/-1}

/* Instruksi bayar di halaman sukses */
.bayar-box{margin:14px 0 6px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px}
.bayar-box-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:12px;
  font-weight:700;color:var(--navy);margin-bottom:10px}
.bayar-box-head b{font-size:15px}
.bayar-teks{font-size:12.5px;line-height:1.6;color:#41505f;margin:0}
.qris-bayar{max-width:250px;margin:0 auto;text-align:center}
.qris-bayar img{width:100%;aspect-ratio:1/1;object-fit:contain;display:block;background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px}
.qris-bayar-nama{font-size:12px;font-weight:700;margin:8px 0 0;color:var(--navy)}
.rek{border:1px dashed var(--line);border-radius:12px;padding:10px 12px;margin-bottom:8px;background:var(--bg)}
.rek:last-child{margin-bottom:0}
.rek-bank{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.rek-nomor{font-size:16px;font-weight:800;color:var(--navy);letter-spacing:.02em;cursor:pointer;margin-top:2px}
.rek-copy{font-size:10px;font-weight:700;color:var(--amber);text-transform:uppercase;letter-spacing:.06em}
.rek-nama{font-size:11.5px;color:var(--muted);margin-top:2px}
.bukti-aksi{margin-top:12px}
.bukti-aksi .btn{margin-bottom:6px}
