/* Gendis · halaman PO kue kering & hampers
   Warna diatur per tema di bawah. Ganti tema lewat theme: "..." di index.html */

:root, [data-theme="mentega"] {
  --bg: #fff4d6;        /* latar */
  --paper: #fffaf0;     /* kartu */
  --soft: #fbe5ad;      /* aksen lembut */
  --line: #ecd6a6;      /* garis */
  --ink: #3b2414;       /* teks utama */
  --muted: #7d5c44;     /* teks kedua */
  --accent: #b9621f;    /* tombol & sorotan */
  --accent-ink: #fffaf0;
  --accent-2: #6b3b1d;  /* label kedua */
  --wa: #1d8f4e;        /* tombol WhatsApp */
  --dot: rgba(185, 98, 31, .13);
}
[data-theme="pandan"] {
  --bg: #edf5e4;
  --paper: #fbfdf6;
  --soft: #d6ebc6;
  --line: #c9dfb8;
  --ink: #1d3420;
  --muted: #557055;
  --accent: #2f7a3a;
  --accent-ink: #fbfdf6;
  --accent-2: #8a6a12;
  --wa: #1d8f4e;
  --dot: rgba(47, 122, 58, .12);
}
[data-theme="delima"] {
  --bg: #fbeee8;
  --paper: #fffaf7;
  --soft: #f5d6cd;
  --line: #ecc9be;
  --ink: #2b1713;
  --muted: #7a4f45;
  --accent: #a8212c;
  --accent-ink: #fffaf7;
  --accent-2: #1f5a44;
  --wa: #1d8f4e;
  --dot: rgba(168, 33, 44, .1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
body.has-cart main { padding-bottom: 104px; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: "Gloock", Georgia, serif; font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: -.005em; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- hero ---------- */
.hero {
  padding: 20px 0 28px;
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.7px);
  background-size: 18px 18px;
}
.hero-grid { display: grid; gap: 22px; }
.cover { margin: 0; }
.cover img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 22px; border: 6px solid var(--paper);
  box-shadow: 0 14px 34px -18px rgba(60, 30, 10, .45);
}
.eyebrow {
  display: inline-block; margin: 0 0 10px; padding: 5px 12px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(38px, 10vw, 64px); }
.tagline { margin: 10px 0 0; color: var(--muted); font-size: 17px; max-width: 34ch; }
.status { margin-top: 18px; font-size: 15px; }
.status b { font-weight: 700; }
.dot {
  display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: #23a35a; vertical-align: 1px;
  box-shadow: 0 0 0 0 rgba(35, 163, 90, .5); animation: pulse 2s infinite;
}
.dot.wait { background: #e0a21b; box-shadow: none; animation: none; }
.dot.off { background: #9b8f86; box-shadow: none; animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(35, 163, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(35, 163, 90, 0); } }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; max-width: 380px; }
.countdown div {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 4px 8px; text-align: center;
}
.countdown b { display: block; font: 400 28px/1 "Gloock", Georgia, serif; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 12px; color: var(--muted); }

.quota { margin-top: 16px; max-width: 380px; }
.quota-bar { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.quota-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width .6s; }
.quota p { margin: 6px 0 0; font-size: 14px; color: var(--muted); font-weight: 600; }

/* ---------- tab kategori ---------- */
.tabs {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tabs-inner { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; text-decoration: none; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper);
  font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.tabs a.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- menu ---------- */
.cat { padding-top: 28px; }
.cat > h2 { font-size: 28px; margin-bottom: 14px; }
.cards { display: grid; gap: 12px; }
.card {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 14px; row-gap: 0; align-items: start; align-content: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 12px;
}
/* di HP: foto di kiri, ukuran & tombol melebar penuh di bawahnya */
.card .body { display: contents; }
.card .pic { grid-column: 1; grid-row: 1 / span 3; }
.card h3, .card .tags, .card .desc { grid-column: 2; }
.card .sizes { grid-column: 1 / -1; }
.pic { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--soft); }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.noimg {
  position: relative; width: 100%; height: 100%; display: grid; place-items: center;
  color: var(--accent);
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.7px); background-size: 12px 12px;
}
.noimg svg { width: 58%; max-width: 150px; fill: var(--paper); stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.noimg span {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-38%); text-align: center;
  font: 400 clamp(22px, 6vw, 54px)/1 "Gloock", Georgia, serif;
}
.card h3 { font-size: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tag {
  font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border-radius: 99px;
  background: var(--soft); color: var(--accent-2);
}
.t-laris { background: var(--accent); color: var(--accent-ink); }
.t-baru { background: #1f5a8a; color: #fff; }
.t-terbatas { background: #fde2e1; color: #9e1c24; }
.t-tanpa-pengawet { background: #dff1df; color: #22612d; }
.t-habis { background: var(--ink); color: var(--paper); }
.desc { margin: 6px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.sizes { margin-top: 10px; display: grid; gap: 8px; }
.size {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding-top: 8px; border-top: 1px dashed var(--line);
}
.s-label { font-size: 13px; color: var(--muted); grid-column: 1; }
.s-price { font-weight: 700; font-size: 15px; grid-column: 1; }
.stepper { grid-column: 2; grid-row: 1 / span 2; }

.stepper, .lstep { display: inline-flex; align-items: center; border-radius: 999px; background: var(--soft); }
.stepper button, .lstep button {
  width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent;
  font-size: 20px; font-weight: 600; line-height: 1; color: var(--ink);
  display: grid; place-items: center; touch-action: manipulation;
}
.stepper .plus, .lstep .plus { background: var(--accent); color: var(--accent-ink); }
.stepper output, .lstep output { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper:not(.has) { background: transparent; }
.stepper:not(.has) .minus, .stepper:not(.has) output { display: none; }
.stepper:not(.has) .plus { width: auto; padding: 0 14px 0 12px; border-radius: 999px; gap: 4px; display: inline-flex; font-size: 18px; }
.stepper:not(.has) .plus::after { content: "Tambah"; font-size: 14px; font-weight: 700; }
.stepper button:disabled, .lstep button:disabled { opacity: .35; cursor: not-allowed; }
.card.soldout .pic img { filter: grayscale(1); opacity: .6; }
body.closed .stepper { opacity: .6; }

/* ---------- info ---------- */
.info { margin-top: 36px; padding: 22px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; }
.info h2 { font-size: 26px; margin-bottom: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--accent); background: var(--paper);
}
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 22px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li.done::before { background: var(--accent); }
.timeline b { display: block; }
.timeline span { color: var(--muted); font-size: 14px; }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; min-height: 28px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--soft); color: var(--accent-2); font-weight: 800; font-size: 14px; display: grid; place-items: center;
}

#faq details { border-top: 1px solid var(--line); }
#faq details:last-child { border-bottom: 1px solid var(--line); }
#faq summary { list-style: none; cursor: pointer; padding: 14px 30px 14px 0; font-weight: 700; position: relative; }
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 22px; color: var(--accent); transition: transform .2s; }
#faq details[open] summary::after { transform: rotate(45deg); }
#faq p { margin: 0 0 14px; color: var(--muted); }

.foot { text-align: center; padding: 36px 0 40px; color: var(--muted); font-size: 14px; }
.foot p { margin: 0; }
.foot-links { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.pill {
  text-decoration: none; padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
#l-wa { background: var(--wa); border-color: var(--wa); color: #fff; }

/* ---------- bar keranjang ---------- */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.cartbar button {
  pointer-events: auto; width: 100%; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 18px; padding: 14px 16px; background: var(--ink); color: var(--paper);
  box-shadow: 0 12px 30px -10px rgba(30, 15, 5, .55); text-align: left; animation: rise .25s ease-out;
}
#cart-count { font-size: 13px; opacity: .8; }
.cart-total { font-weight: 800; font-size: 17px; }
.cart-cta { margin-left: auto; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }

/* ---------- lembar pesanan ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet-bg { position: absolute; inset: 0; background: rgba(25, 12, 5, .5); animation: fade .2s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 24px 24px 0 0; padding: 0 18px calc(20px + env(safe-area-inset-bottom));
  animation: up .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 12px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-size: 26px; }
.x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 24px; line-height: 1; }

.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n n" "st sub"; gap: 8px 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.l-name { grid-area: n; }
.l-name b { display: block; }
.l-name span { font-size: 13px; color: var(--muted); }
.lstep { grid-area: st; justify-self: start; }
.lstep button { width: 32px; height: 32px; font-size: 18px; }
.l-sub { grid-area: sub; font-weight: 700; }
.lines li.empty { display: block; color: var(--muted); text-align: center; padding: 24px 0; }

.field { display: block; border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.field > span, .field legend { display: block; padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.field em { font-style: normal; font-weight: 500; color: var(--muted); }
.field input:not([type]), .field textarea {
  width: 100%; padding: 12px 14px; font-size: 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--paper); resize: vertical;
}
.field input:not([type]):focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--dot); }

.opts { display: grid; gap: 8px; }
.opt {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper);
}
.opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.opt b { display: block; font-size: 15px; }
.opt em { display: block; font-style: normal; font-size: 13px; color: var(--muted); }
.opt i { font-style: normal; font-weight: 700; font-size: 14px; white-space: nowrap; }
.opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--dot); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: block; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper);
  font-size: 14px; font-weight: 600;
}
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.sum { margin: 22px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.sum div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.sum dt { color: var(--muted); }
.sum dd { margin: 0; font-weight: 600; text-align: right; }
.sum .grand { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.sum .grand dt { color: var(--ink); font-weight: 700; }
.sum .grand dd { font-weight: 800; font-size: 19px; }
.pay { margin: 12px 0 0; font-size: 13px; color: var(--muted); padding: 10px 14px; background: var(--soft); border-radius: 12px; }
.err { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: #fde2e1; color: #9e1c24; font-weight: 600; font-size: 14px; }
.send {
  margin-top: 16px; width: 100%; border: 0; border-radius: 16px; padding: 16px; background: var(--wa); color: #fff;
  font-size: 16px; font-weight: 800;
}
.send:active { transform: translateY(1px); }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px);
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 16px; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); animation: fade .15s; text-align: center;
}

/* ---------- layar lebar ---------- */
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .card { grid-template-columns: minmax(0, 1fr); padding: 0; overflow: hidden; gap: 0; }
  .card .body { display: block; }
  .card .pic { grid-row: auto; aspect-ratio: 4 / 3; border-radius: 0; }
  .card .body { padding: 16px 18px 18px; }
  .card h3 { font-size: 23px; }
  .info { padding: 28px; }
  .sheet-panel { left: 50%; right: auto; bottom: auto; top: 50%; width: 540px; max-height: 88vh; transform: translate(-50%, -50%); border-radius: 24px; padding: 0 26px 26px; animation: pop .22s ease-out; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } }
  .lines li { grid-template-columns: 1fr auto 96px; grid-template-areas: "n st sub"; }
  .l-sub { text-align: right; }
  .toast { bottom: 110px; }
}
@media (min-width: 900px) {
  .hero { padding: 48px 0 52px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; }
  .cover { order: 2; }
  .cover img { transform: rotate(1.5deg); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  main .info { display: inline-block; vertical-align: top; width: calc(50% - 10px); }
  main .info + .info { margin-left: 16px; }
  #faq-wrap { display: block; width: 100%; margin-left: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media print {
  .tabs, .cartbar, .sheet, .toast { display: none !important; }
}
