/*
 * Design tokens — единый источник правды для всего проекта.
 * Подключать первым перед любыми другими CSS-файлами.
 */

:root {
  /* ── Brand colours ── */
  --red:          #e63946;
  --red-hover:    #c92a37;
  --red-light:    #fdecea;

  /* Primary action: зелёный (add-to-cart, finish-order) */
  --green:        #27ae60;
  --green-hover:  #219150;

  /* Secondary action: оранжевый только для Cart FAB / нейтральных back-кнопок */
  --orange:       #f97316;
  --orange-hover: #ea6c0a;

  /* ── Neutrals ── */
  --dark:         #1a1a2e;
  --body:         #374151;
  --gray:         #6b7280;
  --gray-light:   #94a3b8;
  --border:       #e2e8f0;
  --border-light: #f1f5f9;

  /* ── Surfaces ── */
  --bg:           #ffffff;
  --bg-muted:     #f8fafc;
  --bg-subtle:    #f3f4f6;
  --white:        #ffffff;

  /* ── Typography scale ── */
  --text-xs:   0.6875rem;  /* 11px */
  --text-sm:   0.8125rem;  /* 13px */
  --text-base: 0.9375rem;  /* 15px */
  --text-md:   1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */

  /* ── Font stack ── */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* ── Radius ── */
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
  --shadow:    0 4px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .12);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, .18);

  /* ── Transitions ── */
  --transition: 0.18s ease;

  /* ── Layout ── */
  --max-w-content: 860px;
  --max-w-wide:    1280px;
}
/*
 * global.css — общие компоненты: layout, модалки, кнопки, корзина.
 * Подключать после tokens.css.
 * Здесь НЕТ :root — все переменные живут в tokens.css.
 */

/* ── Base reset ──────────────────────────────────────────────────────── */

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

body {
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

/* ── Layout containers ───────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 1rem;
}

.container--wide {
  width: 100%;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Typography helpers (без !important) ─────────────────────────────── */

.heading-xl  { font-size: var(--text-4xl); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.heading-lg  { font-size: var(--text-3xl); font-weight: 700; line-height: 1.2; }
.heading-md  { font-size: var(--text-2xl); font-weight: 700; line-height: 1.3; }
.heading-sm  { font-size: var(--text-xl);  font-weight: 600; line-height: 1.4; }
.heading-xs  { font-size: var(--text-lg);  font-weight: 600; line-height: 1.4; }
.text-sm     { font-size: var(--text-sm);  color: var(--gray); }
.text-muted  { color: var(--gray); }

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), color var(--transition), opacity var(--transition);
  text-decoration: none;
}

/* Primary (red) — CTA на лендинге, модалках */
.btn--primary {
  background: var(--red);
  color: #fff;
}
.btn--primary:hover {
  background: var(--red-hover);
  color: #fff;
}

/* Green — добавить в корзину, завершить заказ */
.btn--green {
  background: var(--green);
  color: #fff;
}
.btn--green:hover {
  background: var(--green-hover);
  color: #fff;
}

/* Outline — вторичное действие */
.btn--outline {
  background: transparent;
  color: var(--dark);
  border: 1.5px solid var(--border);
}
.btn--outline:hover {
  border-color: var(--gray-light);
  background: var(--bg-muted);
}

/* Ghost — «назад к покупкам» и т.п. */
.btn--ghost {
  background: var(--bg-subtle);
  color: var(--dark);
}
.btn--ghost:hover {
  background: var(--border-light);
}

/* ── add-to-cart-button (React + SSR) ───────────────────────────────── */

.add-to-cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 10px 20px;
  width: 100%;
  font-size: var(--text-md);
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 1rem;
  color: #fff;
  background: var(--green);
  transition: background var(--transition);
  text-decoration: none;
  text-align: center;
}

.add-to-cart-button:hover {
  background: var(--green-hover);
  color: #fff;
}

/* close-button: нейтральная (было orange — это антипаттерн) */
.close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 10px 20px;
  width: 100%;
  font-size: var(--text-md);
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 1rem;
  color: var(--dark);
  background: var(--bg-subtle);
  transition: background var(--transition);
}

.close-button:hover {
  background: var(--border-light);
}

/* ── Modal: полноэкранная (React, корзина и т.п.) ────────────────────── */

