﻿/* =========================================================
   Добрый Повар Геленджик — style.css
   1/4 — переменные, сброс, типографика, контейнер, кнопки, формы
   ========================================================= */

/* Атрибут hidden обязан скрывать: правило класса с display перебивает
   браузерное [hidden]{display:none}, и скрытый блок остаётся видимым. */
[hidden] { display: none !important; }

:root {
  /* Палитра — снята с дизайн-референса (sendcloud.com) */
  /* Стопы градиента затемнены: на исходных #02CCF7/#17A0FD белый текст кнопок,
     бейджей и логотипа давал 1.9-2.8 по реальным пикселям (photo_contrast) —
     ниже рабочего порога 3.0. Сейчас худшая точка градиента даёт 3.47. */
  --c-grad-start: #0096B8;
  --c-grad-end:   #1073BC;
  --c-navy:       #112857;
  --c-navy-soft:  #5B6B85;
  --c-bg:         #F6F6F9;
  --c-white:      #FFFFFF;
  --c-line:       #E4E7EF;
  /* Тон акцента для текстовых ссылок: сам акцент #17A0FD на светлом фоне даёт контраст 2.6 */
  --c-link:       #1073BC;

  /* Пастельные подложки категорий/товаров (тёплые, унаследованы от структурного референса) */
  --c-pastel-peach:  #FDEDE3;
  --c-pastel-sky:    #E7F3FE;
  --c-pastel-butter: #FFF4D6;
  --c-pastel-mint:   #E7F8F0;
  --c-pastel-blush:  #FDEAF0;

  --grad-primary: linear-gradient(90deg, var(--c-grad-start), var(--c-grad-end));

  --shadow-card: 0 4px 16px rgba(17, 40, 87, .08);
  --shadow-card-lg: 0 12px 32px rgba(17, 40, 87, .12);

  --radius-card: 16px;
  --radius-pill: 999px;
  --radius-sm: 10px;

  --font-heading: 'Manrope', 'Arial', sans-serif;
  --font-body: 'Manrope', 'Arial', sans-serif;
  --font-script: 'Caveat', cursive;

  --container-w: 1280px;
  --container-pad: 24px;
  --gap-section: 96px;

  color-scheme: light;
}

@media (max-width: 480px) {
  :root { --container-pad: 16px; --gap-section: 56px; }
}

/* ---------- Сброс ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--c-navy);
  margin: 0 0 .5em;
  line-height: 1.18;
}

h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; }
h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
h3 { font-size: clamp(18px, 2vw, 22px); font-weight: 700; }

p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--c-navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Контейнер / секции ---------- */

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section { padding: 56px 0; }

.section__head { max-width: 640px; margin: 0 0 32px; }
.section__head p { color: var(--c-navy-soft); font-size: 16px; }

.section--tight { padding: 32px 0; }

/* ---------- Типографика вспомогательная ---------- */

.eyebrow {
  display: inline-block;
  font-family: var(--font-script);
  font-size: 22px;
  font-weight: 600;
  color: var(--c-grad-end);
  margin-bottom: 6px;
}

.text-muted { color: var(--c-navy-soft); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-heading);
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, opacity .15s ease;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(2, 165, 246, .35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(2, 165, 246, .42); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--c-white);
  color: var(--c-navy);
  border-color: var(--c-navy);
}
.btn-secondary:hover { background: var(--c-navy); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--c-navy);
  padding: 10px 4px;
}
.btn-ghost:hover { color: var(--c-grad-end); }

.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- Формы ---------- */

.field {
  display: block;
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--c-navy);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  background: var(--c-white);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:hover, .field textarea:hover, .field select:hover { border-color: #C7CEDD; }

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--c-grad-end);
  box-shadow: 0 0 0 3px rgba(23, 160, 253, .18);
}

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

.checklist { margin: 0; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--c-navy);
}
.checklist .icon { color: var(--c-navy); flex: 0 0 auto; margin-top: 2px; }

/* =========================================================
   2/4 — шапка, навигация, бургер, мобильное меню, футер
   ========================================================= */

