/* ==========================================================================
   FRESCO — дизайн-система и стили сайта

   1. Токены (цвета, тени, радиусы, типографика)
   2. Сброс и база
   3. Утилиты и примитивы (кнопки, поля, чипы, стекло)
   4. Шапка и баннер «закрыто»
   5. Герой
   6. Меню: навигация по категориям, карточки
   7. Секция «Как мы работаем», подвал
   8. Модальные окна и шторки
   9. Карточка товара
  10. Корзина и оформление
  11. Трекинг, установка PWA, уведомления
  12. Мобильная панель и адаптив
   ========================================================================== */

/* ==========================================================================
   1. ТОКЕНЫ
   ========================================================================== */

:root {
  /* Палитра: кремово-белая база + оранжево-красный акцент */
  --cream: #FFFBF5;
  --cream-2: #FFF4E8;
  --paper: #FFFFFF;
  --ink: #1B1410;
  --ink-2: #4A3F38;
  --ink-3: #8A7C72;
  --line: rgba(27, 20, 16, .09);
  --line-2: rgba(27, 20, 16, .14);

  --accent: #F4511E;
  --accent-2: #FF7A45;
  --accent-3: #D93A0B;
  --accent-soft: rgba(244, 81, 30, .1);
  --accent-glow: rgba(244, 81, 30, .28);

  --green: #16A34A;
  --green-soft: rgba(22, 163, 74, .12);
  --red: #DC2626;
  --red-soft: rgba(220, 38, 38, .1);
  --amber: #D97706;
  --amber-soft: rgba(217, 119, 6, .12);

  /* Стекло */
  --glass-bg: rgba(255, 255, 255, .72);
  --glass-bg-strong: rgba(255, 255, 255, .88);
  --glass-border: rgba(255, 255, 255, .7);
  --blur: saturate(180%) blur(20px);

  /* Тени: мягкие, многослойные */
  --sh-xs: 0 1px 2px rgba(27, 20, 16, .05);
  --sh-sm: 0 2px 8px rgba(27, 20, 16, .06), 0 1px 2px rgba(27, 20, 16, .04);
  --sh-md: 0 8px 24px rgba(27, 20, 16, .08), 0 2px 6px rgba(27, 20, 16, .04);
  --sh-lg: 0 20px 48px rgba(27, 20, 16, .12), 0 4px 12px rgba(27, 20, 16, .06);
  --sh-xl: 0 32px 72px rgba(27, 20, 16, .18), 0 8px 20px rgba(27, 20, 16, .08);
  --sh-accent: 0 8px 24px rgba(244, 81, 30, .3);

  /* Радиусы */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Типографика */
  --font: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ui: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Анимации */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: .16s;
  --t: .28s;
  --t-slow: .5s;

  /* Раскладка */
  --container: 1200px;
  --gutter: 24px;
  --header-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ==========================================================================
   2. СБРОС И БАЗА
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 64px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/**
 * Блокировка фона при открытом окне.
 * position: fixed вместо overflow: hidden — только так на iOS страница
 * действительно перестаёт скроллиться. Смещение top ставит скрипт,
 * он же возвращает прокрутку на место при закрытии.
 */
body.is-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}


/**
 * Атрибут hidden должен побеждать любые display из наших правил.
 * Без этого элементы вроде .modal { display: grid } остаются видимыми,
 * даже когда JS выставил им hidden.
 */
[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; }

button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: #fff; }

/* Скроллбар */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(27, 20, 16, .16);
  border-radius: var(--r-full);
  border: 3px solid var(--cream);
}
::-webkit-scrollbar-thumb:hover { background: rgba(27, 20, 16, .28); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Декоративные пятна фона */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}

.ambient__blob--1 {
  width: 520px; height: 520px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(255, 138, 76, .5), transparent 70%);
  animation: float 22s var(--ease) infinite;
}

.ambient__blob--2 {
  width: 420px; height: 420px;
  top: 40vh; left: -160px;
  background: radial-gradient(circle, rgba(255, 196, 120, .45), transparent 70%);
  animation: float 26s var(--ease) infinite reverse;
}

.ambient__blob--3 {
  width: 380px; height: 380px;
  bottom: -120px; right: 10%;
  background: radial-gradient(circle, rgba(244, 81, 30, .22), transparent 70%);
  animation: float 30s var(--ease) infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.06); }
  66%      { transform: translate(-30px, 24px) scale(.96); }
}

/* Появление при скролле */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   3. ПРИМИТИВЫ
   ========================================================================== */

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--sh-md);
}

.text-gradient {
  background: linear-gradient(115deg, var(--accent) 10%, #FF9E2C 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* --- Кнопки --- */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  background: var(--btn-bg);
  color: var(--btn-fg);
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t) var(--ease),
              background-color var(--t) var(--ease),
              opacity var(--t) var(--ease);
}

.btn:active { transform: scale(.97); }

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: .5;
  pointer-events: none;
}

.btn--primary {
  --btn-fg: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: var(--sh-accent);
}
.btn--primary:hover {
  box-shadow: 0 12px 32px var(--accent-glow);
  transform: translateY(-1px);
}

.btn--soft {
  --btn-bg: var(--accent-soft);
  --btn-fg: var(--accent-3);
}
.btn--soft:hover { background: rgba(244, 81, 30, .16); }

.btn--ghost {
  --btn-fg: var(--ink-2);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .6);
}
.btn--ghost:hover {
  background: #fff;
  border-color: var(--line-2);
  box-shadow: var(--sh-sm);
}

.btn--lg { padding: 15px 26px; font-size: 16px; }
.btn--full { width: 100%; }
.btn--grow { flex: 1; }

.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
.btn--soft.is-loading::after,
.btn--ghost.is-loading::after {
  border-color: rgba(244, 81, 30, .3);
  border-top-color: var(--accent);
}

@keyframes spin { to { transform: rotate(360deg); } }

.linklike {
  color: var(--ink-3);
  transition: color var(--t) var(--ease);
}
.linklike:hover { color: var(--accent); }

/* --- Чипы и бейджи --- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
}

.chip--accent {
  background: var(--accent-soft);
  border-color: rgba(244, 81, 30, .2);
  color: var(--accent-3);
}

.chip__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s var(--ease) infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .45; transform: scale(.82); }
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: 0 4px 12px rgba(244, 81, 30, .28);
}

.pulse {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}
.pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--green);
  opacity: .3;
  animation: ripple 2s var(--ease) infinite;
}
.pulse--off { background: var(--ink-3); }
.pulse--off::after { display: none; }

@keyframes ripple {
  0%   { transform: scale(.6); opacity: .5; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* --- Поля ввода --- */