.global-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.global-modal-container {
  height: 90%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 500px;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.global-modal-footer {
  display: flex;
  max-width: 500px;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: sticky;
  bottom: 0;
  background: var(--white);
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, .06);
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

/* ── Modal overlay (промо на лендинге) ───────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

/* ── Cart / Order buttons ─────────────────────────────────────────────── */

.cart-button-shopping,
.cart-button-finish {
  border: none;
  padding: 11px 16px;
  width: 100%;
  font-size: var(--text-md);
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  color: #fff;
  transition: background var(--transition);
}

.cart-button-shopping {
  background: var(--bg-subtle);
  color: var(--dark);
}

.cart-button-shopping:hover {
  background: var(--border-light);
}

.cart-button-finish {
  background: var(--green);
}

.cart-button-finish:hover {
  background: var(--green-hover);
}

/* ── Login button ─────────────────────────────────────────────────────── */

.login-button {
  border: none;
  border-radius: var(--radius);
  background: var(--green);
  padding: 10px 20px;
  font-size: var(--text-md);
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  width: 100%;
  transition: background var(--transition);
}

.login-button:hover {
  background: var(--green-hover);
}

/* ── Misc helpers ─────────────────────────────────────────────────────── */

.total-price {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: 8px;
}

.global-title {
  text-align: left;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 12px 16px 4px;
}

.global-description {
  padding: 0 16px 10px;
  font-size: var(--text-sm);
  color: var(--gray);
  line-height: 1.5;
}

/* ── Modal login popup ─────────────────────────────────────────────────── */

.modal-login-container {
  position: absolute;
  top: 5rem;
  right: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1000;
}

.modal-login-content {
  background: var(--white);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.modal-login-content a {
  text-decoration: none;
  color: var(--dark);
  display: block;
  font-size: var(--text-lg);
}

@media (min-width: 768px) {
  .modal-login-container {
    top: 5.5rem;
    right: 1rem;
  }
}
/*
 * Шапка сайта: логотип, языковой переключатель, гамбургер-меню.
 * Подключается на лендинге и на странице меню магазина.
 */

/* ── Общая обёртка ──────────────────────────────────────────────────── */

.landing-header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

/* На странице меню шапка не sticky — добавляем модификатор */
.landing-header--static {
  position: relative;
}

.company-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 0;
}

.company-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: clamp(44px, 12%, 80px);
}

.company-logo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.company-name {
  flex: 1;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--dark);
}

/* ── Shop-specific header info (страница меню) ──────────────────────── */

/* Сетка: лого | заголовок/мета | действия — третья колонка всегда у правого края */
.shop-menu-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: 100%;
  gap: 10px;
  /* Слева — как у .container (1rem), справа — 0, чтобы гамбургер не «плавал» в поле отступа */
  padding: 12px 0 12px 0;
  padding-right: 0;
  box-sizing: border-box;
}

.shop-menu-header .company-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
}

.shop-menu-header .company-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-menu-header__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-menu-header__name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-menu-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
}

/* Разделитель между адресом и часами */
.shop-menu-header__meta .meta-sep {
  color: var(--gray-light);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.shop-menu-header__addr,
.shop-menu-header__hours {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  color: var(--gray);
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

.shop-menu-header__addr svg,
.shop-menu-header__hours svg {
  flex-shrink: 0;
  color: var(--gray-light);
}

/* shop-widget.css (React global.css) раньше задавал .header-profile { margin: 1rem } на весь документ —
   перекрываем с более высокой специфичностью, пока не пересобран виджет */
.shop-menu-header nav.header-profile.header-actions,
.shop-menu-header .header-profile.header-actions {
  margin: 0;
  padding: 0;
  width: auto;
  max-width: none;
}

@media (min-width: 768px) {
  .shop-menu-header nav.header-profile.header-actions,
  .shop-menu-header .header-profile.header-actions {
    margin: 0;
    padding: 0;
  }
}

/* Страница меню магазина: блок действий у правого края сетки */
.shop-menu-header .header-actions {
  justify-content: flex-end;
  margin-left: 0;
  gap: 8px;
}

.shop-menu-header .header-mobile-wrap {
  margin-left: 0;
}

/* Меньше «воздуха» вокруг полосок внутри кнопки; сама кнопка уже у края строки */
.shop-menu-header .menu-toggle {
  padding: 4px;
  width: 36px;
  height: 36px;
  gap: 4px;
}

@media (max-width: 767px) {
  .shop-menu-header .header-actions {
    gap: 0;
  }
}

/* ── Header actions (правая часть) ───────────────────────────────────── */

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.header-mobile-wrap {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.header-profile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  margin: 0;
}

/* ── Language switcher (desktop) ─────────────────────────────────────── */

.lang-wrap {
  position: relative;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--dark);
  transition: border-color var(--transition), background var(--transition);
  white-space: nowrap;
}

.lang-trigger:hover {
  border-color: var(--gray-light);
  background: var(--bg-muted);
}

.lang-trigger__arrow {
  font-size: 0.65em;
  opacity: 0.6;
  transition: transform var(--transition);
}

.lang-trigger[aria-expanded="true"] .lang-trigger__arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 50;
  display: none;
  overflow: hidden;
}

.lang-dropdown.is-open {
  display: block;
}

.lang-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  background: none;
  font-size: var(--text-sm);
  text-align: left;
  cursor: pointer;
  color: var(--dark);
  transition: background var(--transition);
}

