/* Fried Joy — design system */
@font-face {
  font-family: "Rotondac";
  src: url("../шрифт/Rotondac%20bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange: #ff7a00;
  --orange-dark: #e86e00;
  --yellow: #ffd524;
  --yellow-hover: #ffcc00;
  --black: #1a1a1a;
  --text: #2b2b2b;
  --muted: #6b7280;
  --light-muted: #9ca3af;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --input-bg: #f0f2f5;
  --border: #e8eaed;
  --footer: #1c1c1c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  --font: "Rotondac", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scrollbar-gutter: stable;
}

/* Блокировка скролла (оверлей входа и т.п.): без сдвига из‑за исчезновения скроллбара */
html.ui-scroll-locked {
  overflow: hidden;
  scrollbar-gutter: auto;
}

html.ui-scroll-locked body {
  overflow: hidden;
  padding-right: var(--ui-lock-pad, 0px);
  position: fixed;
  top: var(--ui-lock-top, 0px);
  left: 0;
  right: 0;
  width: 100%;
}

html.ui-scroll-locked .drawer-overlay,
html.ui-scroll-locked .cart-drawer,
html.ui-scroll-locked .product-modal-overlay,
html.ui-scroll-locked .map-modal-overlay,
html.ui-scroll-locked .cookie-banner,
html.ui-scroll-locked .ui-toast-host,
html.ui-scroll-locked .ui-dialog-overlay {
  padding-right: var(--ui-lock-pad, 0px);
}

/* Высота шапки + липкой полоски вкладок меню (index): якоря и JS */
:root {
  --menu-tabs-stick-top: 78px;
  --menu-sticky-offset: 148px;
}

@media (max-width: 1024px) {
  :root {
    --menu-tabs-stick-top: 128px;
    --menu-sticky-offset: 198px;
  }
}

/* Мобилка: отключить приближение двойным тапом (жест остаётся для прокрутки и pinch-zoom) */
@media (max-width: 900px) {
  html {
    touch-action: manipulation;
    overflow-x: visible;
  }

  body,
  .page {
    overflow-x: visible;
    max-width: none;
  }

  .ui-dialog-overlay--auth {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    overflow-x: hidden;
    touch-action: none;
  }

  .ui-dialog--auth {
    width: min(400px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
    overflow: visible;
    transform: translateX(-5px);
  }

  .ui-dialog--auth > .product-modal__close.ui-dialog__close--auth {
    top: -14px;
    right: -10px;
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  .page {
    overflow-x: hidden;
  }
}

.main {
  flex: 1;
}

.container {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
}

/* auto | 1fr | auto — меню не начинается, пока не закончится логотип (нет налёта «Главная» на Joy) */
.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(20px, 3vw, 36px);
  padding: 14px 0;
}

.site-header__inner .logo {
  justify-self: start;
  flex-shrink: 0;
  min-width: 0;
}

.site-header__inner .nav {
  justify-self: center;
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.site-header__inner .header-actions {
  justify-self: end;
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
    row-gap: 12px;
  }

  .site-header__inner .nav {
    grid-column: 1 / -1;
    order: 3;
    justify-self: center;
    width: 100%;
    justify-content: center;
    padding-bottom: 4px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
  }

  .site-header__inner .logo {
    grid-column: 1;
  }

  .site-header__inner .header-actions {
    grid-column: 2;
  }
}

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

.logo__mark-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.logo__wordmark {
  height: clamp(28px, 4vw, 36px);
  width: auto;
  object-fit: contain;
}

.logo__wordmark--footer {
  height: clamp(26px, 3.5vw, 32px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav__link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--black);
  transition: color 0.15s, background 0.15s;
}

.nav__link--pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav__link--pill:hover {
  background: var(--bg);
  color: var(--orange);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--orange);
}

.site-header .nav__link.is-active {
  background: rgba(255, 122, 0, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-menu {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.account-menu__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 148px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: grid;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  z-index: 120;
}

.account-menu:hover .account-menu__dropdown,
.account-menu:focus-within .account-menu__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.account-menu__link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
}

.account-menu__link:hover {
  background: var(--bg);
  color: var(--orange);
}

.account-menu__link--danger {
  color: #b91c1c;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--black);
  position: relative;
  transition: background 0.15s;
}

.icon-btn:hover {
  background: var(--bg);
}

.icon-btn svg {
  width: 24px;
  height: 24px;
}

.icon-btn img.icon-btn__cart-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--black);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

/* Hero — один готовый баннер по центру */
.hero {
  margin: 20px 0 16px;
  width: 100%;
  box-sizing: border-box;
}

.hero__wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
}

