:root {
  --cocoa-900: #241109;
  --cocoa-800: #34190f;
  --cocoa-700: #4a2617;
  --berry: #8c1d33;
  --berry-600: #a32640;
  --gold: #d4a94f;
  --gold-soft: #f1dfb1;
  --cream: #fbf6ee;
  --paper: #ffffff;
  --ink: #2a1a12;
  --muted: #8a7466;
  --line: #eadfce;
  --ok: #1f8a4c;
  --wa: #25d366;
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(52, 25, 15, .28);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--gold-soft);
  background:
    radial-gradient(circle at 15% 20%, rgba(212,169,79,.18) 0 2px, transparent 3px) 0 0 / 34px 34px,
    radial-gradient(ellipse at top, var(--cocoa-700), var(--cocoa-900) 70%);
  padding: 34px 0 54px;
  text-align: center;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: auto 0 -1px 0; height: 30px;
  background: var(--cream);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.crest {
  width: 86px; height: 86px; margin: 0 auto 12px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold), #9c7426);
  box-shadow: 0 0 0 5px rgba(212,169,79,.18), 0 12px 30px rgba(0,0,0,.4);
}
.crest svg { width: 50px; height: 50px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 8vw, 46px);
  margin: 0;
  color: var(--gold);
  letter-spacing: .5px;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.hero p { margin: 4px 0 0; opacity: .85; font-size: 15px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; padding: 4px 14px; border-radius: 99px;
  font-size: 13px; font-weight: 700;
  background: rgba(31,138,76,.18); color: #8fe3b1; border: 1px solid rgba(143,227,177,.35);
}
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.closed { background: rgba(163,38,64,.25); color: #ffb3c1; border-color: rgba(255,179,193,.35); }

/* ---------- Category bar ---------- */
.cats {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251,246,238,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.cats-row { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none; max-width: 980px; margin: 0 auto; }
.cats-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--paper);
  font-weight: 700; font-size: 14px; white-space: nowrap;
  transition: .2s;
}
.chip.active { background: var(--cocoa-800); color: var(--gold-soft); border-color: var(--cocoa-800); }

.search {
  margin: 18px 0 4px; position: relative;
}
.search input {
  width: 100%; padding: 13px 16px 13px 44px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--paper); outline: none;
}
.search input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,169,79,.2); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; color: var(--muted); }

.notice {
  margin-top: 16px; padding: 12px 16px; border-radius: 14px;
  background: #fff7df; border: 1px dashed var(--gold); font-weight: 600; font-size: 14px;
}

/* ---------- Menu ---------- */
.section { padding-top: 26px; scroll-margin-top: 64px; }
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 24px; margin: 0 0 14px; color: var(--cocoa-800);
}
.section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, var(--gold), transparent); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  border: 1px solid #f2e9dc;
  animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.card.off { opacity: .55; filter: grayscale(.6); }