/* ---------- Город-модалка ---------- */

.city-modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 40, 87, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 20px;
}
.city-modal[hidden] { display: none; }

.city-modal__panel {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-card-lg);
}

.city-modal__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  margin-bottom: 10px;
}
.city-modal__title .icon { color: var(--c-grad-end); }

.city-modal__text { color: var(--c-navy-soft); margin-bottom: 22px; }

.city-modal__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.city-modal__actions .btn { flex: 1 1 auto; }

.city-modal__switch { margin-top: 16px; display: flex; gap: 10px; }
.city-modal__switch[hidden] { display: none; }
.city-modal__option {
  flex: 1;
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-weight: 600;
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease;
}
.city-modal__option:hover { border-color: var(--c-grad-end); background: var(--c-pastel-sky); }

/* ---------- Шапка ---------- */

.site-header { background: var(--c-white); position: sticky; top: 0; z-index: 300; box-shadow: 0 1px 0 var(--c-line); }

.topbar { background: var(--c-navy); color: #fff; font-size: 13px; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; padding: 8px 24px; gap: 16px; }
.topbar__hours { display: flex; align-items: center; gap: 6px; opacity: .9; white-space: nowrap; }
.topbar__links { display: flex; gap: 18px; }
.topbar__links a { display: flex; align-items: center; gap: 5px; opacity: .85; white-space: nowrap; }
.topbar__links a:hover { opacity: 1; color: #8fe0ff; }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
}

.logo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.logo__mark {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--grad-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 15px;
}
.logo__text { font-weight: 800; font-size: 15px; line-height: 1.25; white-space: nowrap; }
.logo__text small { font-weight: 500; color: var(--c-navy-soft); font-size: 12px; }

.header__search {
  flex: 1 1 auto;
  min-width: 120px;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  color: var(--c-navy-soft);
}
.header__search:focus-within { border-color: var(--c-grad-end); background: var(--c-white); }
.header__search input {
  border: 0; background: transparent; width: 100%; outline: none; color: var(--c-navy); font-size: 14px;
}

.header__city {
  display: flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
}
.header__city:hover { border-color: var(--c-grad-end); color: var(--c-grad-end); }

.header__phone { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; white-space: nowrap; }
.header__phone .icon { color: var(--c-grad-end); }
.header__phone span { display: flex; flex-direction: column; font-weight: 700; font-size: 14px; line-height: 1.2; }
.header__phone small { font-weight: 500; color: var(--c-navy-soft); font-size: 11px; }
.header__phone:hover { color: var(--c-grad-end); }

.header__iconlink {
  position: relative;
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--c-navy);
}
.header__iconlink:hover { background: var(--c-pastel-sky); color: var(--c-grad-end); }

