/* =========================================================
   O4 — лендинг бренда
   Семантичная адаптивная вёрстка по канонам.
   Палитра и типографика перенесены из Figma-макета.
   ========================================================= */

/* ---------------------------------------------------------
   1. Переменные (дизайн-токены из макета)
   --------------------------------------------------------- */
:root {
  --bg: #fafafc;                    /* общий фон */
  --ink: #191919;                   /* основной тёмный текст */
  --ink-soft: rgba(25, 25, 25, 0.70);/* вторичный тёмный */
  --muted: #4a4a4f;                 /* текст футера */
  --heading: #111112;               /* заголовки футера */

  --accent: #749926;                /* акцентный зелёный (Купить) */
  --accent-hover: #5e7f1e;
  --btn-border: #111827;            /* рамка кнопки «В корзину» */

  --topbar-bg: #e8e8e8;
  --hero-bg: #6b6b6b;
  --footer-bg: #f4f4f6;
  --footer-border: #e5e5ea;

  --overlay-dark: rgba(0, 0, 0, 0.20);
  --overlay-strong: rgba(26, 26, 26, 0.60);

  --radius: 8px;
  --radius-pill: 999px;

  --shadow-card: 0 8px 24px -8px rgba(0, 0, 0, 0.08);

  --container: 1440px;
  --gutter: clamp(16px, 4vw, 64px);
  --nav-h: 78px;                    /* высота верхней навигации (для наложения на hero) */
  --header-bg: #FCFCFC;             /* фон шапки на внутренних страницах (без hero) */

  --font-body: "Exo 2", sans-serif;
  --font-ui: "Exo 2", sans-serif;
  --font-footer: "Exo 2", sans-serif;

  --transition: 180ms ease;
}

/* ---------------------------------------------------------
   2. Базовый сброс и типографика
   --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Скрытый, но доступный заголовок (screen reader / SEO) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease, opacity 200ms ease;
}

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

ul {
  list-style: none;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  width: 100%;
  padding-inline: var(--gutter);
}

/* Доступность: видимый фокус */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Скрытый визуально, но доступный скринридерам */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Уважение к reduce-motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------
   3. Верхняя плашка (бесплатная доставка)
   --------------------------------------------------------- */
.announce {
  background: var(--topbar-bg);
  color: #000;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  text-align: center;
  padding: 10px var(--gutter);
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------
   4. Шапка / навигация
   --------------------------------------------------------- */
/* На главной: прозрачная, лежит поверх баннеров слайдера */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: transparent;
  color: #fff;
  transition: background 250ms ease, box-shadow 250ms ease, color 250ms ease;
}

/* Внутренние страницы (без hero): шапка сразу светлая, контент тёмный.
   Класс добавляется на <header> — тогда не нужен ховер/скролл для инверсии. */
.site-header--solid {
  background: var(--header-bg);
  color: var(--ink);
}
/* инверсия логотипа и контента в тёмное — как при is-scrolled на главной */
.site-header--solid .brand__logo { filter: invert(1); }
.site-header--solid .nav__burger span { background: var(--heading); }
.site-header--solid .nav__links a { color: var(--heading); opacity: 1; }
.site-header--solid .icon-btn { color: var(--heading); }
.site-header--solid .icon-btn:hover { background: rgba(0, 0, 0, 0.06); }

/* При уходе с hero (на главной) — шапка становится светлой, текст и логотип инвертируются */
.site-header.is-scrolled {
  background: #FCFCFC;
  color: var(--ink);
}
/* логотип инвертируется в тёмный */
.site-header.is-scrolled .brand__logo { filter: invert(1); }
/* бургер тёмный */
.site-header.is-scrolled .nav__burger span { background: var(--heading); }
/* пункты меню тёмные */
.site-header.is-scrolled .nav__links a { color: var(--heading); opacity: 1; }
/* иконки тёмные */
.site-header.is-scrolled .icon-btn { color: var(--heading); }
.site-header.is-scrolled .icon-btn:hover { background: rgba(0, 0, 0, 0.06); }

.nav {
  width: 100%;
  padding: 18px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;   /* лево | логотип (центр) | право */
  align-items: center;
  column-gap: 16px;
}
.nav__left {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav .brand { justify-self: center; }  /* логотип строго по центру в шапке */
.nav__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav__burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
}
.nav__burger span {
  display: block;
  height: 1.5px;
  width: 22px;
  background: #fff;
  border-radius: 2px;
  transition:
    transform 320ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 200ms ease,
    width 320ms cubic-bezier(0.4, 0, 0.2, 1),
    background var(--transition);
}
.nav__burger span:nth-child(3) { width: 16px; }
/* ховер: короткая линия тянется до полной */
.nav__burger:hover span:nth-child(3) { width: 22px; }
/* при наведении на «Каталог» — та же анимация третьей линии */
.nav__burger.is-catalog-hover span:nth-child(3) { width: 22px; }

/* открытое состояние — морф в крест */
.nav__burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__burger.is-open span:nth-child(3) { width: 22px; transform: translateY(-6.5px) rotate(-45deg); }

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

