/* ── Локальные шрифты Cormorant Infant (Variable 300–700, font-display: block — защита от скачков) ── */
/* cyrillic */
@font-face {
  font-family: 'Cormorant Infant';
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url("../fonts/cormorant-infant-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Cormorant Infant';
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url("../fonts/cormorant-infant-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* latin */
@font-face {
  font-family: 'Cormorant Infant';
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url("../fonts/cormorant-infant-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Infant';
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url("../fonts/cormorant-infant-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* vietnamese */
@font-face {
  font-family: 'Cormorant Infant';
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url("../fonts/cormorant-infant-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* cyrillic italic */
@font-face {
  font-family: 'Cormorant Infant';
  font-style: italic;
  font-weight: 300 700;
  font-display: block;
  src: url("../fonts/cormorant-infant-italic-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* cyrillic-ext italic */
@font-face {
  font-family: 'Cormorant Infant';
  font-style: italic;
  font-weight: 300 700;
  font-display: block;
  src: url("../fonts/cormorant-infant-italic-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* latin italic */
@font-face {
  font-family: 'Cormorant Infant';
  font-style: italic;
  font-weight: 300 700;
  font-display: block;
  src: url("../fonts/cormorant-infant-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext italic */
@font-face {
  font-family: 'Cormorant Infant';
  font-style: italic;
  font-weight: 300 700;
  font-display: block;
  src: url("../fonts/cormorant-infant-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* vietnamese italic */
@font-face {
  font-family: 'Cormorant Infant';
  font-style: italic;
  font-weight: 300 700;
  font-display: block;
  src: url("../fonts/cormorant-infant-italic-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

:root {
  --color-bg: #fefbd4;
  --primary: #c60100;
  --color-orange: #d63900; /* оранжевый акцент бордеров/фокуса; темнее кнопочного градиента — держит ≥3:1 на светлом фоне */
  --color-badge-bg: #f9e7b9;
  --color-gold: var(--primary);
  --color-brown: #72401E;
  --color-text: #231E13;
  --header-ink: #593116;
  --color-dark: #1a1814;
  /* Ссылочные токены декоративных поверхностей и статуса наличия
     (аудит 2026-08-25, задокументированы в brand-legacy-tokens.md п.1).
     Локальные хексы на арт-страницах запрещены — используем эти переменные. */
  --color-paper-deep: #e5d4bc;   /* тёмная тёплая бумага: подложки галерей, гало, старт арт-градиентов */
  --color-paper-mid: #efe3cf;    /* средняя тёплая бумага: крупные фоны секций (страница автора и др.) */
  --color-paper-light: #fff8ec;  /* светлая тёплая бумага: фоны таймлайнов, светлые арт-подложки */
  --color-success: #40653c;      /* зелёный ТОЛЬКО для статуса «в наличии», не для декора */
  --color-deep: #100e0a;         /* тёплый глубже-чёрного: футер и тёмные контактные секции */
  /* CTA-градиент — исходный светло-оранжевый (фирменный вид кнопок).
     ⚠️ Осознанное отступление (2026-08-25: тёмно-оранжевый AA-вариант был
     опробован и возвращён по решению пользователя): белый текст на светлом
     стопе #ffa220 = 2.01:1, ниже AA. Все кнопки потребляют ТОЛЬКО этот токен —
     литеральные копии в компонентах запрещены; доступный вариант меняется
     одной строкой здесь, если клиент попросит. */
  --gradient-cta: linear-gradient(180deg, #ff5400 0%, #ffa220 45%, #ff8800 60%, #ff5400 100%);
  --gradient-cta-hover: linear-gradient(180deg, #c21700 0%, #ff3f3f 45%, #ff0a09 60%, #c21700 100%);
  /* Единственная гарнитура /design — Cormorant Infant (brand-legacy-tokens.md, п. 4).
     Семейство задаётся ТОЛЬКО здесь и в дизайн-системе через алиасы --ds-font-display/--ds-font-body. */
  --font-heading: 'Cormorant Infant', serif;
  --font-body: 'Cormorant Infant', serif;
  /* Вертикальные отступы секций и ритм разделителей (единый стандарт дизайн-системы) */
  --ds-section-space: clamp(80px, 0.56rem + 9.26vw, 120px);
  --ds-section-space-top: var(--ds-section-space);
  --ds-section-space-bottom: var(--ds-section-space);
}

/* ── Волшебный огонёк ── */
/* ⚠️ Временно скрыт (на подумать). Убери display:none, чтобы вернуть. */
.firefly {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(circle at 50% 50%,
    #ffffff 0%,
    #fff7d4 18%,
    #ffe27a 38%,
    rgba(198, 1, 0, 0.55) 62%,
    rgba(198, 1, 0, 0) 78%);
  box-shadow:
    0 0 10px 3px rgba(255, 238, 160, 0.9),
    0 0 26px 9px rgba(198, 1, 0, 0.45),
    0 0 60px 20px rgba(198, 1, 0, 0.22);
  animation: firefly-flicker 3.4s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes firefly-flicker {
  0%, 38%, 52%, 64%, 100% { opacity: 1; }
  44% { opacity: 0.32; }
  48% { opacity: 0.95; }
  60% { opacity: 0.7; }
  70% { opacity: 0.4; }
  74% { opacity: 1; }
}

.firefly-spark {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(circle, #ffffff 0%, #ffe27a 45%, rgba(198, 1, 0, 0) 100%);
  box-shadow: 0 0 6px 1px rgba(255, 238, 160, 0.85);
  animation: firefly-spark 950ms ease-out forwards;
  will-change: transform, opacity;
}

@keyframes firefly-spark {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.25); }
}

/* Светящийся хвост-комета за огоньком */
.firefly-trail {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
    rgba(255, 247, 212, 0.85) 0%,
    rgba(255, 226, 122, 0.45) 42%,
    rgba(198, 1, 0, 0) 78%);
  animation: firefly-trail 850ms ease-out forwards;
  will-change: transform, opacity;
}

@keyframes firefly-trail {
  0%   { opacity: 0.85; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.35); }
}

/* Контент живёт в своём слое — огонёк может проходить ЗА ним */
section,
footer {
  position: relative;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .firefly { display: none; }
}

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

body {
  font-family: var(--font-body);
  /* Пол весов типографики — 500/600/700 (2026-08-23): базовый вес всего
     неспецифицированного текста 500, веса ниже 500 запрещены. */
  font-weight: var(--ds-font-weight-medium);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

/* Единый глобальный стандарт ссылок и текстовых кнопок (топ-1% стандарт):
   дефолтное браузерное подчёркивание убрано, кастомная линия располагается
   строго ниже свисающих элементов букв (д, ц, щ, р, у, ф, з, g, j, p, q, y). */
a,
.text-button,
button.text-button {
  text-decoration-skip-ink: auto;
  text-underline-offset: max(3px, 0.14em);
}

.text-button,
button.text-button {
  text-decoration: underline;
  text-decoration-skip-ink: auto;
  text-underline-offset: max(2.5px, 0.14em);
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(114, 64, 30, 0.4);
  border: 0;
  background: none;
  cursor: pointer;
  display: inline-block;
  padding: 0;
  transition: color var(--ds-transition-fast, 0.2s ease), text-decoration-color var(--ds-transition-fast, 0.2s ease);
}

.text-button:hover,
button.text-button:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

/* Все заголовки первого уровня — фирменный коричневый.
   !important нужен, т.к. страничные стили подключаются после styles.css
   и иначе могут перекрыть цвет (см. .article-page .article__heading h1). */
h1 {
  color: var(--color-brown) !important;
}

/* Текстура бумажной страницы */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  opacity: 0.05;
  mix-blend-mode: multiply;
}

/* Лёгкие волокна бумаги */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Cfilter id='fibers'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.012 0.09' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23fibers)'/%3E%3C/svg%3E");
  background-size: 500px 500px;
  opacity: 0.04;
  mix-blend-mode: multiply;
}

/* ── Верхняя полоса ─────────────────────── */
.topbar {
  background-color: var(--color-dark);
  color: var(--ds-color-text-inverse);
  padding: 8px var(--ds-page-gutter, 60px);
  max-height: 40px;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.35s ease;
}

/* Подложка топ-бара и шапки общей оболочки с фирменным орнаментом */
.home-atmosphere .header {
  max-width: 1440px;
  margin: 30px auto 0;
  background: #fdf9b2 url("../images/lines.png") repeat 0 0;
  border: 1px solid #382f21;
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 24px 80px rgba(35, 30, 19, 0.18);
  box-sizing: border-box;
  height: 64px;
  transition:
    margin 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    height 0.35s ease;
}

.home-atmosphere .header .header__container {
  background-color: var(--color-bg);
  border: 2px solid #382f21;
  border-radius: 10px;
  padding: 0 32px;
  box-sizing: border-box;
  height: 100%;
}

.home-atmosphere .topbar {
  margin: 0;
  background-color: var(--color-dark);
  color: var(--ds-color-text-inverse);
}

.home-atmosphere .topbar__phone,
.home-atmosphere .topbar__link {
  color: var(--ds-color-text-inverse);
}

body.is-scrolled.home-atmosphere .header {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

body.is-scrolled.home-atmosphere .header .header__container {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

@media (max-width: 480px) {
  .home-atmosphere .header {
    border-radius: 12px;
    margin-top: 8px;
    height: 48px;
    padding: 3px;
  }

  .home-atmosphere .header .header__container {
    border-radius: 9px;
    border-width: 1.5px;
    padding: 0 10px;
  }

  .home-atmosphere .topbar {
    margin: 0;
  }
}

body.is-scrolled .topbar {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.topbar__container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 24px;
}

.topbar {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Keep both desktop items in the same flex alignment context. The previous
   absolute positioning plus transform was recalculated against a changing
   container height at each breakpoint, which pushed the text to an edge or
   outside the bar. */
.topbar__info,
.topbar__right {
  position: static;
  transform: none;
}

/* Between 1200px and 1440px: hide delivery info and center topbar links */
@media (max-width: 1440px) {
  .topbar__info { display: none; }
  .topbar__container { justify-content: center; }
  /* Ensure links are visible in this range (they are hidden again at <=1199). */
  .topbar__nav { display: flex; }
}

/* At <=1199px revert to the existing compact behavior: show the delivery
   info in the flow and hide the topbar navigation (burger/footer used). */
@media (max-width: 1199px) {
  .topbar__info { display: block; }
  .topbar__nav { display: none; }
  .topbar__container { justify-content: center; }
}

.topbar__info {
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-medium);
  letter-spacing: 0.01em;
}

/* Узкие экраны: строка гарантированно одна — без переноса и обрезки
   контейнером с max-height. */
.topbar__info {
  white-space: nowrap;
}

/* Мобилка: компактный кегль сервисной строки — предложение остаётся одной строкой */
@media (max-width: 640px) {
  .topbar__info {
    font-size: 13px;
    letter-spacing: 0;
  }
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 36px;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Узкие экраны (≤1199): навигация топбара скрывается — ссылки дублируются
   в футере, а на ≤768 их место в бургерном меню шапки (см. .topbar__right ниже).
   Блок стоит ПОСЛЕ базового .topbar__nav { display: flex }, иначе каскад
   перебивает display: none обратно (было: навигация не скрывалась на 769–1199). */
@media (max-width: 1199px) {
  .topbar__nav {
    display: none;
  }

  .topbar__container {
    justify-content: center;
  }
}

.topbar__link {
  color: var(--ds-color-text-inverse);
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-medium);
  text-decoration: none;
  opacity: 0.85;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.topbar__link:hover,
.topbar__phone:hover {
  opacity: 1;
  /* Акцентный оранжевый градиент текста при наведении
     (тот же градиент, что у кнопок .bestsellers__button / --gift-accent-gradient) */
  background-image: var(--gradient-cta);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Шапка ──────────────────────────────── */
.header {
  /* Keep the sticky header on the same canvas as all light page sections. */
  background-color: var(--color-bg);
  padding: 0 var(--ds-page-gutter, 60px);
  height: 57px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition:
    margin 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease,
    border-radius 0.3s ease,
    height 0.35s ease;
}

body.is-scrolled .header {
  box-shadow: 0 8px 24px rgba(20, 20, 20, 0.08);
  /* Когда шапка прилипла к верху вьюпорта, верхние углы прижимаем заподлицо
     к краю окна. Нижние остаются скруглёнными — плавающая карточка. */
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.header__container {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Всегда на всю высоту шапки: и до, и после скролла навигация,
     лого и иконки центрируются строго по вертикали. */
  height: 100%;
}

/* Навигация */
.header__nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-body);
}

.header__nav-ornament {
  display: inline-block;
  width: 26px;
  height: 6px;
  flex-shrink: 0;
  background: url("../images/ornament.svg") no-repeat center / contain;
  opacity: 0.65;
  pointer-events: none;
}

.header__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--ds-font-size-title);
  font-weight: var(--ds-font-weight-bold);
  color: var(--header-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header__menu-trigger {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.header__menu-trigger:focus-visible {
  color: var(--color-brown);
  outline: 3px solid var(--color-brown);
  outline-offset: 4px;
  border-radius: 4px;
}

.header__menu {
  position: relative;
}

.header__dropdown {
  position: fixed;
  right: 0;
  left: 0;
  z-index: 110;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
  width: 100%;
  max-width: none;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  /* Технический скроллбар запрещён — см. AGENTS.md */
  scrollbar-width: none;
  padding: 24px max(60px, calc((100vw - 1360px) / 2));
  border-top: 1px solid rgba(114, 64, 30, 0.18);
  border-radius: 0;
  background: var(--color-bg);
  box-shadow: 0 12px 28px rgba(35, 30, 19, 0.14);
}
.header__dropdown::-webkit-scrollbar {
  display: none;
}

/* Mega-menu каталога: возраст, серии, коллекции и книжная рекомендация. */
/* Позиция панели (top/left) выставляется в header-menu.js: на десктопе
   первые буквы ссылок первой колонки на одной вертикальной линии с первой
   буквой «Каталог» в шапке. */
.header__dropdown--catalog {
  position: fixed;
  top: auto;
  right: auto;
  left: 0;
  display: grid;
  grid-template-columns: minmax(120px, .68fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(260px, 1.18fr);
  gap: 0 20px;
  width: min(1120px, calc(100vw - 48px));
  max-width: 1120px;
  max-height: min(72vh, 560px);
  padding: 20px 26px;
  overflow-y: auto;
  /* Технический скроллбар запрещён — см. AGENTS.md */
  scrollbar-width: none;
  border: 1px solid rgba(114, 64, 30, .2);
  border-radius: 16px;
  background: var(--color-bg);
  box-shadow: 0 18px 36px rgba(35, 30, 19, .17);
}
.header__dropdown--catalog::-webkit-scrollbar {
  display: none;
}

.header__dropdown--catalog .header__dropdown-group {
  padding: 3px 14px;
}

.header__dropdown--catalog .header__dropdown-group a {
  white-space: normal;
}

.header__dropdown--catalog .header__dropdown-group + .header__dropdown-group {
  border-left: 1px solid rgba(114, 64, 30, .14);
}

/* Контейнер книжных промо-карточек в 4-й колонке каталога. Делает обе карточки
   единым grid-child'ом (column flex), чтобы между ними был отступ, а сама
   колонка не разрывалась на две grid-ячейки. min-width: 0 разрешает flex-детям
   сжиматься по горизонтали внутри minmax-колонки каталога. */
.header__catalog-promo-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.header__catalog-promo {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  grid-template-rows: auto 1fr auto;
  column-gap: 16px;
  align-items: center;
  min-height: 172px;
  padding: 14px;
  border-radius: 11px;
  background: var(--color-badge-bg);
}

.header__catalog-promo img {
  grid-row: 1 / 4;
  width: 96px;
  height: 138px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 3px 5px 0 rgba(114, 64, 30, .16);
}

.header__catalog-promo p {
  align-self: end;
  color: var(--color-brown);
  font-size: var(--ds-font-size-title);
  font-weight: var(--ds-font-weight-semibold);
  line-height: 1.3;
}

.header__catalog-promo h2 {
  align-self: start;
  margin: 12px 0 8px;
  font-family: var(--font-heading);
  font-size: var(--ds-font-size-title);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.18;
}

.header__dropdown--catalog .header__catalog-promo a {
  align-self: end;
  justify-self: start;
  grid-column: 2;
  margin: 0;
  padding: 0;
  color: var(--color-brown);
  font-size: var(--ds-font-size-title);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(114, 64, 30, 0.35);
  padding-bottom: 2px;
}

.header__dropdown--catalog .header__catalog-promo a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.header__dropdown--catalog .header__catalog-promo a:hover,
.header__dropdown--catalog .header__catalog-promo a:focus-visible {
  background: transparent;
  color: var(--primary);
}

.header__dropdown--about {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  width: max-content;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 48px));
  max-height: none;
  padding: 12px;
  border: 1px solid rgba(114, 64, 30, 0.16);
  border-radius: 18px;
}

.header__dropdown--about a {
  padding: 10px 12px;
  white-space: normal;
}

/* Десктоп и планшет (> 480px): ссылки выпадающего меню «О нас» выровнены по первой
   букве с триггером «О нас» в шапке — одна вертикальная линия.
   25px = рамка панели 1px + паддинг панели 12px + паддинг ссылки 12px.
   На мобильной ширине панель остаётся прижатой к краю меню навигации. */
@media (min-width: 481px) {
  .header__dropdown--about {
    left: -25px;
  }
}

.header__dropdown[hidden] {
  display: none;
}

.header__dropdown a {
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--header-ink);
  font-size: var(--ds-font-size-title);
  font-weight: var(--ds-font-weight-semibold);
  text-decoration: none;
  white-space: nowrap;
  overflow-wrap: anywhere;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.header__dropdown-group {
  display: grid;
  gap: 2px;
  padding: 0;
}

.header__dropdown-heading {
  padding: 4px 12px 3px;
  color: var(--color-brown);
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-bold);
  line-height: 1.3;
}

.header__dropdown-heading a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: -4px -12px -3px;
  padding: 4px 12px 3px;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(114, 64, 30, .38);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.header__dropdown-heading a:hover,
.header__dropdown-heading a:focus-visible {
  background: transparent;
  color: var(--color-text);
  text-decoration-color: currentColor;
}

.header__dropdown a:hover,
.header__dropdown a:focus-visible {
  background: var(--color-badge-bg);
  color: var(--color-brown);
}

.header__dropdown a:focus-visible {
  outline: 3px solid var(--color-brown);
  outline-offset: -3px;
}

.header__menu-trigger[aria-expanded="true"] {
  color: var(--color-brown);
}

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

.header__link:hover {
  /* Как у иконок в шапке */
  color: var(--primary);
}

.header__link[aria-current="page"] {
  color: var(--color-brown);
}
.header__icon[aria-current="page"] {
  color: var(--color-brown);
}
.header__dropdown a[aria-current="page"] {
  color: var(--color-brown);
  font-weight: var(--ds-font-weight-semibold);
}

.header__chevron {
  flex-shrink: 0;
  /* Посадка по строке строчных букв — чуть ниже центра ссылки */
  margin-top: 4px;
  /* Плотнее к тексту своего пункта меню на 2px */
  margin-left: -2px;
  transition: transform 0.2s ease;
}

/* Keep hash-linked content visible below the sticky site header. */
main section[id],
.quick-filters[id] {
  scroll-margin-top: 112px;
}

/* Логотип — абсолютное центрирование */
.header__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.35s ease;
}

.header__logo-img {
  display: block;
  height: 114px;
  width: auto;
  transition: height 0.35s ease;
}

body.is-scrolled .header__logo {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.7);
}

/* Иконки */
.header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  color: var(--header-ink);
  cursor: pointer;
  transition: color 0.2s ease;
}

.header__menu-toggle {
  display: none;
  position: relative;
}

/* Морфинг бургер ↔ крестик: две «рукописные» иконки крест-накрест,
   состояние читается по aria-expanded на кнопке */
.header__toggle-icon {
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.header__toggle-icon--close {
  position: absolute;
  top: 5px;
  left: 5px;
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

.header__menu-toggle[aria-expanded="true"] .header__toggle-icon--burger {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

.header__menu-toggle[aria-expanded="true"] .header__toggle-icon--close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Дополнительные разделы (дублируют ссылки топбара): на десктопе скрыты —
   на планшете открываются бургером, на мобилке живут внутри бургер-меню. */
.header__secondary {
  display: none;
}

.header__icon:hover {
  color: var(--primary);
}
.header__icon:focus-visible,
.site-search button:focus-visible,
.site-search input:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
/* Активное поле поиска — оранжевая рамка вместо красной (красный у инпута выглядит как ошибка) */
.site-search input:focus-visible {
  outline-color: var(--color-orange);
}

/* ── Кнопка корзины в шапке: чистый контур и чёткий контрастный бейдж ── */
.catalog-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--header-ink);
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.catalog-cart:hover {
  color: var(--primary);
  background-color: rgba(198, 1, 0, 0.06);
}

.catalog-cart:active {
  transform: scale(0.94);
}

/* Корпус сумки всегда контурный, без заливки цветом (иконка больше не закрашивается) */
.catalog-cart .header__bag-body {
  fill: none !important;
}

/* Чёткий бейдж-счётчик количества товаров: заметный, контрастный, вынесен в угол */
.catalog-cart__count {
  position: absolute;
  top: 1px;
  right: -1px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background-color: var(--primary, #c60100);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-bg, #fdfbf7);
  box-shadow: 0 2px 5px rgba(198, 1, 0, 0.35);
  box-sizing: border-box;
  pointer-events: none;
  z-index: 2;
  letter-spacing: -0.02em;
}

/* При наличии товаров в корзине скрываем декоративную звёздочку под бейджем */
.catalog-cart:not(.catalog-cart--empty) svg > path:last-of-type {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Анимация мягкого появления бейджа при добавлении товара */
@keyframes cart-badge-pop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.catalog-cart:not(.catalog-cart--empty) .catalog-cart__count {
  animation: cart-badge-pop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Пустая корзина: бейдж полностью скрыт */
.catalog-cart--empty .catalog-cart__count {
  display: none !important;
}

/* Поиск по каталогу */
body.site-search-open { overflow: hidden; }
body.menu-open { overflow: hidden; }
.site-search[hidden] { display: none; }
.site-search { position: fixed; z-index: 2000; inset: 0; display: grid; place-items: start center; padding: min(14vh, 130px) 20px 20px; }
.site-search__backdrop { position: absolute; inset: 0; background: rgba(35, 30, 19, .58); }
.site-search__dialog { position: relative; width: min(640px, 100%); padding: 28px; border: 1px solid rgba(114, 64, 30, .25); border-radius: 18px; background: var(--color-bg); box-shadow: 0 22px 70px rgba(35, 30, 19, .3); }
.site-search__heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-search__heading h2 { margin: 0; font: var(--ds-font-weight-medium) 34px var(--font-heading); }
.site-search__close { width: 38px; height: 38px; border: 0; border-radius: 8px; background: var(--color-badge-bg); color: var(--color-text); cursor: pointer; font-size: 30px; line-height: 1; }
.site-search__intro { margin: 10px 0 20px; color: var(--color-brown); }
.site-search__form { display: flex; gap: 10px; }
.site-search__form input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 14px; border: 1px solid var(--color-brown); border-radius: 8px; background: rgba(255,255,255,.72); color: var(--color-text); font: var(--ds-font-weight-medium) var(--ds-font-size-md) var(--font-body); }
.site-search__form .ds-button { color: var(--ds-color-text-inverse); }
.site-search__suggestions { margin-top: 18px; }
.site-search__suggestions-label, .site-search__no-suggestions { margin: 0 0 8px; color: var(--color-brown); font-size: var(--ds-font-size-md); font-weight: var(--ds-font-weight-semibold); }
.site-search__suggestions button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--color-text); cursor: pointer; font: var(--ds-font-weight-medium) var(--ds-font-size-md) var(--font-body); text-align: left; }
.site-search__suggestions button small { flex-shrink: 0; color: var(--ds-color-text-muted); font: var(--ds-font-weight-semibold) var(--ds-font-size-sm) var(--font-body); white-space: nowrap; }
.site-search__suggestions button:hover { background: var(--color-badge-bg); }
@media (max-width: 480px) { .site-search { padding: 40px 14px; } .site-search__dialog { padding: 22px; } .site-search__form { flex-direction: column; } .site-search__form .ds-button { width: 100%; } }

/* ── Hero ───────────────────────────────── */
.hero {
  height: calc(100vh - 100px);
  min-height: 580px;
  padding: 32px var(--ds-page-gutter) var(--ds-section-space-bottom);
  display: flex;
  align-items: flex-start;
}

.hero__container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ── Сетка ──────────────────────────────── */
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 2.8vw, 48px);
  align-items: stretch;
  grid-template-areas: 'content visual';
}

/* ── Лейбл автора ───────────────────────── */
/* Начиная с десктопа (до адаптива): звёздочка сверху по левой границе,
   «Елена Велена» крупнее и жирнее первой строкой,
   «Детский писатель» чуть крупнее второй строкой, тире скрыто (feedback 2026-09-11). */
.hero__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: var(--primary);
  font-family: var(--font-heading);
  margin-bottom: 18px;
}

.hero__sparkle {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--primary);
  margin: 0;
}

.hero__label-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.hero__label-sep {
  display: none;
}

.hero__label-name {
  display: block;
  font-size: clamp(30px, 2.5vw + 10px, 50px);
  font-weight: var(--ds-font-weight-bold);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.hero__label-role {
  display: block;
  font-size: clamp(15px, 0.35vw + 12px, 19px);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0.88;
}

/* ── Бейджи ─────────────────────────────── */
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 24px;
}

.hero__content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--color-badge-bg);
  border: 1px solid rgba(114, 64, 30, 0.16);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--color-brown);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.25;
  white-space: nowrap;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.badge:hover {
  border-color: rgba(114, 64, 30, 0.35);
  background-color: rgba(243, 234, 216, 0.95);
  transform: translateY(-1px);
}

.badge svg,
.badge img,
.badge__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.hero__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: var(--ds-font-size-h1);
  line-height: var(--ds-line-height-tight);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 24px;
}

.hero__title-accent {
  color: var(--color-brown);
}

.hero__title-part {
  display: inline;
}

.hero__text {
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-semibold);
  line-height: 1.4;
  max-width: 620px;
  margin-bottom: 48px;
}

/* ── Кнопка ─────────────────────────────── */
.hero__button {
  position: relative;
  display: inline-block;
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-medium);
  color: var(--color-text);
  text-decoration: none;
  padding: 20px 60px;
  border: none;
  border-radius: 8px;
  background: none;
  transition: color 0.25s ease;
  z-index: 0;
}

/* Обводка без заливки — оранжевый градиент кнопки «В корзину» (bestsellers__button) */
.hero__button::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 8px;
  padding: 2px;
  background: var(--gradient-cta);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  transition: background 0.25s ease;
}

/* Ховер и фокус — текст и обводка красные, как у кнопки «В корзину» */
.hero__button:hover,
.hero__button:focus-visible {
  color: var(--primary);
}

.hero__button:hover::before,
.hero__button:focus-visible::before {
  background: var(--gradient-cta-hover);
}

.hero__button:focus-visible {
  outline: 3px solid var(--ds-color-focus);
  outline-offset: 3px;
}

/* CTA главной — та же кнопка, что в hero «Об авторе» (.author-hero .ds-button) */
.hero .ds-button {
  min-height: 62px;
  padding: 18px 40px;
  border: none;
  border-radius: 8px;
  background: var(--gradient-cta);
  color: #fff;
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-bold);
  transition: background .25s ease, color .25s ease;
}

.hero .ds-button:hover {
  background: var(--gradient-cta-hover);
  color: #fff;
}

.hero .ds-button:focus-visible {
  outline: 3px solid var(--ds-color-focus);
  outline-offset: 3px;
}

/* ── Визуал ─────────────────────────────── */
.hero__visual {
  position: relative;
  display: flex;
  align-items: flex-end;
}

.hero__image-wrap {
  border-radius: var(--ds-radius-image, 12px);
  width: 100%;
}

.hero__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--ds-radius-image, 12px);
}

@media (min-width: 768.02px) {
  .hero__visual {
    /* 100vh = остаток экрана под шапкой и отступами + нижний padding hero,
       чтобы фото не упиралось в край экрана. */
    height: calc(100dvh - 255px);
  }

  .hero__image-wrap,
  .hero__image {
    height: 100%;
  }

  .hero__image {
    width: 100%;
  }
}

.hero__content .ds-button {
  margin-top: auto;
  align-self: flex-start;
}

/* ── Об авторе ──────────────────────────── */
.author {
  background-color: var(--color-bg);
  padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
}

.author__container {
  max-width: 1440px;
  margin: 0 auto;
}

.author__grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(32px, 3.5vw, 56px);
  align-items: stretch;
  min-height: min(620px, calc(100vh - 200px));
}

/* Контент центрируется по высоте колонки */
.author__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding-block: var(--ds-space-2, 8px);
}

/* Фото автора */
.author__photo {
  border-radius: var(--ds-radius-image, 12px);
  overflow: hidden;
  align-self: stretch;
  min-height: 0;
}

.author__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--ds-radius-image, 12px);
}

/* Веер из книг */
.author__books {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: clamp(24px, 3.5vh, 40px);
  padding-block: 20px 8px;
}

.author__book {
  display: block;
  flex-shrink: 0;
  width: 180px;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 16px 32px rgba(20, 20, 20, 0.18);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
  will-change: transform;
}

.author__book--left {
  margin-right: -50px;
  transform: rotate(-8deg);
  z-index: 1;
}

.author__book--center {
  transform: translateY(-16px);
  z-index: 2;
  box-shadow: 0 20px 38px rgba(20, 20, 20, 0.22);
}

.author__book--right {
  margin-left: -50px;
  transform: rotate(8deg);
  z-index: 1;
}

/* При наведении на веер книги раскрываются */
@media (hover: hover) {
  .author__books:hover .author__book--left {
    transform: rotate(-12deg) translateX(-20px);
  }

  .author__books:hover .author__book--center {
    transform: translateY(-28px) scale(1.03);
  }

  .author__books:hover .author__book--right {
    transform: rotate(12deg) translateX(20px);
  }
}

/* Планшет (768–1024px): колонки равной ширины, масштабированный веер */
@media (min-width: 768.02px) and (max-width: 1024px) {
  .author__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    min-height: auto;
  }

  .author__book {
    width: 124px;
  }

  .author__book--left {
    margin-right: -34px;
  }

  .author__book--right {
    margin-left: -34px;
  }

  @media (hover: hover) {
    .author__books:hover .author__book--left {
      transform: rotate(-12deg) translateX(-12px);
    }

    .author__books:hover .author__book--center {
      transform: translateY(-20px) scale(1.03);
    }

    .author__books:hover .author__book--right {
      transform: rotate(12deg) translateX(12px);
    }
  }

  .author__text {
    font-size: var(--ds-font-size-md);
    margin-bottom: 20px;
  }

  .author__quote {
    margin-bottom: 32px;
  }

  .author__button {
    padding: 14px 28px;
    font-size: var(--ds-font-size-md);
    white-space: nowrap;
  }
}