.header__cart { width: auto; gap: 6px; padding: 0 12px; border-radius: var(--radius-pill); }
.header__cart-count {
  position: absolute; top: 2px; right: 6px;
  background: var(--c-grad-end); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.header__cart-sum { display: none; font-weight: 700; font-size: 13px; }

.burger {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  flex: 0 0 auto;
}
.burger:hover { background: var(--c-pastel-sky); }

.utilitynav { background: var(--c-white); border-top: 1px solid var(--c-line); }
.utilitynav__list { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.utilitynav__list::-webkit-scrollbar { display: none; }
.utilitynav__list li { flex: 0 0 auto; }
.utilitynav__list a {
  display: block;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  color: var(--c-navy-soft);
  border-bottom: 2px solid transparent;
}
.utilitynav__list a:hover { color: var(--c-navy); }
.utilitynav__list a.is-active { color: var(--c-navy); border-bottom-color: var(--c-grad-end); }

/* ---------- Off-canvas меню ---------- */

.offcanvas {
  position: fixed; inset: 0;
  background: rgba(17,40,87,.5);
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.offcanvas.is-open { opacity: 1; pointer-events: auto; }

.offcanvas__panel {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: min(320px, 86vw);
  background: var(--c-white);
  padding: 20px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .25s ease;
}
.offcanvas.is-open .offcanvas__panel { transform: translateX(0); }

.offcanvas__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.offcanvas__close { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.offcanvas__close:hover { background: var(--c-pastel-sky); }

.offcanvas__menu { margin-bottom: 22px; border-bottom: 1px solid var(--c-line); padding-bottom: 14px; }
.offcanvas__menu li a { display: block; padding: 10px 4px; font-weight: 700; font-size: 15px; }
.offcanvas__menu li a:hover { color: var(--c-grad-end); }

.offcanvas__subtitle { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-navy-soft); font-weight: 700; margin-bottom: 6px; }
.offcanvas__categories { margin-bottom: 22px; }
.offcanvas__categories li a { display: block; padding: 8px 4px; font-size: 14px; white-space: nowrap; }
.offcanvas__categories li a:hover { color: var(--c-grad-end); }

.offcanvas__phone { width: 100%; }

/* ---------- Двухколоночная оболочка ---------- */

.layout__inner { display: flex; align-items: flex-start; gap: 32px; padding-top: 24px; }

.sidebar-categories {
  flex: 0 0 240px;
  width: 240px;
  position: sticky;
  top: 130px;
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 18px 8px;
}
.sidebar-categories__title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-navy-soft);
  font-weight: 700;
  padding: 0 14px;
  margin-bottom: 8px;
}
.sidebar-categories li a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--c-navy);
}
.sidebar-categories li a:hover { background: var(--c-pastel-sky); color: var(--c-grad-end); }
.sidebar-categories li a.is-active { background: var(--c-pastel-sky); color: var(--c-grad-end); }

.site-main { flex: 1 1 auto; min-width: 0; }

/* ---------- Хлебные крошки ---------- */

.breadcrumbs { padding: 18px 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--c-navy-soft); }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 6px; color: var(--c-line); }
.breadcrumbs a:hover { color: var(--c-grad-end); }
.breadcrumbs li[aria-current] { color: var(--c-navy); font-weight: 600; }

/* ---------- Футер ---------- */

.site-footer { background: var(--c-white); margin-top: 40px; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 32px;
  padding: 64px 24px 48px;
}

.footer__col .footer__heading {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
  color: var(--c-navy-soft);
  margin-bottom: 16px;
}

.footer__col--brand .footer__about { color: var(--c-navy-soft); font-size: 14px; margin: 14px 0 18px; max-width: 320px; }

.footer__social { display: flex; gap: 10px; }
.footer__social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--c-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-navy);
}
.footer__social a:hover { border-color: var(--c-grad-end); color: var(--c-grad-end); }

.footer__list li { margin-bottom: 12px; }
.footer__list a { color: var(--c-navy-soft); font-size: 14px; }
.footer__list a:hover { color: var(--c-grad-end); }

.footer__quickorder { display: flex; flex-direction: column; gap: 10px; }
.footer__quickbtn { justify-content: flex-start; width: 100%; }

.footer__bottom { background: var(--c-navy); color: #cfd8ea; }
.footer__bottom-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 24px;
  padding: 18px 24px;
  font-size: 13px;
}
.footer__legal-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer__legal-links a:hover { color: #fff; }
.footer__copy { margin: 0; opacity: .85; }
.footer__pay { display: flex; gap: 8px; }
.footer__pay-badge {
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* =========================================================
   3/4 — стили секций
   ========================================================= */

/* ---------- Hero-слайдер ---------- */

.hero { padding: 24px 0 8px; }
.hero__slider { position: relative; border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card-lg); }
.hero__track { display: flex; transition: transform .45s ease; }
.hero__slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  background: var(--c-white);
  min-height: 180px;
  max-height: 360px;
  overflow: hidden;
}
.hero__slide-text { padding: 22px 32px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--c-pastel-butter);
  color: var(--c-navy);
  font-family: var(--font-script);
  font-size: 22px;
  font-weight: 600;
  padding: 4px 18px 6px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
  transform: rotate(-2deg);
}
.hero__slide h1, .hero__slide h2.hero__title { margin-bottom: 12px; }
.hero__slide p { color: var(--c-navy-soft); max-width: 420px; margin-bottom: 12px; }
.hero__price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.hero__price-current { font-size: 26px; font-weight: 800; color: var(--c-navy); }
.hero__price-old { font-size: 18px; color: var(--c-navy-soft); text-decoration: line-through; }
.hero__slide-media { position: relative; height: 100%; min-height: 180px; max-height: 360px; overflow: hidden; }
.hero__slide-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }

