/* ==========================================================================
   Narciss prototype — главная страница (index.html)
   Стили секций по дизайну «Главная v2» (десктоп 1440) и «Главная мобильная»
   (390), планшет — по экрану «Главная планшет». Общий слой (токены, кнопки,
   теги, карточки, шапка/подвал/модалки) — в base.css, здесь только страница.
   ========================================================================== */

/* ---------- 0. Страничные переменные и общее ---------- */
.home {
  --hm-pad: var(--container-pad); /* 56 / 40 / 16 из base.css */
  display: block;
}

.home a.hm-link:hover { color: var(--color-accent-400); }

/* Короткие подписи кнопок на мобильном (номер телефона → «Позвонить»). */
.hm-show-sm { display: none; }

/* Файл home.css подключается после base.css: страховка для атрибута hidden
   внутри страничных компонентов (у .hm-salon/.hm-faq__a есть свой display). */
.hm-faq__a[hidden],
.hm-salon[hidden],
.hm-shelf__all[hidden] { display: none; }

/* ---------- 0.1 Сезонный промо-баннер (День матери, 29 ноября) ----------
   Два креатива: широкий 3:1 (2172×724) для самых широких экранов и
   компактный 16:9 (1280×720) для остальных. Базово — центрированная полоса
   до 640px между заголовком блока и строкой «букет + H1»; на широких
   экранах — в свободной области строки рекомендации (см. media ниже). */
.hm-promo { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
.hm-promo__link {
  display: block;
  max-width: 640px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.hm-promo__link:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.hm-promo__img { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 720; }

/* ---------- 1. Первый экран ---------- */
.hm-hero {
  padding: 28px var(--hm-pad) 56px;
  background: radial-gradient(700px 420px at 30% 30%, rgba(228, 68, 132, 0.09), transparent 70%);
}

.hm-hero__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  row-gap: 16px;
  align-items: stretch;
  padding: 20px 24px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* На десктопе шапка рекомендации растянута на всю ширину карточки:
   .hm-rec «растворяется», а его части становятся элементами сетки панели. */
.hm-rec {
  display: contents;
}
.hm-rec__head {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.hm-rec__row {
  grid-column: 1;
  grid-row: 3;
}

.hm-rec__head h6 { margin: 0; color: var(--color-neutral-400); }

.hm-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}
.hm-link i { font-size: 14px; }

.hm-rec__row {
  display: flex;
  gap: 28px;
  align-items: stretch;
  min-width: 0;
}

/* фото рекомендации */
.hm-rec__media {
  position: relative;
  flex: none;
  width: 260px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg);
  cursor: pointer;
}
.hm-rec__media img { width: 100%; height: 100%; object-fit: cover; }

.hm-rec__hit { position: absolute; left: 10px; top: 10px; }

.hm-rec__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-divider);
  background: var(--chip-bg);
  color: var(--color-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hm-rec__arrow--prev { left: 8px; }
.hm-rec__arrow--next { right: 8px; }
.hm-rec__arrow:hover { border-color: var(--color-accent); color: var(--color-accent); }

.hm-fav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--chip-bg);
  color: var(--color-text);
  font-size: 17px;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}
.hm-fav:hover { color: var(--color-accent); }
.hm-fav.is-active { color: var(--color-accent); }
.hm-fav.is-active:active { transform: scale(0.94); }

.hm-rec__fav {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 32px;
  height: 32px;
  font-size: 15px;
}

.hm-rec__hint {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--chip-bg);
  color: var(--color-text);
  font-size: 13px;
}

/* карточка рекомендации: текст */
.hm-rec__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 4px 0;
}
.hm-rec__cat { font-size: 13px; color: var(--color-neutral-400); }
.hm-rec__name { font-size: 24px; font-weight: 500; line-height: 1.2; }
.hm-rec__price { font-size: 22px; font-weight: 500; color: var(--color-accent); }
.hm-rec__actions { display: flex; gap: 8px; margin-top: 6px; }
.hm-rec__actions .btn { height: 40px; font-size: 15px; }
.hm-rec__note { font-size: 13px; color: var(--color-neutral-500); }