.hero__img {
  display: block;
  width: auto;
  max-width: min(100%, 1100px);
  height: auto;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
  object-position: center center;
}

.hero__card {
  background: linear-gradient(120deg, #eceff2 0%, #e2e6ea 50%, #dde2e8 100%);
  border-radius: calc(var(--radius) + 6px);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  min-height: 280px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.hero__banner {
  border-radius: var(--radius);
  overflow: hidden;
  align-self: center;
}

.hero__banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 900px) {
  .hero__card {
    grid-template-columns: 1fr;
    padding: 28px;
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero__title {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.03em;
}

.hero__desc {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}

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

.btn--yellow {
  background: var(--yellow);
  color: var(--black);
  box-shadow: 0 4px 16px rgba(255, 213, 36, 0.45);
}

.btn--yellow:hover {
  background: var(--yellow-hover);
}

.btn--orange {
  background: var(--orange);
  color: #fff;
}

.btn--orange:hover {
  background: var(--orange-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--border);
}

.btn--block {
  width: 100%;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn--sm {
  padding: 10px 18px;
  font-size: 0.85rem;
}

/* Product modal — поверх шапки и корзины */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  overscroll-behavior: contain;
}

.product-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.product-modal {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  max-width: 920px;
  width: 100%;
  overflow: visible;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

/* Скролл только у содержимого — иначе overflow обрезает крестик за пределами блока */
.product-modal__inner {
  max-height: min(90vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px;
}

.product-modal__close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #e53935;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-modal__close:hover {
  filter: brightness(1.05);
}

.product-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 28px;
  align-items: start;
}

@media (max-width: 720px) {
  .product-modal-overlay {
    padding: 52px 16px 24px;
    align-items: flex-start;
  }

  .product-modal__grid {
    grid-template-columns: 1fr;
    padding: 20px;
    padding-top: 28px;
  }

  .product-modal__close {
    top: -14px;
    right: -10px;
  }
}

.product-modal__img-wrap {
  border-radius: 16px;
  overflow: hidden;
  background: #f3f4f6;
}

.product-modal__img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 1.1;
}

.product-modal__body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-top: 4px;
}

.product-modal__body h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  color: var(--black);
}

.product-modal__weight {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--light-muted);
}

.product-modal__desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.55;
}

.size-toggle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0 8px;
}

.size-btn {
  min-width: 52px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 2px solid var(--orange);
  background: var(--surface);
  color: var(--black);
  font-weight: 800;
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s;
}

.size-btn.is-active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.product-modal__footer {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) 170px;
  align-items: center;
  column-gap: 18px;
  row-gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--input-bg);
  border-radius: 12px;
  overflow: hidden;
  height: 44px;
  width: 124px;
}

.qty-stepper button {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--black);
  line-height: 1;
}

.qty-stepper button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.qty-stepper .qty-val {
  width: 36px;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
}

.product-modal__price-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  min-height: 44px;
  min-width: 150px;
}

.product-modal__price-tag {
  font-size: 1.25rem;
  font-weight: 800;
}

.product-modal__price-unit {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}

.product-modal__price-unit[hidden] {
  display: block !important;
  visibility: hidden;
}

@media (max-width: 720px) {
  .product-modal__footer {
    grid-template-columns: auto 1fr;
  }

  .product-modal__price-block {
    align-items: flex-start;
    min-width: 0;
  }

  .product-modal__add {
    grid-column: 1 / -1;
  }
}

.product-modal__add {
  width: 170px;
  min-width: 170px;
  justify-self: end;
}