.field { display: flex; flex-direction: column; gap: 7px; position: relative; }

.field__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.field__label i { color: var(--accent); font-style: normal; }

.input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .8);
  font-family: var(--font-ui);
  /* Ровно 16px: при меньшем размере Safari на iPhone масштабирует
     страницу, как только человек ставит курсор в поле */
  font-size: 16px;
  transition: border-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease),
              background-color var(--t) var(--ease);
}


.input::placeholder { color: var(--ink-3); opacity: .75; }

.input:hover { border-color: rgba(27, 20, 16, .2); }

.input:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.input--area { resize: vertical; min-height: 84px; line-height: 1.5; }

.field.has-error .input {
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.field__error {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
}
.field.has-error .field__error { display: block; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.hint {
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}
.hint--error { color: var(--red); font-weight: 600; }

/* --- Заголовки секций --- */

.section-head { text-align: center; margin-bottom: 34px; }

.section-title {
  font-size: clamp(30px, 4.5vw, 44px);
  margin-bottom: 10px;
}

.section-sub {
  color: var(--ink-3);
  font-size: 17px;
  max-width: 520px;
  margin-inline: auto;
}

/* --- Пустые состояния --- */

.empty {
  text-align: center;
  padding: 64px 24px;
}
.empty--sm { padding: 48px 20px; }
.empty__emoji { font-size: 52px; display: block; margin-bottom: 14px; }
.empty h3 { font-size: 21px; margin-bottom: 8px; }
.empty p { color: var(--ink-3); margin-bottom: 18px; }

/* --- Скелетоны --- */

.sk {
  border-radius: var(--r-md);
  background: linear-gradient(100deg,
    rgba(27, 20, 16, .05) 30%,
    rgba(27, 20, 16, .09) 50%,
    rgba(27, 20, 16, .05) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.sk--img { aspect-ratio: 4 / 3; margin-bottom: 16px; border-radius: var(--r-lg); }
.sk--line { height: 15px; margin-bottom: 10px; }
.sk--short { width: 55%; }

@keyframes shimmer {
  from { background-position: 150% 0; }
  to   { background-position: -150% 0; }
}

/* ==========================================================================
   4. ШАПКА
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--t) var(--ease), background-color var(--t) var(--ease);
  background: rgba(255, 251, 245, .72);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid transparent;
}

.header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(27, 20, 16, .06);
}

.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo { display: flex; align-items: center; gap: 11px; }

.logo__mark {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: var(--sh-accent);
  transition: transform var(--t) var(--ease);
}
.logo__mark svg { width: 26px; height: 26px; }
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.06); }

.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__text strong { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.logo__text small { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }

.header__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  padding: 7px 13px;
  white-space: nowrap;
  flex: none;

  border-radius: var(--r-full);
  background: var(--green-soft);
  color: #12803B;
  font-size: 13px;
  font-weight: 700;
}
.header__status.is-closed { background: rgba(27, 20, 16, .06); color: var(--ink-3); }

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.cart-btn { position: relative; padding-right: 20px; }

.cart-btn__badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border: 2px solid var(--cream);
  animation: pop .3s var(--ease);
}

@keyframes pop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* Баннер «закрыто» */
.closed-banner {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: linear-gradient(135deg, #2B211B, #40312A);
  color: #fff;
}

.closed-banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px var(--gutter);
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
}
.closed-banner .icon { opacity: .8; }

/* ==========================================================================
   5. ГЕРОЙ
   ========================================================================== */

.hero { padding: clamp(40px, 7vw, 84px) 0 clamp(48px, 8vw, 96px); }

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.hero__content { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }

.hero__title {
  font-size: clamp(38px, 6.4vw, 68px);
  letter-spacing: -.035em;
  line-height: 1.05;
}

.hero__text {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-2);
  max-width: 44ch;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__actions .icon { transform: rotate(0); }

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  width: 100%;
}
.hero__facts li { display: flex; flex-direction: column; }
.hero__facts strong { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.hero__facts span { font-size: 13px; color: var(--ink-3); }

/* Визуал: тарелка с пиццей */
.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 380px;
}

.hero__plate {
  width: min(400px, 84%);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .95), rgba(255, 244, 232, .6) 60%),
    linear-gradient(135deg, #FFE9D2, #FFD6B0);
  box-shadow:
    0 40px 80px rgba(244, 81, 30, .18),
    inset 0 2px 20px rgba(255, 255, 255, .9);
  animation: float-slow 8s var(--ease) infinite;
}

.hero__pizza {
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, #FFC46B, #F0982E 55%, #E07B1E 100%);
  box-shadow:
    inset 0 -8px 24px rgba(160, 80, 10, .3),
    inset 0 6px 18px rgba(255, 255, 255, .5),
    0 12px 28px rgba(224, 123, 30, .3);
  position: relative;
}

/* Пепперони */
.hero__pizza::before,
.hero__pizza::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #E8543A, #C0341C);
  box-shadow:
    0 2px 6px rgba(120, 30, 10, .35),
    inset 0 -2px 5px rgba(120, 30, 10, .3);
}
.hero__pizza::before { width: 17%; aspect-ratio: 1; top: 20%; left: 26%; }
.hero__pizza::after  { width: 14%; aspect-ratio: 1; bottom: 24%; right: 24%; }

@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}

.hero__card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 17px;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  animation: float-slow 7s var(--ease) infinite;
}
.hero__card strong { display: block; font-size: 14px; font-weight: 700; }
.hero__card small { font-size: 12px; color: var(--ink-3); }
.hero__card-emoji { font-size: 24px; }

.hero__card--1 { top: 8%; left: -2%; animation-delay: -1.5s; }
.hero__card--2 { bottom: 10%; right: -4%; animation-delay: -3.5s; }

/* ==========================================================================
   6. МЕНЮ
   ========================================================================== */

.menu { padding-bottom: clamp(48px, 8vw, 88px); scroll-margin-top: var(--header-h); }

/* Навигация по категориям */
.catnav {
  position: sticky;
  /* Под шапкой, а если висит баннер «закрыто» — под ним.
     Высоту считает скрипт и кладёт в переменную. */
  top: var(--sticky-top, var(--header-h));

  z-index: 80;
  margin-bottom: 28px;
  padding: 10px 0;
  background: rgba(255, 251, 245, .82);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.catnav__scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px;
  scroll-snap-type: x proximity;
}
.catnav__scroll::-webkit-scrollbar { display: none; }

