/* Pilona Kaos — CSS publik, ditulis tangan, mobile-first. Palet kopi. */
:root {
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --ink: #1A1815;
  --ink-muted: #6B6459;
  --accent: #8B5E34;        /* cokelat kopi */
  --accent-hover: #6F4A28;
  --border: #E5DFD6;
  --success: #2E7D5B;
  --warning: #C77D00;
  --danger: #C0392B;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.08);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --container: 1140px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* Header / nav */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav .brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; flex-shrink: 0; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 8px 12px; border-radius: 8px; color: var(--ink-muted); font-weight: 600; font-size: .95rem; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--bg); }
.nav-cart { position: relative; }

/* Header di HP: brand tetap satu baris, menu bisa digeser horizontal */
@media (max-width: 560px) {
  .nav { gap: 10px; }
  .nav .brand { font-size: 1.02rem; }
  .nav-links { gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-right: -20px; padding-right: 20px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { padding: 8px 10px; font-size: .9rem; }
}

/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius); font-weight: 700; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }

/* Hero */
.hero { padding: 56px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); letter-spacing: -.02em; }
.hero p { color: var(--ink-muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Kartu / grid */
.section { padding: 40px 0; }
.section-title { text-align: center; margin-bottom: 28px; }
.section-title h2 { font-size: 1.6rem; }
.section-title p { color: var(--ink-muted); margin: 0; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .grid.grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.product-card .thumb { aspect-ratio: 4/5; background: var(--bg); }
.product-card .body { padding: 12px 14px; }
.product-card .name { font-weight: 700; font-size: .98rem; margin: 0 0 2px; }
.product-card .price { color: var(--accent); font-weight: 700; }

/* Langkah cara pesan */
.steps { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { text-align: center; padding: 20px; }
.step .num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 12px;
}
.step h3 { font-size: 1.05rem; }
.step p { color: var(--ink-muted); margin: 0; font-size: .95rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 28px 0; margin-top: 48px; color: var(--ink-muted); font-size: .9rem;
}
.site-footer .row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }

/* Tabel ukuran & konten statis */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: 1.8rem; }
table.sizes { width: 100%; border-collapse: collapse; margin: 16px 0; }
table.sizes th, table.sizes td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
table.sizes th { background: var(--bg); }

/* Notifikasi / alert */
.alert { padding: 12px 16px; border-radius: var(--radius); margin: 16px 0; font-size: .95rem; }
.alert-error { background: #FBEAE8; color: var(--danger); border: 1px solid #f2c9c4; }
.alert-success { background: #E7F3EC; color: var(--success); border: 1px solid #c2e0cf; }

/* Kontrol katalog: chips kategori (scroll horizontal di HP) + urutan */
.catalog-controls { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.chip {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-muted); font-weight: 600; font-size: .9rem; white-space: nowrap;
}
.chip:hover { color: var(--ink); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sort-form select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-family: inherit; font-size: .9rem; }

/* Detail produk */
.product-detail { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 16px; }
@media (min-width: 860px) { .product-detail { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; } }
.gallery-main { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.gallery-main img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.gthumb { flex: 0 0 auto; width: 60px; height: 75px; border: 2px solid transparent; border-radius: 8px; overflow: hidden; padding: 0; cursor: pointer; background: none; }
.gthumb img { width: 100%; height: 100%; object-fit: cover; }
.gthumb.active { border-color: var(--accent); }
.product-info h1 { font-size: 1.5rem; }
.price-lg { font-size: 1.6rem; font-weight: 800; color: var(--accent); margin: 4px 0 16px; }
.opt-group { margin: 18px 0; }
.opt-label { display: block; font-weight: 700; margin-bottom: 8px; font-size: .95rem; }
.size-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.size-opt {
  padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  font-family: inherit; font-weight: 600; cursor: pointer; color: var(--ink); font-size: .95rem;
  display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2;
}
.size-opt small { color: var(--ink-muted); font-weight: 600; font-size: .72rem; }
.size-opt:hover { border-color: var(--accent); }
.size-opt.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.size-opt.active small { color: rgba(255,255,255,.85); }
.qty-box { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.qty-btn { width: 44px; height: 44px; border: none; background: var(--surface); font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.qty-btn:hover { background: var(--bg); }
.qty-box input { width: 56px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); height: 44px; font-size: 1rem; font-family: inherit; }
.qty-box input::-webkit-outer-spin-button, .qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Badge keranjang di nav */
.cart-badge { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; text-align: center; background: var(--accent); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 0 5px; }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 820px) { .checkout-grid { grid-template-columns: 1fr 340px; align-items: start; } }
.checkout-side .cart-summary { position: sticky; top: 76px; }
.zones { display: flex; flex-direction: column; gap: 8px; }
.zone-opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.zone-opt:hover { border-color: var(--accent); }
.zone-opt input { width: auto; margin: 0; }
.zone-name { flex: 1; font-weight: 600; }
.zone-cost { color: var(--accent); font-weight: 700; }
.sum-row { display: flex; justify-content: space-between; font-size: .92rem; margin: 6px 0; }
.sum-row.total { font-size: 1.1rem; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

/* Halaman pesanan */
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.pay-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #FDF6EC; border: 1px solid #F0DFC4; border-radius: var(--radius); padding: 16px; margin-bottom: 18px; }
.order-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.order-section h2 { font-size: 1.05rem; margin: 0 0 12px; }
.order-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.order-item:last-child { border-bottom: none; }
.oi-thumb { width: 56px; height: 70px; border-radius: 6px; overflow: hidden; background: var(--bg); }
.oi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.oi-total { font-weight: 700; white-space: nowrap; }

/* Keranjang */
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
}
.cart-thumb { width: 64px; height: 80px; border-radius: 8px; overflow: hidden; background: var(--bg); display: block; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-name { font-weight: 700; color: var(--ink); display: block; }
.cart-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.cart-line { font-weight: 700; white-space: nowrap; }
.qty-sm .qty-btn { width: 34px; height: 34px; font-size: 1rem; }
.qty-sm input { width: 44px; height: 34px; font-size: .9rem; }
.link-danger { background: none; border: none; color: var(--danger); cursor: pointer; font-family: inherit; font-size: .88rem; padding: 0; text-decoration: underline; }
.cart-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-top: 18px; }
.cart-summary .row { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; }
@media (max-width: 480px) {
  .cart-item { grid-template-columns: 56px 1fr; }
  .cart-thumb { width: 56px; height: 70px; }
  .cart-line { grid-column: 2; text-align: right; margin-top: 4px; }
}

/* Pesan custom */
.custom-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 16px; }
@media (min-width: 780px) { .custom-grid { grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; } }
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 28px 16px; text-align: center;
  cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus, .dropzone.drag { border-color: var(--accent); background: #FBF8F4; outline: none; }
.dz-icon { font-size: 2rem; color: var(--accent); }
.dropzone p { margin: 6px 0; }
.dz-preview { width: 160px; height: 200px; margin: 0 auto 10px; border-radius: 8px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.dz-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.dz-noprev { color: var(--ink-muted); font-size: .82rem; padding: 10px; }
.dz-filename { font-weight: 700; word-break: break-all; }

/* Badge keranjang di nav */
.cart-badge { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; text-align: center; background: var(--accent); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 0 5px; }

/* Utilitas */
.muted { color: var(--ink-muted); }
.center { text-align: center; }
.mt-2 { margin-top: 16px; } .mt-4 { margin-top: 32px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-muted); }