.hm-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: auto;
}
.hm-thumb {
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.hm-thumb img { display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 5px; object-fit: cover; }
.hm-thumb:hover { border-color: var(--color-accent-400); }
.hm-thumb.is-active {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
}

/* правая колонка первого экрана */
.hm-hero__intro {
  grid-column: 2;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  min-width: 0;
  padding-left: 28px;
  background:
    linear-gradient(to bottom,
      transparent, var(--color-divider) 48px,
      var(--color-divider) calc(100% - 48px), transparent) no-repeat left / 1px 100%;
}
.hm-hero__intro-top { display: flex; flex-direction: column; gap: 10px; }
.hm-hero__city { align-self: flex-start; }
.hm-hero__intro h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hm-hero__tags { display: none; }

.hm-adv { display: flex; flex-direction: column; gap: 10px; }
.hm-adv__item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 12px;
  border-left: 2px solid var(--color-accent);
}
.hm-adv__item b { font-weight: 500; font-size: 15px; }
.hm-adv__item span { font-size: 13px; color: var(--color-neutral-400); }

/* ---------- 2. Выбор по поводам ---------- */
.hm-occasions { padding: 0 var(--hm-pad) 72px; }
.hm-occasions h6 { margin: 0 0 14px; color: var(--color-neutral-400); }

.hm-occasions__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.hm-occasion {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
.hm-occasion i { font-size: 24px; color: var(--color-accent); margin-bottom: 10px; }
.hm-occasion__t { font-size: 16px; font-weight: 500; }
.hm-occasion__s { font-size: 13px; color: var(--color-neutral-400); }
.hm-occasion:hover { border-color: var(--color-accent); background: var(--color-accent-900); }

/* ---------- 3–4. Заголовки секций, табы, карусели ---------- */
.hm-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.hm-head--pad { padding: 0 var(--hm-pad); margin-bottom: 24px; }
.hm-head__titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hm-head h2 { margin: 0; font-size: 34px; }
.hm-head__sub { color: var(--color-neutral-400); font-size: 15px; }
.hm-head__tools { display: flex; gap: 16px; align-items: center; flex: none; }

/* сегментированные табы (авторские букеты) */
.hm-tabs { flex: none; }
.hm-tabs .seg-opt { padding: 8px 14px; font-size: 14px; }
.hm-tabs .seg-opt[aria-pressed="true"] {
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  box-shadow: none;
}

/* чипы витрины */
.hm-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.hm-chips--pad { padding: 0 var(--hm-pad); margin-bottom: 24px; }
.hm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
  background: transparent;
  color: var(--color-text);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.hm-chip__n { color: var(--color-neutral-500); font-size: 13px; }
.hm-chip:hover { border-color: var(--color-accent); }
.hm-chip.is-active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}
.hm-chip.is-active .hm-chip__n { color: var(--color-accent); }

.hm-rail-wrap { position: relative; }

.hm-arrow {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-divider);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hm-arrow:hover { border-color: var(--color-accent); color: var(--color-accent); }
.hm-arrow--prev,
.hm-arrow--next { top: 140px; }
.hm-arrow--prev { left: 12px; }
.hm-arrow--next { right: 12px; }
.hm-arrow--shop-prev,
.hm-arrow--shop-next { top: 88px; }
.hm-arrow--shop-prev { left: 12px; }
.hm-arrow--shop-next { right: 12px; }

.hm-rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 0 var(--hm-pad);
  scroll-padding: 0 var(--hm-pad);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}
.hm-rail::-webkit-scrollbar { display: none; }
.hm-rail.is-dragging { cursor: grabbing; }
.hm-rail.is-dragging a { pointer-events: none; }

/* ---------- 3. Авторские букеты ---------- */
.hm-authors { padding: 0 0 80px; }
.hm-rail--auth .hm-card--author { flex: 0 0 252px; }

/* ---------- карточки ---------- */
.hm-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  scroll-snap-align: start;
}
.hm-card__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}
.hm-card__media-link { display: block; width: 100%; height: 100%; }
.hm-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-card--author .hm-card__media { aspect-ratio: 4 / 5; }
.hm-card--shelf .hm-card__media { aspect-ratio: 1 / 1; background: var(--color-bg); }
.hm-card--fresh .hm-card__media { aspect-ratio: 3 / 4; background: var(--color-surface); }