.catnav__btn {
  flex: none;
  padding: 10px 18px;
  border-radius: var(--r-full);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line);
  scroll-snap-align: start;
  transition: all var(--t) var(--ease);
}
.catnav__btn:hover { background: #fff; box-shadow: var(--sh-sm); }

.catnav__btn.is-active {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--sh-accent);
}

/* Секция категории */
.cat { margin-bottom: 52px; scroll-margin-top: calc(var(--header-h) + 70px); }

.cat__head { margin-bottom: 20px; }
.cat__title { font-size: clamp(24px, 3.2vw, 31px); }
.cat__desc { color: var(--ink-3); font-size: 15px; margin-top: 4px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 22px;
}

/* Карточка товара */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: var(--r-xl);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--sh-sm);
  cursor: pointer;
  transition: transform var(--t) var(--ease),
              box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-lg);
  border-color: rgba(244, 81, 30, .22);
}
.card:active { transform: translateY(-2px) scale(.99); }

.card--skeleton { cursor: default; pointer-events: none; }
.card--skeleton:hover { transform: none; box-shadow: var(--sh-sm); }

.card__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--cream-2), #FFE4C7);
}

.card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
/* Фото ведёт себя как нарисованная пицца: чуть подкручивается и наезжает.
   Масштаб 1.16 обязателен — повёрнутый на 8° квадрат иначе показывает
   пустые углы контейнера (для покрытия нужно cos8° + sin8° ≈ 1.13). */
.card:hover .card__img { transform: rotate(8deg) scale(1.16); }

/* Нарисованная пицца вместо фото */
.pizza-art {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
}
.pizza-art__disc {
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #FFCE7D, #F0982E 58%, #DE7A1F 100%);
  box-shadow:
    inset 0 -6px 18px rgba(160, 80, 10, .26),
    inset 0 5px 14px rgba(255, 255, 255, .45),
    0 8px 20px rgba(224, 123, 30, .22);
  position: relative;
  transition: transform var(--t-slow) var(--ease);
}
.card:hover .pizza-art__disc { transform: rotate(14deg) scale(1.04); }

.pizza-art__disc span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #E8543A, #BC331B);
  box-shadow: inset 0 -2px 4px rgba(120, 30, 10, .3);
}
.pizza-art__disc span:nth-child(1) { width: 17%; aspect-ratio: 1; top: 21%; left: 25%; }
.pizza-art__disc span:nth-child(2) { width: 14%; aspect-ratio: 1; top: 52%; left: 55%; }
.pizza-art__disc span:nth-child(3) { width: 12%; aspect-ratio: 1; top: 30%; right: 20%; }
.pizza-art__disc span:nth-child(4) { width: 13%; aspect-ratio: 1; bottom: 20%; left: 30%; }

.card__badge { position: absolute; top: 12px; left: 12px; z-index: 2; }

.card__out {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 251, 245, .78);
  backdrop-filter: blur(3px);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-2);
  z-index: 3;
}

.card.is-out { cursor: default; }
.card.is-out:hover { transform: none; box-shadow: var(--sh-sm); border-color: var(--glass-border); }

.card__name {
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}

.card__desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-3);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__price { display: flex; flex-direction: column; line-height: 1.2; }
.card__price small { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.card__price strong { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }

.card__add {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent);
  transition: all var(--t) var(--ease);
}
.card:hover .card__add {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: var(--sh-accent);
}
.card__add svg { width: 22px; height: 22px; fill: currentColor; }

/* ==========================================================================
   7. «КАК МЫ РАБОТАЕМ» И ПОДВАЛ
   ========================================================================== */

.about { padding-bottom: clamp(56px, 9vw, 100px); }

.about__inner {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  align-items: start;
}

.about__card { padding: clamp(26px, 4vw, 40px); border-radius: var(--r-xl); }
.about__card .section-title { text-align: left; margin-bottom: 26px; }

.steps { display: flex; flex-direction: column; gap: 22px; }
.steps li { display: flex; gap: 16px; }

.steps__num {
  flex: none;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent-3);
  font-weight: 800;
}
.steps strong { display: block; font-size: 16.5px; margin-bottom: 3px; }
.steps p { font-size: 14.5px; color: var(--ink-3); }

.about__side { display: flex; flex-direction: column; gap: 16px; }

.info-card { padding: 22px 24px; border-radius: var(--r-xl); }
.info-card h3 { font-size: 17px; margin-bottom: 14px; }

.hours { display: flex; flex-direction: column; gap: 8px; }

.hours li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14.5px;
  padding: 5px 9px;
  border-radius: var(--r-sm);
}
.hours li.is-today {
  background: var(--accent-soft);
  font-weight: 700;
  color: var(--accent-3);
}
.hours__day { color: var(--ink-2); }
.hours li.is-today .hours__day { color: inherit; }
.hours__time { font-variant-numeric: tabular-nums; font-weight: 600; }
.hours__time--off { color: var(--ink-3); font-weight: 500; }

.info-card__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.info-card__row .icon { color: var(--accent); margin-top: 1px; }
.info-card__row a:hover { color: var(--accent); }

.footer {
  padding: 34px 0 calc(34px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .5);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 14px;
  color: var(--ink-3);
}
.footer__brand { display: block; font-size: 18px; color: var(--ink); margin-bottom: 3px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer__links a:hover { color: var(--accent); }
.footer__copy { font-size: 13px; }

/* ==========================================================================
   8. МОДАЛЬНЫЕ ОКНА И ШТОРКИ
   ========================================================================== */

.modal,
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
}

.modal { place-items: center; padding: 20px; }

.modal__backdrop,
.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 20, 16, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade var(--t) var(--ease);
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal__box {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 30px;
  border-radius: var(--r-xl);
  background: var(--glass-bg-strong);
  box-shadow: var(--sh-xl);
  animation: modal-in .38s var(--ease-out);
}

