:root {
  color-scheme: dark;
  --bg: #14110f;
  --surface: #1d1916;
  --surface-2: #27211d;
  --line: #352d27;
  --text: #f1e8dd;
  --text-2: #cfc2b4;
  --muted: #9a8b7d;
  --red: #e0533a;
  --red-hover: #ec6a50;
  --red-soft: rgba(224, 83, 58, .14);
  --saffron: #e8b04b;
  --char: #0f0c0a;
  --wa: #1f9d55;
  --wa-hover: #24b261;
  --radius: 16px;
  --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(--text);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; } /* no double-tap zoom on quick repeated taps */
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }

/* ---------- 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-hover); }
.btn--ghost { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid rgba(255,255,255,.22); }
.btn--ghost:hover { background: rgba(255,255,255,.14); }
.btn--wa { width: 100%; background: var(--wa); color: #fff; font-size: 17px; min-height: 54px; }
.btn--wa:hover { background: var(--wa-hover); }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent; color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }

/* ---------- Brand (name split: first word red) ---------- */
[data-brand] { text-transform: uppercase; }
[data-brand] span { color: var(--text); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  background: rgba(15,12,10,.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.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; min-width: 0;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.brand__logo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.brand__name {
  font-family: var(--display); font-weight: 900; font-size: 19px; letter-spacing: .02em; color: var(--red);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button {
  border: 0; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
}
.lang button.is-active { background: var(--surface-2); color: var(--text); }
.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:hover { background: var(--red-hover); }
.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; overflow: hidden; background: var(--char); }
.hero__bg {
  position: absolute; inset: 0;
  background-color: var(--char);
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,12,10,.6) 0%, rgba(15,12,10,.86) 65%, var(--char) 100%);
}
.hero__content {
  position: relative; max-width: 760px; margin: 0 auto;
  padding: 44px 16px 36px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero__logo {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: var(--surface-2);
  box-shadow: 0 0 0 4px rgba(255,255,255,.08), 0 10px 30px rgba(0,0,0,.5);
}
.hero__title {
  margin: 18px 0 4px;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(36px, 9vw, 64px); line-height: 1.02; letter-spacing: .02em;
  color: var(--red);
}
.hero__tag { margin: 6px 0 0; color: var(--saffron); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }
.hero__tag:empty, .hero__lead:empty { display: none; }
.hero__lead { margin: 14px 0 0; max-width: 480px; font-size: 17px; color: var(--text-2); }
.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: var(--muted); text-decoration: none;
}
.hero__addr:hover { color: var(--text); text-decoration: underline; }
.hero__addr svg { color: var(--saffron); flex: none; }

/* ---------- How to ---------- */
.howto { background: var(--char); padding: 0 16px 24px; }
.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: var(--surface); border: 1px solid var(--line);
  font-size: 13px; line-height: 1.25; color: var(--text-2);
}
.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(20,17,15,.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  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(--surface); border: 1px solid var(--line); color: var(--muted);
}
.search:focus-within { border-color: var(--saffron); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; }
.search input::placeholder { color: var(--muted); }
.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(--surface);
  padding: 7px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap;
}
.chip:hover { border-color: var(--muted); }
.chip.is-active { background: var(--saffron); border-color: var(--saffron); color: var(--char); font-weight: 600; }

/* ---------- Menu ---------- */
.menu { max-width: 1200px; margin: 0 auto; padding: 4px 16px 120px; min-height: 40vh; }
.sub { scroll-margin-top: calc(var(--topbar-h) + 118px); }
.sub__title {
  margin: 28px 0 12px;
  font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--text);
}
.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: 14px; } }

.card {
  display: grid; grid-template-columns: 1fr 112px; gap: 12px;
  padding: 12px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  min-width: 0;
  transition: border-color .15s ease;
}
.card__body { display: flex; flex-direction: column; min-width: 0; }
.card__name { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.25; color: var(--text); }
.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; color: var(--saffron); }
.card__media {
  position: relative; width: 112px; height: 112px; border-radius: 12px; overflow: hidden;
  background: var(--surface-2);
}
.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: .45;
}
.card.in-cart { border-color: var(--red); background: linear-gradient(0deg, var(--red-soft), var(--red-soft)), var(--surface); }