.hm-card__tag { position: absolute; left: 10px; top: 10px; }
.hm-card--fresh .hm-card__tag { left: 8px; top: 8px; }

.hm-card__media .hm-fav { position: absolute; right: 10px; top: 10px; }
.hm-card--shelf .hm-card__media .hm-fav { right: 8px; top: 8px; }
.hm-fav--sm { width: 36px; height: 36px; }
.hm-fav--xs { width: 34px; height: 34px; font-size: 16px; }

.hm-card__cat { font-size: 13px; color: var(--color-neutral-400); }
.hm-card__name {
  display: block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.3;
  min-height: 42px;
  color: var(--color-text);
  text-decoration: none;
}
.hm-card__name:hover { color: var(--color-accent); }

.hm-card__price-row { display: flex; align-items: baseline; gap: 8px; }
.hm-card__price-row--between { justify-content: space-between; align-items: center; }
.hm-card__price { font-size: 18px; font-weight: 500; }
.hm-card__note { font-size: 13px; color: var(--color-neutral-500); }
.hm-card__actions { display: flex; gap: 6px; }
.hm-card__actions .btn-primary { flex: 1; }
.hm-card__mini { display: flex; gap: 6px; align-items: center; }
.hm-card__mini .btn-icon { font-size: 18px; }

.hm-card--shelf .hm-card__name { font-size: 15px; min-height: 40px; }
.hm-card--shelf .hm-card__price { font-size: 17px; }
.hm-card--fresh .hm-card__name { font-size: 14px; min-height: 36px; }
.hm-card--fresh .hm-card__price { font-size: 16px; }

/* ---------- 4. Витрина магазина ---------- */
.hm-shelf {
  padding: 56px 0 80px;
  background: linear-gradient(180deg, var(--color-surface), var(--color-bg));
}
.hm-rail--shelf .hm-card--shelf { flex: 0 0 220px; }
.hm-shelf__all { display: none; }

/* ---------- 5. Локальная флористика ---------- */
.hm-local {
  padding: 40px var(--hm-pad) 88px;
  display: grid;
  grid-template-columns: 560px minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hm-local__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--color-surface);
}
.hm-local__media a { display: block; width: 100%; height: 100%; }
.hm-local__media img { width: 100%; height: 100%; object-fit: cover; }

.hm-local__body { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.hm-eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-300);
}

.hm-local__title { margin: 0; font-size: 40px; line-height: 1.1; text-wrap: balance; }
.hm-local__lead { margin: 0; font-size: 17px; line-height: 1.55; color: var(--color-neutral-300); max-width: 540px; }

.hm-florist {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  max-width: 520px;
}
.hm-florist > img { flex: none; width: 64px; height: 64px; border-radius: 6px; object-fit: cover; }
.hm-florist__info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.hm-florist__info > span:first-child { font-size: 13px; color: var(--color-neutral-400); }
.hm-florist__info b { font-weight: 500; font-size: 16px; }
.hm-florist__price { color: var(--color-accent); font-weight: 500; font-size: 15px; }

.hm-local__thumbs { display: flex; gap: 10px; }
.hm-local__thumbs img { width: 88px; height: 88px; border-radius: var(--radius-md); object-fit: cover; }

/* ---------- 6. Новые поступления ---------- */
.hm-fresh { padding: 0 0 88px; }
.hm-fresh__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}
.hm-fresh__grid--pad { padding: 0 var(--hm-pad); }

/* ---------- 7. Доверие + отзывы ---------- */
.hm-trust {
  padding: 72px var(--hm-pad);
  background: linear-gradient(120deg, var(--color-accent-900), var(--color-bg) 75%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 56px;
}
.hm-trust__left { display: flex; flex-direction: column; gap: 20px; }
.hm-trust__title { margin: 0; font-size: 38px; line-height: 1.1; text-wrap: balance; }
.hm-trust__lead { margin: 0; font-size: 17px; line-height: 1.55; color: var(--color-neutral-300); }
.hm-trust__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  margin-top: 4px;
}
.hm-trust__phone { align-self: flex-start; font-size: 16px; padding: 12px 20px; margin-top: 8px; }