/* Цитата */
.author__quote {
  margin-bottom: clamp(28px, 4vh, 48px);
}

.author__quote-mark {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(64px, 5.5vw, 96px);
  line-height: 0.6;
  color: var(--primary);
  margin-bottom: 20px;
}

.author__text {
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-medium);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 600px;
}

.author__text:last-child {
  margin-bottom: 0;
}

/* Кнопка CTA */
.author__button {
  align-self: flex-start;
  margin-bottom: 0;
  padding: 16px 36px;
  white-space: nowrap;
}

.book-type {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 60px var(--ds-page-gutter);
  /* Сплошной фон, чтобы следующая секция полностью перекрывала предыдущую */
  background-color: var(--color-bg);
}

.book-type__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-semibold);
  font-size: 64px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 40px;
}

.book-type__text {
  max-width: 520px;
  margin-bottom: 48px;
}

.book-type__text p {
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.65;
  color: rgba(35, 30, 19, 0.88);
  margin-bottom: 24px;
}

.book-type__text p:last-child {
  margin-bottom: 0;
}

.book-type__button {
  margin-bottom: 0;
}

.book-type__visual {
  display: flex;
  justify-content: center;
}

/* ── Подборки сказок: Sticky-Parallax ── */
.stories-sticky-wrapper {
  --stories-light: #c60100; /* акцент декора — как в «Аудиосказке»: primary-red вместо кремового */
  position: relative;
  height: 160vh; /* короткая прокрутка — кадры меняются сразу */
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: clip;
  /* Фон и радиальные градиенты — скопированы из секции .gift («Аудиосказка в подарок») */
  background-image:
    radial-gradient(55% 80% at 4% 8%, rgba(255, 138, 0, 0.20), transparent 68%),
    radial-gradient(48% 72% at 96% 18%, rgba(255, 82, 0, 0.16), transparent 70%),
    radial-gradient(42% 64% at 76% 108%, rgba(255, 162, 32, 0.18), transparent 72%),
    linear-gradient(135deg, var(--color-bg) 0%, rgba(255, 255, 255, 0.74) 52%, var(--color-badge-bg) 100%);
  border-radius: 32px;
}