.thumb {
  position: relative; aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 30% 25%, #fff3dc, #f0dcc0);
  display: grid; place-items: center; font-size: 56px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--berry); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 10px; border-radius: 99px;
}
.badge.gray { background: #6b5d55; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0; font-size: 15px; line-height: 1.4; }
.card .desc { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.card-foot > div:has(.stepper) { flex-basis: 100%; }
.card .stepper { width: 100%; justify-content: space-between; }
.price { font-weight: 800; color: var(--berry); font-size: 15px; white-space: nowrap; }
.price small { color: var(--muted); font-weight: 600; font-size: 11px; }

.add-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 0;
  background: var(--cocoa-800); color: var(--gold-soft); font-size: 22px; line-height: 1;
  display: grid; place-items: center; transition: transform .15s;
}
.add-btn:active { transform: scale(.9); }
.stepper {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--cocoa-800); color: var(--gold-soft); border-radius: 12px; padding: 3px;
}
.stepper button { width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: inherit; font-size: 18px; }
.stepper button:active { background: rgba(255,255,255,.12); }
.qty-input {
  width: 46px; min-width: 0; flex: 1; text-align: center; font-weight: 700; font-size: 14px;
  border: 0; border-radius: 8px; padding: 5px 2px; background: rgba(255,255,255,.12); color: inherit; outline: none;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus { background: #fff; color: var(--cocoa-900); }
.qty-unit { font-size: 11px; opacity: .8; }
.qty-unit:empty { display: none; }

.empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------- Cart bar ---------- */
.cart-bar {
  position: fixed; inset: auto 12px 14px 12px; z-index: 30;
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 18px; border: 0;
  background: linear-gradient(135deg, var(--berry), #6c1426); color: #fff;
  box-shadow: 0 16px 40px -10px rgba(140,29,51,.6);
  transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.cart-bar.show { transform: none; }
.cart-bar .count {
  background: var(--gold); color: var(--cocoa-900); font-weight: 800;
  border-radius: 10px; min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 6px;
}
.cart-bar strong { font-size: 16px; }
.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.04); } }

/* ---------- Sheet ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20,8,4,.55); z-index: 40; opacity: 0; pointer-events: none; transition: .25s; }
.overlay.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 50; inset: auto 0 0 0;
  max-width: 620px; margin: 0 auto; max-height: 92vh;
  background: var(--cream); border-radius: 24px 24px 0 0;
  display: flex; flex-direction: column;
  transform: translateY(105%); transition: transform .35s cubic-bezier(.2,.9,.3,1);
}
.sheet.show { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-size: 22px; color: var(--cocoa-800); }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-size: 18px; display: grid; place-items: center; }
.sheet-body { overflow-y: auto; padding: 0 18px 18px; }
.sheet-foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }

.line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line .mini { width: 52px; height: 52px; border-radius: 12px; flex: none; overflow: hidden; display: grid; place-items: center; font-size: 28px; background: #f6e8d2; }
.line .mini img { width: 100%; height: 100%; object-fit: cover; }
.line .info { flex: 1; min-width: 0; }
.line .info b { display: block; font-size: 14.5px; }
.line .info small { color: var(--muted); }
.line .sub { font-weight: 800; color: var(--berry); white-space: nowrap; }

.field { margin-top: 14px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); outline: none;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,169,79,.2); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper);
  font-weight: 700; cursor: pointer; margin: 0;
}
.seg input { display: none; }
.seg input:checked + span { color: var(--berry); }
.seg label:has(input:checked) { border-color: var(--berry); background: #fff1f3; }

.totals { display: grid; gap: 4px; font-size: 14px; margin: 16px 0 0; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 18px; font-weight: 800; color: var(--cocoa-900); padding-top: 6px; border-top: 1px dashed var(--line); margin-top: 4px; }

.btn {
  width: 100%; border: 0; border-radius: 14px; padding: 14px 18px;
  font-weight: 800; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-wa { background: var(--wa); color: #06331a; }
.btn-dark { background: var(--cocoa-800); color: var(--gold-soft); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 22px; height: 22px; }

.success { text-align: center; padding: 30px 10px 10px; }
.success .tick { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: #e5f6ec; color: var(--ok); font-size: 40px; }
.success h3 { font-family: var(--font-display); font-size: 24px; margin: 0; }
.success p { color: var(--muted); }

.toast {
  position: fixed; top: 16px; left: 50%; transform: translate(-50%, -150%); z-index: 99;
  background: var(--cocoa-900); color: var(--gold-soft); padding: 10px 18px; border-radius: 12px;
  font-weight: 700; font-size: 14px; transition: transform .3s; box-shadow: var(--shadow); max-width: 90vw; text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

footer.site { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0 120px; }
footer.site a { color: var(--muted); }
.demo-flag { display: inline-block; margin-top: 6px; font-size: 12px; background: #fff3cd; color: #7a5a00; padding: 2px 10px; border-radius: 99px; }
