/* =========================================================
   KOPI & COOKIES — stylesheet utama
   Tema: cokelat hangat / artisan
   ========================================================= */

:root {
  --cream: #f7f0e5;
  --cream-2: #fcf7ef;
  --paper: #fffdf9;
  --ink: #2b1d16;
  --ink-2: #4a382e;
  --muted: #8a7464;
  --line: #e8dcc9;
  --brown: #5b3a2a;
  --brown-dark: #40271c;
  --caramel: #c08457;
  --gold: #d9a441;
  --green: #5c7a4a;
  --red: #b4432e;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 14px 40px rgba(70, 45, 30, 0.12);
  --shadow-sm: 0 6px 18px rgba(70, 45, 30, 0.08);
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--ink); }

.container { width: min(1180px, 92vw); margin-inline: auto; }
.hidden { display: none !important; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.18; color: var(--ink); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--caramel);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--caramel); border-radius: 2px; }

.section { padding: 88px 0; position: relative; }
.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin: 14px 0 12px; }
.section-head p { color: var(--muted); font-size: 1.02rem; }

/* ------------------------------- TOMBOL ------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brown); color: #fdf7ef; box-shadow: 0 10px 24px rgba(91, 58, 42, 0.28); }
.btn-primary:hover { background: var(--brown-dark); box-shadow: 0 14px 30px rgba(91, 58, 42, 0.34); }
.btn-accent { background: var(--caramel); color: #fffaf3; box-shadow: 0 10px 24px rgba(192, 132, 87, 0.32); }
.btn-accent:hover { background: #ad7244; }
.btn-outline { border: 1.6px solid var(--line); background: rgba(255, 253, 249, 0.7); color: var(--ink); }
.btn-outline:hover { border-color: var(--brown); background: #fff; }
.btn-light { background: #fdf7ef; color: var(--brown); }
.btn-light:hover { background: #fff; }
.btn-sm { padding: 10px 18px; font-size: 0.86rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.chip-best { background: #f6e7cd; color: #8a5a1d; }
.chip-new { background: #e3ecdc; color: #46633a; }
.chip-pack { background: #eddccf; color: #7a4b2c; }

/* -------------------------------- NAVBAR -------------------------------- */

.topbar {
  background: var(--brown-dark); color: #f0e3d4;
  font-size: 0.8rem; letter-spacing: 0.04em; text-align: center;
  padding: 9px 16px;
}
.topbar strong { color: var(--gold); }

.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(247, 240, 229, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 220, 201, 0.9);
  transition: box-shadow 0.25s ease;
}
.nav.scrolled { box-shadow: 0 8px 26px rgba(70, 45, 30, 0.10); }
.nav-inner { display: flex; align-items: center; gap: 26px; height: 74px; }

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px;
  background: linear-gradient(145deg, var(--brown), var(--brown-dark));
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 1.05rem; letter-spacing: 0.01em; }
.brand-text span { font-family: var(--font-body); font-size: 0.66rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--caramel); font-weight: 700; }

.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { font-size: 0.93rem; font-weight: 600; color: var(--ink-2); position: relative; padding: 6px 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--caramel); transition: width 0.25s ease; border-radius: 2px;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--line);
  display: grid; place-items: center; transition: all 0.2s ease;
}
.icon-btn:hover { border-color: var(--brown); transform: translateY(-2px); }
.cart-badge {
  position: absolute; top: -5px; right: -5px; min-width: 21px; height: 21px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 0.7rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
  border: 2px solid var(--cream); transform: scale(0); transition: transform 0.2s ease;
}
.cart-badge.show { transform: scale(1); }

.user-menu { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
  font-weight: 700; font-size: 0.88rem; transition: border-color 0.2s ease;
}
.user-chip:hover { border-color: var(--brown); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--caramel);
  color: #fff; display: grid; place-items: center; font-size: 0.78rem; font-weight: 800;
}
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); width: 220px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 8px; display: none; z-index: 70;
}
.dropdown.open { display: block; animation: pop 0.18s ease; }
.dropdown a, .dropdown button {
  display: block; width: 100%; text-align: left; padding: 11px 14px;
  border-radius: 10px; font-size: 0.9rem; font-weight: 600; color: var(--ink-2);
}
.dropdown a:hover, .dropdown button:hover { background: var(--cream); color: var(--ink); }
.dropdown .divider { height: 1px; background: var(--line); margin: 6px 4px; }
.dropdown button.danger { color: var(--red); }