/* Декоративные рукописные элементы */
.stories-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

@media (min-width: 768.02px) and (max-width: 1024px) {
  .gift__deco {
    overflow: visible;
  }

  .gift__sparkle,
  .gift__dot {
    transform: scale(0.6);
    transform-origin: center;
  }

  .gift__sparkle--tl {
    top: -24px;
    left: -8px;
    width: 114px;
  }

  .gift__sparkle--br {
    bottom: -24px;
    right: -24px;
    width: 114px;
  }
}

/* Текстура фона — лёгкие рукописные завитушки */
.stories-sticky-wrapper .stories-deco::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M24 86 C 24 64, 42 52, 58 58 C 74 64, 72 80, 60 82 C 52 83, 52 74, 60 74' fill='none' stroke='%23c60100' stroke-width='1.4' stroke-linecap='round'/%3E%3Cpath d='M96 34 C 96 56, 78 68, 62 62' fill='none' stroke='%23c60100' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.09;
}

.stories-sticky-wrapper .stories-deco__sparkle {
  position: absolute;
  opacity: 0.9;
  filter: drop-shadow(0 0 14px rgba(255, 82, 0, 0.28));
}

/* Цвета декораций заданы в разметке SVG: настоящие <linearGradient>
   (id="stories-flame-tl" / id="stories-flame-br") со стопами градиента кнопки
   .bestsellers__button. CSS-оверрайды stroke/fill убраны — они затирали бы
   градиентные url(#…) заливки/обводки (CSS сильнее SVG-атрибутов),
   как и в секции .gift. */

.stories-deco__sparkle--tl {
  top: calc(6% - 48px);
  left: 4%;
  animation: stories-float 9s ease-in-out infinite;
}

.stories-deco__sparkle--br {
  bottom: calc(6% - 24px);
  right: 4%;
  animation: stories-float 11s ease-in-out infinite reverse;
}

@keyframes stories-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-20px) rotate(8deg); }
}

.stories-sticky-wrapper .stories-deco__dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c22e00;
  box-shadow: 0 0 10px 3px rgba(194, 46, 0, 0.48);
  animation: stories-twinkle 5s ease-in-out infinite;
}
/* Точки — стопы градиента кнопки .bestsellers__button (#d63900 / #cc3400 / #c22e00), как в .gift__dot */
.stories-sticky-wrapper .stories-deco__dot--1 { top: 28%; left: 68%; animation-delay: 0.4s; background: #d63900; box-shadow: 0 0 10px 3px rgba(214, 57, 0, 0.45); }
.stories-sticky-wrapper .stories-deco__dot--2 { top: 62%; left: 26%; animation-delay: 1.1s; background: #cc3400; box-shadow: 0 0 10px 3px rgba(204, 52, 0, 0.45); }
.stories-sticky-wrapper .stories-deco__dot--3 { top: 18%; left: 52%; animation-delay: 1.8s; background: #c22e00; box-shadow: 0 0 10px 3px rgba(255, 136, 0, 0.45); }
.stories-sticky-wrapper .stories-deco__dot--4 { top: 74%; left: 60%; animation-delay: 2.4s; background: #d63900; box-shadow: 0 0 10px 3px rgba(214, 57, 0, 0.45); }

@keyframes stories-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%      { opacity: 1; transform: scale(1.4); }
}

@media (prefers-reduced-motion: reduce) {
  .stories-deco__sparkle,
  .stories-deco__dot,
  .wholesale__sparkle,
  .wholesale__dot,
  .gift__sparkle,
  .gift__dot { animation: none; }
}

.stories-sticky-frame {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.stories-sticky-frame__inner {
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--ds-page-gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

/* Левая колонка */
.sticky-text-col {
  position: relative;
}

.sticky-section-title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 56px;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 36px; /* было 48px — сокращено на 12px по запросу */
  color: var(--color-brown);
}

.sticky-text-stage {
  position: relative;
  min-height: 280px;
}

/* Правая колонка */
.sticky-media-col {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Пагинация-точки: на правом краю по центру */
.stories-pagination {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 5;
}

.stories-pagination__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background-color: rgba(198, 1, 0, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.stories-pagination__dot:focus-visible {
  outline: 2px solid var(--stories-light);
  outline-offset: 3px;
}

.stories-sticky-wrapper .stories-pagination__dot.is-active {
  background-color: var(--stories-light);
  transform: scale(1.6);
  box-shadow: 0 0 8px 2px rgba(198, 1, 0, 0.45);
}

/* Магическое свечение позади веера книг */
.sticky-media-col::before {
  content: '';
  position: absolute;
  width: 560px;
  height: 560px;
  max-width: 90%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 1, 0, 0.20), rgba(198, 1, 0, 0) 65%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}

/* Шаги — абсолютно друг над другом */
.story-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.story-step.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Медиа-шаги центрируют изображение */
.story-step--media {
  align-items: center;
  justify-content: center;
}

/* Планшет и мобилка (≤1080px): sticky-сцена скрыта — вместо неё
   горизонтальная карусель карточек .stories-mobile (см. разметку в index.html).
   Десктоп (>1080px) продолжает использовать sticky-parallax версию выше.
   Порог 1080, а не 768: в диапазоне 769–1080 сцена 100vh/160vh с колонками
   1fr+1fr и min-height:560px сжималась и оставляла огромные пустоты. */
@media (max-width: 1080px) {
  /* Обёртка больше не задаёт высоту прокрутки */
  .stories-sticky-wrapper {
    height: auto;
  }

  .stories-sticky-frame {
    display: none;
  }
}

.story-step__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 40px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
  /* Тот же цвет, что и заголовок «Подборки сказок» */
  color: var(--color-brown);
}

.story-step__text {
  max-width: 460px;
  margin-bottom: 32px;
}

.story-step__text p {
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.65;
  color: rgba(35, 30, 19, 0.78);
}

/* Общая кнопка подборок — не участвует в смене кадров */
.sticky-text-col .story-step__button {
  margin-top: 8px;
  color: var(--color-text);
}

.stories-sticky-wrapper .story-step__button::before,
.stories-sticky-wrapper .story-step__button:hover::before {
  background: var(--gradient-cta);
}

.stories-sticky-wrapper .story-step__button:hover {
  color: var(--primary);
}

/* ── Веер из трёх книг ── */
.book-fan {
  position: relative;
  width: 480px;
  max-width: 92%;
  height: 540px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  cursor: pointer;
}

.book-fan__book {
  position: absolute;
  top: 0;
  left: 50%;
  width: 322px;
  max-width: 92%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 24px 48px rgba(20, 20, 20, 0.22);
  transform-origin: 50% 100%;
  transition: transform 0.45s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

/* Базовое положение веера */
.book-fan__book--left {
  transform: translateX(-50%) translateX(-39px) rotate(-9deg);
  z-index: 1;
}
.book-fan__book--center {
  transform: translateX(-50%) translateY(-12px) rotate(0);
  z-index: 3;
}
.book-fan__book--right {
  transform: translateX(-50%) translateX(39px) rotate(9deg);
  z-index: 2;
}

/* При наведении книги разъезжаются */
.book-fan:hover .book-fan__book--left {
  transform: translateX(-50%) translateX(-117px) rotate(-16deg);
}
.book-fan:hover .book-fan__book--center {
  transform: translateX(-50%) translateY(-63px) rotate(0);
}
.book-fan:hover .book-fan__book--right {
  transform: translateX(-50%) translateX(117px) rotate(16deg);
}

/* ── Мобильная/планшетная карусель подборок (≤1080px) ──
   Те же три подборки, что и в sticky-версии, но карточками по образцу
   карусели «Бестселлеров». На десктопе блок скрыт — там sticky-веера. */
.stories-mobile {
  display: none;
}

@media (max-width: 1080px) {
  .stories-mobile {
    display: block;
    position: relative;
    z-index: 1; /* над декоративным фоном секции */
    padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  }

  .stories-mobile__container {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
  }

  /* Секция стала компактнее — уводим рукописные декорации в углы,
     чтобы перо не цепляло заголовок, а пергамент — кнопку под каруселью */
  .stories-deco__sparkle--tl {
    top: -36px;
    left: -48px;
    opacity: 0.6;
  }

  .stories-deco__sparkle--br {
    bottom: -44px;
    right: -56px;
    opacity: 0.55;
  }
}

.stories-mobile__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 42px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 28px;
  color: var(--color-brown);
}

@media (max-width: 480px) {
  .stories-mobile__title {
    font-size: 32px;
    margin-bottom: 20px;
  }
}

.stories-mobile__viewport {
  position: relative;
}

.stories-mobile__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  align-items: stretch;
  /* Карусель выровнена по сетке контента строго под заголовком */
  width: 100%;
  margin: 0 0 28px;
  padding: 8px 0 24px;
  /* Технический скроллбар запрещён — см. AGENTS.md */
  scrollbar-width: none;
}

.stories-mobile__track::-webkit-scrollbar {
  display: none;
}

/* Карточки: 2 в ряд на планшетах (контракт design-system.css), 1 на смартфонах */
.stories-mobile-card {
  flex: 0 0 calc((100% - 20px) / 2);
  min-width: 0;
  scroll-snap-align: start;
}

@media (max-width: 480px) {
  .stories-mobile-card {
    flex: 0 0 100%;
  }
}

.stories-mobile-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.stories-mobile-card__link:hover .stories-mobile-card__title {
  color: var(--primary);
}

.stories-mobile-card__link:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
  border-radius: 8px;
}

.stories-mobile-card__image-wrap {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: 18px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 14px 30px rgba(35, 30, 19, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stories-mobile-card__link:hover .stories-mobile-card__image-wrap {
  transform: translateY(-4px);
  box-shadow: 0 20px 38px rgba(35, 30, 19, 0.22);
}

.stories-mobile-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stories-mobile-card__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
  color: var(--color-brown);
  transition: color 0.2s ease;
}

.stories-mobile-card__text {
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.65;
  color: rgba(35, 30, 19, 0.78);
  margin-top: auto;
}

/* Стрелки — видны всегда (тач-экраны), акцент --stories-light секции.
   Классы js-carousel__arrow* подхватывает универсальный обработчик .js-carousel. */
.stories-mobile__arrow {
  position: absolute;
  top: 38%; /* над центром фотографии карточки */
  transform: translateY(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--stories-light);
  background-color: rgba(255, 252, 245, 0.94);
  color: var(--stories-light);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(35, 30, 19, 0.12);
  transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.stories-mobile__arrow--prev { left: -16px; }
.stories-mobile__arrow--next { right: -16px; }

@media (max-width: 480px) {
  .stories-mobile__arrow--prev { left: 4px; }
  .stories-mobile__arrow--next { right: 4px; }
}

.stories-mobile__arrow:hover {
  background-color: var(--stories-light);
  color: #fff;
}

.stories-mobile__arrow:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Точки — универсальный обработчик создаёт кнопки .new-books__dot,
   перекрашиваем их в акцент секции (как .stories-pagination__dot) */
.stories-mobile__controls {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

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

.stories-mobile__dots .new-books__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background-color: rgba(198, 1, 0, 0.25);
  cursor: pointer;
  transition: width 0.3s ease, background-color 0.25s ease;
}

.stories-mobile__dots .new-books__dot.is-active {
  width: 28px;
  background-color: var(--stories-light);
}

/* Общая кнопка блока — статична под каруселью, вне скролл-контейнера */
.stories-mobile__button {
  display: block;
  width: max-content;
  margin: 28px auto 0;
}

/* ── Новые издания (горизонтальный скролл) ── */
.new-books {
  padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  background-color: var(--color-bg);
}

.new-books__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 56px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 48px;
}

/* Контейнер: стрелки поверх ленты */
.new-books__viewport {
  position: relative;
}

/* ── Пагинация карусели ─────────────────── */
.new-books__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.new-books__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background-color: rgba(35, 30, 19, 0.25);
  cursor: pointer;
  transition: width 0.3s ease, background-color 0.25s ease;
}

.new-books__dot.is-active {
  width: 28px;
  background-color: var(--color-brown);
}

/* ── Бестселлеры (крупные карточки, 4 в ряд + пятая частично) ── */
.bestsellers {
  padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  background-color: var(--color-bg);
  overflow-x: clip;
}

.bestsellers__wrapper {
  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
}

.bestsellers__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 48px;
  text-align: left;
}

.bestsellers__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 56px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
}

/* Табы всегда в одну линию: если не вмещаются — горизонтальный
   свайп-скролл без видимой полосы прокрутки (стандарт магазинов). */
.bestsellers__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  /* Запас снизу под рукописное подчёркивание активного таба */
  padding-bottom: 4px;
}

.bestsellers__tabs::-webkit-scrollbar {
  display: none;
}

.bestsellers__tab {
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.2;
  color: var(--color-text);
  background: none;
  border: none;
  padding: 0 0 6px;
  cursor: pointer;
  position: relative;
  opacity: 0.7;
  transition: opacity 0.25s ease, color 0.25s ease;
}

/* Рукописное подчёркивание: «вырастает» из центра при ховере,
   у активного таба — остаётся на месте. */
.bestsellers__tab::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -2px;
  height: 7px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 7' preserveAspectRatio='none'%3E%3Cpath d='M1 4 C 10 1, 20 6, 30 3 S 50 1, 60 4 S 80 6, 90 3 S 110 1, 119 4' fill='none' stroke='%23c60100' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.32s ease;
}

.bestsellers__tab:hover {
  opacity: 1;
  color: var(--color-brown);
}

.bestsellers__tab:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.bestsellers__tab:focus-visible {
  outline: none;
  opacity: 1;
  color: var(--color-brown);
}

.bestsellers__tab.is-active {
  color: var(--color-brown);
  opacity: 1;
}

.bestsellers__tab.is-active::after {
  transform: scaleX(1);
  opacity: 1;
  /* Активный таб — коричневое подчёркивание, поверх ховера */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 7' preserveAspectRatio='none'%3E%3Cpath d='M1 4 C 10 1, 20 6, 30 3 S 50 1, 60 4 S 80 6, 90 3 S 110 1, 119 4' fill='none' stroke='%2372401E' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Разделитель с пульсирующей звёздочкой */
.bestsellers__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  margin: 0;
}

.bestsellers__divider-rule {
  flex: 1;
  height: 2px;
  /* линия немного «прерывается» к краям — мягко сходит на нет;
     цвет — primary (бордовый #c60100), градиент сохранён */
  background: linear-gradient(90deg,
    rgba(198, 1, 0, 0) 0%,
    rgba(198, 1, 0, 0.381) 35%,
    rgba(198, 1, 0, 0.381) 65%,
    rgba(198, 1, 0, 0) 100%);
  border-radius: 2px;
}

.bestsellers__divider-star {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--primary);
  transform-origin: center;
  animation: bestsellers-star-pulse 2.6s ease-in-out infinite;
}

@keyframes bestsellers-star-pulse {
  0%, 100% {
    transform: scale(1);
    filter:
      drop-shadow(0 0 4px rgba(198, 1, 0, 0.55))
      drop-shadow(0 0 10px rgba(198, 1, 0, 0.30));
  }
  50% {
    transform: scale(1.22);
    filter:
      drop-shadow(0 0 9px rgba(198, 1, 0, 0.95))
      drop-shadow(0 0 22px rgba(198, 1, 0, 0.65));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bestsellers__divider-star { animation: none; }
}

.bestsellers__viewport {
  position: relative;
}

.bestsellers__carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  align-items: flex-start;
  /* Карусель выровнена по сетке контента строго под заголовком */
  width: 100%;
  margin: 0 0 32px;
  padding: 12px 0 24px;
  scrollbar-width: none;
}

.bestsellers__carousel::-webkit-scrollbar {
  display: none;
}

/* Всегда 4 целых карточки в ряд, без частичного «подглядывания» пятой */
.bestsellers__card {
  flex: 0 0 calc((100% - 72px) / 4);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.bestsellers__card:hover {
  transform: translateY(-12px);
  box-shadow: none;
}

.bestsellers__link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.bestsellers__link:hover .bestsellers__name {
  color: var(--primary);
}

.bestsellers__link:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
  border-radius: 8px;
}

/* Шахматный порядок: чётные карточки ниже (как в «Новых изданиях») */
.bestsellers__card:nth-child(even) {
  margin-top: 80px;
}

.bestsellers__image-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(35, 30, 19, 0.18);
}