/* Как у «Выбрать» на карточке: оранжевая заливка при наведении на окно или на кнопку */
.product-modal__add.btn--yellow:not(:disabled) {
  transition:
    transform 0.12s,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.product-modal__add.btn--yellow:hover:not(:disabled) {
  background: var(--orange);
  color: #fff;
  box-shadow:
    0 6px 22px rgba(255, 122, 0, 0.45),
    0 0 0 3px rgba(255, 122, 0, 0.2);
}

/* Section menu */
.section-menu {
  padding: 40px 0 80px;
  overflow: visible;
}

.section-menu .section-head {
  text-align: center;
  margin-inline: auto;
  margin-bottom: 24px;
  max-width: 640px;
}

.section-head {
  margin-bottom: 24px;
}

.section-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.section-menu .section-head p {
  margin-inline: auto;
}

/* Category tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
  width: fit-content;
  max-width: 100%;
}

.section-menu .tabs:not(.tabs--jump) {
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* Горизонтальный скролл как раньше; полоса прокрутки скрыта, листать можно */
.tabs--jump {
  position: -webkit-sticky;
  position: sticky;
  top: var(--menu-tabs-stick-top);
  z-index: 95;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: fit-content;
  max-width: min(960px, calc(100% - 8px));
  margin-left: auto;
  margin-right: auto;
  justify-content: flex-start;
  padding: 10px 14px;
  gap: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

.tabs--jump::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

.tabs--jump .tab {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 14px 22px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.menu-category {
  scroll-margin-top: var(--menu-sticky-offset);
  margin-bottom: 48px;
}

.menu-category:last-child {
  margin-bottom: 0;
}

.menu-category__title {
  margin: 0 0 20px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.menu-category__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.menu-category__photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.menu-category__label {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.tab {
  border: none;
  background: transparent;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.tab:hover {
  color: var(--black);
}

.tab.is-active {
  background: var(--yellow);
  color: var(--black);
  box-shadow: none;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.section-menu .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  justify-content: center;
  max-width: 1100px;
  margin-inline: auto;
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section-menu .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-menu .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 420px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
  contain: layout style;
}

.card:hover:not(.card--disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.card--disabled {
  opacity: 0.65;
  filter: grayscale(0.9);
}

.card__img-wrap {
  position: relative;
  aspect-ratio: 1.15;
  overflow: hidden;
  background: #eee;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #eee;
}

.card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge--sale {
  background: #e53935;
  color: #fff;
}

.badge--hit {
  background: var(--orange);
  color: #fff;
}

.card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}

.card__text {
  margin: 0 0 16px;
  font-size: 0.82rem;
  color: var(--muted);
  flex: 1;
  line-height: 1.45;
}

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

/* Карточка товара: при наведении на позицию — жёлтая кнопка → оранжевая, белый текст, «обводка» сзади */
.card:not(.card--disabled) .btn--yellow {
  transition:
    transform 0.12s,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.card:not(.card--disabled):hover .btn--yellow:not(:disabled) {
  background: var(--orange);
  color: #fff;
  box-shadow:
    0 6px 22px rgba(255, 122, 0, 0.45),
    0 0 0 3px rgba(255, 122, 0, 0.2);
}

.price {
  font-weight: 800;
  font-size: 1.05rem;
}

.price--old {
  text-decoration: line-through;
  color: var(--light-muted);
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 8px;
}

/* Footer */
.site-footer {
  background: var(--footer);
  color: #e5e5e5;
  padding: 48px 0 0;
  margin-top: auto;
}

.site-footer a:hover {
  color: var(--yellow);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 32px;
}

.footer-grid--compact {
  display: grid;
  grid-template-columns: auto auto;
  align-items: flex-start;
  justify-content: center;
  justify-items: center;
  column-gap: clamp(40px, 8vw, 88px);
  text-align: center;
  padding-bottom: 32px;
}

.footer-grid--compact .footer-brand {
  text-align: center;
}

.footer-grid--compact .footer-brand .logo {
  justify-content: center;
}

.footer-grid--compact .footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-grid--compact .footer-contact {
  justify-self: center;
  text-align: center;
  max-width: 24rem;
}

.footer-grid--compact .footer-contact .email {
  display: inline-block;
}

.footer-contact__meta {
  margin: 8px 0 0;
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid--compact {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 28px;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid--compact {
    grid-template-columns: 1fr;
  }
}

/* Текстовые страницы (политики) */
.legal-page {
  padding: 32px 0 56px;
  max-width: 800px;
}

.legal-page h1 {
  margin: 0 0 20px;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  color: var(--black);
}

.legal-page h2 {
  margin: 28px 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--black);
}

.legal-page h3 {
  margin: 20px 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.legal-page p,
.legal-page li {
  color: var(--text);
  line-height: 1.65;
  font-size: 0.95rem;
}

.legal-page a {
  color: var(--orange);
}

.legal-page ul,
.legal-page ol {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.legal-page li {
  margin-bottom: 8px;
}

.legal-page .legal-muted {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 32px;
}

.legal-page .legal-muted a {
  color: var(--orange);
  text-decoration: underline;
}

/* «Доставка и оплата», «О нас» */
.static-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 0 56px;
}

.static-page h1 {
  margin: 0 0 24px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--black);
}

.static-page p {
  margin: 0 0 14px;
  line-height: 1.65;
  color: var(--text);
  font-size: 0.95rem;
}

.static-page strong {
  font-weight: 700;
  color: var(--black);
}

.static-page a {
  color: var(--orange);
}

.about-page .about-block {
  margin-bottom: 20px;
}

.delivery-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 36px 40px;
  align-items: start;
}

.delivery-split__main p {
  margin: 0 0 14px;
  line-height: 1.65;
  color: var(--text);
  font-size: 0.95rem;
}

.delivery-split__main h2 {
  margin: 22px 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
}

.delivery-split__aside {
  border-left: 3px solid var(--yellow);
  padding-left: 28px;
}

.delivery-split__aside h2 {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--black);
}

.delivery-split__aside p,
.delivery-split__aside li {
  margin: 0 0 8px;
  line-height: 1.55;
  font-size: 0.92rem;
  color: var(--text);
}

.delivery-split__aside ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 768px) {
  .delivery-split {
    grid-template-columns: 1fr;
  }

  .delivery-split__aside {
    border-left: none;
    border-top: 3px solid var(--yellow);
    padding-left: 0;
    padding-top: 24px;
  }
}

.footer-brand .logo__title,
.footer-brand .logo__sub {
  color: #fff;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
}

.footer-col h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.footer-col a {
  color: #ccc;
}

.footer-contact .email {
  color: #fff;
  word-break: break-all;
}

.btn--footer {
  margin-top: 12px;
  background: var(--yellow);
  color: var(--black);
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
}

.socials {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.social--tg {
  background: #229ed9;
}
.social--wa {
  background: #25d366;
}
.social--vb {
  background: #7360f2;
}
.social--ig {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743);
}

.footer-bar {
  border-top: 1px solid #333;
  padding: 16px 0 20px;
  font-size: 0.8rem;
  color: #888;
  text-align: center;
}

.footer-bar__inner {
  margin: 0 auto;
  line-height: 1.55;
  text-align: center;
  max-width: 32rem;
}

.footer-bar__inner p {
  margin: 0 0 6px;
}

.footer-bar__inner p:last-child {
  margin-bottom: 0;
}

/* Cart drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: var(--surface);
  z-index: 210;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-drawer__head {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer__head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.cart-drawer__body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px 40px;
  flex: 1;
  min-height: min(420px, 55vh);
}

.cart-empty__img {
  width: min(280px, 88%);
  height: auto;
  display: block;
  margin: 0 auto 20px;
  object-fit: contain;
}

.cart-empty__title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.02em;
}

.cart-empty__hint {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 16rem;
}

#cart-drawer .cart-drawer__foot.hidden {
  display: none !important;
}

.cart-line {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.cart-line__thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--input-bg);
}

.cart-line__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-line__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-line__top {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.cart-line__text {
  flex: 1;
  min-width: 0;
}

.cart-line__title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  margin: 0 0 4px;
}

.cart-line__muted {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 4px;
}

.cart-line__part {
  font-size: 0.78rem;
  color: var(--orange-dark);
  margin: 0 0 4px;
  font-weight: 700;
}

.cart-line__desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-line__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}

.cart-line__line-sum {
  font-weight: 800;
  font-size: 1rem;
  color: var(--black);
  min-width: 92px;
  text-align: right;
}

.cart-line__per {
  font-size: 0.82rem;
  color: var(--muted);
  min-width: 68px;
  text-align: right;
}

.cart-line__qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--input-bg);
  border-radius: 10px;
  overflow: hidden;
  height: 32px;
  flex-shrink: 0;
}

.cart-line__qty-stepper button {
  width: 30px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  color: var(--black);
}

.cart-line__qty-stepper button:hover {
  background: rgba(0, 0, 0, 0.06);
}

.cart-line__qty-val {
  width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 0.86rem;
}

.cart-line__info {
  flex: 1;
  min-width: 0;
}

.cart-line__meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.cart-line__tail {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cart-line__price {
  font-weight: 800;
  white-space: nowrap;
}

.cart-line__remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--light-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.cart-line__remove:hover {
  background: rgba(229, 57, 53, 0.12);
  color: #c62828;
}

.cart-drawer__foot {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.add-to-order {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface);
}

.add-to-order__title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

.add-to-order__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.add-to-order--drawer {
  margin-top: 0;
  margin-bottom: 12px;
}

.add-to-order--drawer .add-to-order__grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 2px;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  /* Скрыть полоску скролла (прокрутка колесом / свайпом сохраняется) */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.add-to-order--drawer .add-to-order__grid::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.add-to-order--drawer .add-to-order__item {
  flex: 0 0 108px;
  min-height: 148px;
}

.add-to-order__item {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text);
  font-family: inherit;
}

.add-to-order__item:hover {
  border-color: var(--orange);
  background: rgba(255, 122, 0, 0.06);
}

.add-to-order__thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--input-bg);
}

.add-to-order__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.add-to-order__name {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.add-to-order__price {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Checkout */
.checkout-page .main {
  background: var(--surface);
  padding-bottom: 60px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  grid-template-rows: auto auto;
  gap: 40px;
  align-items: start;
  padding-top: 28px;
}

.checkout-primary {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.checkout-side-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  justify-self: stretch;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
}

@media (max-width: 960px) {
  .checkout-page .main > .container.checkout-layout {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-inline: 0;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  .checkout-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    grid-template-columns: unset;
    grid-template-rows: unset;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .checkout-primary {
    grid-column: unset;
    grid-row: unset;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .checkout-side-panels {
    grid-column: unset;
    grid-row: unset;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .checkout-actions {
    grid-column: unset;
    grid-row: unset;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (min-width: 1280px) {
  .checkout-page .container.checkout-layout {
    width: min(1440px, 100% - 40px);
  }

  .checkout-layout {
    grid-template-columns: minmax(0, 1fr) minmax(680px, 760px);
    gap: 28px;
  }

  .checkout-side-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.checkout-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 800;
}

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.stepper__item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--light-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.stepper__item.is-done {
  color: var(--muted);
}

.stepper__item.is-current {
  color: var(--orange);
}

.stepper__circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--surface);
}

.stepper__item.is-done .stepper__circle {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.stepper__item.is-current .stepper__circle {
  border-color: var(--orange);
  color: var(--orange);
}

.stepper__dash {
  width: 24px;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--border),
    var(--border) 4px,
    transparent 4px,
    transparent 8px
  );
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  font-size: 0.95rem;
  font-family: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}

.textarea {
  min-height: 100px;
  resize: vertical;
}

.form-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .form-row-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-size: 0.95rem;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
}

/* Toggle delivery time */
.toggle-pair {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toggle-btn {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  font-family: inherit;
}

.toggle-btn.is-active {
  border-color: var(--orange);
  background: rgba(255, 122, 0, 0.08);
  color: var(--orange);
}

.time-picker-wrap {
  margin-top: 12px;
  display: none;
}

.time-picker-wrap.is-visible {
  display: block;
}

.delivery-fastest-label {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.time-slots__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.time-slots {
  display: grid;
  gap: 8px;
}

.time-slot-btn {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
}

.time-slot-btn:hover {
  border-color: rgba(255, 122, 0, 0.35);
}

.time-slot-btn.is-active {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255, 122, 0, 0.08);
}

/* Promo inline */
.promo-row {
  display: flex;
  gap: 10px;
}

.promo-row .input {
  flex: 1;
}

.address-map-btn {
  margin-top: 10px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--orange);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
}

.address-map-btn:hover {
  color: var(--orange-dark);
}

.checkout-street-picker {
  position: relative;
}

.checkout-street-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  max-height: 240px;
  overflow-y: auto;
  z-index: 6;
}

.checkout-street-suggestion {
  padding: 10px 12px;
}

/* Payment box */
.pay-box {
  background: var(--input-bg);
  border-radius: var(--radius);
  padding: 20px;
}

.pay-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.pay-option:last-child {
  border-bottom: none;
}

.pay-option input[type="radio"] {
  margin-top: 4px;
  accent-color: var(--orange);
}

.pay-option label {
  flex: 1;
  cursor: pointer;
}

.pay-option__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pay-option__icon {
  width: 1.25em;
  height: 1.25em;
  object-fit: contain;
  flex-shrink: 0;
}

.pay-option__sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.checkout-actions {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 0;
  flex-wrap: wrap;
}

.link-back {
  color: var(--muted);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-back:hover {
  color: var(--orange);
}

/* Sticky order summary */
.order-summary {
  position: sticky;
  top: 96px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.order-summary--add {
  position: sticky;
  top: 96px;
}

.order-summary--add .add-to-order {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.order-summary--add .add-to-order__grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 2px;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.order-summary--add .add-to-order__grid::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.order-summary--add .add-to-order__item {
  flex: 0 0 108px;
  min-height: 148px;
}

.order-summary h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 800;
}

.order-summary__line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.order-summary__line-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--input-bg);
}

.order-summary__line-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.order-summary__line-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-summary__line-title {
  font-weight: 700;
  line-height: 1.25;
}

.order-summary__line-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "qty qty"
    "sum remove";
  align-items: center;
  gap: 8px 10px;
  flex-shrink: 0;
  justify-items: end;
  min-width: 148px;
}

.order-summary__line-sum {
  grid-area: sum;
  font-weight: 800;
  white-space: nowrap;
  width: 84px;
  text-align: right;
}

.order-summary__line small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

.order-summary__line .order-summary__part {
  color: var(--orange-dark);
  font-weight: 700;
  margin: 0;
}

.order-summary__qty-stepper {
  grid-area: qty;
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--input-bg);
  border-radius: 10px;
  overflow: hidden;
  height: 32px;
}

.order-summary__qty-stepper button {
  width: 30px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  color: var(--black);
}

.order-summary__qty-stepper button:hover {
  background: rgba(0, 0, 0, 0.06);
}

.order-summary__qty-val {
  width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 0.86rem;
}

.order-summary__remove {
  grid-area: remove;
}

.order-summary__total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.15rem;
  margin-top: 16px;
}