.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); }
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 3.5px auto; border-radius: 2px; }

/* --------- NAV VERSI HP: tombol masuk/daftar pindah ke menu burger ------ */
.nav-auth-mobile { display: none; }
.nav-auth-mobile.nav-auth-guest { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 0 6px; margin-top: 6px; border-top: 1px solid rgba(232, 220, 201, 0.7); }
.nav-auth-mobile.nav-auth-user { padding: 6px 0; }
.nav-drop-link { display: block; width: 100%; text-align: left; padding: 12px 6px; font-size: 0.95rem; font-weight: 600; color: var(--ink-2); border-radius: 10px; }
.nav-drop-link:hover { background: var(--cream); color: var(--ink); }
.nav-drop-link.danger { color: var(--red); }

/* ------------------------- TOMBOL PASANG APP (PWA) ---------------------- */
.pwa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 160;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px;
  background: var(--brown); color: #f7f0e5;
  font-size: 0.86rem; font-weight: 700; letter-spacing: 0.01em;
  box-shadow: 0 12px 30px rgba(64, 39, 28, 0.32);
  transition: transform 0.2s ease, background 0.2s ease;
}
.pwa-float:hover { transform: translateY(-2px); background: var(--brown-dark); }
.pwa-float--hint { animation: floaty 4.5s ease-in-out infinite; }


/* --------------------------------- HERO --------------------------------- */

.hero {
  position: relative; overflow: hidden; padding: 74px 0 84px;
  background:
    radial-gradient(900px 420px at 82% 8%, rgba(217, 164, 65, 0.16), transparent 60%),
    radial-gradient(700px 420px at 4% 78%, rgba(192, 132, 87, 0.18), transparent 62%),
    var(--cream);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); margin: 18px 0 18px; letter-spacing: -0.02em; }
.hero h1 em { font-style: italic; color: var(--caramel); }
.hero p.lead { font-size: 1.06rem; color: var(--ink-2); max-width: 520px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 24px; }
.hero-stats b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--brown); }
.hero-stats span { font-size: 0.82rem; color: var(--muted); font-weight: 600; }

.hero-visual { position: relative; }
.hero-photo {
  border-radius: 200px 200px 26px 26px; overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 4/4.4; background: var(--line);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.float-card {
  position: absolute; background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 11px; animation: floaty 5s ease-in-out infinite;
}
.float-card small { display: block; font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.float-card b { font-size: 0.95rem; color: var(--ink); }
.float-card .thumb { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; }
.float-1 { left: -34px; top: 16%; }
.float-2 { right: -22px; bottom: 12%; animation-delay: 1.6s; }

@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ------------------------------- FITUR --------------------------------- */

.features { padding: 60px 0; background: var(--cream-2); border-block: 1px solid var(--line); }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-sm); }
.feature .ico {
  width: 46px; height: 46px; border-radius: 14px; background: #f4e9db;
  display: grid; place-items: center; margin-bottom: 16px; color: var(--brown);
}
.feature h3 { font-size: 1.06rem; margin-bottom: 7px; }
.feature p { font-size: 0.9rem; color: var(--muted); }

/* -------------------------------- MENU --------------------------------- */

.menu-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 30px;
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter {
  padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--paper); font-weight: 700; font-size: 0.87rem; color: var(--ink-2);
  transition: all 0.18s ease;
}
.filter:hover { border-color: var(--caramel); }
.filter.active { background: var(--brown); border-color: var(--brown); color: #fdf7ef; }

.search-box {
  display: flex; align-items: center; gap: 9px; background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 18px; min-width: 250px;
}
.search-box input { border: none; outline: none; background: transparent; width: 100%; font-size: 0.92rem; }
.search-box:focus-within { border-color: var(--caramel); }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.product-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.product-media { position: relative; aspect-ratio: 4/3.1; overflow: hidden; background: var(--line); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-media img { transform: scale(1.07); }
.product-media .chip { position: absolute; top: 12px; left: 12px; box-shadow: 0 6px 14px rgba(0,0,0,0.12); }
.product-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-cat { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--caramel); font-weight: 800; }
.product-body h3 { font-size: 1.08rem; }
.product-body p { font-size: 0.86rem; color: var(--muted); flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.price { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--brown); }

.add-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px;
  border-radius: 999px; background: var(--brown); color: #fdf7ef;
  font-size: 0.85rem; font-weight: 700; transition: all 0.18s ease;
}
.add-btn:hover { background: var(--brown-dark); transform: translateY(-2px); }
.add-btn.added { background: var(--green); }