.modal__box--wide { max-width: 880px; padding: 0; overflow: hidden; }
.modal__box--center { text-align: center; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(28px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.modal__title { font-size: 24px; margin-bottom: 22px; }

.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 5;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  color: var(--ink-2);
  box-shadow: var(--sh-sm);
  transition: all var(--t) var(--ease);
}
.modal__close:hover { background: #fff; color: var(--ink); transform: rotate(90deg); }
.modal__close svg { width: 20px; height: 20px; fill: currentColor; }
.modal__close--left { position: static; transform: none; }
.modal__close--left:hover { transform: none; }

/* Шторки (корзина, оформление) */
.drawer { justify-content: flex-end; }

.drawer__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(460px, 100%);
  height: 100%;
  /* dvh учитывает адресную строку мобильных браузеров: без него
     нижняя кнопка «Оформить» уезжает под панель Safari */
  height: 100dvh;
  background: var(--cream);
  box-shadow: var(--sh-xl);
  animation: drawer-in .38s var(--ease-out);
}

.drawer__panel--wide { width: min(560px, 100%); }

@keyframes drawer-in {
  from { transform: translateX(100%); }
  to   { transform: none; }
}

.drawer__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .6);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.drawer__head h2 { font-size: 21px; }
.drawer__head .modal__close { position: static; margin-left: auto; }
.drawer__head .modal__close--left { margin: 0; }

.drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.drawer__foot {
  padding: 18px 22px calc(18px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

/* ==========================================================================
   9. КАРТОЧКА ТОВАРА
   ========================================================================== */

.product { display: grid; grid-template-columns: 1fr 1fr; }

.product__media {
  display: grid;
  place-items: center;
  padding: 30px;
  background: linear-gradient(150deg, var(--cream-2), #FFE0BF);
  min-height: 340px;
}
.product__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--r-lg);
}
.product__media .pizza-art { width: 100%; }
.product__media .pizza-art__disc { width: 82%; animation: float-slow 8s var(--ease) infinite; }

.product__body {
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product__name { font-size: 27px; letter-spacing: -.03em; }
.product__desc { font-size: 15px; color: var(--ink-3); line-height: 1.55; }

/* Переключатель размеров */
.product__sizes {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: var(--r-lg);
  background: rgba(27, 20, 16, .05);
}

.size {
  flex: 1;
  padding: 11px 8px;
  border-radius: var(--r-md);
  text-align: center;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: all var(--t) var(--ease);
}
.size:hover:not(.is-active):not(:disabled) { background: rgba(255, 255, 255, .6); }

.size.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--sh-sm);
}
.size:disabled { opacity: .4; cursor: not-allowed; }
.size small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }

/* КБЖУ */
.nutrition {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 15px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
}

.nutrition div { text-align: center; }
.nutrition strong { display: block; font-size: 16px; font-weight: 800; }
.nutrition small { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.nutrition__note {
  grid-column: 1 / -1;
  font-size: 11.5px;
  color: var(--ink-3);
  text-align: center;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.product__foot {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.counter {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-full);
  background: rgba(27, 20, 16, .05);
}

.counter__btn {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-2);
  background: #fff;
  box-shadow: var(--sh-xs);
  transition: all var(--t-fast) var(--ease);
}
.counter__btn:hover { color: var(--accent); transform: scale(1.08); }
.counter__btn:disabled { opacity: .35; pointer-events: none; }

.counter__value {
  min-width: 30px;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
  10. КОРЗИНА И ОФОРМЛЕНИЕ
   ========================================================================== */

.cart-list { display: flex; flex-direction: column; gap: 12px; }

.cart-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 13px;
  padding: 13px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  animation: item-in .3s var(--ease-out);
}

@keyframes item-in {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: none; }
}

.cart-item.is-removing {
  animation: item-out .25s var(--ease) forwards;
}

@keyframes item-out {
  to { opacity: 0; transform: translateX(30px); height: 0; padding: 0; margin: 0; }
}

.cart-item__media {
  width: 62px; height: 62px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--cream-2), #FFE4C7);
}
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__media .pizza-art__disc { width: 76%; }

.cart-item__top { display: flex; justify-content: space-between; gap: 8px; }
.cart-item__name { font-size: 15px; font-weight: 700; }
.cart-item__size { font-size: 12.5px; color: var(--ink-3); }

.cart-item__note {
  font-size: 12.5px;
  color: var(--accent-3);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  display: inline-block;
  margin-top: 5px;
}

.cart-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.cart-item__price { font-weight: 800; font-variant-numeric: tabular-nums; }
.cart-item__price s { color: var(--ink-3); font-weight: 600; margin-right: 2px; }

/* Строка-подарок: без счётчика и удаления, с зелёным акцентом */
.cart-item--gift { background: rgba(46, 160, 90, .06); }
.cart-item__gift-tag {
  font-size: 11px; font-weight: 700; color: #2E9E5B;
  background: rgba(46, 160, 90, .12);
  padding: 2px 7px; border-radius: var(--r-full); white-space: nowrap;
}
.cart-item__gift-note { font-size: 13px; color: var(--ink-3); }

.cart-item__remove {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
  transition: all var(--t) var(--ease);
}
.cart-item__remove:hover { background: var(--red-soft); color: var(--red); }
.cart-item__remove svg { width: 17px; height: 17px; fill: currentColor; }

.counter--sm { padding: 3px; }
.counter--sm .counter__btn { width: 28px; height: 28px; font-size: 16px; }
.counter--sm .counter__value { min-width: 24px; font-size: 14px; }

/* Промокод */
.promo { padding-top: 4px; }
.promo__row { display: flex; gap: 8px; }
.promo__row .input { flex: 1; text-transform: uppercase; }
.promo__row .input::placeholder { text-transform: none; }

.promo__msg {
  margin-top: 9px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 13px;
  border-radius: var(--r-md);
}
.promo__msg--ok { background: var(--green-soft); color: #12803B; }
.promo__msg--err { background: var(--red-soft); color: var(--red); }

/* Итоги */
.totals { display: flex; flex-direction: column; gap: 8px; }

.totals__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.totals__row dd { font-variant-numeric: tabular-nums; font-weight: 600; }
.totals__row--discount { color: var(--green); }
.totals__row--free dd { color: var(--green); font-weight: 700; }

.totals__row--total {
  padding-top: 11px;
  margin-top: 3px;
  border-top: 1px solid var(--line);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}
.totals__row--total dd { font-size: 22px; font-weight: 800; }

/* Оформление */
.fieldset { display: flex; flex-direction: column; gap: 14px; }

.fieldset__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
}
.fieldset__title small { font-size: 13px; font-weight: 600; color: var(--ink-3); }

/* Подсказки адреса */
.field--suggest { position: relative; }

.suggest {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  z-index: 20;
  margin-top: 6px;
  max-height: 260px;
  overflow-y: auto;
  border-radius: var(--r-lg);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  animation: modal-in .2s var(--ease-out);
}