.hero__arrows { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; pointer-events: none; }
.hero__arrow {
  pointer-events: auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--c-navy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
}
.hero__arrow:hover { background: var(--c-white); color: var(--c-grad-end); }

.hero__intro { max-width: 760px; margin: 0 auto 28px; text-align: center; }
.hero__subtitle { color: var(--c-navy-soft); font-weight: 600; font-size: 18px; margin: 0; }

.hero__dots { display: flex; gap: 8px; justify-content: center; padding: 16px 0 4px; }
.hero__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-line); }
.hero__dot.is-active { background: var(--grad-primary); width: 22px; border-radius: var(--radius-pill); transition: width .2s ease; }

/* ---------- Пилюли-подборки ---------- */

.promo-pills { padding: 28px 0 8px; }
.promo-pills__list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.promo-pills__list::-webkit-scrollbar { display: none; }
.promo-pills__list a {
  flex: 0 0 auto;
  display: inline-flex; align-items: center;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--c-white);
  border: 1.5px solid var(--c-line);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
}
.promo-pills__list a:hover,
.promo-pills__list a.is-accent {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
}

/* ---------- Сетка категорий ---------- */

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

.category-card {
  display: block;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--c-white);
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-lg); }
.category-card__media { display: block; aspect-ratio: 4 / 3; }
.category-card__media img { width: 100%; height: 100%; object-fit: cover; }
.category-card__label { padding: 14px 16px; font-weight: 700; font-size: 15px; display: block; }
.category-card__label h3 { margin: 0; font: inherit; color: inherit; }
.category-card__label small { display: block; font-weight: 500; color: var(--c-navy-soft); font-size: 12.5px; margin-top: 4px; }

/* ---------- Товарная сетка / карточка ---------- */

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

.product-card {
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-lg); }

.product-card__media { position: relative; display: block; aspect-ratio: 4 / 3; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--grad-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.product-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card__title { font-size: 15px; margin: 0; }
.product-card__title a:hover { color: var(--c-grad-end); }
.product-card__desc { font-size: 13px; color: var(--c-navy-soft); margin: 0; flex: 1; }
.product-card__weight { font-size: 12px; color: var(--c-navy-soft); margin: 0 0 6px; }

.product-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
/* В два столбца на 375px карточка ужимается до ~150px, и строка цены перестаёт
   помещаться рядом с кнопкой «+». Без nowrap она рвётся прямо внутри значения
   («399» и «₽» на разных строках), поэтому переносим только старую цену
   целиком под новую. */
.product-card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; min-width: 0; }
.product-card__price-current { font-weight: 800; font-size: 17px; white-space: nowrap; }
.product-card__price-old { font-size: 13px; color: var(--c-navy-soft); text-decoration: line-through; white-space: nowrap; }

