:root {
  --red: #d2381f;
  --red-dark: #a8280f;
  --saffron: #f2b33d;
  --ink: #23160e;
  --ink-2: #4a3a2e;
  --muted: #8a7867;
  --cream: #faf5ec;
  --paper: #ffffff;
  --line: #ece2d3;
  --char: #1c120c;
  --wa: #25d366;
  --wa-dark: #128c4e;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(35, 22, 14, .06), 0 6px 20px rgba(35, 22, 14, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Roboto Slab", Georgia, serif;
  --topbar-h: 60px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn--ghost:hover { background: rgba(255,255,255,.2); }
.btn--wa { width: 100%; background: var(--wa); color: #fff; font-size: 17px; min-height: 54px; }
.btn--wa:hover { background: #1fbf5b; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink);
}
.icon-btn:hover { background: var(--cream); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  background: var(--char); color: #fff;
}
.topbar__inner {
  max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__logo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.brand__name { font-family: var(--display); font-weight: 900; font-size: 19px; letter-spacing: .02em; color: var(--red); }
.brand__name span { color: #fff; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 2px; }
.lang button {
  border: 0; background: transparent; color: rgba(255,255,255,.7);
  font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
}
.lang button.is-active { background: #fff; color: var(--char); }
.cart-btn {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--red); color: #fff;
}
.cart-btn__count {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 999px; background: var(--saffron); color: var(--char);
  font-size: 12px; font-weight: 700;
}
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.15); } }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--char); }
.hero__bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(28,18,12,.55) 0%, rgba(28,18,12,.85) 70%, var(--char) 100%),
    url("../img/hero.jpg") center/cover no-repeat;
}
.hero__content {
  position: relative; max-width: 760px; margin: 0 auto;
  padding: 44px 16px 40px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero__logo {
  width: 124px; height: 124px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 4px rgba(255,255,255,.15), 0 10px 30px rgba(0,0,0,.4);
}
.hero__title {
  margin: 18px 0 4px;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(38px, 9vw, 68px); line-height: 1; letter-spacing: .02em;
  color: var(--red);
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.hero__title span { color: #fff; }
.hero__tag { margin: 6px 0 0; color: var(--saffron); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }
.hero__lead { margin: 14px 0 0; max-width: 480px; font-size: 17px; color: rgba(255,255,255,.88); }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.hero__addr {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 20px;
  font-size: 14px; color: rgba(255,255,255,.8); text-decoration: none;
}
.hero__addr:hover { color: #fff; text-decoration: underline; }
.hero__addr svg { color: var(--saffron); flex: none; }

/* ---------- How to ---------- */
.howto { background: var(--char); color: #fff; padding: 0 16px 22px; }
.howto__list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 760px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.howto__list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,.06);
  font-size: 13px; line-height: 1.25; color: rgba(255,255,255,.9);
}
.howto__list b {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--saffron); color: var(--char); font-size: 13px;
}

/* ---------- Category nav ---------- */
.catnav {
  position: sticky; top: var(--topbar-h); z-index: 20;
  background: rgba(250,245,236,.96);
  backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: var(--topbar-h);
}
.catnav__inner { max-width: 1200px; margin: 0 auto; padding: 10px 16px 0; }
.search {
  display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 14px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); color: var(--muted);
}
.search:focus-within { border-color: var(--red); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--paper);
  padding: 7px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
.chip:hover { border-color: var(--red); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Menu ---------- */
.menu { max-width: 1200px; margin: 0 auto; padding: 8px 16px 120px; }
.group__title {
  margin: 34px 0 0; font-family: var(--display); font-weight: 800;
  font-size: 28px; color: var(--red);
}
.sub { scroll-margin-top: calc(var(--topbar-h) + 118px); }
.sub__title { margin: 22px 0 12px; font-size: 19px; font-weight: 700; color: var(--ink); }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

.card {
  display: grid; grid-template-columns: 1fr 112px; gap: 12px;
  padding: 12px; border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow);
  min-width: 0;
}
.card__body { display: flex; flex-direction: column; min-width: 0; }
.card__name { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.25; }
.card__desc {
  margin: 4px 0 0; font-size: 13px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__foot { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 700; font-size: 17px; white-space: nowrap; }
.card__media {
  position: relative; width: 112px; height: 112px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, #f3e6d3, #ead7bb);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media.noimg::after {
  content: "🍽"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; opacity: .6;
}
.card.in-cart { box-shadow: 0 0 0 2px var(--red), var(--shadow); }

.add {
  display: inline-flex; align-items: center; gap: 4px;
  height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--red); color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap;
}
.add:hover { background: var(--red-dark); }
.stepper {
  display: inline-flex; align-items: center;
  height: 36px; border-radius: 999px; background: var(--ink); color: #fff;
}
.stepper button {
  width: 36px; height: 36px; border: 0; background: transparent; color: #fff;
  font-size: 20px; line-height: 1; display: grid; place-items: center;
}
.stepper span { min-width: 22px; text-align: center; font-weight: 700; font-size: 15px; }

.empty-search { text-align: center; color: var(--muted); padding: 40px 16px 140px; margin: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--char); color: rgba(255,255,255,.75); padding: 36px 16px 120px; font-size: 14px; }
.footer__inner { max-width: 1200px; margin: 0 auto; display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer__inner { grid-template-columns: 2fr 1.5fr 1fr; } }
.footer__brand { font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--red); }
.footer__brand span { color: #fff; }
.footer h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--saffron); }
.footer a { color: #fff; text-decoration: none; line-height: 1.8; }
.footer a:hover { text-decoration: underline; }
.footer p { margin: 6px 0 0; }

/* ---------- Floating cart bar ---------- */
.cartbar {
  position: fixed; z-index: 25; left: 50%; transform: translateX(-50%);
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 20px 0 10px; border: 0; border-radius: 999px;
  background: var(--red); color: #fff;
  box-shadow: 0 10px 30px rgba(168,40,15,.35);
  font-weight: 600; font-size: 16px;
}
.cartbar:hover { background: var(--red-dark); }
.cartbar__count {
  display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px;
  border-radius: 999px; background: rgba(0,0,0,.2); font-weight: 700;
}
.cartbar__label { flex: 1; text-align: left; }
.cartbar__total { font-weight: 700; }

/* ---------- Drawer ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(20,12,8,.5); }
.drawer {
  position: fixed; z-index: 50; top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  display: flex; flex-direction: column;
  background: var(--paper);
  transform: translateX(100%); transition: transform .25s ease;
  visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line);
}
.drawer__head h2 { margin: 0; font-family: var(--display); font-size: 22px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }

.cart-empty { text-align: center; padding: 60px 0; color: var(--muted); }
.cart-empty p { margin: 0 0 16px; font-size: 17px; }

.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-item {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.cart-item__img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #f3e6d3; }
.cart-item__name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.cart-item__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cart-item .stepper { height: 32px; }
.cart-item .stepper button { width: 32px; height: 32px; font-size: 18px; }

.cart-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px 0 4px; font-size: 18px;
}
.cart-total strong { font-size: 24px; font-family: var(--display); }

.order-form { margin-top: 18px; padding-top: 18px; border-top: 2px dashed var(--line); }
.order-form h3 { margin: 0 0 12px; font-size: 17px; }
.field { display: block; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.field > span, .field legend { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 0; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--cream);
  font-size: 16px; outline: 0; resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--red); background: #fff; }
.field__err { display: none; margin-top: 4px; font-size: 13px; color: var(--red); }
.field.has-error input, .field.has-error textarea { border-color: var(--red); background: #fff5f2; }
.field.has-error .field__err { display: block; }

.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay legend { grid-column: 1 / -1; }
.pay__opt { position: relative; }
.pay__opt input { position: absolute; opacity: 0; pointer-events: none; }
.pay__opt > span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--cream);
  font-weight: 600; font-size: 15px; color: var(--ink-2); cursor: pointer;
}
.pay__opt input:checked + span { border-color: var(--red); background: #fff3ef; color: var(--red-dark); }
.pay__opt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

.order-form__hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; top: calc(var(--topbar-h) + 12px);
  transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow);
  transition: opacity .2s ease, transform .2s ease;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 420px) {
  .brand__name { font-size: 16px; }
  .howto__list li { flex-direction: column; text-align: center; gap: 6px; font-size: 12px; padding: 10px 6px; }
  .card { grid-template-columns: 1fr 96px; }
  .card__media { width: 96px; height: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drawer, .toast, .btn { transition: none; }
  .cart-btn.bump { animation: none; }
}