.suggest__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  transition: background-color var(--t-fast) var(--ease);
}
.suggest__item:last-child { border-bottom: 0; }
.suggest__item:hover,
.suggest__item.is-active { background: var(--accent-soft); }
.suggest__item strong { display: block; font-size: 14.5px; font-weight: 600; }
.suggest__item small { font-size: 12.5px; color: var(--ink-3); }

.suggest__empty { padding: 14px 15px; font-size: 14px; color: var(--ink-3); text-align: center; }

/* Зона доставки */
.zone-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  animation: modal-in .25s var(--ease-out);
}
.zone-note--ok { background: var(--green-soft); color: #12803B; }
.zone-note--warn { background: var(--amber-soft); color: #92500A; }
.zone-note--err { background: var(--red-soft); color: var(--red); }
.zone-note small { display: block; font-weight: 500; opacity: .85; margin-top: 2px; }

/* Слоты */
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.slot {
  padding: 12px 6px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-2);
  background: rgba(255, 255, 255, .7);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: all var(--t) var(--ease);
}
.slot:hover:not(:disabled) {
  border-color: var(--accent);
  background: #fff;
  transform: translateY(-2px);
}

.slot.is-active {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--sh-accent);
}
/* Ховер по уже выбранному слоту не должен перекрашивать его в белый —
   иначе белый текст пропадает на белом фоне. Держим акцентную заливку. */
.slot.is-active:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
}

.slot:disabled {
  opacity: .45;
  cursor: not-allowed;
  text-decoration: line-through;
  background: rgba(27, 20, 16, .04);
}

.slots__empty {
  grid-column: 1 / -1;
  padding: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-3);
  background: rgba(27, 20, 16, .04);
  border-radius: var(--r-md);
}

/* Оплата */
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay__option { cursor: pointer; }
.pay__option input { position: absolute; opacity: 0; width: 0; height: 0; }

.pay__body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-2);
  background: rgba(255, 255, 255, .7);
  font-size: 14.5px;
  font-weight: 600;
  transition: all var(--t) var(--ease);
}
.pay__option:hover .pay__body { border-color: rgba(244, 81, 30, .4); }

.pay__option input:checked + .pay__body {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-3);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.pay__option input:focus-visible + .pay__body { outline: 2px solid var(--accent); outline-offset: 2px; }
.pay__emoji { font-size: 20px; }

/* ==========================================================================
  11. УСПЕХ, ТРЕКИНГ, УСТАНОВКА, УВЕДОМЛЕНИЯ
   ========================================================================== */