.lang-dropdown button:hover {
  background: var(--bg-muted);
}

.login-wrap {
  position: relative;
  z-index: 300;
}

/* Логин в шапке меню: десктопный слот и мобильная полоска у гамбургера */
.login-wrap--header-desktop {
  display: block;
}

.login-wrap--mobile-bar {
  display: none;
  flex-shrink: 0;
}

.menu-login-name {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-login-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--dark);
  transition: border-color var(--transition), background var(--transition);
  white-space: nowrap;
}

.menu-login-trigger:hover {
  border-color: var(--gray-light);
  background: var(--bg-muted);
}

.menu-login-trigger__arrow {
  font-size: 0.65em;
  opacity: 0.6;
}

.menu-login-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 400;
  overflow: hidden;
  display: none;
}

.menu-login-dropdown.is-open {
  display: block;
}

.menu-login-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 14px;
  border: none;
  background: none;
  font-size: var(--text-sm);
  text-align: left;
  cursor: pointer;
  color: var(--dark);
}

.menu-login-option:hover {
  background: var(--bg-muted);
}

.login-sub {
  display: none;
  padding-bottom: 4px;
}

.login-sub.is-open {
  display: block;
}

.lang-dropdown button .lang-flag {
  font-size: 1rem;
  line-height: 1;
}

/* ── Hamburger (mobile) ──────────────────────────────────────────────── */

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.menu-toggle:hover {
  background: var(--bg-muted);
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--dark);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 50;
  padding: 6px 0;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu .menu-item {
  padding: 10px 16px;
  font-size: var(--text-sm);
  color: var(--dark);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  display: block;
  text-decoration: none;
  transition: background var(--transition);
}

.mobile-menu .menu-item:hover {
  background: var(--bg-muted);
}

.mobile-menu .menu-item--sub {
  padding-left: 32px;
  color: var(--gray);
}

.lang-sub {
  display: none;
  padding-bottom: 4px;
}

.lang-sub.is-open {
  display: block;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  .lang-wrap--desktop {
    display: none;
  }
  .login-wrap--header-desktop {
    display: none;
  }
  .login-wrap--mobile-bar {
    display: block;
  }
  .menu-toggle {
    display: flex;
  }
}

@media (min-width: 768px) {
  .header-mobile-wrap {
    display: none;
  }
  .company-header {
    padding: 12px 0;
  }

  /* Страница меню магазина: на вебе тот же гамбургер, что на мобилке; язык и логин — в выпадающем меню */
  .landing-header .shop-menu-header .header-mobile-wrap {
    display: flex;
  }
  .landing-header .shop-menu-header .menu-toggle {
    display: flex;
  }
  .landing-header .shop-menu-header .lang-wrap--desktop,
  .landing-header .shop-menu-header .login-wrap--header-desktop {
    display: none !important;
  }

  /* Чуть крупнее логотип на странице меню (веб) */
  .shop-menu-header .company-logo {
    width: 52px;
    height: 52px;
  }
}
/*
 * Карусель промо-баннеров — лендинг и страница меню магазина.
 * Единственный источник правды для карусели промо.
 */

.promo-section {
  padding: 0;
  background: var(--bg-muted, #f8fafc);
}

.promo-banners {
  overflow: hidden;
}

.promo-banners .carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0 16px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: var(--max-w-content, 860px);
  margin: 0 auto;
}

.promo-banners .carousel::-webkit-scrollbar {
  display: none;
}

/* Карточка — flex-колонка: картинка вверху, тело снизу */
.promo-banner {
  flex: 0 0 calc(100% - 32px);
  background: #fff;
  border-radius: var(--radius-sm, 8px);
  scroll-snap-align: start;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .08);
  text-decoration: none;
}

/* Desktop: два баннера в видимой зоне */
@media (min-width: 768px) {
  .promo-banner {
    flex: 0 0 calc((100% - 8px) / 2 - 16px);
  }
}

/* Картинка занимает всю ширину, высота — естественная */
.promo-banner .promo-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Тело: название, описание, кнопка */
.promo-banner__body {
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.promo-banner__name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin: 0;
  line-height: 1.3;
}