.qty-mini { display: inline-flex; align-items: center; gap: 4px; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.qty-mini button { width: 30px; height: 30px; border-radius: 50%; background: var(--paper); font-weight: 800; font-size: 1rem; color: var(--brown); display: grid; place-items: center; }
.qty-mini button:hover { background: var(--brown); color: #fff; }
.qty-mini span { min-width: 24px; text-align: center; font-weight: 800; font-size: 0.9rem; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); grid-column: 1/-1; }
.empty-state h3 { margin-bottom: 8px; }

/* -------------------------------- PROMO -------------------------------- */

.promo { background: var(--brown-dark); color: #f2e6d8; position: relative; overflow: hidden; }
.promo::before {
  content: ""; position: absolute; inset: 0;
  background: url("/img/beans.jpg") center/cover; opacity: 0.16;
}
.promo .container { position: relative; }
.promo-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 34px; align-items: center; }
.promo h2 { color: #fdf6ec; font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 14px 0 14px; }
.promo p { color: #ddcdbb; max-width: 520px; margin-bottom: 26px; }
.promo .eyebrow { color: var(--gold); }
.promo .eyebrow::before { background: var(--gold); }
.promo-code {
  display: inline-flex; align-items: center; gap: 12px; border: 1.5px dashed var(--gold);
  border-radius: 14px; padding: 12px 18px; color: var(--gold); font-weight: 800;
  letter-spacing: 0.14em; background: rgba(217, 164, 65, 0.08);
}
.promo-cards { display: grid; gap: 16px; }
.promo-card {
  background: rgba(255, 251, 244, 0.08); border: 1px solid rgba(240, 227, 212, 0.22);
  border-radius: var(--radius); padding: 20px; display: flex; gap: 16px; align-items: center;
  backdrop-filter: blur(6px);
}
.promo-card img { width: 74px; height: 74px; border-radius: 16px; object-fit: cover; }
.promo-card h4 { color: #fdf6ec; font-size: 1.02rem; margin-bottom: 4px; }
.promo-card p { font-size: 0.85rem; margin: 0; color: #d6c5b3; }
.promo-card b { color: var(--gold); }

/* ------------------------------- LANGKAH -------------------------------- */

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 26px; position: relative; }
.step-num {
  font-family: var(--font-display); font-size: 3rem; color: #ecdfcd;
  position: absolute; top: 14px; right: 24px; line-height: 1;
}
.step h3 { font-size: 1.15rem; margin-bottom: 9px; }
.step p { font-size: 0.92rem; color: var(--muted); }

/* -------------------------------- CERITA -------------------------------- */

.story { background: var(--cream-2); border-block: 1px solid var(--line); }
.story-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: center; }
.story-photos { position: relative; }
.story-photos .main { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3.4; }
.story-photos .main img { width: 100%; height: 100%; object-fit: cover; }
.story-photos .sub {
  position: absolute; right: -26px; bottom: -34px; width: 46%; border-radius: 20px;
  overflow: hidden; border: 8px solid var(--cream-2); box-shadow: var(--shadow-sm); aspect-ratio: 1/1;
}
.story-photos .sub img { width: 100%; height: 100%; object-fit: cover; }
.story h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 14px 0 16px; }
.story p { color: var(--ink-2); margin-bottom: 16px; }
.story .quote {
  border-left: 3px solid var(--caramel); padding: 6px 0 6px 18px;
  font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--brown);
}

/* ----------------------------- TESTIMONI -------------------------------- */

.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testi {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; transition: transform 0.22s ease;
}
.testi:hover { transform: translateY(-6px); }
.stars { color: var(--gold); letter-spacing: 3px; margin-bottom: 12px; font-size: 0.95rem; }
.testi p { font-size: 0.95rem; color: var(--ink-2); margin-bottom: 20px; }
.testi-who { display: flex; align-items: center; gap: 12px; }
.testi-who .avatar { width: 42px; height: 42px; font-size: 0.9rem; background: var(--brown); }
.testi-who b { display: block; font-size: 0.95rem; }
.testi-who span { font-size: 0.78rem; color: var(--muted); }

/* --------------------------------- CTA ---------------------------------- */

.cta { background: linear-gradient(135deg, var(--brown), var(--brown-dark)); color: #f6ebdd; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 34px; flex-wrap: wrap; }
.cta h2 { color: #fdf6ec; font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-bottom: 10px; }
.cta p { color: #d8c7b5; max-width: 480px; }
.newsletter { display: flex; gap: 10px; background: rgba(255, 251, 244, 0.1); border: 1px solid rgba(240, 227, 212, 0.3); padding: 8px; border-radius: 999px; }
.newsletter input { background: transparent; border: none; outline: none; color: #fdf6ec; padding: 10px 18px; min-width: 240px; }
.newsletter input::placeholder { color: #c3b09d; }

/* -------------------------------- FOOTER -------------------------------- */

footer { background: #24170f; color: #bda894; padding: 66px 0 28px; font-size: 0.92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; margin-bottom: 44px; }
footer h4 { color: #f3e8da; font-size: 1rem; margin-bottom: 18px; font-family: var(--font-body); font-weight: 800; letter-spacing: 0.04em; }
footer .brand-text b { color: #f3e8da; }
footer ul { list-style: none; display: grid; gap: 10px; }
footer ul a:hover { color: var(--gold); }
footer .about { max-width: 300px; line-height: 1.75; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 251, 244, 0.08); color: #e8d9c8; transition: all 0.2s ease;
}
.socials a:hover { background: var(--gold); color: #24170f; transform: translateY(-3px); }
.foot-bottom { border-top: 1px solid rgba(255, 251, 244, 0.1); padding-top: 22px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 0.83rem; }
.mode-tag { color: var(--gold); opacity: 0.9; }

/* ----------------------------- KERANJANG -------------------------------- */

.overlay {
  position: fixed; inset: 0; background: rgba(36, 23, 15, 0.5);
  opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 90;
  backdrop-filter: blur(3px);
}
.overlay.show { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(430px, 100%);
  background: var(--cream-2); z-index: 100; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -20px 0 50px rgba(36, 23, 15, 0.22);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 1.25rem; }
.close-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.1rem; }
.close-btn:hover { background: var(--brown); color: #fff; }

.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.cart-item {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px;
  animation: pop 0.2s ease;
}
.cart-item img { width: 70px; height: 70px; border-radius: 12px; object-fit: cover; }
.cart-item h4 { font-size: 0.95rem; margin-bottom: 3px; }
.cart-item .price { font-size: 0.92rem; }
.cart-item-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.remove-btn { color: var(--muted); font-size: 0.78rem; font-weight: 700; text-decoration: underline; }
.remove-btn:hover { color: var(--red); }

.drawer-foot { border-top: 1px solid var(--line); padding: 20px 24px 26px; background: var(--paper); }
.ship-progress { margin-bottom: 16px; }
.ship-progress p { font-size: 0.8rem; color: var(--muted); margin-bottom: 7px; }
.ship-progress p b { color: var(--green); }
.progress-bar { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--caramel), var(--green)); border-radius: 999px; transition: width 0.4s ease; }

.summary { display: grid; gap: 9px; margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.92rem; color: var(--muted); }
.summary-row.total { font-size: 1.12rem; font-weight: 800; color: var(--ink); border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 4px; }

.cart-empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.cart-empty .ico { width: 76px; height: 76px; border-radius: 50%; background: var(--paper); border: 1px dashed var(--line); display: grid; place-items: center; margin: 0 auto 18px; color: var(--caramel); }
.cart-empty h4 { color: var(--ink); margin-bottom: 6px; }

/* -------------------------------- MODAL --------------------------------- */

.modal {
  position: fixed; inset: 0; z-index: 110; display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.modal.show { display: flex; }
.modal-card {
  background: var(--cream-2); border-radius: 24px; width: min(660px, 100%);
  max-height: 92vh; overflow-y: auto; box-shadow: 0 30px 70px rgba(36, 23, 15, 0.35);
  animation: modalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 1.3rem; }
.modal-body { padding: 24px 26px 28px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.84rem; font-weight: 700; margin-bottom: 7px; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 13px;
  background: var(--paper); outline: none; transition: border-color 0.2s ease; font-size: 0.95rem;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--caramel); }
.field .hint { font-size: 0.76rem; color: var(--muted); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-option { position: relative; }
.pay-option input { position: absolute; opacity: 0; }
.pay-option label {
  display: flex; align-items: center; gap: 11px; padding: 14px 16px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper);
  font-size: 0.9rem; font-weight: 700; transition: all 0.18s ease;
}
.pay-option label .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; }
.pay-option input:checked + label { border-color: var(--brown); background: #f6ece1; }
.pay-option input:checked + label .dot { border-color: var(--brown); background: var(--brown); box-shadow: inset 0 0 0 3px var(--paper); }

.alert {
  display: flex; gap: 11px; align-items: flex-start; padding: 14px 16px; border-radius: 14px;
  font-size: 0.88rem; margin-bottom: 16px; line-height: 1.5;
}
.alert-warn { background: #fbeee0; color: #8a5a1d; border: 1px solid #f0dcc2; }
.alert-error { background: #fbe9e5; color: #9c3725; border: 1px solid #f2cec6; }
.alert-success { background: #e9f1e3; color: #46633a; border: 1px solid #d3e3c9; }
.alert a { text-decoration: underline; font-weight: 800; }

.order-mini { display: grid; gap: 10px; background: var(--paper); border: 1px dashed var(--line); border-radius: 16px; padding: 16px; margin-bottom: 18px; }
.order-mini-row { display: flex; justify-content: space-between; font-size: 0.88rem; }
.order-mini-row span { color: var(--muted); }
.order-mini-row b { font-weight: 700; }

/* ------------------------------ SUCCESS --------------------------------- */

.success-card { text-align: center; padding: 44px 34px 38px; width: min(460px, 100%); }
.success-ico {
  width: 84px; height: 84px; border-radius: 50%; background: var(--green); color: #fff;
  display: grid; place-items: center; margin: 0 auto 20px; animation: pop 0.4s ease;
}
.success-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.success-card p { color: var(--muted); font-size: 0.94rem; margin-bottom: 18px; }
.order-code {
  display: inline-block; background: var(--paper); border: 1.5px dashed var(--caramel);
  border-radius: 12px; padding: 10px 20px; font-weight: 800; letter-spacing: 0.08em; margin-bottom: 22px;
}
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* -------------------------------- TOAST --------------------------------- */

.toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; width: min(420px, 92vw); }
.toast {
  background: var(--brown-dark); color: #f7eee2; padding: 14px 18px; border-radius: 14px;
  box-shadow: var(--shadow); font-size: 0.9rem; display: flex; align-items: center; gap: 11px;
  animation: toastIn 0.3s ease; border-left: 4px solid var(--gold);
}
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ------------------------------- LOGIN ---------------------------------- */

.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-visual {
  position: relative; padding: 54px; display: flex; flex-direction: column; justify-content: space-between;
  color: #f6ebdd; overflow: hidden;
}
.auth-visual::before {
  content: ""; position: absolute; inset: 0;
  background: url("/img/cafe.jpg") center/cover;
  transform: scale(1.04);
}
.auth-visual::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(165deg, rgba(36, 23, 15, 0.86), rgba(64, 39, 28, 0.78));
}
.auth-visual > * { position: relative; z-index: 2; }
.auth-visual .brand-text b { color: #fdf6ec; }
.auth-visual h1 { color: #fdf6ec; font-size: clamp(2rem, 3.4vw, 2.9rem); margin-bottom: 16px; }
.auth-visual p { color: #ddcdba; max-width: 430px; }
.auth-quotes { display: flex; gap: 14px; flex-wrap: wrap; }
.auth-quote {
  background: rgba(255, 251, 244, 0.1); border: 1px solid rgba(240, 227, 212, 0.25);
  border-radius: 16px; padding: 16px 18px; max-width: 250px; backdrop-filter: blur(6px);
}
.auth-quote p { font-size: 0.86rem; color: #eadfd0; margin-bottom: 10px; font-style: italic; }
.auth-quote b { font-size: 0.84rem; color: var(--gold); }

.auth-form-side { display: grid; place-items: center; padding: 46px 26px; background: var(--cream); }
.auth-card { width: min(440px, 100%); }
.auth-card h2 { font-size: 1.9rem; margin: 16px 0 6px; }
.auth-card .sub { color: var(--muted); font-size: 0.94rem; margin-bottom: 26px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--cream-2); border: 1.5px solid var(--line); border-radius: 999px; padding: 5px; margin-bottom: 26px; }
.tab { padding: 11px; border-radius: 999px; font-weight: 700; font-size: 0.92rem; color: var(--muted); transition: all 0.2s ease; }
.tab.active { background: var(--brown); color: #fdf7ef; box-shadow: var(--shadow-sm); }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 62px; }
.pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.76rem; font-weight: 800; color: var(--caramel); }
.form-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; margin-bottom: 20px; }
.form-meta a { color: var(--caramel); font-weight: 700; }
.form-meta label { display: flex; align-items: center; gap: 7px; color: var(--muted); cursor: pointer; }
.auth-alt { text-align: center; margin-top: 22px; font-size: 0.9rem; color: var(--muted); }
.auth-alt a { color: var(--brown); font-weight: 800; }
.field-row-2 { display: grid; gap: 0; }

/* ------------------------------ RIWAYAT --------------------------------- */

.page-head { background: linear-gradient(135deg, var(--brown), var(--brown-dark)); color: #f6ebdd; padding: 54px 0; }
.page-head h1 { color: #fdf6ec; font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 8px; }
.page-head p { color: #d6c5b3; }

.orders-list { display: grid; gap: 22px; }
.order-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 24px; background: var(--cream-2); border-bottom: 1px solid var(--line); }
.order-top .code { font-weight: 800; letter-spacing: 0.06em; color: var(--brown); }
.order-top .date { font-size: 0.83rem; color: var(--muted); }
.status { padding: 6px 14px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.status-menunggu { background: #f8ecd6; color: #8a5a1d; }
.status-diproses { background: #e2ecf6; color: #2f5a86; }
.status-selesai { background: #e6f0e0; color: #46633a; }
.order-body { padding: 20px 24px; display: grid; gap: 16px; }
.order-items { display: grid; gap: 10px; }
.order-line { display: flex; align-items: center; gap: 12px; font-size: 0.92rem; }
.order-line img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
.order-line .qty { color: var(--muted); font-size: 0.84rem; }
.order-line .amt { margin-left: auto; font-weight: 700; }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.order-meta div span { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.order-meta div b { font-size: 0.9rem; font-weight: 600; }

/* ----------------------------- ANIMASI ---------------------------------- */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ----------------------------- RESPONSIVE -------------------------------- */

@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--cream-2); border-bottom: 1px solid var(--line); padding: 8px 0;
    display: none; box-shadow: var(--shadow-sm);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 6vw; border-bottom: 1px solid rgba(232, 220, 201, 0.6); }
  .nav-links a::after { display: none; }
  .nav-auth-mobile { display: block; }
  .nav-auth-mobile.nav-auth-guest { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 6vw 18px; }
  .nav-auth-mobile.nav-auth-user { padding: 4px 6vw 10px; }
  .nav-drop-link { padding: 14px 6vw; border-bottom: 1px solid rgba(232, 220, 201, 0.6); border-radius: 0; }
  /* bar navigasi sempit: tombol masuk/keluar dipindahkan ke menu burger */
  #guestActions, .orders-page #loginBtn, .orders-page #logoutBtn { display: none !important; }
  .burger { display: block; }
  .hero-grid, .story-grid, .promo-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; margin-inline: auto; }
  .float-1 { left: -10px; }
  .float-2 { right: -6px; }
  .steps-grid, .testi-grid { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { min-height: 280px; padding: 34px; gap: 24px; }
  .auth-quotes { display: none; }
  .story-photos .sub { right: 0; bottom: -24px; }
}

@media (max-width: 680px) {
  .section { padding: 62px 0; }
  .nav-inner { gap: 14px; }
  .nav-actions { gap: 10px; }
  .user-chip #userName, .user-chip svg { display: none; }
  .user-chip { padding: 6px; }
  .pwa-float { right: 12px; bottom: 12px; padding: 11px 15px; }
  .toast-wrap { bottom: 76px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .features-grid { grid-template-columns: 1fr; }
  .hero { padding: 46px 0 60px; }
  .hero-stats { gap: 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .search-box { min-width: 100%; }
  .field-row, .pay-options { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .newsletter { width: 100%; }
  .newsletter input { min-width: 0; flex: 1; }
  .float-card { padding: 9px 12px; }
  .product-body { padding: 14px; }
  .product-body p { display: none; }
  .brand-text span { display: none; }
}

@media (max-width: 430px) {
  .nav-inner .brand-text { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .product-body p { display: block; }
}

/* Checkout memenuhi layar HP, tetap dapat digulir saat keyboard terbuka. */
@media (max-width: 680px) {
  .modal { padding: 0; }
  .modal-card { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal-head { position: sticky; top: 0; background: var(--cream-2); z-index: 1; padding-top: max(20px, env(safe-area-inset-top)); }
  .modal-body { padding: 20px 18px max(24px, env(safe-area-inset-bottom)); }
  .nav-links { max-height: calc(100dvh - 74px); overflow-y: auto; }
}