.success { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.success__icon {
  width: 76px; height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #34D07A, var(--green));
  color: #fff;
  box-shadow: 0 12px 32px rgba(22, 163, 74, .35);
  animation: bounce-in .55s var(--ease-out);
}
.success__icon svg { width: 40px; height: 40px; fill: currentColor; }

@keyframes bounce-in {
  0%   { transform: scale(0) rotate(-25deg); opacity: 0; }
  60%  { transform: scale(1.12) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

.success h2 { font-size: 26px; }
.success__num { font-size: 17px; color: var(--ink-3); }
.success__num strong { color: var(--ink); font-size: 21px; }

.success__box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  padding: 17px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line);
}
.success__box small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.success__box strong { font-size: 17px; font-weight: 800; }

.success__text { font-size: 14px; color: var(--ink-3); }
.success__actions { display: flex; flex-direction: column; gap: 9px; width: 100%; margin-top: 4px; }

/* Трекинг */
.track-form { display: flex; flex-direction: column; gap: 15px; }

.track-card {
  margin-top: 22px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  animation: modal-in .3s var(--ease-out);
}

.track-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.track-card__num { font-size: 19px; font-weight: 800; }

.status-pill {
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

/* Прогресс статусов */
.stepper { display: flex; flex-direction: column; gap: 0; margin-bottom: 18px; }

.stepper__item {
  display: flex;
  gap: 13px;
  position: relative;
  padding-bottom: 18px;
}
.stepper__item:last-child { padding-bottom: 0; }

.stepper__item::before {
  content: '';
  position: absolute;
  left: 13px; top: 28px; bottom: 0;
  width: 2px;
  background: var(--line-2);
}
.stepper__item:last-child::before { display: none; }
.stepper__item.is-done::before { background: var(--green); }

.stepper__dot {
  flex: none;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(27, 20, 16, .07);
  color: var(--ink-3);
  font-size: 13px;
  z-index: 1;
}
.stepper__item.is-done .stepper__dot { background: var(--green); color: #fff; }
.stepper__item.is-current .stepper__dot {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.stepper__dot svg { width: 15px; height: 15px; fill: currentColor; }

.stepper__text { font-size: 14.5px; font-weight: 600; color: var(--ink-3); padding-top: 3px; }
.stepper__item.is-done .stepper__text,
.stepper__item.is-current .stepper__text { color: var(--ink); }

.track-card__rows { display: flex; flex-direction: column; gap: 8px; }
.track-card__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.track-card__row dt { color: var(--ink-3); }
.track-card__row dd { font-weight: 600; text-align: right; }

/* Установка PWA */
.install { text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.install__icon { font-size: 54px; }
.install h2 { font-size: 23px; }
.install p { color: var(--ink-3); font-size: 15px; }

.install__steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  text-align: left;
  counter-reset: step;
}
.install__steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  font-size: 14.5px;
  font-weight: 600;
}

.install__step-icon {
  flex: none;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
}
.install__step-icon svg { width: 19px; height: 19px; fill: currentColor; }

/* Тосты */
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  pointer-events: none;
  width: min(420px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 19px;
  border-radius: var(--r-full);
  background: rgba(27, 20, 16, .93);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: var(--sh-lg);
  animation: toast-in .35s var(--ease-out);
  pointer-events: auto;
  max-width: 100%;
}
.toast.is-hiding { animation: toast-out .3s var(--ease) forwards; }
.toast--ok { background: linear-gradient(135deg, #1FA855, var(--green)); }
.toast--err { background: linear-gradient(135deg, #E24343, var(--red)); }
.toast__emoji { font-size: 18px; flex: none; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(22px) scale(.94); }
  to   { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(14px) scale(.96); }
}

/* ==========================================================================
  12. МОБИЛЬНАЯ ПАНЕЛЬ И АДАПТИВ
   ========================================================================== */

.mobilebar {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 150;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: rgba(255, 251, 245, .86);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--line);
  display: none;
  animation: bar-in .35s var(--ease-out);
}

@keyframes bar-in {
  from { transform: translateY(100%); }
  to   { transform: none; }
}

.mobilebar__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  font-weight: 700;
  box-shadow: var(--sh-accent);
}
.mobilebar__left { display: flex; align-items: center; gap: 10px; }

.mobilebar__count {
  min-width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .25);
  font-size: 13px;
  font-weight: 800;
}
.mobilebar__total { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* --- Планшет --- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { min-height: 320px; order: -1; }
  .hero__content { align-items: center; text-align: center; }
  .hero__text { max-width: 52ch; }
  .hero__actions { justify-content: center; }
  .hero__facts { justify-content: center; text-align: center; }
  .hero__facts li { align-items: center; }
  .about__inner { grid-template-columns: 1fr; }
  .about__card .section-title { text-align: center; }
}

/* --- Мобильные --- */
@media (max-width: 768px) {
  :root { --gutter: 16px; --header-h: 64px; }

  .header__status,
  .cart-btn__label,
  .btn--ghost#openTrack span { display: none; }

  /* Уведомления и корзина уже есть в нижней панели — в шапке дубли.
     Кнопка телефона нигде не повторяется, её оставляем. */
  #openSetup,
  .cart-btn { display: none; }

  /* Лого вплотную к краю смотрится тесно — чуть отодвигаем */
  .logo { margin-left: 6px; }

  #openTrack { padding: 11px; }
  .logo__text small { display: none; }

  .hero { padding-top: 26px; }
  .hero__card--1 { top: 2%; left: -8px; padding: 10px 13px; }
  .hero__card--2 { bottom: 4%; right: -8px; padding: 10px 13px; }
  .hero__card small { display: none; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
  .card { padding: 11px; border-radius: var(--r-lg); }
  .card__media { margin-bottom: 11px; }
  .card__name { font-size: 15px; }
  .card__desc { font-size: 12.5px; -webkit-line-clamp: 2; margin-bottom: 10px; }
  .card__price strong { font-size: 17px; }
  .card__add { width: 36px; height: 36px; }

  .product { grid-template-columns: 1fr; }
  .product__media { min-height: 220px; padding: 22px; }
  .product__media .pizza-art__disc { width: 62%; }
  .product__body { padding: 22px 20px 24px; }
  .product__name { font-size: 22px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal__box {
    max-height: 92vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    animation: sheet-in .38s var(--ease-out);
    padding: 26px 20px calc(26px + var(--safe-b));
  }
  .modal__box--wide { padding: 0; }

  @keyframes sheet-in {
    from { transform: translateY(100%); }
    to   { transform: none; }
  }

  .drawer__panel { width: 100%; }
  .drawer__body { padding: 16px; gap: 18px; }
  .drawer__foot { padding: 14px 16px calc(14px + var(--safe-b)); }
  .drawer__head { padding: 16px; }

  .grid-2, .grid-3, .pay { grid-template-columns: 1fr; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .nutrition { grid-template-columns: repeat(2, 1fr); }

  .mobilebar { display: block; }
  body.has-cart .footer { padding-bottom: 110px; }

  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
}

/* --- Узкие телефоны --- */
@media (max-width: 400px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card__desc { display: none; }
  .hero__title { font-size: 33px; }
  .hero__facts { gap: 10px 20px; }
  .hero__facts strong { font-size: 17px; }
  .success__box { grid-template-columns: 1fr; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .slot { font-size: 13px; padding: 11px 4px; }
}

/* --- Телефон в альбомной ориентации: экран низкий --- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero__visual { display: none; }
  .hero { padding: 24px 0 32px; }
  .modal__box { max-height: 96vh; }
  .drawer__head { padding: 12px 16px; }
  .drawer__head h2 { font-size: 18px; }
}

/**
 * Тач-устройства: убираем эффекты наведения (на телефоне они «залипают»
 * после нажатия) и увеличиваем зоны нажатия до рекомендованных 44 px.
 */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: var(--sh-sm); border-color: var(--glass-border); }
  .card:hover .card__img,
  .card:hover .pizza-art__disc { transform: none; }
  .card:hover .card__add { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
  .btn--primary:hover { transform: none; box-shadow: var(--sh-accent); }
  .slot:hover:not(:disabled) { transform: none; }
  .counter__btn:hover { transform: none; color: var(--ink-2); }
  .modal__close:hover { transform: none; }

  /* Отклик на касание вместо наведения */
  .card:active { transform: scale(.985); }
  .catnav__btn:active,
  .slot:active { transform: scale(.96); }

  .counter__btn,
  .modal__close,
  .cart-item__remove { min-width: 44px; min-height: 44px; }
  .cart-item__remove { width: 40px; height: 40px; }
  .counter--sm .counter__btn { min-width: 36px; min-height: 36px; }
}

/* Плавная инерционная прокрутка внутри окон на iOS */
.drawer__body,
.modal__box,
.suggest,
.catnav__scroll { -webkit-overflow-scrolling: touch; }

/* --- Печать --- */
@media print {
  .header, .footer, .mobilebar, .ambient, .modal, .drawer { display: none !important; }
  body { background: #fff; }
}



/* NEW-UI ====================================================================
   Навигация, мои заказы, мастер настройки, соцсети
   ========================================================================== */

/* --- Навигация в шапке --- */
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 10px;
  flex: 1;                /* забирает свободное место, кнопки — справа */
  min-width: 0;
}

.nav__link {
  position: relative;
  padding: 9px 13px;
  white-space: nowrap;    /* «Мои заказы» и «О нас» — всегда в одну строку */

  border-radius: var(--r-full);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-2);
  transition: all var(--t) var(--ease);
}
.nav__link:hover { background: rgba(27, 20, 16, .05); color: var(--ink); }
.nav__link.is-active { background: var(--accent-soft); color: var(--accent-3); }

.nav__dot {
  position: absolute;
  top: 6px; right: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Логотип из админки --- */
.logo__mark img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.logo__mark--image { background: none; box-shadow: none; overflow: hidden; }

/* --- Соцсети --- */
.socials { display: flex; gap: 8px; margin-top: 4px; }

.social {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: rgba(27, 20, 16, .05);
  color: var(--ink-2);
  transition: all var(--t) var(--ease);
}
.social:hover { background: var(--accent-soft); color: var(--accent); transform: translateY(-2px); }
.social svg { width: 22px; height: 22px; fill: currentColor; }

/* --- Первый экран: карточки-факты --- */
.hero__cards { position: absolute; inset: 0; pointer-events: none; }

.hero__card {
  position: absolute;
  pointer-events: auto;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
}
.hero__plate--image { overflow: hidden; }
.hero__plate--image img { width: 100%; height: 100%; object-fit: cover; }

/* --- Мои заказы --- */
.orders-list { display: flex; flex-direction: column; gap: 12px; }

.myorder {
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  animation: item-in .3s var(--ease-out);
}

.myorder__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.myorder__num { font-size: 16px; font-weight: 800; }
.myorder__total { margin-left: auto; font-size: 17px; font-weight: 800; }

.myorder__meta { font-size: 13px; color: var(--ink-3); margin-bottom: 12px; }

.myorder__items {
  font-size: 13.5px;
  color: var(--ink-2);
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: rgba(27, 20, 16, .035);
  margin-bottom: 12px;
}

.myorder__reason {
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--red-soft);
  color: var(--red);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.myorder__actions { display: flex; gap: 8px; }

/* Компактный прогресс статусов */
.progress { display: flex; gap: 4px; margin-bottom: 12px; }

.progress__step {
  flex: 1;
  height: 5px;
  border-radius: var(--r-full);
  background: rgba(27, 20, 16, .1);
  transition: background-color var(--t) var(--ease);
}
.progress__step.is-done { background: var(--green); }
.progress__step.is-current { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }

.addorder {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: rgba(27, 20, 16, .035);
}
.addorder summary {
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-2);
  list-style: none;
}
.addorder summary::-webkit-details-marker { display: none; }
.addorder summary::before { content: '+ '; color: var(--accent); }
.addorder[open] summary::before { content: '− '; }
.addorder[open] summary { margin-bottom: 14px; }

/* --- Мастер настройки --- */
.setup__intro { font-size: 14.5px; color: var(--ink-3); }

.setup-step {
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.setup-step.is-done { background: var(--green-soft); border-color: rgba(22, 163, 74, .25); }

.setup-step__head { display: flex; align-items: center; gap: 13px; }
.setup-step__icon { font-size: 26px; flex: none; }
.setup-step__head strong { display: block; font-size: 15.5px; }
.setup-step__head small { font-size: 13px; color: var(--ink-3); }

.setup-step__state {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: var(--r-full);
  background: rgba(27, 20, 16, .07);
  color: var(--ink-3);
  white-space: nowrap;
}
.setup-step__state--on { background: var(--green-soft); color: #12803B; }

.setup__note {
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--amber-soft);
  color: #92500A;
  font-size: 13.5px;
  font-weight: 600;
}

/* --- Нижняя панель навигации (мобильные) --- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 150;
  display: none;
  padding: 8px 8px calc(8px + var(--safe-b));
  background: rgba(255, 251, 245, .93);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--line);
}

.tabbar__btn {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 4px;
  border-radius: var(--r-md);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  transition: color var(--t) var(--ease);
}
.tabbar__btn svg { width: 22px; height: 22px; fill: currentColor; }
.tabbar__btn.is-active { color: var(--accent); }
.tabbar__btn:active { transform: scale(.94); }

.tabbar__cart { position: relative; display: block; }

.tabbar__badge {
  position: absolute;
  top: -6px; right: -9px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.tabbar__btn--cart { color: var(--ink); }
.tabbar__dot {
  position: absolute;
  top: 6px; right: 22%;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Карточка товара: кнопка всегда видна --- */
.product__body { min-height: 0; }
.product__scroll {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 0;
}
.product__foot {
  padding: 14px 0 0;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

/* Окно товара — со стеклянной подложкой */
#productModal .modal__box {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
}
#successModal .modal__box {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

@media (max-width: 1100px) {
  .nav { display: none; }
}

@media (max-width: 768px) {
  .tabbar { display: flex; }
  body { padding-bottom: 76px; }
  .footer { padding-bottom: calc(24px + var(--safe-b)); }
  .mobilebar { display: none !important; }

  /* Карточка товара занимает экран, кнопка прикреплена снизу */
  #productModal .modal__box--wide {
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
  }
  .product {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 0;
    flex: 1;
  }
  .product__body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: calc(16px + var(--safe-b));
  }
  .product__scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .product__media { min-height: 170px; padding: 16px; }
  .product__media .pizza-art__disc { width: 46%; }

  /* На телефоне карточка — лист во весь экран. Стеклянная полупрозрачность
     тут не нужна и вредна: у sticky-футера она накладывается на такое же
     стекло модалки, и футер проступает белым «квадратом». Делаем и модалку,
     и футер одним сплошным цветом — футер бесшовно сливается с телом,
     разделяет их только тонкая линия сверху. */
  #productModal .modal__box {
    background: var(--cream);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .product__foot {
    position: sticky;
    bottom: 0;
    background: var(--cream);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .myorder__total { margin-left: 0; width: 100%; }
}

/* Шторки всегда прижаты к правому краю: margin-left гарантирует это
   независимо от того, как раскладка ведёт себя в разных браузерах */
.drawer { justify-items: end; }
.drawer__panel { margin-left: auto; }


/* NEWS-UI ===================================================================
   Новости на главной и круглые кнопки шапки
   ========================================================================== */

/* --- Круглая кнопка (звонок, уведомления) --- */
.roundbtn {
  position: relative;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  box-shadow: var(--sh-xs);
  flex: none;
  transition: all var(--t) var(--ease);
}
.roundbtn:hover {
  background: #fff;
  color: var(--accent);
  border-color: rgba(244, 81, 30, .3);
  box-shadow: var(--sh-sm);
  transform: translateY(-1px);
}
.roundbtn:active { transform: scale(.94); }
.roundbtn .icon { width: 21px; height: 21px; }

.roundbtn__dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--cream);
}

/* --- Блок новостей --- */
.news {
  position: relative;
  padding: clamp(20px, 3vw, 34px) 0 clamp(26px, 4vw, 44px);
}

.news .container { position: relative; }

/* Окно просмотра: прокрутка с примагничиванием карточек */
.news__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-xl);
}
.news__viewport::-webkit-scrollbar { display: none; }

.news__track {
  display: flex;
  gap: 16px;
}

/* Карточка новости */
.news-card {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: center;
  min-height: clamp(230px, 34vw, 380px);
  display: flex;
  align-items: flex-end;
  padding: clamp(22px, 3vw, 40px);
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: var(--sh-lg);
  animation: news-in .5s var(--ease-out) both;
}

@keyframes news-in {
  from { opacity: 0; transform: scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* Фото фоном + затемнение, чтобы текст читался на любой картинке */
.news-card__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 8s var(--ease);
}
.news-card:hover .news-card__bg { transform: scale(1.05); }

.news-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(20, 12, 8, .82) 0%,
    rgba(20, 12, 8, .45) 45%,
    rgba(20, 12, 8, .08) 100%
  );
}
/* Без картинки затемнение не нужно — фон и так контрастный */
.news-card--plain::after { background: none; }