.map-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  z-index: 260;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.map-modal-overlay.is-open {
  display: flex;
}

.map-modal {
  width: min(880px, 100%);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.map-modal__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.map-modal__body {
  padding: 14px 16px;
}

.map-modal__search {
  position: relative;
  z-index: 4;
  margin-bottom: 12px;
}

.map-modal__search-title {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
  color: #1f3356;
}

.map-modal__search-subtitle {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.map-modal__search-field {
  position: relative;
}

.map-modal__search-input {
  padding-right: 46px;
}

.map-modal__search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--light-muted);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
}

.map-modal__search-clear:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted);
}

.map-modal__search-clear:disabled {
  opacity: 0.45;
  cursor: default;
}

.map-modal__suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  max-height: min(48vh, 320px);
  overflow-y: auto;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  z-index: 12;
}

.map-modal__suggestion {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text);
}

.map-modal__suggestion:last-child {
  border-bottom: none;
}

.map-modal__suggestion:hover {
  background: rgba(255, 122, 0, 0.08);
}

.map-modal__suggestion-main {
  display: block;
  font-weight: 700;
}

.map-modal__suggestion-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
  color: var(--muted);
}

.map-modal__map {
  width: 100%;
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--input-bg);
}

.map-modal__hint {
  margin: 12px 0 4px;
  font-size: 0.86rem;
  color: var(--muted);
}