.promo-banner__desc {
  font-size: .82rem;
  color: var(--gray, #64748b);
  margin: 0;
  flex: 1;
  line-height: 1.4;
}

.promo-banner__cta {
  margin-top: 8px;
  background: var(--primary, #22c55e);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm, 8px);
  padding: 9px 16px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: center;
  display: block;
}

/* Пустой баннер (нет картинки) */
.promo-banner--empty {
  min-height: 11rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--gray-light, #94a3b8);
  background: var(--bg-muted, #f8fafc);
}
/*
 * Стили для страницы меню магазина (menu.html).
 * Вынесено из inline <style> для кеширования и уменьшения HTML.
 */

#react-root { position: relative; z-index: 500; }

/* ── Category nav ───────────────────────────────────────────────── */
.category-buttons {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid #f0f0f0;
}
.category-buttons-container {
  max-width: var(--max-w-content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding: 12px 16px;
  gap: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.category-buttons-container::-webkit-scrollbar { display: none; }

/* Веб: ряд категорий по центру экрана */
@media (min-width: 768px) {
  .category-buttons-container {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
    row-gap: 10px;
  }
}

.category-button {
  flex-shrink: 0;
  border: 1.5px solid #d1d5db;
  border-radius: 9999px;
  background: #fff;
  padding: 7px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.category-button:hover,
.category-button.active {
  background: #1c1c2e;
  color: #fff;
  border-color: #1c1c2e;
}

.category-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1c1c2e;
  margin: 20px 0 12px;
  padding-left: 2px;
}

/* ── Menu area ──────────────────────────────────────────────────── */
.menu { padding: 8px 0 100px; }
.menu-sec { margin-bottom: 8px; }

/* ── Product list: мобилка ──────────────────────────────────────── */
.productlist {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #f0f0f0;
  border-radius: 16px;
  overflow: hidden;
}

/* ── Product card: мобилка — 2 колонки: фото ~25%, текст ~75%, кнопка у цены ── */
.product-card {
  display: flex;
  align-items: flex-start;
  padding: 14px 12px 14px 14px;
  background: #fff;
  position: relative;
  gap: 12px;
}
.product-card:first-child { border-radius: 16px 16px 0 0; }
.product-card:last-child  { border-radius: 0 0 16px 16px; }
.product-card:only-child  { border-radius: 16px; }

.product-card-image {
  flex: 0 0 25%;
  max-width: 25%;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.product-card-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
  aspect-ratio: 1;
}
.product-card-image--empty {
  display: flex; align-items: center;
  justify-content: center; font-size: 2rem;
  min-height: 72px;
  background: #f3f4f6;
}

.product-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1c1c2e;
  line-height: 1.3;
  margin: 0;
}
.product-card-description {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.product-card-footer__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
}
.product-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #2D9F5C;
}
.product-price--from {
  font-weight: 500;
  font-size: 0.8125rem;
  margin-right: 2px;
}
.old-price {
  font-size: 0.75rem;
  color: #9ca3af;
  text-decoration: line-through;
}

/*
 * Счётчик на карточке = как в модалке корзины (Cart.css / .cart-item__qty),
 * но «+» зелёный. Селектор .menu .product-card перебивает оранжевый + из shop-widget.css.
 */
.menu .product-card .cart-item__qty {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-top: 2px;
  padding: 0;
  border-radius: 999px;
  background: #f3f4f6;
}

/* В корзине 0 шт.: только зелёный «+», без серой «таблетки» и без места под − / число */
.menu .product-card .cart-item__qty--solo {
  padding: 0;
  background: transparent;
}

.menu .product-card .cart-item__qty--solo .cart-qty--dec,
.menu .product-card .cart-item__qty--solo .cart-qty__value {
  display: none !important;
  visibility: hidden;
  position: absolute;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

.menu .product-card .cart-qty {
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.menu .product-card .cart-qty:hover {
  background: rgba(0, 0, 0, 0.06);
}

.menu .product-card .cart-qty--inc {
  background: #38d71c;
  color: #fff;
}

.menu .product-card .cart-qty--inc:hover {
  background: #2fb818;
  color: #fff;
}

.menu .product-card .cart-qty__value {
  min-width: 28px;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
}

.menu .product-card .cart-item__qty .cart-qty[disabled],
.menu .product-card .cart-item__qty [hidden] {
  display: none !important;
}

/* ── SEO text ───────────────────────────────────────────────────── */
.seo-text {
  padding: 24px 0 16px;
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.6;
}

/* ── Планшет (540px+): вертикальные карточки в 2 колонки ────────── */
@media (min-width: 540px) {
  .productlist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: transparent;
    border-radius: 0;
    overflow: visible;
  }
  .product-card {
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 14px;
    border-radius: 16px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    gap: 0;
  }
  .product-card-image {
    flex: none;
    max-width: none;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 16px 16px 0 0;
    padding: 8px;
  }
  .product-card-image img {
    aspect-ratio: auto;
    max-height: 200px;
    object-fit: contain;
  }
  .product-card-body {
    padding: 12px 14px 0;
  }
  .product-card-footer {
    padding: 0 14px;
    margin-top: 10px;
  }
}

/* ── Desktop (860px+): 3 колонки ───────────────────────────────── */
@media (min-width: 860px) {
  .productlist {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* ── Широкий экран: 4 карточки в ряд ───────────────────────────── */
@media (min-width: 1200px) {
  .productlist {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}