.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-hover); }
.stepper {
  display: inline-flex; align-items: center;
  height: 36px; border-radius: 999px; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line);
}
.stepper button {
  width: 36px; height: 34px; border: 0; background: transparent; color: var(--text);
  font-size: 20px; line-height: 1; display: grid; place-items: center; border-radius: 999px;
}
.stepper button:hover { background: rgba(255,255,255,.06); }
.stepper span { min-width: 22px; text-align: center; font-weight: 700; font-size: 15px; }

.add__count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: rgba(0,0,0,.25); font-size: 12px; font-weight: 700;
}
.card__opts { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--text-2); }

/* ---------- Options picker ---------- */
.opt-dialog {
  width: min(420px, calc(100% - 24px)); padding: 0;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.opt-dialog::backdrop { background: rgba(0,0,0,.6); }
.opt-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 12px 0 20px; }
.opt-dialog__head h2 { margin: 0; font-family: var(--display); font-size: 20px; line-height: 1.2; }
.opt-dialog__price { margin: 4px 0 0; color: var(--saffron); font-weight: 700; }
.opt-dialog__hint { margin: 10px 20px 4px; font-size: 14px; color: var(--muted); }
.opt-list { list-style: none; margin: 0; padding: 0 20px; }
.opt-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; border-bottom: 1px solid var(--line);
}
.opt-row:last-child { border-bottom: 0; }
.opt-row__name { font-size: 17px; font-weight: 600; }
.opt-dialog__done { display: flex; width: calc(100% - 40px); margin: 12px 20px 20px; }
@media (max-width: 560px) {
  .opt-dialog {
    width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 20px 20px 0 0;
    border-bottom: 0; padding-bottom: env(safe-area-inset-bottom);
  }
}

.empty-search { text-align: center; color: var(--muted); padding: 0 16px 140px; margin: 0; }
.menu-state { display: grid; place-items: center; gap: 14px; padding: 60px 16px; text-align: center; color: var(--muted); }
.menu-state p { margin: 0; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--saffron);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.footer { background: var(--char); color: var(--muted); padding: 36px 16px 120px; font-size: 14px; border-top: 1px solid var(--line); }
.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 h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--saffron); }
.footer a { color: var(--text-2); text-decoration: none; line-height: 1.8; display: inline-block; }
.footer a:hover { color: var(--text); text-decoration: underline; }
.footer p { margin: 6px 0 0; }
#footerPhones a { display: block; }
.footer__credit {
  max-width: 1200px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid var(--line);
  text-align: center; font-size: 13px; color: var(--muted);
}
.footer__credit a { color: var(--saffron); font-weight: 600; line-height: inherit; }

/* ---------- 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(0,0,0,.45);
  font-weight: 600; font-size: 16px;
}
.cartbar:hover { background: var(--red-hover); }
.cartbar__count {
  display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px;
  border-radius: 999px; background: rgba(0,0,0,.22); 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(0,0,0,.6); }
.drawer {
  position: fixed; z-index: 50; top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line);
  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: var(--surface-2); }
.cart-item__name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.cart-item__opt { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 999px; background: rgba(232,176,75,.14); color: var(--saffron); font-size: 12px; font-weight: 700; }
.cart-item__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cart-item__sub b { color: var(--text-2); }
.cart-item .stepper { height: 32px; }
.cart-item .stepper button { width: 32px; height: 30px; 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); color: var(--saffron); }

.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(--text-2); padding: 0; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
  font-size: 16px; outline: 0; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #6f6257; }
.field input:focus, .field textarea:focus { border-color: var(--saffron); }
.field__err { display: none; margin-top: 4px; font-size: 13px; color: #ff8a73; }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.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(--bg);
  font-weight: 600; font-size: 15px; color: var(--text-2); cursor: pointer;
}
.pay__opt input:checked + span { border-color: var(--saffron); background: rgba(232,176,75,.1); color: var(--saffron); }
.pay__opt input:focus-visible + span { outline: 2px solid var(--saffron); 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(--text); color: var(--char); padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  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; }
  .spinner { animation-duration: 2s; }
}