.bestsellers__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.bestsellers__card:hover .bestsellers__image {
  transform: scale(1.05);
}

.bestsellers__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.bestsellers__age,
.bestsellers__format {
  font-size: var(--ds-font-size-sm);
  font-weight: var(--ds-font-weight-bold);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-badge-bg);
  color: var(--color-brown);
}

.bestsellers__name {
  font-size: var(--ds-font-size-title);
  font-weight: var(--ds-font-weight-bold);
  line-height: 1.3;
  margin-bottom: 16px;
}

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

.bestsellers__price {
  font-size: 24px;
  font-weight: var(--ds-font-weight-bold);
  /* Цена не переносится: в узких колонках «650 ₽» ломалось на две строки */
  white-space: nowrap;
}

.bestsellers__button {
  font-family: var(--font-body);
  font-size: var(--ds-font-size-title);
  font-weight: var(--ds-font-weight-bold);
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: var(--gradient-cta);
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
  /* Кнопка карточки не переносит текст («В корзину» всегда одной строкой) */
  white-space: nowrap;
  text-decoration: none !important;
}

.bestsellers__button:hover,
.bestsellers__button:focus,
.bestsellers__button:active,
.bestsellers__button:visited {
  background: var(--gradient-cta-hover);
  color: #fff;
  text-decoration: none !important;
}

/* Стрелки и точки — наследуют оформление карусели */
.bestsellers__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.bestsellers__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--color-text);
  background-color: rgba(247, 240, 228, 0.92);
  color: var(--color-text);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.bestsellers__arrow--prev { left: -24px; }
.bestsellers__arrow--next { right: -24px; }

.bestsellers__viewport:hover .bestsellers__arrow,
.bestsellers__viewport:focus-within .bestsellers__arrow {
  opacity: 1;
  pointer-events: auto;
}

.bestsellers__arrow:hover {
  background-color: var(--color-text);
  color: #fff;
}

.bestsellers__arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.bestsellers__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.bestsellers__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background-color: rgba(35, 30, 19, 0.25);
  cursor: pointer;
  transition: width 0.3s ease, background-color 0.25s ease;
}

.bestsellers__dot.is-active {
  width: 28px;
  background-color: var(--color-brown);
}

@media (max-width: 1024px) {
  .bestsellers__card {
    flex: 0 0 calc((100% - 24px) / 2);
  }

  .bestsellers__card:nth-child(even) {
    margin-top: 0;
  }

  .bestsellers__arrow--prev { left: 4px; }
  .bestsellers__arrow--next { right: 4px; }
}

@media (max-width: 768px) {
  .bestsellers {
    padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  }

  .bestsellers__header {
    margin-bottom: 32px;
    gap: 16px;
  }

  .bestsellers__title {
    font-size: 42px;
    margin-bottom: 0;
  }

  .bestsellers__tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: calc(100% + (var(--ds-page-gutter) * 2));
    margin-inline: calc(var(--ds-page-gutter) * -1);
    padding-inline: var(--ds-page-gutter);
    padding-bottom: 8px;
  }

  /* На узких экранах — 2 целые карточки в ряд, без обрезки.
     Шахматное смещение отключено: на мобильных все карточки
     стоят строго по одной линии, ряды цен выровнены снизу. */
  .bestsellers__card {
    flex: 0 0 calc((100% - 24px) / 2);
  }

  .bestsellers__card:nth-child(even) {
    margin-top: 0;
  }

  .bestsellers__carousel {
    width: 100%;
    align-items: stretch;
    padding: 8px 0 24px;
  }
}

@media (max-width: 480px) {
  .bestsellers__title {
    font-size: 34px;
  }

  /* На мобильных — 1 целая карточка в ряд */
  .bestsellers__card {
    flex: 0 0 100%;
  }
}

/* ── Аудиосказка в подарок ──────────────── */
.gift {
  --gift-ink: var(--color-text);
  --gift-accent: var(--primary);
  --gift-sun: color-mix(in srgb, var(--primary) 55%, var(--color-badge-bg));
  /* Оранжевый градиент акцентов секции: кнопка play, чекбокс, эквалайзер */
  --gift-accent-gradient: var(--gradient-cta);
  position: relative;
  overflow: hidden;
  padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  color: var(--gift-ink);
  background-color: var(--color-bg);
  /* Радиальные свечения — оранжевые оттенки из градиента кнопки .bestsellers__button
     (#d63900 / #cc3400 / #c22e00); светлый базовый градиент сохраняется */
  background-image:
    radial-gradient(55% 80% at 4% 8%, rgba(255, 138, 0, 0.20), transparent 68%),
    radial-gradient(48% 72% at 96% 18%, rgba(255, 82, 0, 0.16), transparent 70%),
    radial-gradient(42% 64% at 76% 108%, rgba(255, 162, 32, 0.18), transparent 72%),
    linear-gradient(135deg, var(--color-bg) 0%, rgba(255, 255, 255, 0.74) 52%, var(--color-badge-bg) 100%);
  border-radius: 32px;
}

.gift__container {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: 60px;
  padding-right: 60px;
}

.gift__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 64px;
  align-items: center;
  background-color: transparent;
  border-radius: 18px;
  padding: 56px 56px;
  position: relative;
  overflow: visible;
}

/* Акцентная обводка-дивайдер с разрывами возле углов:
   в местах, где парят завитушка (верх-лево) и бабочка (низ-право),
   линия исчезает, чтобы декор не касался рамки */
.gift__grid::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(198, 1, 0, 0.28);
  border-radius: 18px;
  pointer-events: none;
  z-index: 1;
  -webkit-mask-image:
    radial-gradient(circle at 0 0, transparent 70px, #000 120px),
    radial-gradient(circle at 100% 100%, transparent 78px, #000 130px),
    linear-gradient(#000, #000);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle at 0 0, transparent 70px, #000 120px),
    radial-gradient(circle at 100% 100%, transparent 78px, #000 130px),
    linear-gradient(#000, #000);
  mask-composite: intersect;
}

/* Декоративный фон карточки: завитушки + светящиеся элементы */
.gift__deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.gift__deco::before {
  content: none;
}

.gift__sparkle {
  position: absolute;
  opacity: 0.85;
  filter: drop-shadow(0 0 14px rgba(198, 1, 0, 0.28));
}

/* Внутри секции .gift свечение декора — оранжевая гамма кнопки .bestsellers__button.
   Отдельное правило (не правка базового), чтобы не задеть бабочек вне секции .gift */
.gift .gift__sparkle {
  filter: drop-shadow(0 0 14px rgba(255, 82, 0, 0.28));
}

/* Цвета декораций заданы в разметке SVG: настоящие <linearGradient>
   (id="gift-flame-tl" / id="gift-flame-br") со стопами градиента кнопки
   .bestsellers__button. CSS-оверрайды stroke/fill удалены — они затирали
   бы градиентные url(#…) заливки/обводки (CSS сильнее SVG-атрибутов). */

.gift__sparkle--tl {
  top: -60px;
  left: -22px;
  width: 190px;
  animation: stories-float 9s ease-in-out infinite;
}
.gift__sparkle--br {
  bottom: -60px;
  right: -60px;
  width: 190px;
  animation: stories-float 11s ease-in-out infinite reverse;
}

.gift__dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c22e00;
  box-shadow: 0 0 10px 3px rgba(194, 46, 0, 0.48);
  animation: stories-twinkle 5s ease-in-out infinite;
}
/* Точки — стопы градиента кнопки .bestsellers__button (#d63900 / #cc3400 / #c22e00) */
.gift__dot--1 { top: 22%; left: 48%; animation-delay: 0.4s; background: #d63900; box-shadow: 0 0 10px 3px rgba(214, 57, 0, 0.45); }
.gift__dot--2 { top: 70%; left: 30%; animation-delay: 1.3s; background: #cc3400; box-shadow: 0 0 10px 3px rgba(204, 52, 0, 0.45); }
.gift__dot--3 { top: 30%; left: 78%; animation-delay: 1.9s; background: #c22e00; box-shadow: 0 0 10px 3px rgba(255, 136, 0, 0.45); }

/* Левая колонка */
.gift__content {
  position: relative;
  z-index: 1;
}

.gift__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gift-accent);
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 22px;
}

.gift__star {
  flex-shrink: 0;
}

.gift__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 40px;
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--color-brown);
  margin-bottom: 22px;
}

.gift__text {
  /* Описание у заголовка секции: роль «лид у заголовка» = lead/600 (2026-08-23). */
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-semibold);
  line-height: 1.7;
  color: rgba(35, 30, 19, 0.78);
  max-width: 660px;
  margin-bottom: 32px;
}

/* Форма */
.gift__field {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.gift__input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: var(--ds-font-size-md);
  color: var(--gift-ink);
  background-color: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(114, 64, 30, 0.38);
  border-radius: 12px;
  padding: 16px 20px;
  outline: none;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.gift__input::placeholder {
  color: rgba(35, 30, 19, 0.62);
}

.gift__input:focus {
  border-color: var(--color-orange);
  background-color: rgba(255, 255, 255, 0.82);
}

.gift__input:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

.gift__submit {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-semibold);
  color: var(--color-bg);
  background-color: var(--gift-accent);
  border: 1px solid var(--gift-accent);
  border-radius: 8px;
  padding: 15px 27px;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.15s ease;
  white-space: nowrap;
}

.gift__submit:hover {
  background-color: var(--color-brown);
  border-color: var(--color-brown);
}

.gift__submit:focus-visible,
.gift__player-play:focus-visible {
  outline: 2px solid var(--gift-accent);
  outline-offset: 3px;
}

.gift__submit:active {
  transform: scale(0.97);
}

/* Согласие */
.gift__agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.gift__checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gift__checkmark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--gift-accent);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-bg);
  background-color: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  margin-top: 1px;
}

.gift__checkmark svg {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gift__checkbox:checked + .gift__checkmark {
  background: var(--gift-accent-gradient);
  border-color: var(--color-orange);
}

.gift__checkbox:checked + .gift__checkmark svg {
  opacity: 1;
  transform: scale(1);
}

.gift__checkbox:focus-visible + .gift__checkmark {
  box-shadow: 0 0 0 3px rgba(198, 1, 0, 0.24);
}

.gift__agree-text {
  font-size: var(--ds-font-size-md);
  line-height: 1.5;
  color: rgba(35, 30, 19, 0.68);
}

/* Аудиоплеер-превью */
.gift__player {
  background-color: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(198, 1, 0, 0.32);
  border-radius: 14px;
  padding: 28px;
  position: relative;
  z-index: 1;
}

.gift__player-label {
  display: block;
  color: var(--gift-accent);
  font-size: var(--ds-font-size-sm);
  font-weight: var(--ds-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 22px;
}

.gift__player-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.gift__player-play {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: var(--gift-accent-gradient);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.25s ease;
}

.gift__player-play:hover {
  transform: scale(1.06);
  filter: brightness(1.07);
}

.gift__player-play .gift__icon-pause {
  display: none;
}

.gift__player-play.is-playing .gift__icon-play {
  display: none;
}

.gift__player-play.is-playing .gift__icon-pause {
  display: block;
}

.gift__player-track {
  flex: 1;
  min-width: 0;
}

.gift__progress {
  height: 6px;
  border-radius: 999px;
  background-color: rgba(114, 64, 30, 0.18);
  overflow: hidden;
  margin-bottom: 12px;
  cursor: pointer;
}

.gift__progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background-color: var(--gift-accent);
  transition: width 0.1s linear;
}

.gift__times {
  display: flex;
  justify-content: space-between;
}

.gift__time {
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-medium);
  color: var(--gift-ink);
  font-variant-numeric: tabular-nums;
}

/* Эквалайзер */
.gift__equalizer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  height: 26px;
  margin-top: 24px;
}

.gift__equalizer span {
  display: block;
  /* Базис 0 + max-width: полоски занимают те же 6px, но не создают
     min-content (32 × 6px + gap), который распирает колонку грида
     и обрезает контент краем карточки на узких экранах. */
  flex: 1 1 0;
  min-width: 0;
  max-width: 6px;
  background: var(--gift-accent-gradient);
  border-radius: 3px;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.gift__equalizer span:nth-child(1) { height: 40%; }
.gift__equalizer span:nth-child(2) { height: 70%; }
.gift__equalizer span:nth-child(3) { height: 100%; }
.gift__equalizer span:nth-child(4) { height: 55%; }
.gift__equalizer span:nth-child(5) { height: 85%; }
.gift__equalizer span:nth-child(6) { height: 45%; }
.gift__equalizer span:nth-child(7) { height: 75%; }
.gift__equalizer span:nth-child(8) { height: 35%; }
.gift__equalizer span:nth-child(9) { height: 60%; }
.gift__equalizer span:nth-child(10) { height: 90%; }
.gift__equalizer span:nth-child(11) { height: 50%; }
.gift__equalizer span:nth-child(12) { height: 80%; }
.gift__equalizer span:nth-child(13) { height: 38%; }
.gift__equalizer span:nth-child(14) { height: 68%; }
.gift__equalizer span:nth-child(15) { height: 95%; }
.gift__equalizer span:nth-child(16) { height: 58%; }
.gift__equalizer span:nth-child(17) { height: 42%; }
.gift__equalizer span:nth-child(18) { height: 72%; }
.gift__equalizer span:nth-child(19) { height: 48%; }
.gift__equalizer span:nth-child(20) { height: 88%; }
.gift__equalizer span:nth-child(21) { height: 36%; }
.gift__equalizer span:nth-child(22) { height: 78%; }
.gift__equalizer span:nth-child(23) { height: 98%; }
.gift__equalizer span:nth-child(24) { height: 52%; }
.gift__equalizer span:nth-child(25) { height: 65%; }
.gift__equalizer span:nth-child(26) { height: 44%; }
.gift__equalizer span:nth-child(27) { height: 84%; }
.gift__equalizer span:nth-child(28) { height: 56%; }
.gift__equalizer span:nth-child(29) { height: 74%; }
.gift__equalizer span:nth-child(30) { height: 46%; }
.gift__equalizer span:nth-child(31) { height: 92%; }
.gift__equalizer span:nth-child(32) { height: 62%; }

.gift__player.is-playing .gift__equalizer span {
  opacity: 1;
  animation: eq 1s ease-in-out infinite;
}

.gift__player.is-playing .gift__equalizer span:nth-child(1) { animation-delay: 0s; }
.gift__player.is-playing .gift__equalizer span:nth-child(2) { animation-delay: 0.1s; }
.gift__player.is-playing .gift__equalizer span:nth-child(3) { animation-delay: 0.2s; }
.gift__player.is-playing .gift__equalizer span:nth-child(4) { animation-delay: 0.3s; }
.gift__player.is-playing .gift__equalizer span:nth-child(5) { animation-delay: 0.4s; }
.gift__player.is-playing .gift__equalizer span:nth-child(6) { animation-delay: 0.5s; }
.gift__player.is-playing .gift__equalizer span:nth-child(7) { animation-delay: 0.6s; }
.gift__player.is-playing .gift__equalizer span:nth-child(8) { animation-delay: 0.7s; }
.gift__player.is-playing .gift__equalizer span:nth-child(9) { animation-delay: 0s; }
.gift__player.is-playing .gift__equalizer span:nth-child(10) { animation-delay: 0.1s; }
.gift__player.is-playing .gift__equalizer span:nth-child(11) { animation-delay: 0.2s; }
.gift__player.is-playing .gift__equalizer span:nth-child(12) { animation-delay: 0.3s; }
.gift__player.is-playing .gift__equalizer span:nth-child(13) { animation-delay: 0.4s; }
.gift__player.is-playing .gift__equalizer span:nth-child(14) { animation-delay: 0.5s; }
.gift__player.is-playing .gift__equalizer span:nth-child(15) { animation-delay: 0.6s; }
.gift__player.is-playing .gift__equalizer span:nth-child(16) { animation-delay: 0.7s; }
.gift__player.is-playing .gift__equalizer span:nth-child(17) { animation-delay: 0s; }
.gift__player.is-playing .gift__equalizer span:nth-child(18) { animation-delay: 0.1s; }
.gift__player.is-playing .gift__equalizer span:nth-child(19) { animation-delay: 0.2s; }
.gift__player.is-playing .gift__equalizer span:nth-child(20) { animation-delay: 0.3s; }
.gift__player.is-playing .gift__equalizer span:nth-child(21) { animation-delay: 0.4s; }
.gift__player.is-playing .gift__equalizer span:nth-child(22) { animation-delay: 0.5s; }
.gift__player.is-playing .gift__equalizer span:nth-child(23) { animation-delay: 0.6s; }
.gift__player.is-playing .gift__equalizer span:nth-child(24) { animation-delay: 0.7s; }
.gift__player.is-playing .gift__equalizer span:nth-child(25) { animation-delay: 0s; }
.gift__player.is-playing .gift__equalizer span:nth-child(26) { animation-delay: 0.1s; }
.gift__player.is-playing .gift__equalizer span:nth-child(27) { animation-delay: 0.2s; }
.gift__player.is-playing .gift__equalizer span:nth-child(28) { animation-delay: 0.3s; }
.gift__player.is-playing .gift__equalizer span:nth-child(29) { animation-delay: 0.4s; }
.gift__player.is-playing .gift__equalizer span:nth-child(30) { animation-delay: 0.5s; }
.gift__player.is-playing .gift__equalizer span:nth-child(31) { animation-delay: 0.6s; }
.gift__player.is-playing .gift__equalizer span:nth-child(32) { animation-delay: 0.7s; }

/* Анимация эквалайзера */
@keyframes eq {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.4); }
}

