/* Экран меню: подсказка «как заказать», полоса разделов, карточки блюд, окно блюда */

.menu-layout { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.menu-main { min-width: 0; }
.side-order { display: none; }

/* Первый экран: три шага до заказа */
.intro {
  margin-top: 6px; padding: 18px 18px 16px; border-radius: 22px; background: var(--coal); color: #fff;
  box-shadow: var(--shadow-lift); animation: rise 0.7s var(--ease) both;
}
.intro-title { font: 800 21px/1.2 var(--body); max-width: 22ch; }
.steps { list-style: none; margin: 16px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--cream); }
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 21px; left: calc(50% + 28px); right: calc(-50% + 28px);
  border-top: 2px dashed rgba(239, 176, 23, 0.55);
}
.steps i {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-style: normal;
  background: var(--mustard); color: var(--coal); animation: pop 0.6s var(--spring) both;
}
.steps li:nth-child(2) i { animation-delay: 0.12s; }
.steps li:nth-child(3) i { animation-delay: 0.24s; }
.steps i.wa { background: var(--wa); color: #fff; }
.steps svg { width: 22px; height: 22px; }
.terms { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 600; color: #FFE9B8; }
.terms span { display: inline-flex; align-items: center; gap: 6px; }
.terms svg { width: 18px; height: 18px; color: var(--mustard); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.6) rotate(-10deg); } }