.hm-trust__right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hm-trust__right h6 { margin: 0; color: var(--color-neutral-400); }
.hm-reviews { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hm-review { padding: 20px; gap: 12px; }
.hm-stars { color: var(--color-accent); letter-spacing: 2px; }
.hm-review__title { font-weight: 500; font-size: 17px; }
.hm-review__text { font-size: 14px; line-height: 1.55; }
.hm-review__author { display: flex; gap: 10px; align-items: center; }
.hm-review__author img { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.hm-review__author b { display: block; font-weight: 500; font-size: 14px; }
.hm-review__author span { font-size: 12px; color: var(--color-neutral-400); }

.hm-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.hm-strip img { width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; object-fit: cover; }

/* ---------- 8. VK ---------- */
.hm-vk { padding: 72px var(--hm-pad) 0; }
.hm-vk__box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-divider);
}
.hm-vk__text { display: flex; flex-direction: column; gap: 4px; }
.hm-vk__text b { font-weight: 500; font-size: 20px; }
.hm-vk__text span { font-size: 14px; color: var(--color-neutral-400); }
.hm-vk__strip { display: flex; gap: 8px; flex: 1; justify-content: center; }
.hm-vk__strip img { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; }
.hm-vk__actions { display: flex; gap: 8px; }

/* ---------- 9. Перед заказом ---------- */
.hm-before {
  padding: 88px var(--hm-pad);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.hm-faq h2 { margin: 0 0 16px; font-size: 34px; }
.hm-faq__item {
  background:
    linear-gradient(to right,
      var(--color-divider), var(--color-divider) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.hm-faq__q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
}
.hm-faq__q:hover { color: var(--color-accent); }
.hm-faq__sign { color: var(--color-accent); flex: none; }
.hm-faq__a {
  margin: 0;
  padding: 0 0 18px;
  color: var(--color-neutral-400);
  font-size: 15px;
  line-height: 1.55;
  max-width: 600px;
}

.hm-help { padding: 28px; gap: 18px; min-width: 0; }
.hm-help__title { margin: 0; font-size: 28px; line-height: 1.15; }
.hm-help__text { margin: 0; color: var(--color-neutral-300); line-height: 1.55; }
.hm-help__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hm-help__cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.hm-help__cell b { font-weight: 500; }
.hm-help__cell span { font-size: 13px; color: var(--color-neutral-400); }
.hm-help__actions { display: flex; gap: 8px; }
.hm-help__actions .btn { flex: 1; height: 44px; font-size: 15px; }

/* ---------- 10. О магазине ---------- */
.hm-about {
  padding: 72px var(--hm-pad);
  background: var(--color-neutral-900);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
}
.hm-about__left { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hm-about h2 { margin: 0; font-size: 34px; }
.hm-about__lead { margin: 0; color: var(--color-neutral-300); font-size: 16px; line-height: 1.6; }

.hm-stats { display: flex; gap: 48px; padding: 8px 0; }
.hm-stat { display: flex; flex-direction: column; }
.hm-stat span:first-child { font-size: 40px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.hm-stat span:last-child { font-size: 14px; color: var(--color-neutral-400); }

.hm-about h6 { margin: 8px 0 0; color: var(--color-neutral-400); }
.hm-about__links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hm-about__link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.16s ease;
}
.hm-about__link b { font-weight: 500; font-size: 15px; }
.hm-about__link span { font-size: 13px; color: var(--color-neutral-400); }
.hm-about__link:hover { border-color: var(--color-accent); }

.hm-about__right { min-width: 0; }
.hm-about__right h6 { margin: 0 0 8px; color: var(--color-neutral-400); }
.hm-salons { display: flex; flex-direction: column; }
.hm-salon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 2px 4px;
  font-size: 15px;
  background:
    linear-gradient(to right,
      var(--color-divider), var(--color-divider) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.hm-salons__toggle { display: none; }
.hm-about__delivery { margin: 16px 0 0; font-size: 14px; color: var(--color-neutral-400); line-height: 1.55; }

/* ---------- 11. Мобильная панель быстрых действий ---------- */
.hm-mbar { display: none; }

/* ==========================================================================
   Адаптив
   ========================================================================== */

/* ---------- Планшет и уже (base.css на 1080 прячет десктопную шапку) ---------- */
@media (max-width: 1080px) {
  .home { --hm-pad: 28px; }

  /* первый экран: h1 и теги над карточкой рекомендации */
  .hm-hero {
    padding: 16px var(--hm-pad) 0;
    background: none;
    display: block;
  }
  .hm-hero__panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
  }
  .hm-hero__intro {
    order: -1;
    gap: 10px;
    padding-left: 0;
    background: none;
  }
  .hm-hero__city { display: none; }
  .hm-hero__tags { display: flex; gap: 6px; flex-wrap: wrap; }
  .hm-hero__intro h1 { font-size: 34px; }
  .hm-adv { display: none; }

  .hm-rec {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    padding: 16px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }
  .hm-rec__head { display: flex; }
  .hm-rec__row { gap: 20px; }
  .hm-rec__media { width: 320px; }
  .hm-rec__body { gap: 6px; }
  .hm-rec__actions .btn { height: 46px; }
  .hm-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: auto; padding-top: 8px; }

  /* заголовки секций: ссылка в одну строку с h2, табы — ниже во всю ширину */
  .hm-head { flex-wrap: wrap; align-items: baseline; gap: 12px; }
  .hm-head__titles { flex: 1 1 auto; }
  .hm-head h2 { font-size: 26px; }
  .hm-head__tools { display: contents; }
  .hm-head .hm-link { order: 2; }
  .hm-head__sub { font-size: 14px; }

  .hm-tabs {
    order: 3;
    flex: 1 1 100%;
    display: flex;
    border: 0;
    overflow-x: auto;
    gap: 6px;
    scrollbar-width: none;
  }
  .hm-tabs::-webkit-scrollbar { display: none; }
  .hm-tabs .seg-opt {
    flex: none;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-md);
    white-space: nowrap;
  }
  .hm-tabs .seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
  .hm-tabs .seg-opt[aria-pressed="true"] { border-color: var(--color-accent); }

  .hm-arrow { display: none; }

  /* поводы 4 в ряд */
  .hm-occasions { padding: 28px var(--hm-pad) 0; }
  .hm-occasions__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .hm-occasion { padding: 14px; }
  .hm-occasion i { font-size: 22px; margin-bottom: 6px; }
  .hm-occasion__t { font-size: 15px; }
  .hm-occasion__s { font-size: 12px; }

  .hm-authors { padding: 36px 0 0; }
  .hm-rail--auth { gap: 12px; }
  .hm-rail--auth .hm-card--author { flex: 0 0 44%; }

  /* витрина: сетка 3 колонки */
  .hm-shelf { margin-top: 36px; padding: 28px 0; }
  .hm-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .hm-chips::-webkit-scrollbar { display: none; }
  .hm-rail--shelf {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 12px;
    overflow: visible;
    cursor: auto;
  }
  .hm-rail--shelf .hm-card--shelf { flex: none; }

  .hm-local {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 28px var(--hm-pad) 0;
    align-items: start;
  }
  .hm-local__title { font-size: 28px; }
  .hm-local__lead { font-size: 15px; }
  .hm-florist { max-width: none; padding: 10px; }
  .hm-florist > img { width: 52px; height: 52px; }
  .hm-local__thumbs img { width: 72px; height: 72px; }

  .hm-fresh { padding: 36px 0 0; }
  .hm-fresh .hm-head { margin-bottom: 18px; }
  .hm-fresh__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 12px; }

  .hm-trust {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 28px var(--hm-pad);
    margin-top: 36px;
  }
  .hm-trust__title { font-size: 26px; }
  .hm-trust__lead { font-size: 15px; }
  .hm-trust__phone { font-size: 14px; padding: 10px 14px; }
  .hm-trust__grid { gap: 12px; }
  .hm-adv__item b { font-size: 14px; }
  .hm-adv__item span { font-size: 12px; }
  .hm-reviews { grid-template-columns: 1fr; }
  .hm-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hm-strip img:nth-child(n + 5) { display: none; }

  .hm-vk { padding: 28px var(--hm-pad) 0; }
  .hm-vk__box { flex-direction: column; align-items: stretch; gap: 16px; padding: 16px; }
  .hm-vk__strip { justify-content: flex-start; flex-wrap: wrap; }
  .hm-vk__strip img { width: 54px; height: 54px; }
  .hm-vk__actions .btn { flex: 1; }

  .hm-before {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px var(--hm-pad) 0;
  }
  .hm-faq h2 { font-size: 26px; }
  .hm-faq__q { font-size: 16px; min-height: 54px; padding: 12px 0; }
  .hm-faq__a { font-size: 14px; padding-bottom: 14px; }
  .hm-help { padding: 20px; gap: 12px; }
  .hm-help__title { font-size: 21px; }
  .hm-help__text { font-size: 14px; }
  .hm-help__cell { padding: 10px; }
  .hm-help__actions .btn { height: 46px; }

  .hm-about {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 28px var(--hm-pad);
    margin-top: 36px;
  }
  .hm-about h2 { font-size: 24px; }
  .hm-about__lead { font-size: 14px; }
  .hm-stats { gap: 24px; }
  .hm-stat span:first-child { font-size: 30px; }
  .hm-stat span:last-child { font-size: 12px; }
  .hm-about__links { grid-template-columns: 1fr; }
  .hm-about__link { padding: 12px; }
  .hm-salon { font-size: 14px; min-height: 46px; }
}

