/* =========================================================
   KAWA KEBUN — leaf green · coffee cherry · paper
   Layout: hero dua kolom (teks + foto), katalog grid kartu kemasan,
   panduan seduh berbentuk "resep", keranjang sebagai drawer kanan.
   ========================================================= */
:root {
  --leaf: #183a2b;
  --leaf-2: #2f5d46;
  --cherry: #c4372b;
  --cherry-2: #a52a20;
  --paper: #f4efe6;
  --paper-2: #ebe3d4;
  --card: #fffdf8;
  --ink: #1b1a17;
  --muted: #6b655b;
  --line: #ddd3c1;
  --kraft: #c9a67a;
  --ok: #2f7d4f;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --r: 18px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cherry); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
.kicker { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--cherry); margin-bottom: 10px; }
.muted { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--cherry); color: #fff; }
.btn--primary:hover { background: var(--cherry-2); }
.btn--line { border-color: var(--leaf); color: var(--leaf); }
.btn--line:hover { background: var(--leaf); color: var(--paper); }
.btn--leaf { background: var(--leaf); color: var(--paper); }
.btn--leaf:hover { background: var(--leaf-2); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.demo-bar { background: var(--leaf); color: #cfe0d4; font-size: .8rem; text-align: center; padding: 6px 16px; }
.demo-bar a { color: #fff; font-weight: 700; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(244, 239, 230, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav__in { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 1.3rem; color: var(--leaf); margin-right: auto; }
.brand svg { width: 34px; height: 34px; }
.brand svg ellipse { fill: var(--cherry); }
.brand svg path { fill: none; stroke: var(--paper); stroke-width: 2.4; stroke-linecap: round; }
.nav__links { display: none; gap: 26px; font-weight: 600; font-size: .95rem; }
.nav__links a { text-decoration: none; color: var(--muted); }
.nav__links a:hover { color: var(--leaf); }
@media (min-width: 760px) { .nav__links { display: flex; } }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--leaf); color: var(--paper); border: 0; border-radius: 999px; padding: 9px 14px 9px 12px; font-weight: 700; cursor: pointer; }
.cart-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.cart-btn b { min-width: 22px; height: 22px; border-radius: 11px; background: var(--cherry); display: inline-grid; place-items: center; font-size: .78rem; padding: 0 6px; }
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.08); } }
@media (max-width: 420px) { .cart-btn span { display: none; } }

/* ---------- hero ---------- */
.hero { padding: 48px 0 64px; }
.hero__in { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero__in { grid-template-columns: 1fr 1.05fr; gap: 56px; } .hero { padding: 72px 0 88px; } }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.3rem); font-weight: 900; color: var(--leaf); margin-bottom: 20px; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--cherry); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 46ch; margin-bottom: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.roast { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--leaf); border-radius: 4px 14px 14px 4px; padding: 12px 18px; }
.roast b { display: block; font-size: .95rem; color: var(--leaf); }
.roast small { display: block; color: var(--muted); font-size: .85rem; }
.hero__photo { margin: 0; position: relative; }
.hero__photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 28px 28px 28px 120px; }
.hero__photo figcaption { margin-top: 10px; font-size: .85rem; color: var(--muted); }