.map-modal__address {
  margin: 0;
  font-weight: 700;
}

.map-modal__foot {
  padding: 0 16px 16px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .map-modal-overlay {
    padding: 10px;
    align-items: flex-start;
  }

  .map-modal {
    margin-top: 6px;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }

  .map-modal__search-title {
    font-size: 1.1rem;
  }

  .map-modal__search-subtitle {
    font-size: 0.86rem;
  }

  .map-modal__map {
    height: 300px;
  }

  .map-modal__suggestions {
    max-height: 156px;
  }

  .map-modal__foot {
    padding-bottom: 12px;
  }

  .map-modal__foot .btn {
    width: 100%;
  }
}

/* Account page */
.account-page .main {
  padding: 32px 0 60px;
}

.account-section {
  margin-bottom: 40px;
}

.account-section h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 800;
}

.promo-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 420px;
}

.promo-card img,
.promo-card .gift-placeholder {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
}

.gift-placeholder {
  background: linear-gradient(145deg, #e8eaed, #d1d5db);
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 3rem;
}

.promo-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.link-orange {
  color: var(--orange);
  font-weight: 700;
  margin-top: 12px;
  display: inline-block;
}

.link-orange:hover {
  text-decoration: underline;
}

.field-display {
  background: var(--input-bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-display span {
  font-weight: 500;
}

.field-action {
  color: var(--orange);
  font-weight: 700;
  font-size: 0.9rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.field-action:hover {
  text-decoration: underline;
}

.label-with-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--light-muted);
  color: var(--light-muted);
  font-size: 0.7rem;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.subscriptions .checkbox-row {
  max-width: 560px;
}

.orders-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.orders-table th,
.orders-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.orders-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
}

.btn-logout {
  background: var(--input-bg);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text);
}

.btn-logout:hover {
  background: var(--border);
}

.sub-hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 12px;
}