/* ── Художники, которые рисуют сказки ───── */
.artists {
  padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  background-color: var(--color-bg);
}

.artists__container {
  max-width: 1440px;
  margin: 0 auto;
}

.artists__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 56px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-align: center;
  margin-bottom: 64px;
}

.artists__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.artists__card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(20, 20, 20, 0.08);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease;
}

.artists__card:hover {
  transform: translateY(-12px);
  box-shadow: 0 22px 44px rgba(20, 20, 20, 0.16);
}

.artists__card:focus-visible {
  outline: 3px solid var(--color-brown);
  outline-offset: 3px;
}

.artists__photo {
  width: 100%;
  aspect-ratio: 3 / 3.4;
  overflow: hidden;
  background: #fff;
}

.artists__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.artists__card:hover .artists__img {
  transform: scale(1.05);
}

.artists__info {
  padding: 28px 24px 32px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.artists__name {
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-semibold);
  line-height: 1.25;
  margin-bottom: 6px;
}

.artists__role {
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-brown);
  margin-bottom: 16px;
}

.artists__text {
  /* Содержательное описание в крупной карточке: роль lead/600. */
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-semibold);
  line-height: 1.6;
  color: rgba(35, 30, 19, 0.88);
}

/* Ниже 1025px (≤1024px): карточки художников выстраиваются друг под друга (1 колонка) */
@media (max-width: 1024px) {
  .artists {
    padding: 72px 0 88px;
  }

  .artists__title {
    font-size: 42px;
    margin-bottom: 40px;
  }

  .artists__grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 460px;
    margin: 0 auto;
  }

  .artists__photo {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 480px) {
  .artists__title {
    font-size: 34px;
  }
}

/* ── Появление при загрузке ─────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__content {
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.hero__visual {
  grid-area: visual;
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.author__photo,
.author__content {
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.author__content {
  animation-delay: 0.35s;
}

/* ── Постепенное появление при скролле ───── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Уважаем настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  .hero__content,
  .hero__visual,
  .author__photo,
  .author__content {
    opacity: 1;
    animation: none;
  }

  .author__book {
    transition: none;
  }

  .author__books:hover .author__book--left {
    transform: rotate(-8deg);
  }

  .author__books:hover .author__book--center {
    transform: translateY(-16px);
  }

  .author__books:hover .author__book--right {
    transform: rotate(8deg);
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Адаптив ────────────────────────────── */
@media (max-width: 1440px) {
  .hero__text {
    font-size: var(--ds-font-size-lead);
  }

  .book-type__title {
    font-size: 52px;
  }

  .book-type__text p {
    font-size: var(--ds-font-size-lead);
  }
}@media (max-width: 768px) {
  .topbar {
    padding: 8px 24px;
  }

  /* В адаптиве в топбаре остаётся только информация о доставке —
     ссылки разделов переехали в бургерное меню шапки. */
  .topbar__right {
    display: none;
  }

  .topbar__container {
    justify-content: center;
  }

  .topbar__info {
    text-align: center;
  }

  .hero {
    height: auto;
    padding: 40px 24px var(--ds-section-space-bottom);
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__badges {
    margin-bottom: 48px;
  }

  .hero__text {
    font-size: var(--ds-font-size-lead);
    margin-bottom: 48px;
  }

  .author {
    padding: var(--ds-section-space-top) var(--ds-page-gutter, 24px) var(--ds-section-space-bottom);
  }

  .author__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    height: auto;
    min-height: auto;
  }

  .author__photo {
    width: 100%;
    max-width: 440px;
    height: clamp(320px, 52vh, 460px);
    margin: 0 auto;
    border-radius: var(--ds-radius-image, 12px);
  }

  .author__content {
    height: auto;
    padding-block: 0;
    align-items: center;
    text-align: center;
  }

  .author__books {
    margin-bottom: 32px;
    padding-block: 16px 8px;
  }

  .author__book {
    width: clamp(105px, 24vw, 130px);
  }

  .author__book--left {
    margin-right: -30px;
    transform: rotate(-8deg);
  }

  .author__book--center {
    transform: translateY(-12px);
  }

  .author__book--right {
    margin-left: -30px;
    transform: rotate(8deg);
  }

  .author__quote {
    margin-bottom: 32px;
    text-align: center;
  }

  .author__quote-mark {
    margin-inline: auto;
    text-align: center;
  }

  .author__text {
    font-size: var(--ds-font-size-md);
    margin-bottom: 18px;
    margin-inline: auto;
    text-align: center;
  }

  .author__button {
    align-self: center;
    margin: 0 auto;
    padding: 14px 28px;
    font-size: var(--ds-font-size-md);
    white-space: nowrap;
    max-width: 100%;
    text-align: center;
  }

  .new-books {
    height: auto;
    padding: 64px 24px 80px;
  }

  .new-books__title {
    font-size: 42px;
    margin-bottom: 32px;
  }

  /* Фиксированная высота картинки убрана — пропорции 3/4
     считаются от реальной ширины карточки на любом вьюпорте. */
  .book-type {
    position: static;
    min-height: 0;
    padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  }

  .book-type__title {
    font-size: 44px;
    text-align: center;
  }

  .book-type__text {
    margin: 0 auto 40px;
    text-align: center;
  }

  .book-type__button {
    display: block;
    margin: 0 auto;
  }

}

@media (max-width: 480px) {
  .header__dropdown--catalog {
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: min(70vh, 540px);
    padding: 12px;
  }

  .header__dropdown--catalog .header__dropdown-group {
    padding: 3px 5px;
  }

  .header__dropdown--catalog .header__dropdown-group + .header__dropdown-group {
    border-top: 1px solid rgba(114, 64, 30, .14);
    border-left: 0;
  }

  .header__dropdown--catalog .header__catalog-promo {
    grid-column: auto;
  }
}

/* Доуплотнение на больших телефонах (именованный тир 640px):
   плашки-бейджи героя переносят текст внутри пилюли. */
@media (max-width: 640px) {
  .badge {
    white-space: normal;
  }

  /* Заголовок подарочной секции: 32px не помещается в узкую колонку
     с учётом внутренних паддингов грида (мин-слово «аудиосказку»). */
  .gift__title {
    font-size: 28px;
  }

  /* Eyebrow из inline-flex пишет всю строку в одну линию — на узкой
     колонке переключаем на блок с обычным переносом слов. */
  .gift__eyebrow {
    display: block;
  }

  .bestsellers__header {
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header__dropdown--catalog,
  .header__catalog-promo a,
  .about__reviews-track {
    transition: none;
  }
}

/* ── Адаптив: секция подарка ────────────── */

/* Компактный десктоп (≤1199px): уменьшаем боковые отступы контейнера и сетки,
   чтобы плеер справа и текстовая колонка слева сохраняли комфортную ширину. */
@media (max-width: 1199px) {
  .gift__container {
    padding-left: 32px;
    padding-right: 32px;
  }

  .gift__grid {
    gap: 40px;
    padding: 48px 32px;
  }
}

/* Планшет (768–1024px): плеер уходит на вторую строку под текстом
   и формой — обе колонки растягиваются на всю ширину секции,
   а декор не обрезается по краю контейнера. */
@media (min-width: 768.02px) and (max-width: 1024px) {
  .gift__deco {
    overflow: visible;
  }

  .gift__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 24px;
  }

  .gift__player {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .gift {
    padding: 72px 24px 88px;
  }

  /* Обёртка не добавляет своих боковых отступов на мобильных:
     горизонтальный ритм задаёт внутренний контентный контейнер (12px).
     Так же, как на лендингах (.landing-index .gift .gift__container). */
  .gift__container {
    padding-left: 0;
    padding-right: 0;
  }

  .gift__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    /* Боковые паддинги внутреннего контентного контейнера — 12px */
    padding: 40px 12px;
  }

  /* Оранжевая обводка-дивайдер на мобильных не нужна */
  .gift__grid::after {
    content: none;
  }

  .gift__title {
    font-size: 32px;
  }

  .gift__field {
    flex-direction: column;
  }

  .gift__submit {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .gift__grid {
    /* Боковые паддинги остаются 12px и на узких экранах */
    padding: 32px 12px;
  }

  .gift__title {
    font-size: 28px;
  }

  .gift__player {
    padding: 22px 18px;
  }

  .gift__player-controls {
    gap: 14px;
  }

  .gift__player-play {
    width: 48px;
    height: 48px;
  }
}

/* ── Преимущества ───────────────────────── */
.features {
  padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  background-color: var(--color-bg);
}

.features__container {
  max-width: 1440px;
  margin: 0 auto;
}

.features__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 52px;
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: 920px;
  margin: 0 auto 72px;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-space-8, 32px);
}

.features__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px 32px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(20, 20, 20, 0.08);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease;
}

/* «Корешок» книжки слева */
.features__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background-color: var(--primary);
}

.features__item:hover {
  transform: translateY(-10px);
  box-shadow: 0 22px 44px rgba(20, 20, 20, 0.16);
}

/* Рукописная иконка над заголовком пункта */
.features__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brown);
  margin-bottom: 20px;
  line-height: 0;
}

.features__name {
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-semibold);
  line-height: 1.25;
  margin-bottom: 12px;
}

.features__text {
  font-size: var(--ds-font-size-title);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.6;
  color: rgba(35, 30, 19, 0.78);
}

/* Ниже 1280px (≤1279px): 2 карточки в ряд, 2 ряда — вместо тесных 4 колонок. */
@media (max-width: 1279px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .features {
    padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  }

  .features__title {
    font-size: 38px;
    margin-bottom: 48px;
  }

  .features__grid {
    gap: 36px;
  }
}

@media (max-width: 480px) {
  .features__title {
    font-size: 32px;
  }
}

/* ── Об авторе (после аудиоплеера) ───────── */
.about {
  padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  background-color: var(--color-bg);
}

.about__container {
  max-width: 1440px;
  margin: 0 auto;
}

.about__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: stretch;
}

/* Левая карточка */
.about__card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(20, 20, 20, 0.1);
}

.about__photo {
  overflow: hidden;
  background: #fff;
}

.about__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.about__body {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.about__head {
  margin-bottom: 24px;
}

.about__name {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}

.about__role {
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brown);
}

.about__text {
  /* Читальная колонка у заголовка секции «Об авторе»: md → lead (2026-08-23). */
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.7;
  color: rgba(35, 30, 19, 0.85);
  margin-bottom: 28px;
}

/* Буквица «Л» на 2 строки */
.about__drop {
  float: left;
  font-family: var(--font-heading);
  font-size: 64px;
  line-height: 0.82;
  padding: 6px 12px 0 0;
  color: var(--color-brown);
}

/* Статистика: линия-дивайдер на всю ширину карточки (содержимое осталось по центру) */
.about__stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 24px 0;
  margin-bottom: 28px;
  align-self: stretch;
  border-top: 1px solid rgba(35, 30, 19, 0.12);
  border-bottom: 1px solid rgba(35, 30, 19, 0.12);
}

.about__stat {
  display: flex;
  flex-direction: column;
}

.about__stat-num {
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1;
  color: var(--color-brown);
}

.about__stat-label {
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(35, 30, 19, 0.6);
  margin-top: 6px;
}

/* Кнопка «Подробнее об авторе» — на всю ширину карточки, по краям дивайдера статистики */
.about__button {
  align-self: stretch;
}

/* Правая колонка: отзывы (автоматический вертикальный карусельный переключатель по 2) */
.about__reviews {
  position: relative;
  overflow: hidden;
}

.about__reviews-track {
  --pages: 3;
  --index: 0;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(var(--pages) * 100%);
  display: flex;
  flex-direction: column;
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
  transform: translateY(calc(var(--index) * -100% / var(--pages)));
}

.about__review-page {
  flex: 0 0 calc(100% / var(--pages));
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 24px;
  min-height: 0;
}

.about__review {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 36px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 16px;
}

.about__quote {
  font-family: var(--font-heading);
  font-size: 64px;
  line-height: 0.5;
  color: var(--primary);
  margin-bottom: 18px;
}

.about__review-text {
  /* Текст отзыва в крупной карточке: роль lead/600, курсив — цитатная подача. */
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-semibold);
  font-style: italic;
  line-height: 1.65;
  color: rgba(35, 30, 19, 0.88);
  margin-bottom: 18px;
}

.about__review-author {
  font-size: var(--ds-font-size-title);
  font-weight: var(--ds-font-weight-semibold);
  color: var(--color-brown);
}

/* Ниже 1280px (≤1279px): карточка автора — на всю ширину секции,
   блок отзывов переходит на вторую строку со слайдером
   (перестроение с 1279px вместо 1024px). */
@media (max-width: 1279px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about__card {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .about__body {
    padding-inline: 28px;
  }
}

@media (max-width: 768px) {
  .about {
    padding: 88px 24px 80px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about__card {
    grid-template-columns: 1fr;
  }

  .about__photo {
    aspect-ratio: 4 / 3;
  }

  .about__stats {
    flex-wrap: wrap;
    gap: 20px 32px;
  }
}

@media (max-width: 480px) {
  .about__body {
    padding: 28px 24px;
  }

  .about__name {
    font-size: 28px;
  }

  .about__stats {
    gap: 28px;
  }
}

/* ── Новости ─────────────────────────────── */
.news {
  padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  background-color: var(--color-bg);
  overflow-x: clip;
}

.news__container {
  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
}

.news__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 56px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 56px;
}

.news__viewport {
  position: relative;
  width: 100%;
}

.news__track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 12px 0 24px;
  text-align: left;
  /* Технический скроллбар запрещён — см. AGENTS.md */
  scrollbar-width: none;
}

.news__track::-webkit-scrollbar {
  display: none;
}

/* Карточки в слайдере: на десктопе 3 карточки в ряд */
.news__track .post-card {
  flex: 0 0 calc((100% - 64px) / 3);
  min-width: 0;
  scroll-snap-align: start;
}

.post-card,
.post-card--linked {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--ds-shadow-card);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover,
.post-card--linked:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(65, 45, 24, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  .post-card,
  .post-card--linked {
    transition: none;
  }
  .post-card:hover,
  .post-card--linked:hover {
    transform: none;
  }
}

.post-card a::after,
.post-card--linked a::after {
  position: absolute;
  inset: 0;
  content: "";
  z-index: 1;
}

.post-card a:focus-visible::after,
.post-card--linked a:focus-visible::after {
  outline: 3px solid var(--color-brown);
  outline-offset: -3px;
}