/* Полоса разделов: прилипает под шапкой, чёрная подложка едет к текущему разделу */
.chips {
  position: sticky; z-index: 20; top: calc(var(--appbar-h) + env(safe-area-inset-top, 0px));
  margin: 0 -16px; padding: 10px 0 8px; background: var(--mustard);
}
.chips-track {
  position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 0 16px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent);
}
.chips-track::-webkit-scrollbar { display: none; }
.chip {
  position: relative; z-index: 1; flex: none; height: 44px; padding: 0 16px; border: 0; border-radius: 12px;
  background: rgba(255, 244, 214, 0.55); color: var(--coal); font-weight: 700; font-size: 14.5px; white-space: nowrap;
  transition: color 0.3s;
}
.chip.on { color: #fff; background: transparent; }
.chips-pill {
  position: absolute; z-index: 1; top: 0; left: 0; height: 44px; border-radius: 12px; background: var(--coal);
  transition: transform 0.5s var(--spring), width 0.5s var(--spring);
}
.chip { z-index: 2; }

/* Разделы */
.group { padding-top: 18px; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
.group-head h2 { font: 800 25px/1.15 var(--head); }
.group-head p { font-size: 13.5px; font-weight: 600; color: var(--tobacco); }
.demo-note { margin: 28px 0 8px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--tobacco); }
.ym-note { margin: 28px 0 8px; text-align: center; font-size: 11.5px; font-weight: 500; color: var(--tobacco); opacity: 0.8; }

/* Карточки блюд: фото на светло-жёлтой подложке, ценник на фото, широкая кнопка */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 339px) { .grid { grid-template-columns: 1fr; } }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; cursor: pointer;
  background: var(--cream); border-radius: 18px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(22px) scale(0.97);
  transition: opacity 0.5s var(--ease), transform 0.65s var(--spring), box-shadow 0.3s;
}
.card.in { opacity: 1; transform: none; }
.card.in:active { transform: scale(0.98); transition-delay: 0s !important; }
@media (hover: hover) { .card.in:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); transition-delay: 0s !important; } }
.card.off { filter: grayscale(0.8); opacity: 0.7; }
.art { position: relative; aspect-ratio: 17 / 12; background: var(--tile); overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
@media (hover: hover) { .card:hover .art img { transform: scale(1.05); } }
.art > svg { width: 62%; height: 100%; margin: 0 auto; }
.badge {
  position: absolute; top: 8px; left: 8px; padding: 4px 8px; border-radius: 8px;
  background: var(--cream); color: var(--coal); font-size: 11.5px; font-weight: 700; line-height: 1.3;
}
.tag {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 9px; border-radius: 8px; background: var(--coal); color: #fff;
  font: 800 15px/1 var(--body); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.tag s { font-weight: 600; font-size: 12px; opacity: 0.65; }
/* Отметки админки на фото: «Хит» и скидка, в правом верхнем углу */
.marks { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.marks i {
  padding: 4px 8px; border-radius: 8px; font: 800 11.5px/1.3 var(--body); font-style: normal;
  letter-spacing: 0.02em; box-shadow: 0 4px 10px -6px rgba(20, 18, 16, 0.6);
}
.mk-hit { background: var(--red); color: #fff; }
.mk-sale { background: var(--cream); color: var(--red); }
.c-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 10px; }
.c-name { font: 700 15px/1.25 var(--body); }
.c-desc { font-size: 12px; line-height: 1.4; color: var(--tobacco); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.c-buy { margin-top: auto; padding-top: 8px; }

/* Кнопка «Добавить» и счётчик «− 2 +» */
.ctl { position: relative; display: flex; }
.ctl button { border: 0; background: none; color: inherit; display: inline-flex; align-items: center; justify-content: center; }
.ctl svg { width: 20px; height: 20px; stroke-width: 2.6; }
.ctl.empty button {
  position: relative; width: 100%; height: 44px; gap: 6px; border-radius: 12px; background: var(--coal); color: #fff;
  font-weight: 700; font-size: 14.5px; transition: transform 0.4s var(--spring), background 0.2s;
}
.ctl.empty button:active { transform: scale(0.92); }
.ctl.has {
  width: 100%; height: 44px; align-items: center; justify-content: space-between; border-radius: 12px;
  background: var(--coal); color: #fff; animation: pop-in 0.45s var(--spring);
}
.ctl.has button { width: 44px; height: 44px; border-radius: 12px; transition: transform 0.35s var(--spring), background 0.2s; }
.ctl.has button:active { transform: scale(0.85); background: rgba(255, 255, 255, 0.12); }
.ctl.has output { flex: 1; text-align: center; font: 800 16px/1 var(--body); font-variant-numeric: tabular-nums; }
.ctl-n {
  position: absolute; top: -7px; right: -5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--red); color: #fff; font: 800 12px/22px var(--body); font-style: normal; box-shadow: 0 0 0 2px var(--cream);
}
.ctl.big button { height: 52px; font-size: 16px; }
.ctl.big.has { height: 52px; }
.ctl.big.has button { height: 52px; width: 52px; }
.soldout { display: block; text-align: center; padding: 12px 0; font-size: 13px; font-weight: 700; color: var(--tobacco); }
@keyframes pop-in { from { transform: scale(0.9); } }

/* Окно блюда */
.d-art { aspect-ratio: 17 / 12; background: var(--tile); overflow: hidden; }
.d-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-art > svg { width: 50%; height: 100%; margin: 0 auto; }
.sheet.open .d-art img { animation: settle 0.8s var(--ease); }
.d-body { padding: 16px 18px 20px; display: grid; gap: 8px; }
.d-meta { font-size: 13px; font-weight: 700; color: var(--tobacco); }
.d-name { font: 800 23px/1.2 var(--body); }
.d-desc { font-size: 14.5px; color: var(--tobacco); }
.d-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; margin-top: 6px; }
.d-opts button {
  position: relative; min-height: 60px; padding: 8px; border: 2px solid rgba(20, 18, 16, 0.18); border-radius: 14px;
  background: #fff; display: grid; place-content: center; gap: 2px; text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.35s var(--spring);
}
.d-opts button b { font-size: 15px; }
.d-opts button small { font-size: 13px; font-weight: 600; color: var(--tobacco); }
.d-opts button[aria-pressed="true"] { border-color: var(--coal); background: var(--coal); color: #fff; }
.d-opts button[aria-pressed="true"] small { color: var(--tile); }
.d-opts button:active { transform: scale(0.95); }
.opt-n {
  position: absolute; top: -8px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--red); color: #fff; font: 800 12px/22px var(--body); font-style: normal;
}
.d-buy { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.d-price { font: 800 26px/1 var(--body); white-space: nowrap; font-variant-numeric: tabular-nums; }
.d-price s { font-size: 16px; font-weight: 600; opacity: 0.55; }
#dCtl { flex: 1; }
@keyframes settle { from { transform: scale(1.08); } }