.news-card__body {
  position: relative;
  max-width: 46ch;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-card__title {
  font-size: clamp(24px, 3.4vw, 42px);
  line-height: 1.08;
  letter-spacing: -.03em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .35);
}

.news-card__subtitle {
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.5;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}

.news-card__btn {
  align-self: flex-start;
  margin-top: 4px;
  padding: 12px 22px;
  border-radius: var(--r-full);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  box-shadow: var(--sh-md);
  transition: all var(--t) var(--ease);
}
.news-card__btn:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.news-card__btn:active { transform: scale(.97); }

/* Стрелки листания — только на широком экране */
.news__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  color: var(--ink);
  box-shadow: var(--sh-md);
  transition: all var(--t) var(--ease);
}
.news__arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.news__arrow svg { width: 22px; height: 22px; fill: currentColor; }
.news__arrow--prev { left: calc(var(--gutter) + 14px); }
.news__arrow--next { right: calc(var(--gutter) + 14px); }
.news__arrow:disabled { opacity: 0; pointer-events: none; }

/* Точки-индикаторы */
.news__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
}
.news__dots:empty { display: none; }

.news__dot {
  width: 8px; height: 8px;
  border-radius: var(--r-full);
  background: rgba(27, 20, 16, .18);
  transition: all var(--t) var(--ease);
}
.news__dot.is-active { width: 26px; background: var(--accent); }