.post-card:hover a,
.post-card--linked:hover a {
  color: var(--color-brown-dark, #5c3012);
}

.post-card__image {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: none;
  box-sizing: border-box;
}

.post-card p,
.post-card__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ограничение: в слайдере новостей отображаются не более 8 последних материалов */
.news__track > .post-card:nth-child(n+9) {
  display: none !important;
}

/* Стрелки навигации карусели (.js-carousel) */
.news__arrow {
  position: absolute;
  top: 160px;
  transform: translateY(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--color-text);
  background-color: rgba(247, 240, 228, 0.94);
  color: var(--color-text);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(35, 30, 19, 0.12);
  transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.news__arrow--prev { left: -24px; }
.news__arrow--next { right: -24px; }

.news__arrow:hover {
  background-color: var(--color-text);
  color: #fff;
}

.news__arrow:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

/* Заглушки изображений новостных карточек */
.post-card__image--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 280px;
  background: linear-gradient(145deg, #f7efe1 0%, #ebe0cc 100%);
  color: var(--color-brown);
  border-bottom: 1px solid rgba(164, 148, 119, 0.15);
  box-sizing: border-box;
  user-select: none;
  border-radius: 14px 14px 0 0;
  margin: 0;
  padding: 0;
}

.post-card__image--placeholder svg {
  width: 44px;
  height: 44px;
  opacity: 0.55;
}

.post-card__image--placeholder span {
  font-family: var(--font-heading);
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

/* Точки пагинации карусели (.js-carousel) */
.news__controls {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.news__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.news__controls:empty,
.news__controls:has(.news__dots:empty),
.news__controls:has(.news__dots > :only-child) {
  display: none;
}

/* Сетка для статических блоков блога (например, blog-article.html) */
.news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: left;
}

.news__button {
  margin-top: 56px;
}

@media (max-width: 1024px) {
  .news__track {
    gap: 24px;
    padding: 8px 0 20px;
  }

  /* На планшетах (≤1024px) — 2 целые карточки в ряд */
  .news__track .post-card {
    flex: 0 0 calc((100% - 24px) / 2);
  }

  .news__arrow {
    top: 160px;
  }

  .news__arrow--prev { left: -16px; }
  .news__arrow--next { right: -16px; }

  .news__grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .news {
    padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  }

  .news__title {
    font-size: 42px;
    margin-bottom: 40px;
  }

  .news__arrow {
    width: 42px;
    height: 42px;
    top: 160px;
  }

  .news__arrow--prev { left: -10px; }
  .news__arrow--next { right: -10px; }

  .news__grid,
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 480px;
    margin-inline: auto;
  }

  .news__button {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .news__title {
    font-size: 34px;
  }

  /* На мобильных (≤480px) — 1 карточка во всю ширину */
  .news__track .post-card {
    flex: 0 0 100%;
  }

  .news__track .post-card__image,
  .post-card__image,
  .post-card__image--placeholder {
    height: 220px;
  }

  .news__arrow {
    top: 120px;
  }

  .news__arrow--prev { left: 4px; }
  .news__arrow--next { right: 4px; }
}

/* ── Форма для оптовиков и учреждений ──────── */
.wholesale {
  --wholesale-light: #f7efde;
  position: relative;
  overflow: hidden;
  padding: var(--ds-section-space-top) var(--ds-page-gutter) var(--ds-section-space-bottom);
  color: var(--ds-color-text-inverse);
  background-color: var(--color-deep);
  background-image:
    radial-gradient(120% 80% at 18% 12%, rgba(198, 1, 0, 0.16), transparent 55%),
    radial-gradient(120% 80% at 84% 88%, rgba(114, 64, 30, 0.50), transparent 60%),
    linear-gradient(180deg, var(--color-dark) 0%, var(--color-deep) 70%);
  border-radius: 32px;
}

/* Декоративный фон */
.wholesale__deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Текстура-паттерн удалена — секция остаётся чистой */
.wholesale__deco::before {
  content: none;
}

/* Световые вензеля по углам */
.wholesale__sparkle {
  position: absolute;
  opacity: 0.9;
  filter: drop-shadow(0 0 12px rgba(247, 239, 222, 0.45));
}

.wholesale__deco svg [stroke] {
  stroke: var(--wholesale-light);
}

.wholesale__deco svg [fill]:not([fill="none"]) {
  fill: var(--wholesale-light);
}
.wholesale__sparkle--tl {
  top: 5%;
  left: 3%;
  animation: stories-float 9s ease-in-out infinite;
}
.wholesale__sparkle--br {
  bottom: 5%;
  right: 3%;
  animation: stories-float 11s ease-in-out infinite reverse;
}

/* Мерцающие огоньки */
.wholesale__dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wholesale-light);
  box-shadow: 0 0 8px 2px rgba(247, 239, 222, 0.7);
  animation: stories-twinkle 5s ease-in-out infinite;
}
.wholesale__dot--1 { top: 26%; left: 46%; animation-delay: 0.4s; }
.wholesale__dot--2 { top: 64%; left: 22%; animation-delay: 1.1s; }
.wholesale__dot--3 { top: 16%; left: 58%; animation-delay: 1.8s; }
.wholesale__dot--4 { top: 72%; left: 64%; animation-delay: 2.4s; }

.wholesale__container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.wholesale__intro {
  color: #efe3cf;
}

.wholesale__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--wholesale-light);
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-medium);
  margin-bottom: 24px;
}

.wholesale__title {
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 56px;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: #f7efde;
  margin-bottom: 20px;
}

.wholesale__subtitle {
  max-width: 480px;
  font-size: var(--ds-font-size-lead);
  line-height: 1.45;
  font-weight: var(--ds-font-weight-semibold);
  color: #efe3cf;
  opacity: 0.85;
}

.wholesale__link-wrap {
  margin-top: 24px;
}

.wholesale__detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--wholesale-light);
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-semibold);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(255, 235, 210, 0.4);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.wholesale__detail-link:hover {
  color: #ffaa5a;
  border-bottom-color: #ffaa5a;
  transform: translateX(3px);
}

.wholesale__detail-link:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 3px;
  border-radius: 2px;
}

.wholesale__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.wholesale__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.wholesale__field-label {
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-medium);
  color: #efe3cf;
  opacity: 0.85;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
}

.wholesale__required {
  color: var(--color-orange);
  margin-left: 3px;
  font-weight: var(--ds-font-weight-bold);
}

.wholesale__input {
  font-family: var(--font-body);
  font-size: var(--ds-font-size-md);
  color: var(--wholesale-light);
  background-color: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(247, 239, 222, 0.45);
  border-radius: 0;
  padding: 10px 2px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
  min-height: 44px;
}

.wholesale__input::placeholder {
  color: rgba(247, 239, 222, 0.52);
}

.wholesale__input:focus {
  outline: none;
  border-bottom-color: var(--color-orange);
  box-shadow: 0 1px 0 0 var(--color-orange);
}

/* Состояние ошибки — в тёплой гамме компонента, без красного (feedback 2026-09-06) */
.wholesale__field--error .wholesale__input {
  border-bottom-color: var(--color-orange);
  box-shadow: 0 1px 0 0 var(--color-orange);
}

.wholesale__error {
  display: none;
  font-size: var(--ds-font-size-sm);
  color: #ffaa5a;
  line-height: 1.35;
  margin-top: 3px;
}

.wholesale__field--error .wholesale__error {
  display: block;
}

.wholesale__textarea {
  resize: vertical;
  min-height: 60px;
  font-family: var(--font-body);
  line-height: 1.45;
}

/* Чекбокс согласия */
.wholesale__field--checkbox {
  gap: 4px;
  margin-top: 2px;
}

.wholesale__consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  color: rgba(239, 227, 207, 0.85);
  font-size: var(--ds-font-size-sm);
  line-height: 1.45;
  user-select: none;
}

.wholesale__checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1.5px solid rgba(247, 239, 222, 0.5);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.wholesale__checkbox:checked {
  background-color: var(--color-orange);
  border-color: var(--color-orange);
}

.wholesale__checkbox:checked::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.wholesale__checkbox:focus-visible {
  outline: 2px solid var(--wholesale-light);
  outline-offset: 2px;
}

.wholesale__field--error .wholesale__checkbox {
  border-color: var(--color-orange);
}

/* Кнопка отправки */
.wholesale__submit {
  align-self: flex-start;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: var(--ds-font-weight-bold);
  padding: 18px 38px;
  min-height: 52px;
  border: none;
  border-radius: 8px;
  color: #fff;
  background: var(--gradient-cta);
  transition: background 0.25s ease, transform 0.15s ease, opacity 0.25s ease;
}

.wholesale__submit::before {
  content: none;
}

.wholesale .wholesale__submit:hover {
  background: var(--gradient-cta-hover);
  color: #fff;
}

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

.wholesale__submit:focus-visible {
  outline: 2px solid var(--wholesale-light);
  outline-offset: 3px;
}

.wholesale__submit--loading {
  opacity: 0.8;
  cursor: wait;
}

.wholesale__status {
  margin: 0;
  min-height: 1.4em;
  font-size: var(--ds-font-size-md);
  color: var(--color-orange);
  line-height: 1.4;
}

.wholesale__status--error {
  color: #ffaa5a;
}

/* Карточка успешной отправки */
.wholesale__success {
  padding: 36px 30px;
  background: rgba(247, 239, 222, 0.07);
  border: 1px solid rgba(247, 239, 222, 0.2);
  border-radius: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: wholesale-fade 0.3s ease-out;
}

@keyframes wholesale-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.wholesale__success-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(198, 1, 0, 0.25);
  border: 1px solid rgba(255, 84, 0, 0.4);
  color: #ffa220;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.wholesale__success-title {
  font-family: var(--font-heading);
  font-size: var(--ds-font-size-h3);
  font-weight: var(--ds-font-weight-medium);
  color: var(--wholesale-light);
  margin: 0;
  letter-spacing: 0.01em;
}

.wholesale__success-desc {
  font-size: var(--ds-font-size-md);
  line-height: 1.5;
  color: #efe3cf;
  max-width: 480px;
  margin: 0;
}

.wholesale__success-note {
  font-size: var(--ds-font-size-sm);
  color: rgba(239, 227, 207, 0.65);
  margin: 0;
}

.wholesale__reset-btn {
  margin-top: 8px;
}

/* ── Адаптив: перестройка с 1024px и ниже ────────── */
@media (max-width: 1024px) {
  .wholesale {
    padding-top: var(--ds-section-space-top);
    padding-bottom: var(--ds-section-space-bottom);
  }

  .wholesale__container {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 680px;
  }

  .wholesale__intro {
    padding-inline: 0;
  }

  .wholesale__title {
    font-size: clamp(38px, 4.5vw, 48px);
    margin-bottom: 16px;
  }

  .wholesale__subtitle {
    max-width: 100%;
  }

  .wholesale__form {
    padding: 0;
    width: 100%;
  }

  .wholesale__deco {
    overflow: hidden;
  }

  .wholesale__sparkle,
  .wholesale__dot {
    transform: scale(0.45);
    transform-origin: center;
    opacity: 0.55;
  }

  .wholesale__sparkle--tl {
    top: 2%;
    left: 1%;
  }

  .wholesale__sparkle--br {
    bottom: 2%;
    right: 1%;
  }
}

@media (max-width: 768px) {
  .wholesale {
    border-radius: 24px;
  }

  .wholesale__container {
    gap: 32px;
  }

  .wholesale__title {
    font-size: clamp(32px, 5.5vw, 38px);
    margin-bottom: 14px;
  }

  .wholesale__subtitle {
    font-size: var(--ds-font-size-md);
  }

  .wholesale__link-wrap {
    margin-top: 16px;
  }

  .wholesale__sparkle,
  .wholesale__dot {
    transform: scale(0.35);
    opacity: 0.45;
  }

  .wholesale__sparkle--tl {
    top: 1%;
    left: 0;
  }

  .wholesale__sparkle--br {
    bottom: 1%;
    right: 0;
  }
}

@media (max-width: 480px) {
  .wholesale {
    border-radius: 20px;
  }

  .wholesale__container {
    gap: 24px;
  }

  .wholesale__label {
    margin-bottom: 14px;
    font-size: var(--ds-font-size-sm);
  }

  .wholesale__title {
    font-size: 28px;
    line-height: 1.1;
  }

  .wholesale__subtitle {
    font-size: var(--ds-font-size-sm);
    line-height: 1.45;
  }

  .wholesale__form {
    gap: 16px;
  }

  .wholesale__submit {
    width: 100%;
    padding: 16px 20px;
    font-size: 17px;
    text-align: center;
    justify-content: center;
  }

  .wholesale__sparkle {
    display: none;
  }

  .wholesale__dot {
    transform: scale(0.3);
    opacity: 0.3;
  }

  .wholesale__success {
    padding: 28px 18px;
  }
}

/* ── Футер ───────────────────────────────── */
.footer {
  background-color: var(--color-bg);
  color: var(--color-text);
  padding: 80px var(--ds-page-gutter, 60px) 40px;
}

.footer__container {
  max-width: 1440px;
  margin: 0 auto;
}

.footer__cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(35, 30, 19, 0.16);
}

/* Колонка о бренде */
.footer__logo {
  display: inline-block;
  margin-bottom: 20px;
}

.footer__logo-img {
  display: block;
  height: 120px;
  width: auto;
  /* Футер светлый (кремовая подложка) — логотип брендовый, как в шапке,
     без фильтров. Цвет при наведении не меняется — только масштаб. */
  transition: transform 0.2s ease;
}

.footer__logo:hover .footer__logo-img {
  transform: scale(1.05);
}

.footer__brand {
  /* Текстовый заголовок «Добрые сказки» под логотипом скрыт — логотип сам по себе знак.
     display:none, чтобы легко вернуть при необходимости. */
  display: none;
  font-family: var(--font-heading);
  font-weight: var(--ds-font-weight-medium);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--color-text);
  margin-bottom: 18px;
}

.footer__about {
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.7;
  color: rgba(35, 30, 19, 0.66);
  max-width: 320px;
  margin-bottom: 28px;
}

.footer__socials {
  display: flex;
  gap: 12px;
}

.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(35, 30, 19, 0.24);
  border-radius: 12px;
  background-color: transparent;
  color: var(--color-text);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.footer__social:hover {
  background-color: rgba(35, 30, 19, 0.05);
  border-color: var(--color-brown);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(35, 30, 19, 0.08);
}

.footer__social-img {
  display: block;
  object-fit: contain;
}

.footer__social-img--vk {
  width: 24px;
  height: auto;
}

.footer__social-img--max {
  width: 22px;
  height: 22px;
}

/* Списки ссылок */
.footer__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__link {
  display: inline-block;
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.45;
  color: var(--color-text);
  text-decoration: none;
  padding-block: 2px;
  overflow-wrap: break-word;
  transition: color 0.2s ease;
}

.footer__link:hover {
  color: var(--color-brown);
}

.footer__link--disabled {
  opacity: 0.65;
  cursor: default;
}

.footer__phone {
  display: inline-block;
  margin-top: 20px;
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-semibold);
  line-height: 1.3;
  color: var(--color-text);
  text-decoration: none;
  padding-block: 2px;
  transition: color 0.2s ease;
}

.footer__phone:hover {
  color: var(--color-brown);
}

/* Маркетплейсы */
.footer__markets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(35, 30, 19, 0.16);
}

.footer__markets-title {
  font-size: var(--ds-font-size-lead);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.5;
  color: rgba(35, 30, 19, 0.66);
}

.footer__markets-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.footer__market {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background-color: transparent;
  border: 1px solid rgba(35, 30, 19, 0.22);
  border-radius: 8px;
  min-height: 42px;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.footer__market:hover {
  background-color: rgba(35, 30, 19, 0.05);
  border-color: var(--color-brown);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(35, 30, 19, 0.08);
}

.footer__market-img {
  display: block;
  width: auto;
  object-fit: contain;
}

.footer__market-img--wb {
  height: 18px;
}

.footer__market-img--ozon {
  height: 20px;
}

.footer__market-img--ym {
  height: 18px;
}

/* Нижняя строка */
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 28px;
}

.footer__copy {
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1.5;
  color: rgba(35, 30, 19, 0.62);
}

.footer__copy-brand {
  white-space: nowrap;
}

.footer__copy-company {
  white-space: nowrap;
}

