/* ИTLE — меню. Тёмная «стейк-хаус» тема, мобильный first. */
:root {
  --bg: #151311;
  --bg-2: #1e1b18;
  --card: #24201c;
  --card-2: #2c2723;
  --line: #372f2a;
  --text: #f3ece3;
  --muted: #a99d91;
  --accent: #c0392b;      /* фирменный красный ИTLE */
  --accent-2: #e04a3a;
  --gold: #d9a441;
  --ok: #3fae6a;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  line-height: 1.35; padding-bottom: calc(96px + var(--safe-b));
  max-width: 560px; margin-inline: auto;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 20px; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(21,19,17,.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.logo { font-weight: 900; font-size: 22px; letter-spacing: .12em; color: var(--text); }
.branch { font-size: 13px; color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 8px; }
.table-badge { font-size: 12px; color: var(--gold); border: 1px solid rgba(217,164,65,.45); padding: 5px 9px; border-radius: 999px; }
.lang { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: 12px; }

/* Рекомендуем */
.hero-strip { padding: 14px 0 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 16px 10px; }
.section-head .hint { font-size: 12px; color: var(--muted); }
.hero-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 8px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hero-scroll::-webkit-scrollbar { display: none; }
.hero-card {
  flex: 0 0 78%; scroll-snap-align: start; position: relative;
  border-radius: var(--radius); overflow: hidden; background: var(--card);
  aspect-ratio: 4 / 5; box-shadow: var(--shadow); border: 0; padding: 0; text-align: left;
}
.hero-card .media { position: absolute; inset: 0; }
.hero-card .caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
}
.hero-card .caption h3 { font-size: 18px; }
.hero-card .caption .price { color: var(--gold); font-weight: 700; margin-top: 4px; }

/* Медиа блюда: фото, видео, «живой» эффект */
.media { position: relative; overflow: hidden; background: #2a2521; }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media img { transition: opacity .35s ease; }
.media img.loading { opacity: 0; }
.media .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 34px; }
/* Живой эффект без видео: медленный зум + пар. Только transform/opacity — не грузит телефон. */
.media.live img { animation: kenburns 14s ease-in-out infinite alternate; will-change: transform; }
@keyframes kenburns { from { transform: scale(1) translateY(0); } to { transform: scale(1.08) translateY(-2%); } }
.steam { position: absolute; left: 0; right: 0; bottom: 30%; height: 45%; pointer-events: none; mix-blend-mode: screen; }
.steam span {
  position: absolute; bottom: 0; width: 34%; height: 40%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.55), rgba(255,255,255,0) 70%);
  filter: blur(10px); opacity: 0; animation: rise 5.5s ease-in-out infinite;
}
.steam span:nth-child(1) { left: 18%; animation-delay: 0s; }
.steam span:nth-child(2) { left: 40%; animation-delay: 1.8s; width: 28%; }
.steam span:nth-child(3) { left: 58%; animation-delay: 3.4s; width: 30%; }
@keyframes rise {
  0%   { transform: translateY(20%) scale(.8); opacity: 0; }
  25%  { opacity: .55; }
  100% { transform: translateY(-140%) scale(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .media.live img { animation: none; }
  .steam { display: none; }
}
.badge-live {
  position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  background: rgba(0,0,0,.55); color: #fff; padding: 4px 8px; border-radius: 999px; backdrop-filter: blur(6px);
}
.badge-live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); margin-right: 6px; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.tag { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: var(--gold); color: #1a1408; }
.tag.spicy { background: var(--accent); color: #fff; }
.tag.stop { background: rgba(0,0,0,.72); color: #fff; border: 1px solid rgba(255,255,255,.25); top: auto; bottom: 10px; left: 10px; right: auto; }
/* Стоп-лист: блюдо на месте, но приглушено и без «+» */
.card.stop .media img, .card.stop .media video, .hero-card.stop .media img, .hero-card.stop .media video { filter: grayscale(1) brightness(.55); }
.card.stop .media.live img, .hero-card.stop .media.live img { animation: none; }
.card.stop .steam, .hero-card.stop .steam, .card.stop .badge-live, .hero-card.stop .badge-live { display: none; }
.card.stop .add { opacity: .35; pointer-events: none; }
.card.stop .title, .card.stop .price { color: var(--muted); }

/* Категории */
.chips {
  position: sticky; top: 57px; z-index: 15; display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 16px; background: rgba(21,19,17,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  padding: 8px 14px; border-radius: 999px; font-size: 14px; white-space: nowrap;
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Секции и карточки */
.menu { padding: 8px 16px 0; }
.cat { padding-top: 18px; scroll-margin-top: 120px; }
.cat h2 { font-size: 22px; margin-bottom: 4px; }
.cat .note { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; border: 0; padding: 0;
  text-align: left; display: flex; flex-direction: column; color: var(--text);
  transition: transform .15s ease;
}
.card:active { transform: scale(.98); }
.card.wide { grid-column: 1 / -1; }
.card .media { aspect-ratio: 1 / 1; }
.card.wide .media { aspect-ratio: 16 / 10; }
.card .info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .title { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.card .meta { font-size: 12px; color: var(--muted); }
.card .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.card .price { font-weight: 700; font-size: 15px; }
.card .add {
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--accent); color: #fff;
  font-size: 20px; line-height: 1; display: grid; place-items: center;
}
.card .add.in { background: var(--ok); }

.foot { padding: 30px 16px 10px; text-align: center; font-size: 13px; color: var(--muted); }
.foot p + p { margin-top: 6px; font-size: 11px; }

/* Нижняя панель */
.bottom-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); z-index: 30;
  width: min(100% - 24px, 536px); display: flex; gap: 10px; align-items: stretch;
}
.btn-service, .btn-cart, .btn-chat {
  border: 0; border-radius: 999px; padding: 14px 18px; font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: var(--shadow);
}
.btn-service { background: var(--card-2); color: var(--text); flex: 1; }
.btn-cart { background: var(--accent); color: #fff; flex: 1.4; }
.btn-chat { background: var(--gold); color: #1a1408; width: 54px; padding: 0; font-size: 20px; }
.cart-count { background: rgba(255,255,255,.22); border-radius: 999px; padding: 2px 9px; font-size: 13px; }
.cart-total { margin-left: auto; opacity: .95; }

/* Шторки */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; }
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 50;
  width: min(100%, 560px); max-height: 92vh; overflow-y: auto; background: var(--bg-2);
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.5);
  animation: up .25s ease-out; padding-bottom: calc(16px + var(--safe-b));
}
@keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet-handle { width: 42px; height: 5px; border-radius: 999px; background: var(--line); margin: 10px auto 4px; }
.sheet-body { padding: 8px 18px 8px; }
.sheet-body h2 { margin-bottom: 10px; }
.dish-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; margin-bottom: 14px; }
.dish-title { font-size: 22px; font-weight: 800; }
.dish-meta { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.dish-desc { font-size: 15px; color: #d9d0c6; margin-bottom: 14px; }
.dish-price { font-size: 22px; font-weight: 800; color: var(--gold); }
.opts { margin: 12px 0; }
.opts h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.opt.active { border-color: var(--gold); color: var(--gold); }
.opt small { display: block; font-size: 10px; color: var(--muted); }
.dish-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.qty { display: flex; align-items: center; gap: 0; background: var(--card); border-radius: 999px; }
.qty button { width: 42px; height: 46px; border: 0; background: transparent; font-size: 22px; }
.qty span { min-width: 26px; text-align: center; font-weight: 700; }
.btn-primary {
  flex: 1; display: block; width: 100%; border: 0; border-radius: 999px; background: var(--accent); color: #fff;
  padding: 15px 18px; font-weight: 700; font-size: 15px; text-align: center; text-decoration: none;
}
.btn-primary + .btn-primary, .btn-primary + .btn-ghost { margin-top: 10px; }
.btn-primary:disabled { background: #3a3532; color: var(--muted); }
.btn-primary.yandex { background: #fc3f1d; }
.btn-primary.gis { background: #19aa1e; }
.btn-ghost { display: block; width: 100%; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 14px; color: var(--muted); }
.big-emoji { font-size: 44px; margin: 6px 0 8px; }

/* Корзина */
.cart-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.cart-item { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius-s); padding: 10px; }
.cart-item .thumb { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; flex: 0 0 auto; }
.cart-item .ci-title { font-weight: 600; font-size: 14px; }
.cart-item .ci-sub { font-size: 12px; color: var(--muted); }
.cart-item .ci-right { margin-left: auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cart-item .qty { transform: scale(.85); transform-origin: right; }
.cart-item .qty button { height: 36px; width: 36px; }
.field { display: block; margin: 8px 0 14px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field textarea, .chat-form input {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s);
  color: var(--text); padding: 12px; font: inherit; resize: none;
}
.cart-summary { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; margin-bottom: 12px; }
.cart-summary strong { font-size: 22px; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* Сервис */
.service-grid { display: grid; gap: 10px; }
.svc { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 15px 14px; font-size: 15px; font-weight: 600; text-align: left; }
.svc .ico { font-size: 20px; width: 26px; text-align: center; }

/* Чат */
.sheet.chat { height: 88vh; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 6px 18px 12px; border-bottom: 1px solid var(--line); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-weight: 800; }
.chat-name { font-weight: 700; }
.chat-status { font-size: 12px; color: var(--ok); }
.chat-status.off { color: var(--muted); }
.chat-close { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.chat-log > * { flex-shrink: 0; }   /* иначе ряды кнопок сжимаются в ноль при переполнении */
.msg { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; }
.msg.bot { background: var(--card); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.user { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.msg.typing { color: var(--muted); font-style: italic; }
.chat-quick { display: flex; gap: 8px; overflow-x: auto; padding: 6px 18px; scrollbar-width: none; }
.chat-quick::-webkit-scrollbar { display: none; }
.chat-quick button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.chat-form { display: flex; gap: 8px; padding: 8px 18px 4px; }
.chat-form button { width: 48px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-size: 18px; }

/* Тост */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); top: 70px; z-index: 60;
  background: #f3ece3; color: #1a1408; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow); animation: up .2s ease-out; max-width: 90%; text-align: center;
}

/* заглушка, пока нет фото */
.noimg { display:flex; align-items:center; justify-content:center; width:100%; height:100%; background: radial-gradient(circle at 50% 40%, #2e2825, #1c1917); }
.noimg span { font-size: 42px; opacity: .55; filter: grayscale(.3); }
.hero-card .noimg span, .dish-media .noimg span { font-size: 72px; }
.thumb .noimg span { font-size: 22px; }