.nav__links a {
  position: relative;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.92;
  padding-bottom: 2px;
  transition: opacity var(--transition), color var(--transition);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 260ms ease;
}
.nav__links a:hover {
  opacity: 1;
}
.nav__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.brand {
  display: flex;
  align-items: center;
  line-height: 1;
}
.brand__logo {
  height: 60px; /* крупнее в шапке */
  width: auto;
  display: block;
  transition: filter 250ms ease, opacity var(--transition);
}
.brand:hover .brand__logo { opacity: 0.8; }
.footer .brand__logo {
  height: 110px; /* крупный логотип в подвале */
}
.footer .brand__logo--dark {
  filter: invert(1); /* белый логотип -> тёмный на светлом фоне */
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  color: #fff;
  transition: background var(--transition), color 250ms ease, opacity var(--transition);
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Поиск: строка выезжает справа налево, уезжает при уходе ховера */
.search {
  position: relative;
  display: flex;
  align-items: center;
}
/* Выезжающая панель: поле + кнопка «Найти», растёт слева от иконки */
.search__bar {
  position: absolute;
  top: 50%;
  right: 100%;                      /* вплотную к иконке — без мёртвого зазора */
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  width: 0;
  height: 38px;
  padding: 0 4px 0 0;
  background: #fff;
  border: 1px solid var(--footer-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    width 320ms cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 200ms ease;
}
.search.is-open .search__bar,
.search:hover .search__bar,
.search:focus-within .search__bar {
  width: 300px;
  opacity: 1;
  pointer-events: auto;
}
.search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search__input::-webkit-search-cancel-button,
.search__input::-webkit-search-decoration {
  -webkit-appearance: none;
}
/* Кнопка «Найти» */
.search__submit {
  flex: none;
  height: 30px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.search__submit:hover {
  background: var(--accent-hover);
  transform: scale(1.03);
}

/* Боковое меню (drawer) — выезжает слева */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  visibility: hidden;
  pointer-events: none;
  /* при закрытии контейнер прячется только после завершения анимации */
  transition: visibility 0s linear 0.4s;
}
.drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s; /* при открытии — сразу видим */
}

.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.50);
  opacity: 0;
  transition: opacity 320ms ease;
}
.drawer.is-open .drawer__backdrop { opacity: 1; }

.drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 84vw);
  background: #fff;
  color: var(--ink);
  box-shadow: 24px 0 48px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  transform: translateX(-105%);
  transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: translateX(0); }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.drawer__brand {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.08em;
  color: var(--heading);
}
.drawer__close {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--heading);
  transition: background var(--transition), transform var(--transition);
}
.drawer__close:hover { background: var(--footer-bg); transform: rotate(90deg); }
.drawer__close svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

.drawer__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 22px 0 10px;
}
.drawer__label:first-child { margin-top: 0; }

/* Пустое пространство вместо «Каталог» — разделитель между блоками */
.drawer__gap {
  height: 26px;
}

.drawer__nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 2px;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  border-bottom: 1px solid var(--footer-border);
  transition: color var(--transition), padding-left var(--transition);
}
.drawer__nav a::after {
  content: "→";
  font-size: 14px;
  color: var(--muted);
  transition: transform var(--transition), color var(--transition);
}
.drawer__nav a:hover { color: var(--accent); padding-left: 8px; }
.drawer__nav a:hover::after { transform: translateX(4px); color: var(--accent); }

/* Аккордеон в боковом меню (стиль .acc со страницы товара) */
.drawer__acc + .drawer__acc { border-top: 1px solid var(--footer-border); }
.drawer__acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 1;
  transition: color var(--transition), opacity var(--transition);
}
.drawer__acc-head:hover { color: var(--accent); opacity: 1; }
.drawer__acc:not(.is-open) .drawer__acc-head { opacity: 0.55; }
.drawer__acc.is-open .acc__icon { transform: rotate(180deg); }
.drawer__acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease;
}
.drawer__acc-body > .drawer__acc-inner {
  overflow: hidden;
  min-height: 0;
  transition: padding-bottom 300ms ease;
}
.drawer__acc.is-open .drawer__acc-inner { padding-bottom: 15px; }
.drawer__acc.is-open .drawer__acc-body { grid-template-rows: 1fr; }
.drawer__acc-inner a:last-child { border-bottom: 0; }

/* Блокировка прокрутки под открытым меню */
body.no-scroll { overflow: hidden; }

@media (max-width: 900px) {
  .nav__links {
    display: none;
  }
}

@media (max-width: 520px) {
  .nav__actions .icon-btn:nth-child(1),
  .nav__actions .icon-btn:nth-child(3) {
    display: none;
  }
}

/* ---------------------------------------------------------
   5. Герой (слайдер)
   --------------------------------------------------------- */
.hero {
  --dark: 0.45;                       /* текущая глубина затемнения верхней зоны */
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--hero-bg);
  margin-top: calc(-1 * var(--nav-h)); /* баннер уходит под прозрачную шапку */
}

/* Декоративная «фото»-подложка на градиенте (без внешних ассетов) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 70% 20%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(180deg, #565656 0%, #6b6b6b 55%, #5a5a5a 100%);
  z-index: 0;
}

/* Затемнение верхней зоны за прозрачной шапкой; плавно при смене слайда */
.hero__scrim {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 240px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.90), transparent 100%);
  opacity: var(--dark, 0.45);
  transition: opacity 600ms ease;
  pointer-events: none;
  z-index: 2;
}

.hero__track {
  display: flex;
  transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 3;
}

.hero__slide {
  min-width: 100%;
  height: clamp(420px, 56vh, 620px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 96px var(--gutter) 40px;
  position: relative;
}
/* Картинка слайда: фон cover, вместе с градиентом (не выгружается при прокрутке) */
.hero__slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.05));
}
.hero__slide > :not(.hero__slide-img) {
  position: relative;
  z-index: 2;
}

.hero__kicker {
  font-size: 18px;
  font-weight: 100;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.95;
}

.hero__title {
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 300;
  line-height: 1.05;
}

.hero__divider {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.50);
  margin: 4px 0;
}