.product-card__add {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.product-card__add:hover { transform: scale(1.08); }

.product-grid-empty { color: var(--c-navy-soft); }

/* ---------- Промо-баннер во всю ширину ---------- */

.promo-banner {
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
}
.promo-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.promo-banner::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(17,40,87,.88) 0%, rgba(17,40,87,.55) 55%, rgba(17,40,87,.15) 100%);
  z-index: 1;
}
.promo-banner__content { position: relative; z-index: 2; padding: 48px; max-width: 480px; color: #fff; }
.promo-banner__content h2 { color: #fff; }
.promo-banner__content p { color: rgba(255,255,255,.85); margin-bottom: 22px; }

/* ---------- Тёмная карточка-акцент / CTA-баннер ---------- */

.cta-banner {
  background: var(--c-navy);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: #fff; margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,.78); margin: 0; }
.cta-banner .btn-secondary { background: transparent; border-color: #fff; color: #fff; }
.cta-banner .btn-secondary:hover { background: #fff; color: var(--c-navy); }

/* ---------- Текстовый блок с раскрытием ---------- */

.expand-block { max-width: 820px; }
.expand-block__content {
  max-height: 130px;
  overflow: hidden;
  position: relative;
  transition: max-height .3s ease;
}
.expand-block__content::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
  background: linear-gradient(180deg, rgba(246,246,249,0) 0%, var(--c-bg) 100%);
}
.expand-block__content.is-open { max-height: 2000px; }
.expand-block__content.is-open::after { display: none; }
.expand-block__toggle { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--c-link); }
.expand-block__toggle:hover { color: var(--c-navy); }
.expand-block__toggle .icon { transition: transform .2s ease; }
.expand-block__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }

/* ---------- Страница «О нас» ---------- */

.page-hero {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  margin-top: 24px;
}
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,40,87,.15) 0%, rgba(17,40,87,.8) 100%); }
.page-hero__content { position: relative; z-index: 1; padding: 40px 48px; color: #fff; }
.page-hero__content h1 { color: #fff; margin: 0; }

.content-block { max-width: 760px; }
.content-block + .content-block { margin-top: 8px; }

.photo-caption { margin: 36px 0; }
.photo-caption img { border-radius: var(--radius-card); width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.photo-caption figcaption { color: var(--c-navy-soft); font-size: 14px; margin-top: 10px; }

.circle-portrait {
  width: 220px; height: 220px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-card-lg);
  float: right;
  margin: 0 0 16px 24px;
}

.next-section-link {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--c-line);
  padding-top: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
  gap: 12px;
}
.next-section-link a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--c-link); }
.next-section-link a:hover { color: var(--c-navy); }

/* ---------- Доставка и оплата ---------- */

.steps-list { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0; }
.step-card {
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 26px;
  position: relative;
}
.step-card__num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  margin-bottom: 14px;
}
.step-card h3 { margin-bottom: 8px; }
.step-card p { color: var(--c-navy-soft); margin: 0; font-size: 14px; }

.city-terms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 28px 0; }
.city-terms__card {
  border-radius: var(--radius-card);
  padding: 28px;
  background: var(--c-navy);
  color: #fff;
}
.city-terms__card:nth-child(2) { background: var(--c-white); color: var(--c-navy); box-shadow: var(--shadow-card); }
.city-terms__card h3 { color: inherit; display: flex; align-items: center; gap: 8px; }
.city-terms__card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 16px 0 0; font-size: 14px; }
.city-terms__card dt { opacity: .75; }
.city-terms__card dd { margin: 0; font-weight: 700; }

/* ---------- Отзывы ---------- */