.footer__copy-sep {
  margin: 0 4px;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

/* Доступность и фокус-состояния элементов футера */
.footer__link:focus-visible,
.footer__phone:focus-visible,
.footer__market:focus-visible,
.footer__social:focus-visible,
.footer__logo:focus-visible {
  outline: 2px solid var(--ds-color-accent, #ff5400);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Одиночные изображения главной (≤480): вся ширина, высота 450 */
@media (max-width: 480px) {

  .about__photo {
    width: 100%;
    height: 450px;
    min-width: 0;
  }

  .author__photo {
    height: clamp(300px, 48vh, 420px);
  }

  .author__button {
    width: auto;
    max-width: 100%;
    padding: 12px 20px;
    font-size: var(--ds-font-size-sm);
    white-space: nowrap;
  }

  .about__card {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Адаптив футера и формы */
@media (max-width: 1024px) {
  .footer {
    padding: 64px var(--ds-page-gutter, 24px) 36px;
  }

  /* С 1024px и ниже вся навигация футера одноколоночная:
     колонки одна под другой, по центру */
  .footer__cols {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__about {
    margin-inline: auto;
    text-align: center;
  }

  .footer__socials {
    justify-content: center;
  }

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

@media (max-width: 768px) {
  .footer {
    padding: 56px var(--ds-page-gutter, 24px) 32px;
  }

  .footer__cols {
    gap: 36px 24px;
  }

  .footer__markets {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 22px 0;
  }

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

  .footer__markets-list {
    justify-content: center;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .footer__copy {
    text-align: center;
    justify-content: center;
  }

  .footer__legal {
    justify-content: center;
    text-align: center;
  }

  .wholesale {
    padding: var(--ds-section-space-top) 24px var(--ds-section-space-bottom);
  }

  .wholesale__container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .wholesale__title {
    font-size: 40px;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 44px var(--ds-page-gutter, 16px) 24px;
    text-align: center;
  }

  .footer__cols {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .footer__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__logo-img {
    height: 96px;
  }

  .footer__list {
    align-items: center;
    text-align: center;
    padding: 0;
  }

  .footer__col:last-child {
    grid-column: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__col:last-child .footer__phone {
    margin-top: 20px;
    margin-inline: auto;
    text-align: center;
  }

  .footer__legal {
    gap: 16px;
    justify-content: center;
    text-align: center;
  }

  .footer__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
  }

  .footer__copy-sep {
    display: none;
  }

  .footer__markets {
    padding: 20px 0;
    gap: 12px;
    align-items: center;
    text-align: center;
  }

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

  .footer__markets-list {
    gap: 10px 12px;
    justify-content: center;
  }

  .footer__market {
    padding: 6px 12px;
    min-height: 38px;
  }

  .footer__market-img--wb {
    height: 16px;
  }

  .footer__market-img--ozon {
    height: 17px;
  }

  .footer__market-img--ym {
    height: 16px;
  }

  .wholesale__title {
    font-size: 34px;
  }
}

/* Планшет (481–768px): компактная шапка «как на десктопе» — инлайн-навигация
   без бургера, логотип по центру, иконки справа. По высоте уже десктопной.
   Логотип при скролле ведёт себя как на десктопе: плавно скрывается. */
@media (min-width: 481px) and (max-width: 768px) {
  .header {
    padding: 0;
    height: 60px;
  }

  .home-atmosphere .header {
    height: 60px;
    padding: 8px;
    border-radius: 18px;
  }

  .home-atmosphere .header .header__container {
    border-radius: 10px;
    border-width: 2px;
    padding: 0 20px;
  }

  .header__logo-img {
    height: 74px;
  }
}

/* Планшет и компактный десктоп (≤1199px): в шапке только бургер
   и действия. Бургер открывает единое меню со всеми разделами сайта,
   включая ссылки, которые на широком экране живут в топбаре. */
@media (max-width: 1199px) {
  /* Бургер добавляется первым элементом строки: прижимаем навигацию влево,
     а иконки — вправо, иначе space-between ставит разделы по центру
     и они наезжают на абсолютный логотип. */
  .header__container {
    justify-content: flex-start;
    gap: 24px;
    padding: 0 20px;
  }

  .header__actions {
    margin-left: auto;
  }

  .header__menu-toggle {
    display: inline-flex;
  }

  .header__nav {
    display: none;
  }
}

/* Мобилка и большие телефоны (≤ 640px): бургер слева, логотип по центру,
   корзина справа. Поиск и личный кабинет переносятся скриптом внутрь
   полноэкранного меню. Инлайн-навигация ниже 640px физически не помещается —
   все разделы живут в бургер-меню (.mobile-menu). */
@media (max-width: 640px) {
  .header {
    padding: 0;
  }

  .home-atmosphere .header {
    padding: 6px;
    height: 54px;
    border-radius: 16px;
  }

  .home-atmosphere .header .header__container {
    border-radius: 10px;
    border-width: 2px;
    padding: 0 12px;
  }

  .header__container,
  body.is-scrolled .header__container {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    min-height: 100%;
    height: 100%;
    gap: 0;
  }

  .header__menu-toggle {
    display: inline-flex;
    grid-column: 1;
  }

  .header__logo {
    position: absolute;
    top: 50%;
    left: 50%;
    order: initial;
    transform: translate(-50%, -50%);
  }

  .header__logo-img {
    height: 60px;
  }

  body.is-scrolled .header__logo {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
  }

  .header__actions {
    grid-column: 3;
    justify-self: end;
    gap: 8px;
  }

}

/* Планшет и крупные телефоны (481–768): логотип больше, зазоры компактнее. */
@media (min-width: 481px) and (max-width: 768px) {
  .topbar__container {
    min-height: 0;
  }

  .home-atmosphere .header {
    margin-top: 20px;
  }

  .home-atmosphere .site-content-shell {
    margin-top: 20px;
  }

  .header__logo-img {
    height: 74px;
  }
}

/* Топбар на мобилке: строке доставки разрешаем перенос на вторую строку,
   вместо обрезки краёв (max-height 40px базово рассчитан на одну строку).
   Правка бывшего тира 430px — единое поведение на всём диапазоне ≤480. */
@media (max-width: 480px) {
  .topbar {
    max-height: none;
    padding: 8px 16px;
    font-size: 14px;
  }

  .topbar__container {
    min-height: 0;
  }

  .topbar__info {
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    font-size: 14px;
  }

  .home-atmosphere .header {
    margin-top: 8px;
    height: 50px;
    padding: 5px;
    border-radius: 14px;
  }

  .home-atmosphere .header .header__container {
    border-radius: 9px;
    border-width: 1.5px;
    padding: 0 10px;
  }

  .home-atmosphere .site-content-shell {
    margin-top: 12px;
  }

  .header__container,
  body.is-scrolled .header__container {
    min-height: 100%;
    height: 100%;
  }

  .header__logo-img {
    height: 54px;
  }

  .header__actions {
    gap: 6px;
  }
}

@media (max-width: 360px) {
  .home-atmosphere .header .header__container {
    padding: 0 4px;
  }

  .header__logo-img {
    height: 46px;
  }

  .header__actions {
    gap: 2px;
  }

  .header__icon {
    width: 30px;
    height: 30px;
  }

  .header__icon svg {
    width: 22px;
    height: 22px;
  }
}

/* ── Фон страницы + параллакс + птицы/бабочки ─────────────────────────── */
.home-atmosphere {
  position: relative;
  isolation: isolate;
  min-height: 100%;
}

.page-bg,
.page-creatures {
  position: fixed;
  pointer-events: none;
}

.page-bg {
  top: -11vh;
  right: 0;
  left: 0;
  z-index: 0;
  height: 122vh;
  background-image: url("../images/main_bg.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translate3d(0, var(--page-bg-shift, 0px), 0) scale(1.002);
  transform-origin: center;
  will-change: transform;
}

.page-creatures {
  inset: 0;
  /* Птицы и бабочки летают выше всех слоев страницы — выше контента (z-index: 10),
     меню (1100), бумажной текстуры (999) и волшебного огонька (9999).
     pointer-events: none сохранён выше, поэтому интерактив с контентом не блокируется. */
  z-index: 100000;
  overflow: hidden;
}

@media (max-width: 768px) {
  /* На планшете и мобиле птицы неизбежно наезжают на заголовки и UI
     (фильтры блога, герой главной) — декор убираем, читаемость важнее.
     Находка визуального аудита адаптива, 2026-08-29. */
  .page-creatures { display: none; }
}

/* Интерактивный контент — поверх атмосферного фона.
   Относительное позиционирование выставляется только там, где нужно
   (topbar и footer); у sticky-шапки позиционирование не переопределяется. */
.home-atmosphere > .topbar {
  position: relative;
  z-index: 10;
}

.home-atmosphere > .footer {
  position: relative;
  z-index: 10;
  /* Полноширинная полоса в самом низу страницы: без ограничений ширины,
     без внешних отступов — прижата к краям и низу экрана. */
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Единая кремовая подложка основного контента на всех страницах с фирменным орнаментом. */
.site-content-shell {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1440px;
  margin: 32px auto 40px;
  padding-top: 24px;
  padding-bottom: 56px;
  padding-inline: var(--ds-page-gutter, 60px);
  box-sizing: border-box;
  background: #fdf9b2 url("../images/lines.png") repeat 0 0;
  border: 1px solid #382f21;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(35, 30, 19, 0.18);
  overflow: clip;
}

.site-content-shell::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid #382f21;
  border-radius: 10px;
  background-color: var(--color-bg);
  pointer-events: none;
  z-index: 0;
}

.site-content-shell > * {
  position: relative;
  z-index: 1;
}

/* Внутренние страницы уже задают отступы на своих секциях. В общей поверхности
   их собственный фон становится частью одного кремового листа без швов. */
.site-content-shell > section,
.site-content-shell > article,
.site-content-shell > div {
  background-color: transparent;
}

/* Без двойного горизонтального отступа: у секций остаётся только вертикаль. */
.site-content-shell > section,
.site-content-shell > article,
.site-content-shell > div {
  /* Enforce no horizontal padding inside the shell — outer shell controls gutters.
     Use !important to override component-level rules that may set horizontal padding. */
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-inline-start: 0 !important;
  padding-inline-end: 0 !important;
}

/* WooCommerce оборачивает контент страниц (корзина, чекаут, личный кабинет)
   в <div class="woocommerce"> внутри листа. Прямые секции этой обёртки — те же
   «страницы листа», как в статике: горизонтальные отступы задаёт только шелл.
   Без правила у hero появляется свой gutter поверх контейнера, и крошки с
   заголовком уезжают вправо относительно контента (my-account, 2026-09-13). */
.site-content-shell > .woocommerce > section,
.site-content-shell > .woocommerce > article,
.site-content-shell > .woocommerce > div {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-inline-start: 0 !important;
  padding-inline-end: 0 !important;
  background-color: transparent;
}

/* ИСКЛЮЧЕНИЕ: .wholesale — тёмная карточка со скруглением, а не текстовая
   секция на всю ширину. Без собственного паддинга текст прилипает к скруглённому
   краю карточки (находка по секционного аудита адаптива, 2026-08-29).
   Специфичность (0,2,1) выше обнуляющего правила выше; важность — наравне,
   gutter-правило дизайн-системы секцию больше не трогает (убрано из списка). */
.site-content-shell > section.wholesale {
  padding-left: 60px !important;
  padding-right: 60px !important;
}

@media (max-width: 1024px) {
  .site-content-shell > section.wholesale {
    padding-left: 36px !important;
    padding-right: 36px !important;
  }
}

@media (max-width: 768px) {
  .site-content-shell > section.wholesale {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

@media (max-width: 480px) {
  .site-content-shell > section.wholesale {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Плавающие карточки: шапка и контентная оболочка всегда держат зазор
   до края экрана, чтобы по бокам был виден атмосферный фон страницы.
   Десктоп шире 1440px — карточки центрируются с ещё большими полями,
   от 1440px и ниже — минимум 24px с каждой стороны, мобилка (≤480px) — 12px. */
@media (max-width: 1440px) {
  .home-atmosphere .header,
  .site-content-shell {
    width: calc(100% - 48px);
  }
}

/* ── Планшет (≤1024): герой ───────────────
   Фиксированная высота вьюпорта оставляла пустоту под кнопкой,
   а 56px заголовок в узкой колонке переносился «сиротами». */
@media (max-width: 1024px) {
  .hero {
    height: auto;
    padding: 32px 0 var(--ds-section-space-bottom);
  }

  .hero__grid {
    gap: 40px;
    grid-template-columns: 1fr;
    grid-template-areas:
      'content'
      'visual';
  }

  .hero__content {
    min-width: 0;
    align-items: center;
    text-align: center;
  }

  .hero__badges {
    order: 2;
    margin: 0 0 24px;
    justify-content: center;
  }

  .hero__label {
    order: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    margin-bottom: 16px;
  }

  .hero__sparkle {
    margin-top: 0;
    margin-bottom: 3px;
  }

  .hero__label-text {
    align-items: center;
    text-align: center;
    gap: 3px;
  }

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

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

  .hero__title {
    order: 3;
    text-align: center;
  }

  .hero__text {
    order: 4;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
  }

  .hero__content .ds-button {
    order: 5;
    align-self: center;
    margin-top: 0;
    margin-inline: auto;
  }

  .hero__visual {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .hero__image-wrap {
    width: 100%;
    max-width: 440px;
    height: auto;
    margin: 0 auto;
    overflow: hidden;
  }

  .hero__image {
    display: block;
    width: 100%;
    max-width: 440px;
    height: auto;
    max-height: min(560px, 75vh);
    margin: 0 auto;
    object-fit: cover;
    object-position: top center;
  }
}

/* Планшет и мобилка (≤768): контентной оболочке — адаптивные отступы из
   --ds-page-gutter. На планшете поле 40px, на мобилке токен сжимается ниже. */
@media (max-width: 768px) {
  .home-atmosphere .header,
  .site-content-shell {
    width: calc(100% - 24px);
  }

  .hero__label {
    margin-bottom: 14px;
  }

  .hero__badges {
    justify-content: center;
    gap: 6px 8px;
    margin-bottom: 20px;
  }

  .badge {
    font-size: 13px;
    padding: 5px 12px;
    white-space: normal;
    text-align: center;
  }

  .hero__title-part {
    display: block;
  }
}

@media (max-width: 480px) {
  .home-atmosphere .header,
  .site-content-shell {
    width: calc(100% - 24px);
  }

  .site-content-shell {
    margin-top: 16px;
    margin-bottom: 24px;
    padding-top: 18px;
    padding-bottom: 36px;
    padding-inline: var(--ds-page-gutter);
    border-radius: 14px;
  }

  .site-content-shell::before {
    inset: 5px;
    border-width: 1.5px;
    border-radius: 9px;
  }
}

.page-creature {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  opacity: 1;
  will-change: transform;
}

.page-creature img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  filter: saturate(0.78) sepia(0.10) drop-shadow(0 4px 4px rgba(35, 30, 19, 0.18));
  transform-origin: center;
  will-change: transform;
}

.page-creature--bird-one {
  width: clamp(68px, 5.5vw, 100px);
  animation: page-flight-bird-one 36s linear -9s infinite;
}

.page-creature--bird-one img {
  animation: page-wing-bird 1.35s ease-in-out -0.3s infinite;
}

.page-creature--bird-two {
  width: clamp(76px, 6.4vw, 119px);
  animation: page-flight-bird-two 43s linear -28s infinite;
}

.page-creature--bird-two img {
  animation: page-wing-bird 1.55s ease-in-out -0.85s infinite reverse;
}

.page-creature--butterfly-one {
  width: clamp(34px, 3.1vw, 57px);
  animation: page-flight-butterfly-one 27s linear -18s infinite;
}

.page-creature--butterfly-one img {
  animation: page-wing-butterfly 0.76s ease-in-out -0.18s infinite;
}

.page-creature--butterfly-two {
  width: clamp(42px, 3.8vw, 76px);
  animation: page-flight-butterfly-two 32s linear -5s infinite;
}

.page-creature--butterfly-two img {
  animation: page-wing-butterfly 0.92s ease-in-out -0.48s infinite reverse;
}

@keyframes page-flight-bird-one {
  0%   { transform: translate3d(-14vw, 23vh, 0) rotate(-7deg); }
  24%  { transform: translate3d(20vw, 14vh, 0) rotate(2deg); }
  52%  { transform: translate3d(57vw, 29vh, 0) rotate(-3deg); }
  78%  { transform: translate3d(91vw, 17vh, 0) rotate(3deg); }
  100% { transform: translate3d(116vw, 25vh, 0) rotate(-2deg); }
}

@keyframes page-flight-bird-two {
  0%   { transform: translate3d(116vw, 48vh, 0) rotate(5deg); }
  30%  { transform: translate3d(80vw, 38vh, 0) rotate(-4deg); }
  58%  { transform: translate3d(43vw, 53vh, 0) rotate(3deg); }
  82%  { transform: translate3d(12vw, 35vh, 0) rotate(-5deg); }
  100% { transform: translate3d(-16vw, 43vh, 0) rotate(2deg); }
}

@keyframes page-flight-butterfly-one {
  0%   { transform: translate3d(-10vw, 68vh, 0) rotate(-15deg); }
  27%  { transform: translate3d(22vw, 57vh, 0) rotate(12deg); }
  51%  { transform: translate3d(51vw, 72vh, 0) rotate(-9deg); }
  76%  { transform: translate3d(83vw, 60vh, 0) rotate(14deg); }
  100% { transform: translate3d(111vw, 69vh, 0) rotate(-8deg); }
}

@keyframes page-flight-butterfly-two {
  0%   { transform: translate3d(108vw, 78vh, 0) rotate(12deg); }
  29%  { transform: translate3d(79vw, 68vh, 0) rotate(-12deg); }
  55%  { transform: translate3d(48vw, 82vh, 0) rotate(10deg); }
  80%  { transform: translate3d(17vw, 71vh, 0) rotate(-14deg); }
  100% { transform: translate3d(-10vw, 80vh, 0) rotate(8deg); }
}

@keyframes page-wing-bird {
  0%, 100% { transform: rotate(-1deg) scaleY(1); }
  50%      { transform: rotate(2deg) scaleY(0.92); }
}

@keyframes page-wing-butterfly {
  0%, 100% { transform: rotate(-2deg) scaleX(1); }
  50%      { transform: rotate(3deg) scaleX(0.72); }
}

@media (max-width: 480px) {
  .page-bg {
    top: -8vh;
    height: 116vh;
    background-position: 58% center;
    will-change: auto;
  }

  .page-creature--bird-two,
  .page-creature--butterfly-one {
    display: none;
  }

  .page-creature--bird-one {
    animation-duration: 42s;
  }

  .page-creature--butterfly-two {
    animation-duration: 38s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-bg {
    --page-bg-shift: 0px;
    transform: none;
    will-change: auto;
  }

  .page-creatures {
    display: none;
  }

  .page-creature,
  .page-creature img {
    animation: none;
  }
}

/* ============================================================
   Полноэкранное бургер-меню (компактный десктоп, телефон и планшет, ≤ 1199px).
   Единый паттерн вместо прежних двух разных панелей: оверлей
   раскрывается из-под шапки, шапка остаётся доступной (z-index
   ниже, чем у .header). Контент собирается в header-menu.js.
   ============================================================ */
.mobile-menu {
  position: fixed;
  inset: 0;
  /* Ниже шапки (100): логотип, корзина и бургер-крестик остаются кликабельными */
  z-index: 90;
  top: var(--menu-top, 37px);
  height: calc(100vh - var(--menu-top, 37px));
  background:
    radial-gradient(420px 260px at 88% 96%, rgba(255, 168, 32, 0.09), transparent 70%),
    radial-gradient(560px 340px at -12% -10%, rgba(255, 84, 0, 0.07), transparent 70%),
    var(--color-bg);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu[hidden] {
  display: none;
}

/* Декоративные птицы летают выше всех слоёв (z-index: 100000) —
   поверх открытого меню они мешают чтению, поэтому на время
   открытия прячем их (по образцу существующего .no-creatures). */
body.menu-open .page-creatures {
  display: none;
}

/* При открытом бургер-меню шапка плавно примыкает к топбару без зазора:
   исключаем видимый просвет фонового изображения между топбаром и меню. */
body.menu-open.home-atmosphere .header,
body.menu-open .header {
  width: 100% !important;
  max-width: none !important;
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-radius: 0 !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  border-top-color: transparent !important;
  box-shadow: none !important;
}

body.menu-open.home-atmosphere .header .header__container {
  border-radius: 0 !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  border-top-color: transparent !important;
}

.mobile-menu__scroll {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-top: var(--menu-header-height, 57px);
}

.mobile-menu__scroll::-webkit-scrollbar {
  display: none;
}

.mobile-menu__nav,
.mobile-menu__actions {
  width: min(560px, 100%);
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

@media (max-width: 640px) {
  .mobile-menu {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - var(--menu-top, 0px));
    height: calc(100dvh - var(--menu-top, 0px));
  }

  .mobile-menu__scroll {
    height: 100%;
    min-height: 100%;
  }

  .header__search-trigger {
    display: none;
  }

  .mobile-menu__nav,
  .mobile-menu__actions {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.mobile-menu__nav {
  padding-top: clamp(20px, 3.5vh, 32px);
}

.mobile-menu__search {
  display: none;
  position: relative;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .mobile-menu__search {
    display: block;
  }
}

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

.mobile-menu__search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  display: inline-flex;
  color: var(--color-brown);
  transform: translateY(-50%);
  pointer-events: none;
}

.mobile-menu__search-input {
  width: 100%;
  min-height: 48px;
  padding: 8px 14px 8px 46px;
  border: 1px solid rgba(114, 64, 30, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--color-text);
  font: var(--ds-font-weight-medium) 17px/1.3 var(--font-body);
}

.mobile-menu__search-input::placeholder {
  color: rgba(35, 30, 19, 0.62);
}

.mobile-menu__search-input:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 3px;
  border-color: var(--color-orange);
}

.mobile-menu__search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mobile-menu__search-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.mobile-menu__search-button {
  white-space: nowrap;
  min-height: 48px;
  padding: 8px 18px;
}

@media (max-width: 480px) {
  .mobile-menu__search-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .mobile-menu__search-field {
    width: 100%;
  }

  .mobile-menu__search-button {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
}

/* Каскадное появление верхнего уровня */
.mobile-menu__item {
  opacity: 0;
  transform: translateY(12px);
}

  .mobile-menu.is-open .mobile-menu__item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: calc(var(--item-index, 0) * 45ms);
  }

/* Верхний уровень: заголовок-аккордеон или крупная ссылка */
.mobile-menu__trigger,
.mobile-menu__link--major {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 6px 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 22px;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-menu__trigger:hover,
.mobile-menu__link--major:hover,
.mobile-menu__trigger:focus-visible,
.mobile-menu__link--major:focus-visible {
  color: var(--primary);
}

.mobile-menu__trigger:focus-visible,
.mobile-menu__link--major:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.mobile-menu__chevron {
  flex-shrink: 0;
  color: var(--color-brown);
  transition: transform 0.24s ease;
}

.mobile-menu__item.is-open .mobile-menu__chevron {
  transform: rotate(180deg);
}

/* Аккордеон: раскрытие через grid-template-rows без JS-измерений */
.mobile-menu__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.26s ease;
}

.mobile-menu__panel-inner {
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
  transition: visibility 0s linear 0.26s;
}

.mobile-menu__item.is-open .mobile-menu__panel {
  grid-template-rows: 1fr;
}

.mobile-menu__item.is-open .mobile-menu__panel-inner {
  visibility: visible;
  transition-delay: 0s;
}

.mobile-menu__gap {
  height: 14px;
}

/* Подзаголовки групп внутри аккордеона и у группы «Информация» */
.mobile-menu__group-title {
  margin: 14px 0 4px;
  color: var(--color-brown);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: var(--ds-font-weight-bold);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

a.mobile-menu__group-title {
  display: inline-block;
  text-decoration: none;
  transition: color 0.2s ease;
}

a.mobile-menu__group-title:hover,
a.mobile-menu__group-title:focus-visible {
  color: var(--primary);
}

a.mobile-menu__group-title:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.mobile-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-menu__list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 8px 4px 14px;
  border-radius: 8px;
  color: var(--header-ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: var(--ds-font-weight-medium);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.mobile-menu__list a:hover {
  color: var(--primary);
  background: rgba(255, 84, 0, 0.06);
}

.mobile-menu__list a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  color: var(--primary);
}

/* Группа «Информация» — бывшие ссылки топбара */
.mobile-menu__info {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(114, 64, 30, 0.18);
}

.mobile-menu__info .mobile-menu__group-title {
  margin-top: 0;
  margin-bottom: 8px;
}

.mobile-menu__info .mobile-menu__list a {
  margin-left: -8px;
  margin-right: -8px;
  padding-left: 8px;
  padding-right: 8px;
}

/* Промо-карточки внутри аккордеона «Каталог» */
.mobile-menu__promo-row {
  display: flex;
  gap: 12px;
  margin: 16px 0 6px;
  padding: 2px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.mobile-menu__promo-row::-webkit-scrollbar {
  display: none;
}

.mobile-menu__promo-card {
  position: relative;
  flex: 0 0 158px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(114, 64, 30, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 20px rgba(35, 30, 19, 0.08);
  color: var(--color-text);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-menu__promo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(35, 30, 19, 0.14);
}

.mobile-menu__promo-card:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.mobile-menu__promo-card img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  object-position: top;
  border-radius: 9px;
}

.mobile-menu__promo-badge {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mobile-menu__promo-title {
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: var(--ds-font-weight-bold);
}

/* Зарезервированный ряд действий пуст — полностью скрывается через :empty. */
.mobile-menu__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding-top: 16px;
  padding-bottom: max(26px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(114, 64, 30, 0.18);
}

.mobile-menu__actions:empty {
  display: none;
  border: 0;
  padding: 0;
}

/* Социальный ряд — финальная точка телефонного меню. На планшете прежняя
   композиция бургер-панели остаётся без изменений. */
.mobile-menu__socials {
  display: none;
}@media (max-width: 640px) {
  .mobile-menu__socials {
    display: block;
    margin-top: auto;
    padding: 24px 24px max(28px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(114, 64, 30, 0.18);
  }

  .mobile-menu__socials h2 {
    margin: 0 0 12px;
    color: var(--color-brown);
    font: var(--ds-font-weight-bold) 13px/1.3 var(--font-body);
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .mobile-menu__social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .mobile-menu__social-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 7px 12px 7px 8px;
    border: 1px solid rgba(114, 64, 30, 0.24);
    border-radius: 9px;
    color: var(--header-ink);
    font-size: 16px;
    font-weight: var(--ds-font-weight-semibold);
    text-decoration: none;
  }

  .mobile-menu__social-links a:hover,
  .mobile-menu__social-links a:focus-visible {
    color: var(--primary);
    border-color: var(--primary);
  }

  .mobile-menu__social-links a:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
  }

  .mobile-menu__social-links img,
  .mobile-menu__social-monogram {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
  }

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

@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .mobile-menu__item,
  .mobile-menu__chevron,
  .mobile-menu__panel,
  .mobile-menu__panel-inner,
  .header__toggle-icon,
  .mobile-menu__promo-card {
    transition: none !important;
  }

  .mobile-menu.is-open .mobile-menu__item {
    transition-delay: 0s;
  }
}

/* ======================================================================
   Horizontal-scroll escape: allow horizontal scrollers (carousels, tabs,
   sliders) to overflow intermediate containers so they are clipped only by
   the main page shell (.site-content-shell). This fixes cases where tracks
   were visually cut off by their immediate parent (negative margins /
   full-width tracks). We only affect the inline (horizontal) overflow.

   NOTE: track/slider elements keep overflow-x:auto so native scrolling
   behaviour remains. This block is intentionally last in the file so it
   overrides earlier overflow-* settings where necessary.
   ====================================================================== */
.site-content-shell > section:has(.js-carousel__track),
.site-content-shell > article:has(.js-carousel__track),
.site-content-shell > div:has(.js-carousel__track) {
  /* Allow horizontal tracks to overflow only when the direct child
     actually contains a known horizontal scroller (carousel/track).
     Restricting this avoids affecting unrelated sections' centering
     and gutters while still letting full-bleed tracks reach the
     .site-content-shell boundary for consistent clipping. */
  overflow-x: visible !important;
}

/* Re-enable horizontal scrolling on known track/slider elements inside the
   shell (they should remain scroll containers). The [class$="__track"]
   selector catches many track-like classes used across the codebase. */
.site-content-shell .js-carousel__track,
.site-content-shell [class$="__track"],
.site-content-shell .slider,
.site-content-shell .account-nav,
.site-content-shell .mobile-menu__promo-row,
.site-content-shell .bestsellers__carousel,
.site-content-shell .stories-mobile__track,
.site-content-shell .author-gallery__track,
.site-content-shell .article-gallery__track {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.site-content-shell .js-carousel__track::-webkit-scrollbar,
.site-content-shell .slider::-webkit-scrollbar,
.site-content-shell .author-gallery__track::-webkit-scrollbar,
.site-content-shell .article-gallery__track::-webkit-scrollbar {
  display: none;
}

/* Center tracks inside the site-content-shell and restore side gutters.
   Many components use negative margins to reach page edges; overriding
   them here keeps the visual centered layout (equal gutters) while
   preserving native horizontal scrolling and clipping only at the
   .site-content-shell boundary. This lives at the end of the file so it
   wins over earlier component rules. */

/* Единый стандарт (feedback 2026-09-06): с 1024px заголовки, тексты и табы
   секций главной центрируются */
@media (max-width: 1024px) {
  .hero__content { text-align: center; }
  .hero__text { margin-inline: auto; }
  .hero__badges { justify-content: center; }

  .bestsellers__header { flex-direction: column; align-items: center; gap: 16px; }
  .bestsellers__title { text-align: center; }
  .bestsellers__tabs { justify-content: center; }

  .news__title, .features__title, .book-type__title, .gift__title,
  .stories-mobile__title, .new-books__title, .story-step__title,
  .wholesale__title { text-align: center; margin-inline: auto; }
  .wholesale__subtitle, .gift__form, .new-books__viewport { margin-inline: auto; }

  .about__head, .about__text, .about__quote { text-align: center; }
  .about__head { flex-direction: column; align-items: center; }
}

/* Главная, feedback 2026-09-06 (уточнено): при перестройке (≤1024) фото
   занимают полную ширину КОНТЕЙНЕРА, не выходя за паддинги подложки */
@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
    grid-template-areas: 'content' 'visual';
    gap: 32px;
  }
  .hero__visual,
  .hero__image-wrap,
  .hero__image { height: auto; }
  .hero__image {
    width: 100%;
    max-height: 90dvh;
    object-fit: cover;
    object-position: top;
  }

  .about__grid { grid-template-columns: 1fr; }
  .about__card { grid-template-columns: 1fr; }
  .about__img {
    height: auto;
    max-height: 85dvh;
    object-fit: cover;
  }

  .artists__grid { grid-template-columns: 1fr; }
  .artists__card { width: 100%; }

  /* «Подборки сказок»: декоративную графику при перестройке скрываем */
  .stories-deco__sparkle { display: none; }

  /* «Елена Велена»: цитата и контент — по центру (feedback 2026-09-06) */
  .author .author__content { text-align: center; align-items: center; }
  .author .author__quote { text-align: center; }
  .author .author__stats { justify-content: center; }
  .author .author__books, .author .author__quote-mark { margin-inline: auto; }
  .author .author__text { text-align: center; margin-inline: auto; }

  /* Подвал: «Найти наши книги на маркетплейсах» и нижняя строка —
     по центру вместе со всем подвалом (feedback 2026-09-06) */
  .footer__markets { flex-direction: column; align-items: center; text-align: center; }
  .footer__markets-list { justify-content: center; }
  .footer__bottom { flex-direction: column; align-items: center; text-align: center; }
  .footer__copy { text-align: center; justify-content: center; }

  /* Предзаголовки с символами — по центру (везде, единый стандарт) */
  .hero__label, .wholesale__label, .gift__eyebrow, .contacts-card__eyebrow,
  .content-hero__eyebrow, .ds-page-hero__eyebrow,
  .opt-kicker, .mc-kicker { justify-content: center; text-align: center; }

  /* Фото-блоки и сетки карточек — на всю ширину контейнера, без зауженных капсов */
  .hero__image-wrap, .artists__grid, .about__grid, .about__card { max-width: none; }

  /* Формы: всё содержимое центрируется при перестройке (везде) */
  .wholesale { text-align: center; }
  .wholesale__form, .gift__form { margin-inline: auto; }
  .wholesale__consent, .contacts-consent, .gift__agree { justify-content: center; }
  .wholesale__submit { align-self: center; margin-inline: auto; }
  .gift__content { text-align: center; }
  .gift__field { justify-content: center; }

  /* Кнопки не переливаются за паддинги плашек */
  .hero__button, .author__button { white-space: normal; max-width: 100%; }
}
@media (max-width: 480px) {
  .hero__button, .author__button { padding: 14px 24px; }
}

/* Главная, feedback 2026-09-06 (жёсткая гарантия): при перестройке фото
   и карточки — на всю ширину контейнера. !important перебивает любые
   legacy max-width/margin из других медиаблоков. */
@media (max-width: 1024px) {
  .hero .hero__grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: 'content' 'visual' !important;
  }
  .hero .hero__visual,
  .hero .hero__image-wrap {
    max-width: none !important;
    width: 100% !important;
    margin-inline: 0 !important;
    height: auto !important;
  }
  .hero .hero__image {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    max-height: 90dvh !important;
    height: auto !important;
  }
  .about .about__img {
    max-width: none !important;
    margin-inline: 0 !important;
  }
  .artists .artists__img,
  .artists .artists__photo {
    max-width: none !important;
    width: 100% !important;
  }
  .artists .artists__grid {
    grid-template-columns: 1fr !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }
  .artists .artists__card {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }
  .about .about__grid,
  .about .about__card {
    grid-template-columns: 1fr !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }

  /* Секция «Елена Велена» (author): фото — на всю ширину контейнера */
  .author .author__grid {
    grid-template-columns: 1fr !important;
  }
  .author .author__photo {
    max-width: none !important;
    width: 100% !important;
    margin-inline: 0 !important;
    height: auto !important;
  }
  .author .author__img {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: 90dvh !important;
    object-fit: cover !important;
    object-position: top !important;
  }
}