@media (hover: none) {
  .news__arrow { display: none; }
  .news-card__btn:hover { transform: none; box-shadow: var(--sh-md); }
}

@media (max-width: 768px) {
  .news { padding-top: 14px; }
  .news__track { gap: 12px; }
  .news-card { border-radius: var(--r-lg); min-height: 210px; }
  .news__arrow { display: none; }
}


/* NEWS-ARROWS ==============================================================
   Стрелки новостей и отступы меню без заголовка
   ========================================================================== */

/* Стрелки проявляются, только когда курсор над блоком новостей */
.news__arrow {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease),
              background-color var(--t) var(--ease);
}
.news.has-arrows:hover .news__arrow,
.news.has-arrows:focus-within .news__arrow {
  opacity: 1;
  pointer-events: auto;
}
/* Крайняя стрелка не нужна: листать в эту сторону уже некуда */
.news.has-arrows:hover .news__arrow:disabled { opacity: 0; pointer-events: none; }

/* Меню начинается сразу с категорий — заголовка больше нет */
.menu { padding-top: 4px; }
.catnav { margin-bottom: 24px; }

@media (max-width: 768px) {
  .menu { padding-top: 0; }
  .catnav { margin-bottom: 18px; }
}


/* SEARCH-UI ================================================================
   Поиск по меню, кнопка «к меню», приоритет липких панелей
   ========================================================================== */

.search { padding-bottom: clamp(18px, 3vw, 30px); }

.search__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* Поле поиска — во всю ширину контейнера, вровень с карточкой новостей */
.search__box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search__icon {
  position: absolute;
  left: 18px;
  z-index: 2;
  width: 20px; height: 20px;
  fill: var(--accent);
  pointer-events: none;
  transition: fill var(--t) var(--ease);
}
.search__box:focus-within .search__icon { fill: var(--accent); }

.search__input {
  width: 100%;
  padding: 15px 46px 15px 50px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-full);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  font-family: var(--font-ui);
  font-size: 16px;
  box-shadow: var(--sh-sm);
  transition: all var(--t) var(--ease);
}
.search__input::placeholder { color: var(--ink-3); opacity: .8; }
.search__input:hover { border-color: rgba(27, 20, 16, .2); }
.search__input:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--sh-md);
}
/* Родной крестик Safari мешает — свой аккуратнее */
.search__input::-webkit-search-cancel-button { display: none; }

.search__clear {
  position: absolute;
  right: 8px;
  z-index: 2;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
  transition: all var(--t) var(--ease);
}
.search__clear:hover { background: rgba(27, 20, 16, .07); color: var(--ink); }
.search__clear svg { width: 18px; height: 18px; fill: currentColor; }

/* Кнопка «Смотреть меню» со стрелкой */
.search__down {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-full);
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 700;
  transition: all var(--t) var(--ease);
}
.search__down:hover { background: var(--accent-soft); color: var(--accent-3); }
.search__down svg {
  width: 20px; height: 20px;
  fill: currentColor;
  animation: nudge 2.4s var(--ease) infinite;
}

@keyframes nudge {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(4px); }
}

/* Во время поиска прячем панель категорий и заголовки разделов */
body.is-searching .cat__head { display: none; }
body.is-searching .cat { margin-bottom: 0; }
body.is-searching .search__down { display: none; }

/* Баннер «закрыто» всегда выше панели категорий: они не накладываются */
.closed-banner { z-index: 95; }
.catnav { z-index: 80; }

/* На большом экране поле широкое — делаем его крупнее, чтобы не выглядело
   тонкой полоской под большой карточкой новостей */
@media (min-width: 769px) {
  .search__input {
    padding: 19px 56px 19px 58px;
    font-size: 17px;
    box-shadow: var(--sh-md);
  }
  .search__icon { left: 24px; width: 22px; height: 22px; }
  .search__clear { right: 12px; width: 38px; height: 38px; }

  /* Первый экран занимает всю высоту: новости, поиск и кнопка «Смотреть меню».
     Меню оказывается за сгибом — до него нужно пролистать. */
  .firstscreen {
    min-height: calc(100svh - var(--sticky-top, var(--header-h)));
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Новостей нет — растягивать нечего, иначе пустой экран с одним поиском */
  .firstscreen:has(> .news[hidden]) { min-height: 0; }

  /* Во время поиска результаты должны быть сразу видны, без прокрутки */
  body.is-searching .firstscreen { min-height: 0; }
}

@media (max-width: 768px) {
  /* На телефоне первый экран не нужен: новости, поиск и сразу меню */
  .search__down { display: none; }
  .search { padding-bottom: 14px; }
  .search__input { padding: 13px 42px 13px 46px; }
  .search__icon { left: 16px; width: 18px; height: 18px; }
}