.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.review-card { background: var(--c-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 24px; }
.review-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.review-card__name { font-weight: 700; }
.review-card__meta { font-size: 12.5px; color: var(--c-navy-soft); }
.review-card__stars { display: flex; gap: 2px; color: var(--c-grad-end); margin-bottom: 10px; }
.review-card__stars .icon--empty { color: var(--c-line); }
.review-card p { color: var(--c-navy); font-size: 14px; margin: 0; }
.review-card__quote { color: var(--c-line); margin-bottom: 6px; }

/* ---------- Контакты ---------- */

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 40px; }
.contact-card { background: var(--c-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 26px; }
.contact-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.contact-card h3 .icon { color: var(--c-grad-end); }
.contact-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.contact-card dt { color: var(--c-navy-soft); }
.contact-card dd { margin: 0; font-weight: 600; }

.map-block { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); background: var(--c-white); margin-bottom: 24px; }
.map-block__label { padding: 18px 20px 0; font-weight: 700; font-size: 15px; }
.map-block__frame { aspect-ratio: 16 / 7; width: 100%; }
.map-block__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-block__footer { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.map-block__footer a { font-weight: 700; color: var(--c-link); display: inline-flex; align-items: center; gap: 6px; }
.map-block__footer a:hover { color: var(--c-navy); }

/* ---------- Карточка товара (product.php) ---------- */

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 28px 0 8px; align-items: start; }
.product-detail__media { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 4/3; }
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__category { color: var(--c-grad-end); font-weight: 700; font-size: 13px; margin-bottom: 8px; display: inline-block; }
.product-detail__weight { color: var(--c-navy-soft); margin-bottom: 18px; }
.product-detail__price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.product-detail__price-current { font-size: 30px; font-weight: 800; }
.product-detail__price-old { font-size: 18px; color: var(--c-navy-soft); text-decoration: line-through; }

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--c-line); border-radius: var(--radius-pill); overflow: hidden; }
.stepper button { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.stepper button:hover { background: var(--c-pastel-sky); color: var(--c-grad-end); }
.stepper input { width: 44px; text-align: center; border: 0; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.product-detail__actions { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }

.product-detail__desc { border-top: 1px solid var(--c-line); padding-top: 20px; }
.product-detail__desc h2 { font-size: 18px; }

/* ---------- Карта сайта ---------- */

.sitemap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.sitemap-grid h2 { font-size: 18px; margin-bottom: 4px; }
.sitemap-scroll { max-height: 640px; overflow-y: auto; padding-right: 6px; }

@media (max-width: 768px) {
  .sitemap-grid { grid-template-columns: 1fr; gap: 24px; }
  .sitemap-scroll { max-height: none; }
}

/* ---------- FAQ-аккордеон ---------- */

.accordion-item { border-bottom: 1px solid var(--c-line); }
.accordion-item__trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  font-weight: 700;
  text-align: left;
}
.accordion-item__trigger .icon { flex: 0 0 auto; color: var(--c-navy-soft); transition: transform .2s ease; }
.accordion-item__trigger[aria-expanded="true"] .icon { transform: rotate(180deg); color: var(--c-grad-end); }
.accordion-item__panel { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.accordion-item__panel-inner { padding: 0 4px 18px; color: var(--c-navy-soft); font-size: 14px; }

/* ---------- Появление при скролле ---------- */

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Табы ---------- */

.tabs__list { display: flex; gap: 8px; border-bottom: 1px solid var(--c-line); margin-bottom: 24px; flex-wrap: wrap; }
.tabs__list button { padding: 12px 18px; font-weight: 700; color: var(--c-navy-soft); border-bottom: 2px solid transparent; }
.tabs__list button:hover { color: var(--c-navy); }
.tabs__list button.is-active { color: var(--c-navy); border-color: var(--c-grad-end); }
.tabs__panel[hidden] { display: none; }

/* =========================================================
   4/4 — медиазапросы, focus-visible, reduced-motion, печать
   ========================================================= */

/* ---------- focus-visible ---------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.product-card__title a:focus-visible {
  outline: 2.5px solid var(--c-grad-end);
  outline-offset: 2px;
  border-radius: 4px;
}

.btn:focus-visible { outline-offset: 3px; }
.header__iconlink:focus-visible,
.stepper button:focus-visible,
.product-card__add:focus-visible,
.burger:focus-visible { outline-offset: 2px; }

/* ---------- Планшет ≤1024px ---------- */

@media (max-width: 1024px) {
  /* В колоночном режиме align-items: flex-start сжимал бы .site-main до max-content
     и ломал ширину всей страницы, поэтому явно возвращаем растягивание. */
  .layout__inner { flex-direction: column; align-items: stretch; }
  .sidebar-categories { position: static; width: 100%; flex: 1 1 auto; display: none; }

  .category-grid, .product-grid { grid-template-columns: repeat(3, 1fr); }
  .review-grid, .contact-grid, .city-terms { grid-template-columns: 1fr; }
  .steps-list { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
}

/* ---------- Планшет ≤1024px (шапка) ----------
   Логотип + поиск + город + телефон + иконки требуют минимум ~915px внутри
   .header__inner, поэтому строка обязана разрываться раньше этой отметки,
   а не на 900px, где она ещё вылезала за край окна. */

@media (max-width: 1024px) {
  .header__search { order: 4; flex-basis: 100%; max-width: none; margin-top: 10px; }
  .header__inner { flex-wrap: wrap; }
  .header__phone span small { display: none; }
  /* Поиск ушёл на вторую строку и больше не растягивает первую, поэтому
     группу иконок прижимаем к правому краю — иначе она жмётся к логотипу,
     а справа остаётся пустая полоса в треть ширины экрана. */
  .header__city { margin-left: auto; }
}

/* ---------- Мобильные ≤768px ---------- */

@media (max-width: 768px) {
  :root { --gap-section: 64px; }

  .topbar__links a span { display: none; }
  .topbar__inner { padding: 8px 16px; }

  /* Логотип + город + телефон + аккаунт + корзина + бургер должны уместиться
     в одну строку, иначе корзина с бургером срываются на отдельный ряд и слева
     повисает пустая полоса. Поэтому здесь ужимаем зазоры и кнопки. */
  .header__inner { padding: 12px 16px; gap: 8px; }
  .header__city span,
  .header__phone span,
  .header__cart-sum { display: none; }
  .header__city { padding: 9px; }
  .header__iconlink { width: 36px; height: 36px; }
  /* «Войти» на мобильных переезжает в офканвас — шесть контролов в одну
     строку не помещаются, а корзина и бургер важнее. */
  .header__iconlink:not(.header__cart) { display: none; }
  .header__cart { width: auto; padding: 0 10px; }
  .burger { display: flex; width: 36px; height: 36px; }
  .logo__mark { width: 38px; height: 38px; }
  .logo__text { font-size: 14px; }
  .header__search { margin-top: 8px; }
  .utilitynav { display: none; }

  .hero__slide { grid-template-columns: 1fr; min-height: 0; max-height: 320px; }
  .hero__slide-media { min-height: 150px; max-height: 320px; order: -1; }
  .hero__slide-text { padding: 18px 16px; }

  .category-grid, .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  .promo-banner { min-height: 0; }
  .promo-banner__content { padding: 32px 24px; max-width: none; }

  .cta-banner { padding: 32px 24px; text-align: center; justify-content: center; }
  .cta-banner > div:first-child { width: 100%; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; padding: 48px 16px 36px; }
  .footer__quickorder .btn { white-space: normal; text-align: center; padding: 12px 18px; }
  .footer__bottom-inner { flex-direction: column; align-items: flex-start; padding: 16px; }

  .circle-portrait { float: none; margin: 0 auto 20px; display: block; }

  .container { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Малые мобильные ≤480px ---------- */

@media (max-width: 480px) {
  .category-grid, .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer__grid { grid-template-columns: 1fr; }
  .promo-pills__list a { padding: 10px 16px; font-size: 13px; }
  .page-hero__content { padding: 28px 20px; }
  .hero__price-current { font-size: 26px; }
}

/* ---------- prefers-reduced-motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Печать ---------- */

@media print {
  .site-header, .offcanvas, .city-modal, .footer__bottom, .hero__arrows,
  .burger, .header__search, .sidebar-categories, .footer__quickorder,
  .product-card__add, .breadcrumbs { display: none !important; }

  body { background: #fff; color: #000; }
  .layout__inner { display: block; }
  .container { max-width: 100%; padding: 0; }
  a { color: #000; text-decoration: underline; }
  .product-grid, .category-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Модалка заявки ---------- */
.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 32, 55, .55);
}
.lead-modal[hidden] { display: none; }
.lead-modal__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow: auto;
  padding: 28px;
  background: var(--c-white);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(11, 32, 55, .28);
}
.lead-modal__panel h2 { margin: 0 0 8px; font-size: 22px; }
.lead-modal__text { margin: 0 0 16px; color: var(--c-navy-soft); font-size: 14px; }
.lead-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--c-navy-soft);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.lead-modal__close:hover { color: var(--c-navy); }

/* ---------- Формы (движковые) ---------- */
.lead-form, .cart-form { display: grid; gap: 14px; }
.lead-form .bf-row, .cart-form .bf-row { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.lead-form .bf-lab, .cart-form .bf-lab { font-size: 13px; color: var(--c-navy); }
.lead-form input[type="text"], .lead-form input[type="tel"], .lead-form input[type="email"],
.cart-form input[type="text"], .cart-form input[type="tel"], .cart-form input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-weight: 400;
  color: var(--c-navy);
  background: var(--c-white);
  border: 1.5px solid var(--c-line);
  border-radius: 12px;
}
.lead-form .bf-check, .cart-form .bf-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--c-navy-soft);
}
.lead-form .bf-check input, .cart-form .bf-check input { width: 16px; height: 16px; margin-top: 2px; flex: 0 0 auto; }
.lead-form .btn, .cart-form .btn { width: 100%; justify-content: center; }
.bf-msg { font-size: 13px; }
.bf-msg.bf-ok { color: #1a7f37; }
.bf-msg.bf-err { color: #c0392b; }

/* ---------- Страница корзины ---------- */
.cart-page__empty { padding: 8px 0; color: var(--c-navy-soft); }
.cart-page__items { display: grid; gap: 12px; }
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: 14px;
}
.cart-item__name { font-weight: 600; font-size: 15px; }
.cart-item__price { color: var(--c-navy-soft); font-size: 13.5px; }
.cart-item__qty {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-pill);
}
.cart-item__qty button { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.cart-item__qty button:hover { background: var(--c-pastel-sky); color: var(--c-grad-end); }
.cart-item__qty span { min-width: 34px; text-align: center; font-weight: 700; font-size: 14px; }
.cart-item__remove { border: 0; background: none; color: var(--c-navy-soft); font-size: 20px; line-height: 1; cursor: pointer; }
.cart-item__remove:hover { color: #c0392b; }
.cart-page__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 0;
  padding: 16px 18px;
  background: var(--c-pastel-sky);
  border-radius: 14px;
  font-size: 16px;
}
.cart-page__summary strong { font-size: 24px; }
.cart-page__form { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--c-line); }
.cart-page__form h2 { font-size: 22px; margin-bottom: 6px; }
.cart-page__form > p { color: var(--c-navy-soft); font-size: 14px; margin-bottom: 16px; }

@media (max-width: 768px) {
  .cart-item { grid-template-columns: 1fr auto; grid-template-areas: "name remove" "qty price"; row-gap: 10px; }
  .cart-item__name { grid-area: name; }
  .cart-item__remove { grid-area: remove; justify-self: end; }
  .cart-item__qty { grid-area: qty; }
  .cart-item__price { grid-area: price; justify-self: end; }
  .lead-modal__panel { padding: 22px 18px; }
}

/* Слайды hero в 2 раза ниже */
/* компактный герой: слайд вдвое ниже исходного, контент не обрезается */
.hero__slide{min-height:300px!important;max-height:300px!important}
.hero__slide-media{min-height:300px!important;max-height:300px!important}
.hero__slide-text{padding:16px 26px!important}
.hero__slide .hero__title{font-size:21px;line-height:1.25;margin-bottom:6px}
.hero__slide p{font-size:13.5px;line-height:1.45;margin-bottom:8px}
.hero__badge{font-size:16px;padding:2px 12px 4px;margin-bottom:6px}
.hero__price{margin-bottom:10px}
.hero__price-current{font-size:22px}
.hero__price-old{font-size:15px}
.hero__slide .btn{padding:9px 18px;font-size:14px}
@media(max-width:767px){.hero__slide{min-height:0!important;max-height:none!important}.hero__slide-media{min-height:150px!important;max-height:150px!important}}

/* стрелки слайдера — в угол поверх фото, чтобы не перекрывать текст */
.hero__arrows{inset:auto 16px 16px auto!important;align-items:flex-end!important;justify-content:flex-end!important;gap:10px;padding:0!important;}
.hero__arrow{background:rgba(255,255,255,.92)!important;}
@media(max-width:767px){.hero__arrows{inset:auto 12px 12px auto!important}}