/* ---------- shop ---------- */
.shop { padding: 64px 0 80px; background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.shop__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 22px; }
.shop__head h2 { color: var(--leaf); }
.shop__tools { display: flex; gap: 10px; flex-wrap: wrap; width: 100%; }
@media (min-width: 760px) { .shop__tools { width: auto; } }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 0 14px; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { border: 0; background: none; padding: 11px 0; min-width: 0; width: 100%; }
@media (min-width: 760px) { .search { width: 280px; flex: none; } }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--leaf); }
.sort select { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 11px 14px; cursor: pointer; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 26px; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--leaf); border-color: var(--leaf); color: var(--paper); }
.tab small { opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-align: left; padding: 0; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(24, 58, 43, .12); }
.card__art { aspect-ratio: 1; display: grid; place-items: center; background: var(--paper-2); }
.card__art svg { width: 78%; height: 78%; }
.card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__cat { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.card h3 { font-size: 1.15rem; font-weight: 700; color: var(--leaf); }
.card__notes { font-size: .82rem; color: var(--muted); line-height: 1.4; }
.card__price { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.card__price b { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.card__price span { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--cherry); color: #fff; font-size: .7rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; letter-spacing: .03em; }
.badge--local { background: var(--leaf); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--line); border-radius: var(--r); }

/* ---------- brew ---------- */
.brew { padding: 80px 0; }
.brew h2 { color: var(--leaf); margin-bottom: 30px; }
.brew__grid { display: grid; gap: 16px; }
@media (min-width: 860px) { .brew__grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.brew__card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.brew__card h3 { font-size: 1.5rem; color: var(--leaf); }
.brew__card dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 14px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.brew__card dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.brew__card dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.brew__card p { color: var(--muted); font-size: .95rem; }

/* ---------- faq ---------- */
.faq { padding: 72px 0 88px; background: var(--leaf); color: var(--paper); }
.faq .kicker { color: #f0a59c; }
.faq h2 { color: var(--paper); margin-bottom: 12px; }
.faq .muted { color: #b9cdbf; max-width: 36ch; }
.faq__in { display: grid; gap: 32px; }
@media (min-width: 860px) { .faq__in { grid-template-columns: 1fr 1.4fr; gap: 56px; } }
.faq__list { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 16px 18px; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: #f0a59c; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 10px; color: #cfe0d4; }

/* ---------- footer ---------- */
.foot { padding: 32px 0 40px; font-size: .9rem; color: var(--muted); }
.foot__in { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 760px) { .foot__in { flex-direction: row; justify-content: space-between; align-items: flex-end; } }
.foot__brand { font-family: var(--display); font-size: 1.3rem; color: var(--leaf); }
.foot__credit { font-size: .78rem; max-width: 46ch; }

/* ---------- layers ---------- */
.layer { position: fixed; inset: 0; z-index: 60; }
.layer__bg { position: absolute; inset: 0; background: rgba(27, 26, 23, .5); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--paper-2); font-size: 1.4rem; line-height: 1; cursor: pointer; flex: none; }

.dialog { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; background: var(--paper); border-radius: 26px 26px 0 0; animation: up .28s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 760px) { .dialog { left: 50%; top: 50%; bottom: auto; width: min(920px, calc(100% - 48px)); transform: translate(-50%, -50%); border-radius: 26px; animation: fade .2s ease; } }
.dialog > .x { position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; z-index: 2; }
.dialog__body { display: grid; gap: 22px; padding: 22px 20px 26px; }
@media (min-width: 760px) { .dialog__body { grid-template-columns: 1fr 1.15fr; gap: 32px; padding: 30px; } }
.pd__art { background: var(--paper-2); border-radius: var(--r); aspect-ratio: 1; display: grid; place-items: center; }
.pd__art svg { width: 76%; height: 76%; }
.pd__info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pd__info h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--leaf); }
.pd__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: .88rem; }
.pd__meta dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.pd__meta dd { margin: 0; font-weight: 600; }
.notes { display: flex; flex-wrap: wrap; gap: 6px; }
.notes span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: .82rem; font-weight: 600; }
.roastbar { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); }
.roastbar i { flex: 1; height: 8px; border-radius: 8px; background: linear-gradient(90deg, #d9b98b, #8a5a33, #3a2a1f); position: relative; }
.roastbar i::after { content: ''; position: absolute; top: 50%; left: var(--p); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); }
.opt { display: flex; flex-direction: column; gap: 8px; }
.opt > span { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: .9rem; text-align: left; }
.chip small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }
.chip[aria-pressed="true"] { border-color: var(--leaf); background: var(--leaf); color: var(--paper); }
.chip[aria-pressed="true"] small { color: #b9cdbf; }
.pd__buy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); }
.pd__price { font-family: var(--display); font-size: 1.8rem; font-weight: 700; color: var(--leaf); margin-right: auto; font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); }
.qty button { width: 38px; height: 40px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.qty span { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.note-local { background: #e6efe8; color: var(--leaf); border-radius: 12px; padding: 10px 12px; font-size: .88rem; font-weight: 600; }

.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--paper); display: flex; flex-direction: column; animation: slide .28s cubic-bezier(.2,.8,.2,1); box-shadow: -20px 0 50px rgba(0,0,0,.15); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 1.6rem; color: var(--leaf); }
.drawer__scroll { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.drawer__foot { border-top: 1px solid var(--line); padding: 16px 20px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; background: var(--card); }
.ship-meter { font-size: .85rem; color: var(--muted); }
.ship-meter i { display: block; height: 6px; border-radius: 6px; background: var(--paper-2); margin-top: 6px; overflow: hidden; }
.ship-meter i::after { content: ''; display: block; height: 100%; width: var(--w); background: var(--ok); border-radius: 6px; transition: width .3s; }
.ship-meter b { color: var(--ok); }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; }
.line__art { width: 64px; height: 64px; border-radius: 12px; background: var(--paper-2); display: grid; place-items: center; }
.line__art svg { width: 82%; height: 82%; }
.line h4 { margin: 0; font-size: .98rem; color: var(--leaf); }
.line small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.line__right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.line__right b { font-variant-numeric: tabular-nums; font-size: .95rem; }
.line .qty button { width: 30px; height: 30px; font-size: 1rem; }
.sum { display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.sum div { display: flex; justify-content: space-between; }
.sum .total { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--leaf); padding-top: 6px; border-top: 1px dashed var(--line); margin-top: 4px; }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 10px; display: flex; flex-direction: column; gap: 14px; align-items: center; }

.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.form input, .form textarea { border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 12px; font-size: .95rem; font-weight: 500; color: var(--ink); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--leaf); }
.form textarea { min-height: 70px; resize: vertical; }
.ship-opt { display: flex; flex-direction: column; gap: 8px; }
.ship-opt label { flex-direction: row; align-items: flex-start; gap: 10px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; color: var(--ink); font-size: .92rem; font-weight: 600; background: var(--card); }
.ship-opt label:has(input:checked) { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.ship-opt input { margin-top: 4px; accent-color: var(--leaf); }
.ship-opt small { display: block; font-weight: 500; color: var(--muted); }
.ship-opt em { font-style: normal; margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.err { color: var(--cherry); font-size: .85rem; font-weight: 600; }
.back { background: none; border: 0; color: var(--leaf); font-weight: 700; cursor: pointer; padding: 0; text-align: left; }

.wa-preview { background: #0b141a; border-radius: 14px; padding: 14px; }
.wa-preview div { margin-left: auto; max-width: 95%; background: #005c4b; color: #e9edef; border-radius: 10px 10px 4px 10px; padding: 10px 12px; white-space: pre-wrap; font-size: .86rem; line-height: 1.45; }

.toast { position: fixed; left: 50%; top: 84px; z-index: 80; transform: translate(-50%, -12px); background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