/* ---------- Телефон ---------- */
@media (max-width: 760px) {
  .home { --hm-pad: 16px; }

  .hm-hero { padding: 4px var(--hm-pad) 20px; }
  .hm-hero__panel { gap: 12px; }
  .hm-hero__intro { gap: 8px; }
  .hm-hero__intro h1 { font-size: 28px; line-height: 1.12; }

  .hm-rec { display: flex; flex-direction: column; padding: 14px; gap: 12px; }
  .hm-rec__row { flex-direction: column; gap: 12px; }
  .hm-rec__media { width: 100%; }
  .hm-rec__arrow { width: 44px; height: 44px; font-size: 22px; }
  .hm-rec__fav { width: 44px; height: 44px; font-size: 18px; right: 8px; top: 8px; }
  .hm-rec__hint { display: none; }

  .hm-rec__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 0;
  }
  .hm-rec__cat { grid-column: 1 / -1; font-size: 12px; }
  .hm-rec__name { grid-column: 1; font-size: 19px; }
  .hm-rec__price { grid-column: 2; align-self: start; font-size: 19px; white-space: nowrap; }
  .hm-rec__actions { grid-column: 1 / -1; margin-top: 8px; gap: 8px; }
  .hm-rec__actions .btn { height: 48px; font-size: 15px; }
  .hm-rec__actions .btn-accent { flex: 1; }
  .hm-rec__note { display: none; }
  .hm-thumbs {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-top: 8px;
    padding-top: 0;
    scrollbar-width: none;
  }
  .hm-thumbs::-webkit-scrollbar { display: none; }
  .hm-thumb { flex: 0 0 60px; }

  .hm-occasions { padding: 28px 0 0; }
  .hm-occasions h6 { padding: 0 var(--hm-pad); }
  .hm-occasions__grid {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    padding: 0 var(--hm-pad);
    scrollbar-width: none;
  }
  .hm-occasions__grid::-webkit-scrollbar { display: none; }
  .hm-occasion { flex: none; min-width: 118px; padding: 12px; }

  .hm-head h2 { font-size: 24px; }
  .hm-head--pad { margin-bottom: 14px; }
  .hm-head__sub { display: none; }
  .hm-shelf .hm-head .hm-link { display: none; }
  .hm-head .hm-link { font-size: 14px; }

  .hm-authors { padding: 36px 0 0; }
  .hm-authors .hm-head { align-items: center; }
  .hm-tabs { flex: 0 0 100%; }
  .hm-tabs .seg-opt { height: 38px; }
  .hm-rail--auth { padding: 0 var(--hm-pad); gap: 12px; }
  .hm-rail--auth .hm-card--author { flex: 0 0 72%; }
  .hm-card--author .hm-card__cat { display: none; }
  .hm-card--author .hm-card__name { font-size: 16px; min-height: 0; }
  .hm-card--author .hm-card__price { font-size: 18px; }
  .hm-card--author .hm-card__note { display: none; }
  .hm-card--author .hm-card__actions { align-items: center; }
  .hm-card--author .hm-card__actions .btn { height: 44px; }
  .hm-card--author .hm-card__actions .btn-secondary { display: none; }
  .hm-card--author .hm-card__actions .btn-primary { flex: 0 0 auto; padding: 0 16px; }

  .hm-shelf { margin-top: 36px; padding: 28px 0; }
  .hm-shelf .hm-head { margin-bottom: 14px; }
  .hm-chips--pad { margin-bottom: 18px; }
  .hm-chip { height: 38px; padding: 0 12px; font-size: 14px; }
  .hm-chip__n { display: none; }
  .hm-rail--shelf { grid-template-columns: 1fr 1fr; gap: 18px 10px; }
  .hm-card--shelf .hm-fav { display: none; }
  .hm-card--shelf .hm-card__cat { display: none; }
  .hm-card--shelf .hm-card__name { font-size: 14px; min-height: 35px; }
  .hm-card--shelf .hm-card__price { font-size: 16px; }
  .hm-card--shelf .hm-card__mini .btn-primary { display: none; }
  .hm-card--shelf .hm-card__mini .btn-icon { width: 44px; height: 44px; font-size: 20px; }
  /* сетка витрины на телефоне: одинаковая высота карточек и цена с «+» по одной линии */
  .hm-rail--shelf .hm-card--shelf { height: 100%; }
  .hm-card--shelf .hm-card__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 35px;
  }
  .hm-card--shelf .hm-card__price-row { margin-top: auto; }
  .hm-rail--shelf .hm-card--shelf:nth-child(n + 5) { display: none; }
  .hm-shelf__all {
    display: flex;
    margin: 4px var(--hm-pad) 0;
    height: 46px;
    font-size: 15px;
  }

  .hm-local { display: flex; flex-direction: column; gap: 12px; padding: 28px var(--hm-pad) 0; }
  .hm-local__media { width: 100%; aspect-ratio: 4 / 3; }
  .hm-local__body { gap: 12px; }
  .hm-eyebrow { font-size: 12px; }
  .hm-local__title { font-size: 24px; line-height: 1.15; }
  .hm-local__lead { font-size: 15px; line-height: 1.5; }
  .hm-florist { padding: 10px; gap: 12px; }
  .hm-florist__info > span:first-child { font-size: 12px; }
  .hm-florist__info b { font-size: 15px; }
  .hm-florist__price { font-size: 14px; }
  .hm-florist .btn { height: 44px; padding: 0 12px; font-size: 14px; }
  .hm-local__thumbs { display: none; }

  .hm-fresh { padding: 36px 0 0; }
  .hm-fresh .hm-head { margin-bottom: 14px; }
  .hm-fresh__grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 var(--hm-pad);
    scrollbar-width: none;
  }
  .hm-fresh__grid::-webkit-scrollbar { display: none; }
  .hm-card--fresh { flex: 0 0 44%; }
  .hm-card--fresh .hm-card__name { font-size: 13px; line-height: 1.25; min-height: 33px; }
  .hm-card--fresh .hm-card__price { font-size: 15px; }
  .hm-card--fresh .hm-card__price-row .btn-icon { width: 44px; height: 44px; font-size: 20px; }

  .hm-trust {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px var(--hm-pad);
    margin-top: 36px;
    background: linear-gradient(160deg, var(--color-accent-900), var(--color-bg) 80%);
  }
  .hm-trust__title { font-size: 24px; line-height: 1.15; }
  .hm-trust__lead { display: none; }
  .hm-trust__grid { gap: 12px; }
  .hm-adv__item { padding-left: 10px; }
  .hm-trust__phone { display: none; }
  .hm-trust__right h6 { display: none; }
  .hm-reviews {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin: 4px calc(-1 * var(--hm-pad)) 0;
    padding: 0 var(--hm-pad);
    scrollbar-width: none;
  }
  .hm-reviews::-webkit-scrollbar { display: none; }
  .hm-review { flex: 0 0 86%; padding: 16px; gap: 10px; }
  .hm-review__title { font-size: 16px; }
  .hm-review__text { font-size: 14px; line-height: 1.5; }
  .hm-strip { display: none; }

  .hm-vk { padding: 8px var(--hm-pad) 0; }
  .hm-vk__box { padding: 16px; gap: 12px; }
  .hm-vk__text b { font-size: 17px; }
  .hm-vk__text span { font-size: 13px; }
  .hm-vk__strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .hm-vk__strip img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .hm-vk__strip img:nth-child(n + 5) { display: none; }
  .hm-vk__actions .btn-secondary { display: none; }
  .hm-vk__actions .btn { height: 44px; }

  .hm-before {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 36px var(--hm-pad) 0;
  }
  .hm-faq h2 { font-size: 24px; margin-bottom: 6px; }
  .hm-faq__q { font-size: 16px; min-height: 56px; padding: 14px 0; }
  .hm-faq__sign { font-size: 20px; }
  .hm-faq__a { font-size: 14px; padding-bottom: 16px; }
  .hm-help { padding: 18px; gap: 12px; }
  .hm-help__grid { display: none; }
  .hm-help__title { font-size: 21px; line-height: 1.2; }
  .hm-hide-sm { display: none; }
  .hm-show-sm { display: inline; }
  .hm-help__actions .btn { height: 46px; font-size: 15px; padding: 0 8px; }

  .hm-about {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px var(--hm-pad);
    margin-top: 36px;
  }
  .hm-about h2 { font-size: 22px; }
  .hm-about__lead { font-size: 14px; line-height: 1.55; }
  .hm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; }
  .hm-stat span:first-child { font-size: 26px; }
  .hm-stat span:last-child { font-size: 12px; }
  .hm-about h6 { margin: 6px 0 0; }
  .hm-about__links { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hm-about__link { padding: 12px; }
  .hm-about__link b { font-size: 14px; }
  .hm-about__link span { display: none; }
  .hm-salons:not(.is-expanded) .hm-salon:nth-child(n + 4) { display: none; }
  .hm-salons__toggle { display: inline-flex; align-self: flex-start; margin-top: 6px; height: 40px; }
  .hm-about__delivery { margin-top: 0; font-size: 13px; }

  /* мобильная панель быстрых действий */
  .hm-mbar {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 14px;
    z-index: 25;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 20px;
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
  }
  .hm-mbar__icon { flex: none; width: 48px; height: 48px; padding: 0; border-radius: 14px; font-size: 22px; }
  .hm-mbar__main { flex: 1; height: 48px; padding: 0 8px; border-radius: 14px; font-size: 15px; }

  /* не даём панели перекрыть последние строки подвала */
  body[data-page="home"] .site-footer { padding-bottom: 96px; }
}