.hero__cta {
  position: relative;
  font-size: 16px;
  font-weight: 100;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.92;
  padding-bottom: 3px;
  transition: opacity var(--transition);
}
.hero__cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 260ms ease;
}
.hero__cta:hover {
  opacity: 1;
}
.hero__cta:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Стрелки */
.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
  z-index: 5;
}
.hero__arrow:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.40);
}
.hero__arrow--prev { left: 32px; }
.hero__arrow--next { right: 32px; }
.hero__arrow svg { width: 16px; height: 16px; stroke: #fff; fill: none; }

/* Точки */
.hero__dots {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 5;
}
.hero__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: background var(--transition);
}
.hero__dots button.is-active { background: #fff; }

@media (max-width: 700px) {
  .hero__arrow { width: 40px; height: 40px; }
  .hero__arrow--prev { left: 12px; }
  .hero__arrow--next { right: 12px; }
}

/* ---------------------------------------------------------
   6. Категории
   --------------------------------------------------------- */
.categories {
  padding: 0;            /* на всю ширину экрана */
  margin-top: 0;         /* без отступа от слайдера */
}

.categories__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.category {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;   /* заголовок сверху, стрелка снизу */
  aspect-ratio: 360 / 382;
  padding: 24px;
  color: #fff;
  background: var(--overlay-dark);
  overflow: hidden;
  transition: transform var(--transition), filter var(--transition);
}
.category::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(0deg, var(--overlay-dark), var(--overlay-dark)),
    var(--cat-bg, linear-gradient(145deg, #8a8a8a 0%, #6f6f6f 45%, #5e5e5e 100%));
  background-size: cover, cover;
  background-position: center;
  z-index: 0;
}
.category:hover { transform: translateY(-3px); filter: brightness(1.05); }

.category__title,
.category__arrow {
  position: relative;
  z-index: 1;
}
.category__title {
  font-size: 18px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.category__arrow {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  opacity: 0;                      /* скрыта по умолчанию */
  transform: translateX(-6px);
  transition: opacity var(--transition), transform var(--transition);
}
/* появляется при ховере на плитке */
.category:hover .category__arrow {
  opacity: 1;
  transform: translateX(0);
}

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

/* ---------------------------------------------------------
   7. Секция «Новинки»
   --------------------------------------------------------- */
.section {
  padding: 40px var(--gutter) 0;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.section__title {
  font-size: clamp(28px, 4vw, 35px);
  font-weight: 400;
  color: var(--ink);
}

.section__link {
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.section__link:hover { color: var(--ink); }

/* Сетка товаров */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
ul.product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Кнопка «Уже в корзине» — неактивная */
.btn.addtocart-btn.is-in-cart {
  background: #ececf0;
  color: var(--muted);
  border-color: #e0e0e6;
  cursor: default;
  opacity: 1;
}
.btn.addtocart-btn.is-in-cart svg {
  stroke: var(--muted);
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background-color var(--transition);
}
.product-card:hover {
  background-color: #fff;
}

.product-card__body {
  padding: 0em 1em 1em 1em;   /* сверху 0, по бокам/снизу 1em */
}

.product-card__media {
  position: relative;
  aspect-ratio: 310 / 440;
  border-radius: 5px;
  overflow: hidden;
  background: linear-gradient(150deg, #f2f2f4 0%, #e6e6e9 100%);
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.60);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 300;
}

.product-card__title {
  font-size: 18px;
  font-weight: 300;
  color: var(--ink);
}

.product-card__price {
  font-size: 13px;
  font-weight: 100;
  color: var(--ink);
}

/* Лупа (быстрый просмотр) — стеклянная подложка (глассморфизм), появляется на ховере */
.product-card__zoom,
.catalog-card__zoom,
.product-gallery__zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  color: #2b2b2b;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 2;
}
.product-card:hover .product-card__zoom,
.product-card:focus-within .product-card__zoom,
.catalog-card:hover .catalog-card__zoom,
.catalog-card:focus-within .catalog-card__zoom,
.product-gallery__item:hover .product-gallery__zoom,
.product-gallery__item:focus-within .product-gallery__zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.product-card__zoom svg,
.catalog-card__zoom svg,
.product-gallery__zoom svg { width: 24px; height: 24px; }

/* галерея товара: каждый кадр — контейнер с лупой по ховеру */
.product-gallery__item {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
}

/* Кнопки под ценой — появляются на ховере; место зарезервировано базовым отступом */
.product-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;                 /* базовый отступ: место под кнопки всегда занято */
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.product-card:hover .product-card__actions,
.product-card:focus-within .product-card__actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn--ghost {
  background: #fff;
  color: var(--btn-border);
  border: 1px solid var(--btn-border);
}
.btn--ghost:hover { background: #f5f5f7; }

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

.btn svg { width: 16px; height: 16px; flex: none; }

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

/* ---------------------------------------------------------
   8. Баннер «Backstage»
   --------------------------------------------------------- */
.backstage {
  margin: 120px 0 0;
  padding: 0; /* подложка на всю ширину */
  color: #fff;
}

.backstage__inner {
  min-height: clamp(420px, 60vh, 700px); /* выше */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  position: relative;
}
.backstage__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(0deg, var(--overlay-strong), var(--overlay-strong)),
    linear-gradient(150deg, #3a3a3a 0%, #242424 60%, #1a1a1a 100%);
}
.backstage__play,
.backstage__label {
  position: relative;
  z-index: 1;
}

.backstage__play {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.backstage__play:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.backstage__play svg { width: 22px; height: 22px; margin-left: 3px; }

.backstage__label {
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

@media (max-width: 560px) {
  .backstage { margin-top: 80px; }
}

/* ---------------------------------------------------------
   9. Футер
   --------------------------------------------------------- */
.footer {
  background: var(--footer-bg);
  margin-top: 0;          /* вплотную к backstage */
  padding: 80px var(--gutter) 48px;
  font-family: var(--font-footer);
}

.footer__grid {
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 200px repeat(4, 1fr);
  gap: 48px;
  padding-bottom: 48px;
}

.footer__col h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--heading);
  margin-bottom: 16px;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__col a,
.footer__col .muted {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  transition: color var(--transition);
}
.footer__col a {
  position: relative;
}
.footer__col a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 260ms ease;
}
.footer__col a:hover { color: var(--ink); }
.footer__col a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.footer__col .subheading {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--heading);
  margin: 24px 0 12px;
}

/* Соцсети */
.socials {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.socials a {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: var(--heading);
  color: #fefefe;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
}
.socials a:hover { opacity: 0.8; }
.socials svg { width: 14px; height: 14px; fill: currentColor; }

/* Нижняя полоса футера */
.footer__bottom {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--footer-border);
}
.footer__bottom,
.footer__legal {
  font-size: 12px;
  color: var(--muted);
}
.footer__legal {
  display: flex;
  gap: 24px;
}
.footer__legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer__legal a:hover { color: var(--ink); }

@media (max-width: 1020px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}


/* ---------------------------------------------------------
   10. Страница категории
   --------------------------------------------------------- */
.catalog {
  padding: 40px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.catalog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.catalog__crumbs { display: flex; align-items: center; gap: 8px; }
.breadcrumb {
  font-size: 11px;
  color: #8a8a8a;
  font-family: var(--font-footer);
}
.breadcrumb a {
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.breadcrumb a:hover { color: #2b2b2b; }
.breadcrumb__sep { margin-left: 2px; }

.catalog__title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 300;
  color: #2b2b2b;
  font-family: var(--font-footer);
}
.catalog__controls { display: flex; align-items: center; gap: 40px; }
/* Контролы (Фильтры + сортировка) скрыты по запросу */
.catalog__controls { display: none; }
.control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #2b2b2b;
  font-family: var(--font-footer);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition);
}
.control svg { width: 16px; height: 16px; }
.control--sort { color: #5a5a5a; font-weight: 400; }
.control--sort svg { width: 12px; height: 12px; }
.control:hover,
.control:hover, .control--sort:hover { color: var(--accent); }

/* Облако тегов подкатегорий */
.catalog__subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 4px 0 16px;
}
.tag-cloud__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid #ececf0;
  background: #fff;
  color: #2b2b2b;
  font-size: 13px;
  font-weight: 400;
  font-family: var(--font-body);
  text-decoration: none;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.tag-cloud__item:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.catalog__rows { display: flex; flex-direction: column; gap: 48px; }
.catalog__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.catalog__row:last-child { grid-template-columns: repeat(2, 1fr); }

.catalog-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background-color var(--transition);
}
.catalog-card:hover { background-color: #fff; }

.catalog-card__media {
  position: relative;
  height: clamp(360px, 58vh, 520px);
  border-radius: 5px;
  overflow: hidden;
  background: linear-gradient(150deg, #f2f2f4, #e6e6e9);
}
.catalog-card__media img { width: 100%; height: 100%; object-fit: cover; }

/* Контент карточки — обёртка с внутренним отступом */
.catalog-card__body {
  padding: 0em 1em 1em 1em;
}

/* Кнопки под ценой — появляются на ховере; место зарезервировано базовым отступом */
.catalog-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.catalog-card:hover .catalog-card__actions,
.catalog-card:focus-within .catalog-card__actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.catalog-card__title {
  font-size: 16px;
  font-weight: 400;
  color: #2b2b2b;
  font-family: var(--font-footer);
}
.catalog-card__title--lg { font-size: 20px; }
.catalog-card__title + .catalog-card__price { margin-top: 4px; }
.catalog-card__price {
  font-size: 13px;
  font-weight: 400;
  color: #5a5a5a;
  font-family: var(--font-footer);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding-top: 40px;
}
.pagination__item {
  font-size: 14px;
  font-family: var(--font-footer);
  color: #8a8a8a;
  transition: color var(--transition);
}
.pagination__item.is-active { color: #2b2b2b; font-weight: 600; }
.pagination__item--dots { color: #8a8a8a; }
.pagination__item:not(.is-active):not(.pagination__item--dots):hover { color: #2b2b2b; }

@media (max-width: 900px) {
  .catalog__row,
  .catalog__row:last-child { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .catalog__row,
  .catalog__row:last-child { grid-template-columns: 1fr; }
  .catalog__head { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------
   11. Страница товара (внутренняя)
   --------------------------------------------------------- */
.product {
  padding: 40px var(--gutter) 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
/* раскладка: галерея слева (сетка 2 в ряд), инфо-панель справа (липкая) */
.product__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 576px);
  gap: 40px;
  align-items: start;
}
/* галерея: мозаика (2+ фото) — сетка из 2 колонок */
.product__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
/* одиночное фото — на всю ширину блока, выше по вертикали */
.product__gallery--single {
  grid-template-columns: 1fr;
}
.product__gallery--single .product-gallery__item {
  grid-column: 1 / -1;
}
.product__gallery img {
  width: 100%;
  aspect-ratio: 430 / 448;
  object-fit: cover;
  border-radius: 5px;
  background: linear-gradient(150deg, #f2f2f4, #e6e6e9);
}
/* одиночное фото — выше по вертикали */
.product__gallery--single img {
  aspect-ratio: 430 / 560;
}

/* инфо-панель: остаётся на месте, пока галерея прокручивается */
.product__info {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.product__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product__title {
  font-size: 35px;
  font-weight: 400;
  line-height: 1.15;
  color: #2b2b2b;
  font-family: var(--font-footer);
}
.product__sku {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: #8a8a8a;
  letter-spacing: 0.01em;
}
/* Цена под заголовком скрыта: дублируется в блоке покупки. Разметка сохранена для Schema.org */
.product__price-block.wa-hide { display: none; }
/* Общий класс скрытия (кнопки/дубли) */
.wa-hide { display: none !important; }
.product__price-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product__price {
  font-size: 24px;
  font-weight: 400;
  color: #2b2b2b;
  font-family: var(--font-footer);
}
.product__rating { width: 76px; height: 15px; object-fit: contain; }
.product__instalment {
  font-size: 13px;
  color: #8a8a8a;
  font-family: var(--font-footer);
}

/* выбор размера */
.product__size-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product__label {
  font-size: 12px;
  font-weight: 500;
  color: #2b2b2b;
  font-family: var(--font-footer);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sizes { display: flex; flex-wrap: wrap; gap: 12px; }
.size {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e8e8e8;
  background: transparent;
  color: #2b2b2b;
  font-size: 13px;
  font-family: var(--font-footer);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.size:hover { border-color: #2b2b2b; }
.size.is-active {
  border-color: #2b2b2b;
  font-weight: 600;
}

/* добавление в корзину */
.product__buy { display: flex; flex-direction: column; gap: 12px; }
.buy {
  height: 56px;
  border-radius: 20px;
  background: #f2f2f2;
  border: 0;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-footer);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background var(--transition);
}
.buy:hover { background: #e6e6e6; }
.buy__note {
  text-align: center;
  font-size: 11px;
  color: #8a8a8a;
  font-family: var(--font-footer);
}

/* аккордеон */
.product__accordion { display: flex; flex-direction: column; }
.acc {
  border-top: 1px solid #e8e8e8;
  padding: 16px 0;
}
.acc:last-child { border-bottom: 1px solid #e8e8e8; }
.acc__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #2b2b2b;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-footer);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.acc__icon {
  width: 16px;
  height: 16px;
  color: #8a8a8a;
  transition: transform var(--transition);
  flex: none;
}
.acc.is-open .acc__icon { transform: rotate(180deg); }

/* Плавное раскрытие: анимируем grid-строку 0fr -> 1fr (без знания высоты) */
.acc__body {
  display: grid;
  grid-template-rows: 0fr;
  padding-top: 0;
  transition: grid-template-rows 300ms ease, padding-top 300ms ease;
}
.acc__body > .acc__inner {
  overflow: hidden;
  min-height: 0;
}
.acc.is-open .acc__body {
  grid-template-rows: 1fr;
  padding-top: 12px;
}
.acc__text {
  font-size: 14px;
  line-height: 21px;
  color: #5a5a5a;
  font-family: var(--font-footer);
}
.acc__delivery {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  font-family: var(--font-footer);
}

/* «С этим изделием носят» */
.related {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 40px;
}
.related__title {
  font-size: 35px;
  font-weight: 300;
  color: #191919;
  font-family: var(--font-footer);
}
.related__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1100px) {
  .product__layout { grid-template-columns: 1fr; }
  /* sticky отключаем — панель идёт в потоке после галереи */
  .product__info { position: static; padding-bottom: 40px; }
  .related__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .product__gallery { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .related__grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   12. Лукбуки
   --------------------------------------------------------- */
.lookbook {
  padding-bottom: 0;   /* Backstage прилегает к футеру (как на главной) */
}
/* на лукбуке отступ перед Backstage минимальный, чтобы ряды примыкали вплотную */
.lookbook .backstage { margin: 4px 0 0; }
/* верхний hero у нас уже стилизован; добавляем фото-подложку поверх градиента */
.lookbook-hero::before {
  background:
    radial-gradient(120% 80% at 70% 20%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(180deg, #6b6b6b 0%, #7d7d7d 55%, #5f5f5f 100%);
}

.lookbook__slide {
  gap: 14px;
}

/* сетка рядов лукбука — фото на всю ширину (full-bleed) */
.lookbook__rows {
  padding: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lookbook-row {
  position: relative;
  display: grid;
  gap: 4px;
  align-items: stretch;
}
.lookbook-row--a { grid-template-columns: repeat(2, 1fr); }
.lookbook-row--b { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.lookbook-row--c { grid-template-columns: repeat(2, 1fr); }

.lookbook-media {
  height: 100%;
  border-radius: 5px;
  overflow: hidden;
  background: linear-gradient(150deg, #f2f2f4, #e6e6e9);
}
.lookbook-row--a .lookbook-media { height: clamp(360px, 52vw, 640px); }
.lookbook-row--c .lookbook-media { height: clamp(320px, 42vw, 520px); }
.lookbook-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lookbook-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lookbook-col .lookbook-media { flex: 1; min-height: 0; }
.lookbook-media--tall { min-height: 320px; }

/* подпись поверх фото */
.lookbook-caption {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
  z-index: 2;
}
.lookbook-caption__title {
  font-size: 40px;
  font-weight: 300;
  font-family: var(--font-footer);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.lookbook-caption__sub {
  font-size: 13px;
  font-weight: 300;
  font-family: var(--font-footer);
  color: inherit;
  opacity: 0.70;
}
.lookbook-caption--light { color: #fff; }
.lookbook-caption--dark { color: #151515; }

@media (max-width: 900px) {
  .lookbook-row--b { grid-template-columns: 1fr; }
  .lookbook-col { flex-direction: row; }
  .lookbook-col .lookbook-media { min-height: 260px; }
}
@media (max-width: 680px) {
  .lookbook-row--a,
  .lookbook-row--c { grid-template-columns: 1fr; }
  .lookbook-row--a .lookbook-media,
  .lookbook-row--c .lookbook-media { height: clamp(280px, 62vw, 460px); }
  .lookbook-col { flex-direction: column; }
}

/* ---------------------------------------------------------
   13. Истории
   --------------------------------------------------------- */
.stories {
  padding-top: 48px;
}
.stories__head {
  margin-bottom: 12px;
}
.stories__title {
  font-size: 40px;
  font-weight: 300;
  font-family: var(--font-footer);
  color: #2B2B2B;
}
.stories__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 48px;
}
.stories__section {
  padding-bottom: 40px;
}
.stories__section-title {
  font-size: 28px;
  font-weight: 300;
  text-transform: uppercase;
  font-family: var(--font-footer);
  color: #2B2B2B;
  margin-bottom: 24px;
}
/* Видео и Книжный шкаф — по 3 в ряду */
.stories__grid--video,
.stories__grid--books {
  grid-template-columns: repeat(3, 1fr);
}
.stories__grid--video {
  gap: 24px;
  padding-bottom: 64px;
}
.stories__grid--books {
  gap: 32px;
  padding-bottom: 64px;
}

/* Карточка истории */
.story-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.story-card__media {
  border-radius: 5px;
  overflow: hidden;
  background: linear-gradient(150deg, #f2f2f4, #e6e6e9);
}
.story-card__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;   /* вертикальный формат Instagram-сторис */
  object-fit: cover;
  display: block;
}
.story-card__body { display: flex; flex-direction: column; gap: 8px; }
.story-card__meta {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.story-card__title {
  font-size: 16px;
  font-weight: 400;
  font-family: var(--font-footer);
  color: #2B2B2B;
  line-height: 1.4;
}

/* Видео-карточка (с play) — горизонтальная, 3 в ряд */
.story-card--video { gap: 16px; }
.story-card--video .story-card__media img {
  aspect-ratio: auto;
  height: 240px;
}
.story-card__media--overlay {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-card__media--overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.30);
}
.story-card__play {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  color: #2B2B2B;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
  z-index: 1;
}
.story-card__play svg { width: 26px; height: 26px; }
.story-card__play:hover { transform: scale(1.08); }
.story-card__video-title {
  font-size: 14px;
  font-weight: 500;
  color: #2B2B2B;
}

/* Книжный шкаф */
.book-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: #fff;
  border-radius: 5px;
}
.book-card__cover {
  width: 100px;
  height: 150px;
  flex: none;
  border-radius: 3px;
  overflow: hidden;
  background: linear-gradient(150deg, #f2f2f4, #e6e6e9);
}
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card__body { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.book-card__title {
  font-size: 15px;
  font-weight: 600;
  color: #2B2B2B;
}
.book-card__desc {
  font-size: 13px;
  font-weight: 400;
  color: #8A8A8A;
}
.book-card__link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  display: inline-block;
  width: max-content;
}
.book-card__link:hover { text-decoration: underline; }

@media (max-width: 1024px) {
  .stories__grid { grid-template-columns: repeat(2, 1fr); }
  .stories__grid--video,
  .stories__grid--books { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .stories__grid,
  .stories__grid--video,
  .stories__grid--books { grid-template-columns: 1fr; }
  .stories__head { margin-bottom: 24px; }
}

/* ---------------------------------------------------------
   14. Статья (отдельная история)
   --------------------------------------------------------- */
.article { padding-bottom: 0; }

/* Hero статьи */
.article__hero {
  position: relative;
  min-height: clamp(420px, 56vh, 640px);
  display: flex;
  align-items: flex-end;
  padding: 64px clamp(16px, 5vw, 64px);
  background-image: url(https://placehold.co/1440x640/6B6B6B/9a9a9a?text=Италия);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.article__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.40);
  z-index: -1;
}
.article__hero-inner {
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.article__meta-label {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.article__meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #FCFCFC;
}
.article__meta-date {
  color: #FCFCFC;
  font-size: 12px;
  font-weight: 400;
}
.article__title {
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 300;
  font-family: var(--font-footer);
  color: #FCFCFC;
  line-height: 1.15;
}
.article__lead {
  font-size: 16px;
  font-weight: 400;
  color: #D1D5DB;
  max-width: 640px;
}

/* Контент статьи — центр 800px на белом */
.article__body {
  padding: 80px clamp(16px, 5vw, 64px);
  background: #fff;
  display: flex;
  justify-content: center;
}
/* Тёмный заголовок для обычных страниц (privacy-policy и др.) */
.article__title--dark {
  color: #191919;
  margin: 0 0 8px;
}
/* Rich-контент страницы: h3, p, списки как в статье */
.article__rich {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.article__rich p,
.article__rich li {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #374151;
}
.article__rich p {
  margin: 0;
}
.article__rich h2 {
  font-size: 28px;
  font-weight: 300;
  font-family: var(--font-footer);
  color: #191919;
  margin: 24px 0 0;
}
.article__rich h3 {
  font-size: 20px;
  font-weight: 400;
  font-family: var(--font-footer);
  color: #191919;
  margin: 20px 0 0;
}
.article__rich ul,
.article__rich ol {
  padding-left: 24px;
  margin: 0;
}
.article__rich a {
  color: var(--accent);
  text-decoration: underline;
}
.article__content {
  width: min(100%, 800px);
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.article__text {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #374151;
}
.article__text--intro {
  font-size: 18px;
  font-weight: 300;
  color: #191919;
  line-height: 1.65;
}
.article__gallery {
  display: flex;
  gap: 24px;
}
.article__gallery img {
  flex: 1;
  min-width: 0;
  border-radius: 4px;
  height: 360px;
  object-fit: cover;
  display: block;
}
.article__subhead {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.article__subhead-title {
  font-size: 28px;
  font-weight: 300;
  font-family: var(--font-footer);
  color: #191919;
}
.article__subhead-divider {
  width: 80px;
  height: 2px;
  background: var(--accent);
}

/* Цитата */
.article__quote {
  padding: 24px 24px 24px 32px;
  background: #F3F3F3;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.article__quote-text {
  font-size: 20px;
  font-weight: 300;
  font-style: italic;
  color: #191919;
  line-height: 1.5;
}
.article__quote-author {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* Видео в статье */
.article__video {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: linear-gradient(rgba(26,26,26,0.50), rgba(26,26,26,0.50));
}
.article__video img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article__video-play {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  color: #1A1A1A;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
  z-index: 1;
}
.article__video-play svg { width: 24px; height: 24px; }
.article__video-play:hover { transform: scale(1.08); }
.article__video-caption {
  position: relative;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: 16px;
  z-index: 1;
}

/* Другие истории */
.article__more {
  padding: 80px clamp(16px, 5vw, 64px);
  background: #FCFCFC;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.article__more-title {
  font-size: 28px;
  font-weight: 300;
  font-family: var(--font-footer);
  color: #191919;
}
.article__more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
/* "Другие истории" — горизонтальные карточки (широкие), 3 в ряд */
.article__more-grid .story-card__media--wide {
  aspect-ratio: auto;
  height: 240px;
}
.article__more-grid .story-card__media--wide img {
  aspect-ratio: auto;
  height: 100%;
}

@media (max-width: 900px) {
  .article__more-grid { grid-template-columns: repeat(2, 1fr); }
  .article__gallery { flex-direction: column; }
  .article__gallery img { height: 300px; }
}
@media (max-width: 640px) {
  .article__more-grid { grid-template-columns: 1fr; }
  .article__gallery img { height: 220px; }
  .article__body { padding: 48px clamp(16px, 5vw, 64px); }
}

/* ---------------------------------------------------------
   15. Hover-слайдер фото в карточке товара (Webasyst)
   --------------------------------------------------------- */
.product_image_slider {
  position: relative;
  overflow: hidden;
}
.product_image_slider .product-card__media-link {
  display: block;
  width: 100%;
  aspect-ratio: 310 / 440;
}
.product_image_slider .image-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  transition: opacity 220ms ease;
}
.product_image_slider .image-item.is-current,
.product_image_slider:hover .image-item:nth-child(2) { opacity: 1; }
.product_image_slider .image-frame {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product_image_slider .image-zone { position: absolute; top: 0; bottom: 0; }
.product_image_slider .slider-indicators {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 3;
}
.product_image_slider .slider-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}
.product_image_slider .slider-indicator.active { background: #fff; }

/* ------------------------------------------------------
   16. Варианты товара (inline-select) — стиль O4 (как .size)
   ------------------------------------------------------ */
/* Обычные значения (размеры) — круглые кнопки как .size */
.product .options .inline-select a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 50% !important;
  color: #2b2b2b !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  font-family: var(--font-footer) !important;
  text-decoration: none !important;
  transition: border-color 200ms ease, color 200ms ease !important;
}
.product .options .inline-select a:hover {
  border-color: #2b2b2b !important;
}
.product .options .inline-select a.selected {
  border-color: #2b2b2b !important;
  font-weight: 600 !important;
}
/* Заголовок характеристики — как .product__label */
.product .options .inline-select p {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #2b2b2b !important;
  font-family: var(--font-footer) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 14px !important;
}
/* Цвета — круглые свотчи */
.product .options .inline-select.color a {
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid rgba(0,0,0,0.12) !important;
}
.product .options .inline-select.color a.selected {
  border-color: #2b2b2b !important;
  box-shadow: 0 0 0 2px rgba(43,43,43,0.15) !important;
}
.product .options .inline-select.color a .color_name {
  display: inline-block !important;
  position: static !important;
  font-size: 10px !important;
  color: #2b2b2b !important;
}
.product .options {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ------------------------------------------------------
   17. Количество (qty) на странице товара — стиль O4
   ------------------------------------------------------ */
.product .qty.quantity-wrapper {
  background: #f4f4f6;
  border-radius: 999px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.product .qty .volume-buttons {
  margin: 0;
}
.product .qty .increase-volume,
.product .qty .js-decrease {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e8e8e8;
  color: #2b2b2b;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition);
}
.product .qty .increase-volume:hover,
.product .qty .js-decrease:hover {
  border-color: #2b2b2b;
}
.product .qty .js-quantity-field {
  width: 48px;
  height: 36px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  color: #2b2b2b;
  -moz-appearance: textfield;
  appearance: textfield;
  padding: 0;
}
.product .qty .js-quantity-field {
  -webkit-appearance: none;
  margin: 0;
}

/* ------------------------------------------------------
   18. Панель фильтров категории (O4)
   ------------------------------------------------------ */
.catalog__filters {
  display: none;
  margin-top: 8px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #ececf0;
  border-radius: 14px;
}
.catalog__filters.is-open {
  display: block;
}
.catalog__filters-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.catalog__filters-body {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
}
.filter-param {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
}
.filter-param__name {
  font-size: 12px;
  font-weight: 500;
  color: #2b2b2b;
  font-family: var(--font-footer);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.filter-param__range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-param__input {
  width: 90px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  font-size: 13px;
  font-family: var(--font-body);
  color: #2b2b2b;
  background: #fafafc;
  text-align: center;
  outline: none;
}
.filter-param__input:focus {
  border-color: var(--accent);
}
.filter-param__sep {
  color: #b0b0b6;
}
.filter-param__option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: var(--font-body);
  color: #2b2b2b;
  cursor: pointer;
}
.filter-param__option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.catalog__filters-footer {
  display: flex;
  align-items: center;
  gap: 16px;
}
.catalog__filters-reset {
  font-size: 12px;
  font-family: var(--font-footer);
  color: var(--muted);
  text-decoration: underline;
}
.catalog__filters-reset:hover {
  color: var(--accent);
}

/* ---------------------------------------------------------
   Страница ошибки (404/403 и др.) — в стиле сайта.
   Разметка: error.html, одна и та же в темах shop/o4, blog/o4, photos/o4.
   --------------------------------------------------------- */
.errorpage {
  padding: 96px var(--gutter) 120px;
  display: flex;
  justify-content: center;
}
.errorpage__inner {
  width: min(100%, 640px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.errorpage__code {
  margin: 0;
  font-size: clamp(64px, 12vw, 140px);
  font-weight: 100;
  font-family: var(--font-footer);
  line-height: 0.9;
  color: var(--accent);
}
.errorpage__title {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 300;
  font-family: var(--font-footer);
  color: var(--ink);
  line-height: 1.15;
}
.errorpage__text {
  margin: 0;
  font-size: 16px;
  color: var(--ink-soft);
}
.errorpage__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
}
.errorpage__link {
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 180ms ease;
}
.errorpage__link:hover { color: var(--accent); }
@media (max-width: 560px) {
  .errorpage { padding: 64px var(--gutter) 80px; }
}

/* Поиск и текст на странице ошибки */
.errorpage__text {
  max-width: 520px;
  line-height: 1.6;
}
.errorpage__search {
  display: flex;
  gap: 8px;
  width: min(100%, 420px);
  margin: 4px 0 0;
}
.errorpage__search input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #e0e0e6;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
}
.errorpage__search input:focus {
  outline: none;
  border-color: var(--accent);
}
.errorpage__search button {
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease;
}
.errorpage__search button:hover { background: var(--accent-hover, #5f7f1f); }
@media (max-width: 560px) {
  .errorpage__search { flex-direction: column; }
  .errorpage__search button { width: 100%; }
}

/* ---------------------------------------------------------
   Поиск в шапке: на узких экранах строка выезжает под шапкой
   во всю ширину и открывается только по нажатию (тач).
   --------------------------------------------------------- */
@media (max-width: 768px) {
  .search { position: static; }
  .search__bar {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    height: 48px;
    padding: 0 6px 0 0;
    border-radius: var(--radius);
    transform: translateY(-10px);
    visibility: hidden;
    transition:
      opacity 220ms ease,
      transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1),
      visibility 0s;
  }
  .search.is-open .search__bar {
    width: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  /* на тач-экранах ховер не должен раскрывать строку */
  .search:hover .search__bar { width: auto; opacity: 0; visibility: hidden; pointer-events: none; }
  .search.is-open:hover .search__bar { opacity: 1; visibility: visible; pointer-events: auto; }
  .search__input { font-size: 15px; padding: 0 12px; }
  .search__submit { height: 38px; padding: 0 20px; }
}

/* ---------------------------------------------------------
   Поле в выезжающей строке поиска и в форме на 404.
   Общее правило темы (form input[type="search"] в css/webasyst-utilities.css)
   задаёт border 1px, radius 8px, фон и padding и по специфичности перебивает
   .search__input — из-за него внутри пилюли рисовалась лишняя рамка.
   Возвращаем полю вид без рамки, а фокус показываем рамкой самой пилюли.
   --------------------------------------------------------- */
.search__bar .search__input,
.search__bar .search__input:focus {
  width: auto;
  height: 100%;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  box-shadow: none;
  outline: none;
}
.search__bar .search__submit,
.search__bar .search__submit:focus {
  box-shadow: none;
  outline: none;
  border: 0;
}
.search__bar:focus-within { border-color: var(--accent); }

@media (max-width: 768px) {
  .search__bar .search__input { font-size: 15px; padding: 0 12px; }
}

/* Поле поиска на странице ошибки: уточняем селектор, чтобы общий стиль форм
   (form input[type="search"]) не перебивал наши border-radius и padding. */
.errorpage__search input[type="search"] {
  border: 1px solid #e0e0e6;
  border-radius: var(--radius);
  padding: 0 16px;
  background: #fff;
}

/* поле занимает всю высоту пилюли — клик в любом месте строки ставит курсор */
.search__bar .search__input { align-self: stretch; }

@media (max-width: 768px) {
  .search__bar .search__input { font-size: 15px; padding: 0 12px; }
}

/* Поле лежит внутри form, поэтому высоту задаём форме (flex-элементу пилюли):
   так поле занимает всю высоту строки и клик в любом месте ставит курсор. */
.search__bar .search__form { align-self: stretch; display: flex; align-items: center; }
.search__bar .search__input { align-self: stretch; height: auto; }

/* ---------------------------------------------------------
   По просьбе заказчика: все заголовки первого уровня (h1)
   и заголовки секций — заглавными буквами.
   --------------------------------------------------------- */
h1 { text-transform: uppercase; }
.section__title { text-transform: uppercase; }

/* ---------------------------------------------------------
   Подвал — единый стиль ссылок:
   - у ВСЕХ текстовых ссылок одна и та же АНИМИРОВАННАЯ линия
     (псевдоэлемент ::after, scaleX(0) → scaleX(1), 260 ms);
   - статичного text-decoration нет ни в одном состоянии,
     поэтому линия не дублируется;
   - иконки соцсетей — СТРОГО без подчёркиваний: и text-decoration,
     и псевдоэлемент-линия у них отключены.
   --------------------------------------------------------- */
.footer a,
.footer a:hover,
.footer a:focus-visible,
.footer a:active {
  text-decoration: none;
}

.footer__col a,
.footer__legal a,
.footer__bottom a {
  position: relative;
}
.footer__col a::after,
.footer__legal a::after,
.footer__bottom a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 260ms ease;
}
.footer__col a:hover::after,
.footer__legal a:hover::after,
.footer__bottom a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* ИКОНКИ СОЦСЕТЕЙ — строго без подчёркивания (в т.ч. без ::after-линии) */
.footer .socials a::after,
.footer .socials a:hover::after,
.footer .socials a:focus-visible::after,
.footer .socials a:active::after {
  content: none;
  display: none;
}
.footer .socials a,
.footer .socials a:hover,
.footer .socials a:focus-visible,
.footer .socials a:active {
  color: #fefefe;
  text-decoration: none;
}
.footer .socials a:hover { opacity: 0.8; }

/* ---------------------------------------------------------
   Мобильная шапка:
   - иконки справа становятся компактнее, чтобы их блок не
     выдавливал логотип из центра (был шире своей колонки);
   - слева от логотипа — ссылка «РИЛСЫ» на раздел рилсов.
   --------------------------------------------------------- */
.nav__mobile-link { display: none; }

@media (max-width: 900px) {
  .nav__left { gap: 10px; }
  .nav__actions { gap: 6px; }
  .icon-btn { width: 32px; height: 32px; }
  .icon-btn svg { width: 18px; height: 18px; }
  .nav__mobile-link {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: currentColor;
    text-decoration: none;
    opacity: 0.92;
    transition: opacity var(--transition);
  }
  .nav__mobile-link:hover { opacity: 1; }
}

@media (max-width: 520px) {
  .nav__actions { gap: 2px; }
  .icon-btn { width: 30px; height: 30px; }
}

@media (max-width: 380px) {
  .nav__actions { gap: 0; }
  .icon-btn { width: 28px; height: 28px; }
  .icon-btn svg { width: 17px; height: 17px; }
}

/* ---------------------------------------------------------
   Куки-баннер CookieBanner — в палитре и типографике сайта.
   Стили баннера живут в Shadow DOM, наружу выведены только
   CSS-переменные --cb-*, поэтому настраиваем через них:
   белая панель, рамка сайта, без тени, шрифт Exo 2,
   акцент — чёрный (по просьбе заказчика).
   Плюс ниже вставка в shadow root: полоса на всю ширину без скруглений.
   --------------------------------------------------------- */
#cookie-banner-host {
  --cb-font: 'Exo 2', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --cb-accent: #191919;
  --cb-accent-2: #191919;
  --cb-accent-text: #ffffff;
  --cb-bg: #ffffff;
  --cb-panel-bg: #ffffff;
  --cb-text: #191919;
  --cb-muted: rgba(25, 25, 25, 0.7);
  --cb-border: #e5e5ea;
  --cb-hover: #f5f5f7;
  --cb-track: #e0e0e6;
  --cb-shadow: none;
  --cb-overlay: rgba(0, 0, 0, 0.55);
}