/* Auth — шапка без меню: только лого (иконка + надпись) по центру */
.site-header--auth .site-header__inner.site-header__inner--auth {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  column-gap: 0;
}

.site-header--auth .logo--auth {
  margin-inline: auto;
}

@media (max-width: 1024px) {
  .site-header--auth .site-header__inner.site-header__inner--auth {
    display: flex;
    justify-content: center;
    grid-template-columns: unset;
    row-gap: 0;
    padding: 16px 0;
  }
}

/* Auth */
.auth-page .main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 200px);
  padding: 40px 20px;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
}

.auth-card p:not(.auth-hint) {
  text-align: center;
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 0.95rem;
}

.code-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.code-inputs input {
  width: 52px;
  height: 56px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
}

.code-inputs input:focus {
  outline: none;
  border-color: var(--orange);
}

.auth-hint {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.auth-switch-link {
  margin: 30px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-card form .btn + .auth-switch-link {
  margin-top: 42px;
}

.auth-switch-link a {
  color: var(--orange);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 8px;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 280;
  background: rgba(28, 28, 28, 0.96);
  color: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
  will-change: opacity, transform;
}

.cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cookie-banner.is-hiding {
  opacity: 0;
  transform: translateY(16px);
}

.cookie-banner__text {
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
  flex: 1;
  min-width: 260px;
}

.cookie-banner__text a {
  color: var(--yellow);
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner__btn {
  min-height: 38px;
}

.cookie-banner__btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.cookie-banner__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ui-toast-host {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 350;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.ui-toast {
  margin-left: auto;
  max-width: min(420px, 100%);
  background: rgba(28, 28, 28, 0.96);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.ui-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ui-toast.is-hiding {
  opacity: 0;
  transform: translateY(8px);
}

.ui-toast.is-error {
  background: rgba(155, 28, 28, 0.95);
}

.ui-toast.is-success {
  background: rgba(22, 101, 52, 0.95);
}

.ui-toast__text {
  font-size: 0.9rem;
  line-height: 1.4;
}

.ui-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 360;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.ui-dialog-overlay.is-visible {
  opacity: 1;
}

.ui-dialog {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.ui-dialog__message {
  font-size: 0.96rem;
  margin-bottom: 14px;
  color: var(--text);
}

.ui-dialog--auth .ui-dialog__message {
  text-align: center;
  font-weight: 700;
  margin-bottom: 16px;
}

.ui-dialog__input {
  margin-bottom: 14px;
}

.ui-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ui-dialog__btn {
  min-width: 120px;
}

.ui-dialog__btn--ghost {
  background: var(--input-bg);
  color: var(--text);
}

.ui-dialog-overlay--auth {
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  padding: max(28px, env(safe-area-inset-top) + 10px) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ui-dialog--auth {
  position: relative;
  width: min(400px, 100%);
  padding: 28px 18px 20px;
  overflow: visible;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}

/* Крестик — как у модалки товара: круг, смещён за угол карточки */
.ui-dialog--auth > .product-modal__close.ui-dialog__close--auth {
  top: -18px;
  right: -18px;
  width: 44px;
  height: 44px;
  font-size: 26px;
}

.ui-dialog__actions--auth-pair {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.ui-dialog__btn--auth {
  flex: 1 1 140px;
  min-width: 0;
  width: auto;
  font-weight: 800;
  padding: 14px 18px;
  border-radius: 999px;
}

.ui-dialog__actions--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.ui-dialog__btn--wide {
  width: 100%;
  min-width: 0;
}

@media (max-width: 420px) {
  .ui-dialog__actions--auth-pair {
    flex-direction: column;
  }

  .ui-dialog__btn--auth {
    flex: 1 1 auto;
    width: 100%;
  }

  .ui-dialog--auth > .product-modal__close.ui-dialog__close--auth {
    top: -14px;
    right: -10px;
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
}

/* Mobile tuning */
@media (max-width: 640px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 120;
  }

  .container {
    width: min(1180px, 100% - 24px);
  }

  .site-header__inner {
    grid-template-columns: 1fr auto;
    padding: 10px 0;
    row-gap: 10px;
  }

  .site-header__inner .nav {
    justify-content: center;
    overflow-x: visible;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding-top: 8px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .site-header__inner .nav::-webkit-scrollbar {
    display: none;
  }

  .site-header__inner .nav__link--pill {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .logo__mark-img {
    width: 44px;
    height: 44px;
  }

  .logo__wordmark {
    height: 28px;
  }

  .hero {
    margin: 10px 0 8px;
  }

  .section-menu {
    padding: 22px 0 52px;
  }

  .section-menu .tabs.tabs--jump {
    position: -webkit-sticky;
    position: sticky;
    top: var(--menu-tabs-stick-top);
    z-index: 95;
    width: 100%;
    max-width: 100%;
    padding: 8px;
    margin-bottom: 18px;
  }

  .tabs--jump .tab {
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .product-grid,
  .section-menu .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card__body {
    padding: 12px;
  }

  .card__title {
    font-size: 0.92rem;
  }

  .card__text {
    font-size: 0.76rem;
    margin-bottom: 10px;
  }

  .card__footer {
    gap: 8px;
    align-items: flex-end;
  }

  .price {
    font-size: 0.95rem;
  }

  .product-modal-overlay {
    align-items: center;
    justify-content: center;
    padding: max(10px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .product-modal {
    width: min(460px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
    margin: 0 auto;
    overflow: visible;
    transform: translateX(-5px);
  }

  .product-modal__close {
    top: -14px;
    right: -10px;
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .product-modal__inner {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .product-modal__grid {
    gap: 6px;
    padding: 8px;
    padding-top: 12px;
    padding-bottom: 18px;
  }

  /* Блок фото заполняется изображением (как на карточке) */
  .product-modal__img-wrap {
    width: 100%;
    height: min(36dvh, 260px);
    min-height: 160px;
    overflow: hidden;
    display: block;
  }

  .product-modal__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-height: none;
  }

  .product-modal__body h2 {
    font-size: 1rem;
    margin-bottom: 2px;
  }

  .product-modal__weight {
    margin-bottom: 4px;
    font-size: 0.76rem;
  }

  .product-modal__desc {
    font-size: 0.78rem;
    line-height: 1.38;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    overflow: visible;
  }

  .size-toggle {
    margin: 6px 0 3px;
    gap: 6px;
  }

  .size-btn {
    min-width: 40px;
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .product-modal__footer {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding-top: 10px;
    padding-bottom: 8px;
    row-gap: 8px;
    margin-bottom: 4px;
  }

  .qty-stepper {
    justify-self: start;
  }

  .product-modal__add {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    margin-bottom: 6px;
  }

  .product-modal__price-block {
    align-items: center;
    justify-self: start;
    text-align: center;
    width: 112px;
  }

  .product-modal__price-tag {
    font-size: 1.1rem;
  }

  .qty-stepper {
    height: 40px;
    width: 112px;
  }

  .qty-stepper button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .cart-drawer {
    width: 100%;
    max-width: 100%;
  }

  .checkout-layout {
    gap: 20px;
    padding-top: 14px;
  }

  .order-summary {
    position: static;
    top: auto;
    padding: 14px;
  }

  .order-summary__line {
    gap: 8px;
    padding: 10px 0;
  }

  .order-summary__line-actions {
    min-width: 122px;
  }

  .auth-page .main {
    padding: 18px 10px;
    min-height: calc(100vh - 120px);
  }

  .auth-card {
    width: 100%;
    padding: 22px 16px;
  }

  .code-inputs {
    gap: 8px;
  }

  .code-inputs input {
    width: 46px;
    height: 50px;
    font-size: 1.2rem;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .product-grid,
  .section-menu .product-grid {
    grid-template-columns: 1fr;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }
}

.hero-slider {
  position: relative;
  width: 100%;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.hero-slider:active {
  cursor: grabbing;
}

.hero-slider__viewport {
  overflow: hidden;
  width: 100%;
  max-width: min(100%, 1100px);
  margin-left: auto;
  margin-right: auto;
  border-radius: 16px;
}

.hero-slider__track {
  display: flex;
  transition: transform 0.38s cubic-bezier(0.25, 0.85, 0.25, 1);
  will-change: transform;
}

.hero-slider__track.is-dragging {
  transition: none;
}

.hero-slider__slide {
  flex-shrink: 0;
}

.hero-slider__slide img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.hero-slider__dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero-slider__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.hero-slider__dot.is-active {
  background: var(--yellow);
}

.store-status-notice {
  width: min(1180px, calc(100% - 40px));
  margin: 10px auto 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: #b91c1c;
  color: #fff;
  font-weight: 700;
}

.store-status-popup {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.56);
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 16px;
}

.store-status-popup__card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.store-status-popup__card h2 {
  margin: 0 0 8px;
}

.store-status-popup__card p {
  margin: 0 0 16px;
}