/* ---------- Очень узкие экраны (iPhone SE и подобные) ---------- */
@media (max-width: 390px) {
  .hm-mbar__main { font-size: 14px; }
  .hm-rec__price { font-size: 18px; }
  .hm-rec__name { font-size: 18px; }
  .hm-rail--auth .hm-card--author { flex: 0 0 78%; }
  .hm-card--fresh { flex: 0 0 48%; }
}

/* ---------- Широкие экраны (≥1440): баннер — в свободной области ----------
   В строке рекомендации справа от текста остаётся пустое место; туда встаёт
   баннер поверх той же grid-ячейки, над миниатюрами. На 1440–1779 — компактный
   креатив 16:9 шириной 280–340px; с 1780 — широкий креатив 3:1, 560×187.
   На более узких экранах работает компактный центрированный вариант. */
@media (min-width: 1440px) {
  .hm-promo {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    align-self: start;
    width: clamp(280px, calc(100% - 580px), 340px);
    position: relative;
    z-index: 1;
  }
  .hm-promo__link { max-width: none; margin: 0; }
  .hm-rec__row { grid-column: 1; grid-row: 2; }
  .hm-hero__intro { grid-column: 2; grid-row: 2; }
}
@media (min-width: 1780px) {
  .hm-promo { width: 560px; }
  .hm-promo__img { aspect-ratio: 2172 / 724; }
}
