/* ============================================================
   COS WP Woo — стили библиотеки блоков, КОТОРЫХ НЕТ В ТЕМЕ
   ------------------------------------------------------------
   Подключается ВСЕГДА, в том числе при активной companion-теме
   cos-woo-theme. Причина: тема стилизует только те блоки, что
   существовали на момент её сборки (примитивы витрины масла.сайт),
   а библиотека выросла до 67 — витринные, товарные и нишевые
   блоки теме неизвестны. Раньше плагинный CSS при своей теме не
   подключался вовсе, и все эти секции рендерились голым HTML:
   иконки квадратами, плитки категорий одной строкой, карточки
   без сетки. Поймано визуально на wpbox 29.07.2026.

   Здесь ТОЛЬКО блоки, добавленные после темы. Общая часть
   (типографика, кнопки, hero, таблицы) осталась в
   wpaic-blocks.css и по-прежнему грузится лишь на чужой теме —
   иначе два набора правил на одни и те же классы двигали бы
   вёрстку живой витрины масла.сайт.

   Тема, которая возьмёт эти стили на себя, объявляет
   add_theme_support( 'wpaic-block-styles' ) — тогда слой молчит.
   ============================================================ */

/* Токены формы витрины: нужны блокам ниже и на чужой, и на своей
   теме. В :where() — тема и скин кита перебивают без !important. */
:where(:root){
  --ms-type-scale: 1;
  --ms-pad-block:  64px;
  --ms-pad-inline: 24px;
  --ms-btn-radius: var(--radius-xs, 4px);
  --wpc-pad:    0;
  --wpc-bg:     transparent;
  --wpc-radius: 0;
  --wpc-border: 0;
  --wpc-shadow: none;
}

/* Контейнер раскладки. Блоки живут не только на всю ширину экрана: их кладут
   в узкую колонку темы, в сайдбар, во вложенный `row/column` — и тогда ширина
   окна о раскладке не говорит ничего. Сетки ниже спрашивают ширину ближайшей
   из этих обёрток (`@container ms`), а не вьюпорта.

   ⚠️ `container-type: inline-size` включает layout-containment: контейнер
   становится системой координат для `position: fixed` потомков. Поэтому
   обёртка каталога (`.ms-catalog`) контейнером НЕ объявлена — внутри неё
   рендерится шторка фильтра на весь экран. Новую обёртку добавлять сюда
   только убедившись, что внутри нет фиксированных элементов. */
.ms-container,
.ms-sec__inner,
.ms-col { container: ms / inline-size; }

/* ⚠️ Пороги в @container — это ширина КОНТЕЙНЕРА, а не окна, и они меньше
   привычных: окно 860px давало колонку контента ~800px. Двухколоночные секции
   (комплект, сертификат, товар крупно, рецепт с фото, товар дня, подписка)
   складываются на 700px контейнера — иначе на теме с узкой колонкой контента
   вроде Storefront (~723px) они схлопывались в одну колонку уже на десктопе
   и оставляли пол-экрана пустым (поймано на wpbox 29.07.2026). */

/* Тёмные секции: чужая тема красит заголовки своей палитрой прямым селектором
   (`.entry-content h2`, `.wp-site-blocks h1`), а наш белый цвет держался на
   наследовании от секции — и наследование проигрывает. На Kadence заголовок
   первого экрана уходил в тёмно-синий на тёмно-буром фоне и просто исчезал
   (wpbox 29.07.2026). Цвет задаём явно и специфичнее типовых тем. */
.ms-hero :is(h1, h2, h3, .ms-hero__title),
.ms-closing :is(h1, h2, h3, .ms-closing__title),
.ms-section--dark :is(h1, h2, h3, h4, p, li),
.ms-sec--dark :is(h1, h2, h3, h4, p, li),
.ms-cover :is(h1, h2, h3, p),
.ms-banner__body :is(h1, h2, h3, p),
.ms-gift__card--blank :is(span, h2, h3) { color: #fff; }
/* Подсветка внутри заголовка первого экрана — акцентом, а не белым. */
.ms-hero .ms-hero__title .ms-hl { color: var(--masla-cyan-300, #7FD3EC); }

/* Чужая тема подчёркивает ссылки в контенте (Astra, Twenty Twenty-*, Storefront
   и ещё десяток), и структурные ссылки блоков приезжают с подчёркиванием:
   кнопки, плитки категорий, карточки товара, названия в таблице сравнения.
   `:is()` держит специфичность выше типовых `.entry-content a`, а
   `text-underline-offset` у оставшихся текстовых ссылок не трогаем. */
.ms-section a:is(.ms-btn, .ms-cat, .ms-brand, .ms-post, .ms-look, .ms-shopby, .ms-banner,
  .ms-cmp__prod, .ms-point__map, .ms-mate__link, .ms-catlist__head, .ms-hs__dot, .ms-cover--link),
.ms-section :is(.wpc, .ms-prods, .ms-bundle__item) a,
.ms-sec a:is(.ms-btn, .ms-cat, .ms-brand, .ms-post, .ms-cover--link) { text-decoration: none; }

/* Акцентная кнопка витринных блоков. Тема и wpaic-blocks.css знают
   --cyan/--ink/--bronze/--ghost, но не --primary: он приехал вместе с
   блоками витрины и не имел НИ ОДНОГО правила — «Подписаться» и «Взять
   комплектом» рисовались прозрачным прямоугольником. Цвет берём из
   --ms-accent, поэтому кнопка перекрашивается вместе со скином кита. */
.ms-btn--primary { background: var(--ms-accent, #2A9BC4); color: #fff; }
.ms-btn--primary:hover,
.ms-btn--primary:focus-visible { background: color-mix(in srgb, var(--ms-accent, #2A9BC4) 84%, #000); color: #fff; }

/* =========================================================================
   ПРИМИТИВЫ (слой 0): section / row / column / cover / carousel / icon-box
   Структурные блоки, из которых собираются произвольные виды страниц.
   ====================================================================== */

/* ---------- Секция ---------- */
.ms-sec { position: relative; background-size: cover; background-position: center; }
.ms-sec--media { overflow: hidden; }
.ms-sec__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
}
.ms-sec__veil { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ms-sec__inner { position: relative; z-index: 2; }
.ms-sec__inner--full { width: 100%; max-width: none; padding-inline: 0; }
.ms-sec--dark, .ms-sec--dark :where(h1,h2,h3,h4,h5,p,li,span) { color: #fff; }

.ms-p-none { padding-block: 0; }
.ms-p-sm   { padding-block: clamp(18px, 2.4vw, 28px); }
.ms-p-lg   { padding-block: clamp(48px, 6vw, 88px); }
.ms-p-xl   { padding-block: clamp(64px, 8vw, 128px); }

/* ---------- Строка и колонки ---------- */
.ms-row { display: grid; gap: var(--ms-gap, 24px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-row--1 { grid-template-columns: minmax(0, 1fr); }
.ms-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-row--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ms-row--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ms-row--2-1 { grid-template-columns: 2fr 1fr; }
.ms-row--1-2 { grid-template-columns: 1fr 2fr; }
.ms-row--3-1 { grid-template-columns: 3fr 1fr; }

.ms-gap-none { --ms-gap: 0; }
.ms-gap-sm   { --ms-gap: 12px; }
.ms-gap-md   { --ms-gap: 24px; }
.ms-gap-lg   { --ms-gap: clamp(24px, 3vw, 44px); }

.ms-va-start   { align-items: start; }
.ms-va-center  { align-items: center; }
.ms-va-end     { align-items: end; }
.ms-va-stretch { align-items: stretch; }

.ms-col { min-width: 0; }
.ms-col--pad { padding: clamp(16px, 2vw, 28px); border-radius: var(--radius-md); }
.ms-col--top    { align-self: start; }
.ms-col--middle { align-self: center; }
.ms-col--bottom { align-self: end; }
.ms-col--3  { grid-column: span 3; }
.ms-col--4  { grid-column: span 4; }
.ms-col--6  { grid-column: span 6; }
.ms-col--8  { grid-column: span 8; }
.ms-col--9  { grid-column: span 9; }
.ms-col--12 { grid-column: 1 / -1; }

/* Колонки с явной долей работают в 12-колоночной сетке. */
.ms-row:has(> .ms-col[class*="ms-col--"]) { grid-template-columns: repeat(12, minmax(0, 1fr)); }

@media (max-width: 860px) {
  .ms-row { grid-template-columns: minmax(0, 1fr) !important; }
  .ms-col { grid-column: 1 / -1 !important; }
  .ms-row--rev-m { display: flex; flex-direction: column-reverse; }
}

/* ---------- Обложка ---------- */
.ms-cover {
  position: relative; display: flex; overflow: hidden;
  border-radius: var(--radius-md);
  background-size: cover; background-position: center;
  min-height: 220px; padding: clamp(20px, 3vw, 40px);
  isolation: isolate;
}
.ms-cover__veil { position: absolute; inset: 0; z-index: 1; }
.ms-cover__body { position: relative; z-index: 2; max-width: 640px; }
.ms-cover--center      { align-items: center; justify-content: center; text-align: center; }
.ms-cover--left        { align-items: center; justify-content: flex-start; }
.ms-cover--right       { align-items: center; justify-content: flex-end; text-align: right; }
.ms-cover--bottom      { align-items: flex-end; justify-content: center; text-align: center; }
.ms-cover--bottom-left { align-items: flex-end; justify-content: flex-start; }
.ms-cover--link { text-decoration: none; color: inherit; }

/* Эффект наведения — на фон, а не на весь блок: текст не «плывёт». */
.ms-cover--hv-zoom { transition: background-size 420ms var(--ease-out, ease); background-size: 100% auto; }
.ms-cover--hv-zoom:hover { background-size: 108% auto; }
.ms-cover--hv-fade .ms-cover__veil { transition: opacity 240ms var(--ease-out, ease); }
.ms-cover--hv-fade:hover .ms-cover__veil { opacity: .55; }

@media (prefers-reduced-motion: reduce) {
  .ms-cover--hv-zoom, .ms-cover--hv-fade .ms-cover__veil { transition: none; }
  .ms-cover--hv-zoom:hover { background-size: 100% auto; }
}

/* ---------- Карусель (scroll-snap, без JS) ---------- */
.ms-carousel { --ms-per: 3; --ms-per-m: 1; overflow: hidden; }
.ms-carousel__track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--ms-per) - 1) * var(--ms-gap, 24px)) / var(--ms-per));
  gap: var(--ms-gap, 24px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 6px;
}
.ms-carousel__track > * { scroll-snap-align: start; min-width: 0; }
.ms-carousel--nosnap .ms-carousel__track { scroll-snap-type: none; }

@container ms (max-width: 860px) {
  .ms-carousel__track {
    grid-auto-columns: calc((100% - (var(--ms-per-m) - 1) * var(--ms-gap, 24px)) / var(--ms-per-m));
  }
}

/* ---------- Иконка с текстом ---------- */
.ms-iconbox { display: flex; gap: 14px; min-width: 0; }
.ms-iconbox--top    { flex-direction: column; }
.ms-iconbox--center { flex-direction: column; align-items: center; text-align: center; }
.ms-iconbox--side   { flex-direction: row; align-items: flex-start; }
.ms-iconbox--card {
  background: #fff; border-radius: var(--radius-md);
  padding: clamp(18px, 2vw, 26px); box-shadow: var(--shadow-1);
}
.ms-iconbox--outline {
  border: 1px solid var(--border-default, #E2E6EB);
  border-radius: var(--radius-md); padding: clamp(18px, 2vw, 26px);
}
.ms-iconbox__ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: var(--ms-accent-soft, rgba(42,155,196,.12));
  color: var(--ms-accent, #2A9BC4);
}
.ms-iconbox__img { width: 48px; height: 48px; object-fit: contain; flex: 0 0 auto; }
.ms-iconbox__body { min-width: 0; }
.ms-iconbox__title { font-size: 17px; font-weight: 650; margin: 0 0 6px; }
.ms-iconbox__text  { font-size: 15px; color: var(--fg-secondary, #4A5663); margin: 0; }
.ms-iconbox__link {
  display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600;
  color: var(--ms-accent, #2A9BC4); text-decoration: none;
}
.ms-iconbox__link:hover { text-decoration: underline; }

/* ---------- Холст контейнера в редакторе ---------- */
.cwt-inner { min-height: 60px; }

/* =========================================================================
   ВИТРИННЫЕ БЛОКИ (слой 1)
   ====================================================================== */

/* ---------- Шапка секции с ссылкой «показать все» ---------- */
.ms-head--row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: clamp(16px, 2vw, 28px); flex-wrap: wrap;
}
.ms-head__text { min-width: 0; }
.ms-head__title { margin: 0; font-size: clamp(22px, 2.4vw, 32px); font-weight: 680; letter-spacing: -.01em; }
.ms-head__lead { margin: 6px 0 0; color: var(--fg-secondary, #4A5663); font-size: 15px; }
.ms-head__more {
  flex: 0 0 auto; font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--ms-accent, #2A9BC4); white-space: nowrap;
}
.ms-head__more:hover { text-decoration: underline; }

/* ---------- Категории ---------- */
.ms-cats { display: grid; gap: clamp(12px, 1.6vw, 22px); }
.ms-cats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-cats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-cats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-cats--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ms-cats--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.ms-cat {
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: inherit; min-width: 0;
}
.ms-cat__img {
  display: block; width: 100%; aspect-ratio: 1 / 1;
  background-size: cover; background-position: center;
  border-radius: var(--radius-md);
  background-color: var(--bg-soft, #F6F8FA);
  transition: transform 260ms var(--ease-out, ease);
}
/* Категория без фото — обычное состояние свежего магазина: товары уже есть,
   картинок разделов ещё нет. Серый квадрат с иконкой читался как «не
   загрузилось» (увидено на wpbox 29.07.2026), поэтому плитка сама по себе
   выглядит законченной: мягкая заливка из акцента магазина и крупная
   полупрозрачная иконка, а не одинокий значок по центру. */
.ms-cat__img--empty {
  display: grid; place-items: center;
  color: color-mix(in srgb, var(--ms-accent, #2A9BC4) 55%, transparent);
  background-image:
    radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--ms-accent, #2A9BC4) 16%, transparent), transparent 60%),
    linear-gradient(160deg, var(--bg-soft, #F6F8FA), color-mix(in srgb, var(--ms-accent, #2A9BC4) 8%, var(--bg-soft, #F6F8FA)));
}
.ms-cat__img--empty svg { width: 34%; height: 34%; opacity: .55; }
.ms-cat:hover .ms-cat__img { transform: translateY(-3px); }
.ms-cat__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-cat__name  { font-weight: 620; font-size: 15px; }
.ms-cat__count { font-size: 13px; color: var(--fg-muted, #6C7682); }

.ms-cats--circle .ms-cat__img { border-radius: 50%; }
.ms-cats--circle .ms-cat      { text-align: center; align-items: center; }
.ms-cats--tall  .ms-cat__img  { aspect-ratio: 3 / 4; }
.ms-cats--wide  .ms-cat__img  { aspect-ratio: 4 / 3; }

@container ms (max-width: 860px) {
  .ms-cats--4, .ms-cats--5, .ms-cats--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-cats--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Промо-баннеры ---------- */
.ms-banners { display: grid; gap: clamp(12px, 1.6vw, 22px); }
.ms-banners--1 { grid-template-columns: minmax(0, 1fr); }
.ms-banners--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-banners--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ms-banner {
  position: relative; display: flex; overflow: hidden;
  min-height: 200px; padding: clamp(20px, 2.6vw, 36px);
  border-radius: var(--radius-md);
  background-size: cover; background-position: center;
  background-color: var(--bg-soft, #F6F8FA);
  text-decoration: none; color: inherit;
}
/* Читаемость текста поверх произвольного фото — без ручной настройки. */
.ms-banner::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(19,22,29,.55), rgba(19,22,29,.05));
  opacity: .9;
}
.ms-banner--center::before { background: linear-gradient(0deg, rgba(19,22,29,.5), rgba(19,22,29,.2)); }
.ms-banner--right::before  { background: linear-gradient(270deg, rgba(19,22,29,.55), rgba(19,22,29,.05)); }

.ms-banner__body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; max-width: 26ch; color: #fff; }
.ms-banner--left        { align-items: center; justify-content: flex-start; }
.ms-banner--center      { align-items: center; justify-content: center; text-align: center; }
.ms-banner--center .ms-banner__body { align-items: center; }
.ms-banner--right       { align-items: center; justify-content: flex-end; text-align: right; }
.ms-banner--right .ms-banner__body  { align-items: flex-end; }
.ms-banner--bottom-left { align-items: flex-end; justify-content: flex-start; }

.ms-banner__eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  opacity: .9;
}
.ms-banner__title { font-size: clamp(19px, 2vw, 27px); font-weight: 700; line-height: 1.15; }
.ms-banner__text  { font-size: 14px; opacity: .92; }
.ms-banner__btn {
  align-self: flex-start; margin-top: 6px;
  padding: 9px 18px; border-radius: var(--radius-pill);
  background: #fff; color: var(--ink, #14181F);
  font-size: 14px; font-weight: 640;
  transition: transform 160ms var(--ease-out, ease);
}
.ms-banner--center .ms-banner__btn { align-self: center; }
.ms-banner--right .ms-banner__btn  { align-self: flex-end; }
.ms-banner:hover .ms-banner__btn   { transform: translateY(-2px); }

@container ms (max-width: 860px) {
  .ms-banners--2, .ms-banners--3 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Полоса преимуществ ---------- */
.ms-usps { display: grid; gap: clamp(14px, 2vw, 26px); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-usps--card {
  background: #fff; border-radius: var(--radius-md);
  padding: clamp(18px, 2vw, 28px); box-shadow: var(--shadow-1);
}
.ms-usp { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.ms-usp__ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: var(--ms-accent-soft, rgba(42,155,196,.12));
  color: var(--ms-accent, #2A9BC4);
}
.ms-usp__body  { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-usp__title { font-size: 15px; font-weight: 640; }
.ms-usp__text  { font-size: 13px; color: var(--fg-secondary, #4A5663); }
.ms-usps--div .ms-usp + .ms-usp,
.ms-usps--div .ms-usp:not(:first-child) {
  border-left: 1px solid var(--border-default, #E2E6EB); padding-left: clamp(14px, 2vw, 26px);
}

@container ms (max-width: 980px) { .ms-usps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container ms (max-width: 560px) {
  .ms-usps { grid-template-columns: minmax(0, 1fr); }
  .ms-usps--div .ms-usp:not(:first-child) { border-left: 0; padding-left: 0; }
}

/* ---------- Бегущая строка ---------- */
.ms-marquee {
  --ms-mq-dur: 30s;
  overflow: hidden; padding: 12px 0;
  background: var(--ink, #14181F); color: #fff;
  white-space: nowrap;
}
.ms-marquee--lg { font-size: clamp(20px, 3vw, 40px); font-weight: 700; letter-spacing: -.01em; }
.ms-marquee__track { display: flex; width: max-content; animation: ms-mq var(--ms-mq-dur) linear infinite; }
.ms-marquee__unit  { display: flex; align-items: center; gap: 18px; padding-right: 18px; }
.ms-marquee__item  { font-size: inherit; font-weight: inherit; }
.ms-marquee__sep   { opacity: .5; }
.ms-marquee:hover .ms-marquee__track { animation-play-state: paused; }

@keyframes ms-mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ms-marquee__track { animation: none; }
  .ms-marquee { white-space: normal; }
}

/* ---------- Таймер ---------- */
.ms-countdown { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.ms-countdown__title { margin: 0; font-size: clamp(22px, 2.6vw, 34px); font-weight: 700; }
.ms-countdown__lead  { margin: 0; color: var(--fg-secondary, #4A5663); }
.ms-clock { display: flex; gap: 10px; align-items: flex-end; }
.ms-clock__cell { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; }
.ms-clock__num  { font-size: clamp(26px, 3.4vw, 40px); font-weight: 720; font-variant-numeric: tabular-nums; line-height: 1; }
.ms-clock__lbl  { font-size: 12px; color: var(--fg-muted, #6C7682); text-transform: lowercase; }
.ms-countdown--boxes .ms-clock__cell {
  background: #fff; border-radius: var(--radius-md);
  padding: 12px 14px; box-shadow: var(--shadow-1);
}
.ms-clock--ended { font-size: 18px; font-weight: 640; color: var(--fg-secondary, #4A5663); }

/* ---------- Сворачиваемый текст ---------- */
.ms-collapse { --ms-collapse-h: 200px; position: relative; }
.ms-collapse__body {
  max-height: var(--ms-collapse-h); overflow: hidden;
  position: relative;
  color: var(--fg-secondary, #4A5663);
}
/* Затухание края — подсказка, что текст продолжается. */
.ms-collapse:not([open]) .ms-collapse__body::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 72px;
  background: linear-gradient(180deg, transparent, var(--neutral-0, #fff));
  pointer-events: none;
}
.ms-collapse[open] .ms-collapse__body { max-height: none; }
.ms-collapse__toggle {
  order: 2; margin-top: 12px; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 640; color: var(--ms-accent, #2A9BC4);
  display: inline-block;
}
.ms-collapse__toggle::-webkit-details-marker { display: none; }
.ms-collapse { display: flex; flex-direction: column; }
.ms-collapse__body { order: 1; }
.ms-collapse[open]  .ms-collapse__more { display: none; }
.ms-collapse:not([open]) .ms-collapse__less { display: none; }

/* ---------- Стрелки карусели (добавляет wpaic-blocks.js) ---------- */
.ms-carousel { position: relative; }
.ms-carousel__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border-default, #E2E6EB);
  background: #fff; color: var(--ink, #14181F);
  cursor: pointer; display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-1); z-index: 3;
}
.ms-carousel--has-nav .ms-carousel__nav { display: flex; }
.ms-carousel__nav[disabled] { opacity: .35; cursor: default; }
.ms-carousel__nav--prev { left: -6px; }
.ms-carousel__nav--next { right: -6px; }
.ms-carousel__nav::before {
  content: ''; width: 9px; height: 9px;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
}
.ms-carousel__nav--prev::before { transform: rotate(-135deg); margin-left: 3px; }
.ms-carousel__nav--next::before { transform: rotate(45deg); margin-right: 3px; }

@container ms (max-width: 860px) { .ms-carousel__nav { display: none !important; } }

/* =========================================================================
   ТОВАРНЫЕ И СОЦИАЛЬНЫЕ БЛОКИ
   ====================================================================== */

/* ---------- Сетка / список товаров ---------- */
.ms-prods { display: grid; gap: clamp(12px, 1.6vw, 24px); }
.ms-prods--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-prods--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-prods--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-prods--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ms-prods--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ms-prods--list { grid-template-columns: minmax(0, 1fr); }

/* Вид «список»: карточка раскладывается горизонтально — та же разметка. */
.ms-prods--list .pc {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start;
}
.ms-prods--list .pc-media { margin: 0; }

@container ms (max-width: 1100px) { .ms-prods--5, .ms-prods--6 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container ms (max-width: 860px) { .ms-prods--3, .ms-prods--4, .ms-prods--5, .ms-prods--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container ms (max-width: 560px) { .ms-prods--list .pc { grid-template-columns: 110px minmax(0, 1fr); } }

/* ---------- Вкладки товаров (radio + :checked, без JS) ---------- */
.ms-tabs { position: relative; }
.ms-tabs__radio { position: absolute; opacity: 0; pointer-events: none; }
.ms-tabs__label {
  display: inline-block; margin: 0 6px 14px 0; padding: 9px 18px;
  border-radius: var(--radius-pill); border: 1px solid var(--border-default, #E2E6EB);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 160ms, color 160ms, border-color 160ms;
}
.ms-tabs__label:hover { border-color: var(--ms-accent, #2A9BC4); }
.ms-tabs__radio:checked + .ms-tabs__label {
  background: var(--ms-accent, #2A9BC4); border-color: var(--ms-accent, #2A9BC4); color: #fff;
}
.ms-tabs__radio:focus-visible + .ms-tabs__label { box-shadow: var(--shadow-focus, 0 0 0 3px rgba(42,155,196,.28)); }
.ms-tabs__panes { display: grid; }
.ms-tabs__pane  { grid-area: 1 / 1; visibility: hidden; opacity: 0; }

/* n-я радиокнопка показывает n-ю панель. */
.ms-tabs__radio:nth-of-type(1):checked ~ .ms-tabs__panes .ms-tabs__pane:nth-child(1),
.ms-tabs__radio:nth-of-type(2):checked ~ .ms-tabs__panes .ms-tabs__pane:nth-child(2),
.ms-tabs__radio:nth-of-type(3):checked ~ .ms-tabs__panes .ms-tabs__pane:nth-child(3),
.ms-tabs__radio:nth-of-type(4):checked ~ .ms-tabs__panes .ms-tabs__pane:nth-child(4),
.ms-tabs__radio:nth-of-type(5):checked ~ .ms-tabs__panes .ms-tabs__pane:nth-child(5) {
  visibility: visible; opacity: 1;
}

/* ---------- Товар дня ---------- */
.ms-deal { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: center; }
.ms-deal__title { margin: 0 0 8px; font-size: clamp(22px, 2.6vw, 34px); font-weight: 700; }
.ms-deal__lead  { margin: 0 0 18px; color: var(--fg-secondary, #4A5663); }
.ms-deal__side .ms-clock { margin-bottom: 18px; }
.ms-deal__progress { max-width: 380px; }
.ms-deal__bar {
  height: 8px; border-radius: var(--radius-pill);
  background: var(--neutral-200, #E2E6EB); overflow: hidden;
}
.ms-deal__bar > span {
  display: block; height: 100%; border-radius: inherit;
  background: var(--ms-accent, #2A9BC4);
}
.ms-deal__sold { margin: 8px 0 0; font-size: 13px; color: var(--fg-muted, #6C7682); }

@container ms (max-width: 700px) { .ms-deal { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Бренды ---------- */
.ms-brands { display: grid; gap: clamp(10px, 1.4vw, 18px); align-items: center; }
.ms-brands--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-brands--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-brands--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ms-brands--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ms-brands--8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.ms-brand {
  display: flex; align-items: center; justify-content: center;
  min-height: 72px; padding: 12px;
  border-radius: var(--radius-sm); text-decoration: none;
  color: var(--fg-secondary, #4A5663);
}
.ms-brand__logo { max-width: 100%; max-height: 48px; object-fit: contain; }
.ms-brand__name { font-weight: 620; font-size: 15px; }
.ms-brands--gray .ms-brand__logo { filter: grayscale(1); opacity: .65; transition: filter 200ms, opacity 200ms; }
.ms-brands--gray .ms-brand:hover .ms-brand__logo { filter: none; opacity: 1; }

@container ms (max-width: 860px) {
  .ms-brands--5, .ms-brands--6, .ms-brands--8 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Отзывы ---------- */
.ms-reviews { display: grid; gap: clamp(12px, 1.6vw, 22px); }
.ms-reviews--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-reviews--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-reviews--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-review {
  margin: 0; background: #fff; border-radius: var(--radius-md);
  padding: clamp(18px, 2vw, 26px); box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 12px;
}
.ms-review__stars { display: flex; gap: 2px; font-size: 15px; color: var(--neutral-300, #C7CDD5); }
.ms-star.is-on { color: #F0A93B; }
.ms-review__text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--fg-primary, #29333D); }
.ms-review__meta { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.ms-review__ava {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  object-fit: cover; background: var(--bg-soft, #F6F8FA);
  display: grid; place-items: center; font-weight: 700; color: var(--fg-muted, #6C7682);
}
.ms-review__who { display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; }
.ms-review__who span { color: var(--fg-muted, #6C7682); }

@container ms (max-width: 860px) { .ms-reviews--3, .ms-reviews--4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Подписка ---------- */
.ms-news--row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: clamp(20px, 3vw, 48px); align-items: center;
}
.ms-news--center { text-align: center; max-width: 620px; margin-inline: auto; }
.ms-news--center .ms-news__form { justify-content: center; }
.ms-news__title { margin: 0 0 6px; font-size: clamp(21px, 2.4vw, 30px); font-weight: 700; }
.ms-news__lead  { margin: 0; color: var(--fg-secondary, #4A5663); }
.ms-news__form  { display: flex; gap: 8px; flex-wrap: wrap; }
.ms-news__input {
  flex: 1 1 200px; min-width: 0;
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default, #E2E6EB); font-size: 15px;
}
.ms-news__input:focus { outline: none; border-color: var(--ms-accent, #2A9BC4); box-shadow: var(--shadow-focus, 0 0 0 3px rgba(42,155,196,.28)); }
.ms-news__btn { flex: 0 0 auto; }
.ms-news__priv { display: block; margin-top: 10px; font-size: 12px; color: var(--fg-muted, #6C7682); }
.ms-news__msg  { margin: 8px 0 0; font-size: 14px; flex-basis: 100%; }
.ms-news__msg.is-ok  { color: var(--success, #2E7D5B); }
.ms-news__msg.is-err { color: var(--danger, #B4413C); }
/* Honeypot: видим только ботам. */
.cwt-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

@container ms (max-width: 700px) { .ms-news--row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Подбор по задаче ---------- */
.ms-shopbys { display: grid; gap: clamp(12px, 1.6vw, 22px); }
.ms-shopbys--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-shopbys--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-shopbys--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ms-shopbys--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ms-shopby {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; text-decoration: none; color: inherit;
  padding: 16px; border-radius: var(--radius-md);
  transition: background 180ms;
}
.ms-shopby:hover { background: var(--bg-soft, #F6F8FA); }
.ms-shopby__img {
  width: 96px; height: 96px; border-radius: var(--radius-md);
  background-size: cover; background-position: center;
  background-color: var(--bg-soft, #F6F8FA);
  display: grid; place-items: center; color: var(--ms-accent, #2A9BC4);
}
.ms-shopbys--round .ms-shopby__img { border-radius: 50%; }
/* Подпись и пояснение — инлайновые теги (b + span), и без колонки они
   слипались в одну строку: «Сухостьувлажнение и барьер». Видно только
   глазами на витрине — ни один тест такое не ловит. */
.ms-shopby__body  { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.ms-shopby__label { font-size: 15px; font-weight: 640; line-height: 1.25; }
.ms-shopby__sub   { font-size: 13px; line-height: 1.35; color: var(--fg-muted, #6C7682); }

@container ms (max-width: 860px) {
  .ms-shopbys--4, .ms-shopbys--5, .ms-shopbys--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Категории списком ---------- */
.ms-catlists { display: grid; gap: clamp(16px, 2vw, 32px); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.ms-catlist__head {
  display: block; font-weight: 680; font-size: 16px; margin-bottom: 10px;
  text-decoration: none; color: inherit;
}
.ms-catlist__head:hover { color: var(--ms-accent, #2A9BC4); }
.ms-catlist__items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ms-catlist__items a { text-decoration: none; color: var(--fg-secondary, #4A5663); font-size: 14px; }
.ms-catlist__items a:hover { color: var(--ms-accent, #2A9BC4); }
.ms-catlist__num { color: var(--fg-muted, #6C7682); font-size: 12px; }

/* ---------- Товар крупно ---------- */
.ms-spot {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(20px, 3vw, 48px); align-items: center;
}
.ms-spot--right { direction: rtl; }
.ms-spot--right > * { direction: ltr; }
.ms-spot__media {
  display: block; border-radius: var(--radius-md); overflow: hidden;
  background: var(--bg-soft, #F6F8FA);
}
.ms-spot__media img { display: block; width: 100%; height: auto; }
.ms-spot__body { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.ms-spot__eyebrow {
  padding: 4px 12px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--ms-accent, #2A9BC4) 12%, #fff);
  color: var(--ms-accent, #2A9BC4); font-size: 12px; font-weight: 640;
  text-transform: uppercase; letter-spacing: .04em;
}
.ms-spot__title { margin: 0; font-size: clamp(24px, 3vw, 40px); font-weight: 700; line-height: 1.15; }
.ms-spot__price { margin: 0; font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; }
.ms-spot__price del { font-size: 16px; font-weight: 400; color: var(--fg-muted, #6C7682); margin-right: 8px; }
.ms-spot__text { color: var(--fg-secondary, #4A5663); }
.ms-spot__text p { margin: 0 0 8px; }
.ms-spot__specs { margin: 0; width: 100%; max-width: 460px; }
.ms-spot__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

@container ms (max-width: 700px) {
  .ms-spot { grid-template-columns: minmax(0, 1fr); }
  .ms-spot--right { direction: ltr; }
}

/* ---------- Статьи блога ---------- */
.ms-posts { display: grid; gap: clamp(14px, 1.8vw, 24px); }
.ms-posts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-posts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-posts--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-post {
  display: flex; flex-direction: column; min-width: 0;
  text-decoration: none; color: inherit;
  background: #fff; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-1); transition: box-shadow 180ms, transform 180ms;
}
.ms-post:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.ms-post__img { display: block; aspect-ratio: 16 / 10; background: var(--bg-soft, #F6F8FA); }
.ms-post__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ms-post__body { display: flex; flex-direction: column; gap: 8px; padding: clamp(14px, 1.6vw, 20px); }
.ms-post__meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--fg-muted, #6C7682); }
.ms-post__cat { color: var(--ms-accent, #2A9BC4); font-weight: 640; }
.ms-post__title { font-size: 16px; font-weight: 640; line-height: 1.3; }
.ms-post:hover .ms-post__title { color: var(--ms-accent, #2A9BC4); }
.ms-post__text { font-size: 14px; line-height: 1.5; color: var(--fg-secondary, #4A5663); }

@container ms (max-width: 860px) {
  .ms-posts--3, .ms-posts--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container ms (max-width: 560px) {
  .ms-posts--2, .ms-posts--3, .ms-posts--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Команда ---------- */
.ms-mates { display: grid; gap: clamp(14px, 1.8vw, 24px); }
.ms-mates--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-mates--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-mates--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-mate { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.ms-mates--card .ms-mate {
  background: #fff; border-radius: var(--radius-md);
  padding: clamp(16px, 2vw, 24px); box-shadow: var(--shadow-1);
}
.ms-mate__photo {
  width: 104px; height: 104px; margin-bottom: 6px;
  border-radius: 50%; background-size: cover; background-position: center;
  background-color: var(--bg-soft, #F6F8FA);
  display: grid; place-items: center;
  font-size: 34px; font-weight: 700; color: var(--fg-muted, #6C7682);
}
/* Прямоугольное фото ограничиваем по ширине: на широкой колонке портрет
   3:4 вырастал до полуметра экрана и человек занимал больше места, чем товар. */
.ms-mates--square .ms-mate__photo {
  width: 100%; max-width: 240px; height: auto; aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
}
.ms-mate__name { font-size: 16px; font-weight: 680; }
.ms-mate__role { font-size: 13px; color: var(--ms-accent, #2A9BC4); font-weight: 600; }
.ms-mate__text { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--fg-secondary, #4A5663); }
.ms-mate__links { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.ms-mate__link { font-size: 14px; text-decoration: none; color: var(--fg-primary, #29333D); }
.ms-mate__link:hover { color: var(--ms-accent, #2A9BC4); }

@container ms (max-width: 860px) { .ms-mates--3, .ms-mates--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container ms (max-width: 480px) { .ms-mates--2, .ms-mates--3, .ms-mates--4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Комплект ---------- */
.ms-bundle {
  display: grid; gap: clamp(18px, 2.4vw, 32px);
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: center;
}
/* Плюсы между карточками — часть композиции «товар + товар = комплект»,
   поэтому позиции и знаки живут в одной flex-строке, а не в сетке. */
.ms-bundle__items { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(10px, 1.4vw, 18px); }
.ms-bundle__item { flex: 1 1 180px; min-width: 0; }
.ms-bundle__plus {
  flex: 0 0 auto; font-size: 26px; line-height: 1; font-weight: 300;
  color: var(--fg-muted, #6C7682);
}
.ms-bundle__total {
  padding: clamp(16px, 2vw, 24px);
  background: #fff; border-radius: var(--radius-md);
  border: 1px solid var(--border-default, #E2E6EB);
  display: grid; gap: 10px; justify-items: start;
}
.ms-bundle__label { font-size: 13px; color: var(--fg-muted, #6C7682); }
.ms-bundle__price { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.ms-bundle__was { color: var(--fg-muted, #6C7682); font-size: 15px; }
.ms-bundle__now { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; line-height: 1.1; }
.ms-bundle__save {
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--ms-accent, #2A9BC4) 12%, #fff);
  color: var(--ms-accent, #2A9BC4); font-size: 13px; font-weight: 640;
}
.ms-bundle__btn { width: 100%; }
.ms-bundle__note { margin: 0; font-size: 13px; color: var(--fg-muted, #6C7682); }

@container ms (max-width: 700px) {
  .ms-bundle { grid-template-columns: minmax(0, 1fr); }
  .ms-bundle__item { flex-basis: 140px; }
}
/* На узком экране «плюс» между позициями теряет смысл: карточки всё равно
   переносятся, и знак повисает у правого края в конце строки (wpbox, 375px).
   Ровная сетка из двух колонок читается как комплект и без него. */
@container ms (max-width: 1000px) {
  .ms-bundle__items {
    display: grid; align-items: stretch;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .ms-bundle__plus { display: none; }
}

/* =========================================================================
   НИШЕВЫЕ БЛОКИ (слой 2): бьюти и одежда
   ====================================================================== */

/* ---------- До / после ---------- */
.ms-ba {
  --ba-pos: 50%;
  position: relative; overflow: hidden;
  border-radius: var(--radius-md); background: var(--bg-soft, #F6F8FA);
  user-select: none;
}
.ms-ba__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ms-ba__clip {
  position: absolute; inset: 0; overflow: hidden;
  width: var(--ba-pos);
}
.ms-ba__clip .ms-ba__img {
  /* Ширина обрезки меняется, а картинка должна стоять на месте. */
  width: 100vw; max-width: none; height: 100%;
}
.ms-ba__label {
  position: absolute; bottom: 12px; z-index: 3;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: rgba(19,22,29,.6); color: #fff; font-size: 12px; font-weight: 600;
  pointer-events: none;
}
.ms-ba__label--b { left: 12px; }
.ms-ba__label--a { right: 12px; }
.ms-ba__handle {
  position: absolute; top: 0; bottom: 0; left: var(--ba-pos); z-index: 2;
  width: 2px; background: #fff; transform: translateX(-1px);
  box-shadow: 0 0 0 1px rgba(19,22,29,.15);
  pointer-events: none;
}
.ms-ba__handle::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 36px; height: 36px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-2);
}
/* Ползунок невидим, но остаётся доступным с клавиатуры. */
.ms-ba__range {
  position: absolute; inset: 0; z-index: 4;
  width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize;
}
.ms-ba__range:focus-visible + .ms-ba__handle::after,
.ms-ba:focus-within .ms-ba__handle::after { box-shadow: var(--shadow-focus, 0 0 0 3px rgba(42,155,196,.28)); }

/* ---------- Состав ---------- */
.ms-ingrs { display: grid; gap: clamp(12px, 1.6vw, 22px); }
.ms-ingrs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-ingrs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-ingrs--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-ingr { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.ms-ingrs--card .ms-ingr {
  background: #fff; border-radius: var(--radius-md);
  padding: clamp(16px, 2vw, 24px); box-shadow: var(--shadow-1);
}
.ms-ingr__img {
  width: 52px; height: 52px; flex: 0 0 auto; border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: var(--ms-accent-soft, rgba(42,155,196,.12));
  display: grid; place-items: center; color: var(--ms-accent, #2A9BC4);
}
.ms-ingr__body { min-width: 0; }
.ms-ingr__name  { font-size: 15px; font-weight: 640; display: block; }
.ms-ingr__share {
  font-size: 12px; font-weight: 700; color: var(--ms-accent, #2A9BC4);
  padding: 1px 7px; border-radius: var(--radius-pill);
  background: var(--ms-accent-soft, rgba(42,155,196,.12));
}
.ms-ingr__text { margin: 4px 0 0; font-size: 14px; color: var(--fg-secondary, #4A5663); }

@container ms (max-width: 860px) { .ms-ingrs--3, .ms-ingrs--4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Как пользоваться ---------- */
.ms-howto--video { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.ms-howto__video { width: 100%; border-radius: var(--radius-md); background: #000; display: block; }
.ms-howto__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: howto; }
.ms-howto__step { display: grid; grid-template-columns: 36px auto minmax(0, 1fr); gap: 12px; align-items: start; }
.ms-howto__num {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ms-accent, #2A9BC4); color: #fff;
  font-size: 14px; font-weight: 700;
}
.ms-howto__img {
  width: 64px; height: 64px; border-radius: var(--radius-sm);
  background-size: cover; background-position: center;
}
.ms-howto__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ms-howto__title { font-size: 15px; font-weight: 640; }
.ms-howto__text  { font-size: 14px; color: var(--fg-secondary, #4A5663); }

@container ms (max-width: 700px) { .ms-howto--video { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Таблица размеров ---------- */
.ms-sizes__wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-1); }
.ms-sizes { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.ms-sizes th, .ms-sizes td { padding: 11px 14px; text-align: left; white-space: nowrap; }
.ms-sizes thead th {
  background: var(--bg-soft, #F6F8FA); font-weight: 640; font-size: 13px;
  color: var(--fg-secondary, #4A5663);
}
.ms-sizes tbody tr + tr th, .ms-sizes tbody tr + tr td { border-top: 1px solid var(--border-default, #E2E6EB); }
.ms-sizes tbody th { font-weight: 640; }
.ms-sizes__note { margin: 12px 0 0; font-size: 13px; color: var(--fg-muted, #6C7682); }

/* ---------- Характеристики ---------- */
.ms-specs { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.ms-specs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-specs__title { margin: 0 0 10px; font-size: 15px; font-weight: 680; }
.ms-specs__list { margin: 0; display: grid; gap: 0; }
/* Строка «имя — значение» держится на сетке, а не на table: так пара
   переносится на две строки на узком экране, не ломая колонку значений. */
.ms-spec {
  display: grid; grid-template-columns: minmax(120px, 40%) minmax(0, 1fr);
  gap: 8px 16px; padding: 9px 0; align-items: baseline;
}
.ms-spec + .ms-spec { border-top: 1px solid var(--border-default, #E2E6EB); }
.ms-spec__name { margin: 0; font-size: 14px; color: var(--fg-muted, #6C7682); }
.ms-spec__val { margin: 0; font-size: 14px; font-weight: 560; }
/* В одну колонку имя параметра не должно тянуться на пол-экрана: на 1440
   значение уезжало к середине строки и пара читалась как две колонки.
   Только с 721px — мобильная раскладка ниже кладёт пару в столбик, а это
   правило специфичнее и на 375 зажимало значение в узкую колонку, разрывая
   «6,7", AMOLED, 120 Гц» по слогам. */
@container ms (min-width: 721px) {
  .ms-specs--1 .ms-spec { grid-template-columns: minmax(140px, 300px) minmax(0, 1fr); }
}
.ms-specs--striped .ms-spec { padding-inline: 10px; }
.ms-specs--striped .ms-spec:nth-child(odd) { background: var(--bg-soft, #F6F8FA); border-radius: var(--radius-xs); }
.ms-specs--striped .ms-spec + .ms-spec { border-top: 0; }
.ms-specs--card .ms-specs__group {
  padding: clamp(16px, 2vw, 24px); background: #fff;
  border: 1px solid var(--border-default, #E2E6EB); border-radius: var(--radius-md);
}
.ms-specs__note { margin: 14px 0 0; font-size: 13px; color: var(--fg-muted, #6C7682); }

@container ms (max-width: 720px) {
  .ms-specs--2 { grid-template-columns: minmax(0, 1fr); }
  .ms-spec { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- Сравнение моделей ---------- */
.ms-cmp__wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-1); }
.ms-cmp { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.ms-cmp th, .ms-cmp td { padding: 12px 14px; text-align: left; vertical-align: top; }
.ms-cmp thead th {
  background: var(--bg-soft, #F6F8FA); font-weight: 640; font-size: 13px;
  color: var(--fg-secondary, #4A5663); vertical-align: bottom;
}
.ms-cmp tbody tr + tr th, .ms-cmp tbody tr + tr td { border-top: 1px solid var(--border-default, #E2E6EB); }
.ms-cmp__name { font-weight: 560; color: var(--fg-muted, #6C7682); white-space: nowrap; }
.ms-cmp__val { min-width: 130px; }
/* Выделенная колонка — сплошная вертикаль через всю таблицу: границы на
   каждой ячейке, иначе фон разъезжается по строкам. */
.ms-cmp .is-mark {
  background: color-mix(in srgb, var(--ms-accent, #2A9BC4) 7%, #fff);
  box-shadow: inset 1px 0 0 color-mix(in srgb, var(--ms-accent, #2A9BC4) 32%, transparent),
              inset -1px 0 0 color-mix(in srgb, var(--ms-accent, #2A9BC4) 32%, transparent);
}
.ms-cmp thead .is-mark { background: color-mix(in srgb, var(--ms-accent, #2A9BC4) 14%, #fff); }
.ms-cmp__col-name { display: block; }
.ms-cmp__badge {
  display: inline-block; margin-bottom: 8px; padding: 3px 10px;
  border-radius: var(--radius-pill); background: var(--ms-accent, #2A9BC4);
  color: #fff; font-size: 12px; font-weight: 640; white-space: nowrap;
}
.ms-cmp__prod { display: block; text-decoration: none; color: inherit; }
.ms-cmp__img { display: block; margin-bottom: 8px; }
.ms-cmp__img img { width: 100%; max-width: 140px; height: auto; border-radius: var(--radius-sm); display: block; }
.ms-cmp__prod-name { display: block; font-size: 14px; font-weight: 640; color: var(--fg-primary, #29333D); }
.ms-cmp__prod:hover .ms-cmp__prod-name { color: var(--ms-accent, #2A9BC4); }
.ms-cmp__price { font-size: 16px; font-weight: 700; white-space: nowrap; }
.ms-cmp__price del { font-weight: 400; font-size: 13px; color: var(--fg-muted, #6C7682); }
.ms-cmp__buy .ms-btn { width: 100%; }
.ms-cmp__note { margin: 12px 0 0; font-size: 13px; color: var(--fg-muted, #6C7682); }

@container ms (max-width: 560px) {
  .ms-cmp th, .ms-cmp td { padding: 10px; }
  .ms-cmp__val { min-width: 112px; }
}

/* ---------- Рецепт ---------- */
.ms-recipe { display: grid; gap: clamp(18px, 2.4vw, 36px); }
.ms-recipe--media { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); align-items: start; }
.ms-recipe__media {
  min-height: 280px; border-radius: var(--radius-md);
  background-size: cover; background-position: center;
  background-color: var(--bg-soft, #F6F8FA);
}
.ms-recipe__body { display: grid; gap: clamp(16px, 2vw, 26px); }
.ms-recipe--media .ms-recipe__body { grid-template-columns: minmax(0, 1fr); }
.ms-recipe__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-recipe__fact {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--bg-soft, #F6F8FA); font-size: 13px; font-weight: 600;
}
.ms-recipe__ico { color: var(--ms-accent, #2A9BC4); flex: 0 0 auto; }
.ms-recipe__sub { margin: 0 0 10px; font-size: 15px; font-weight: 680; }
.ms-recipe__ings { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ms-recipe__ing {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 0; font-size: 15px;
}
.ms-recipe__ing + .ms-recipe__ing { border-top: 1px dashed var(--border-default, #E2E6EB); }
.ms-recipe__link { text-decoration: none; color: var(--ms-accent, #2A9BC4); font-weight: 600; }
.ms-recipe__link:hover { text-decoration: underline; }
.ms-recipe__amount { color: var(--fg-muted, #6C7682); font-size: 14px; white-space: nowrap; }
.ms-recipe__steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.ms-recipe__step { font-size: 15px; line-height: 1.55; }
.ms-recipe__note { margin: 0; font-size: 13px; color: var(--fg-muted, #6C7682); }

/* На широком экране ингредиенты и шаги стоят рядом — рецепт читается
   целиком, без прокрутки от списка к действиям. */
@container ms (min-width: 861px) {
  .ms-recipe:not(.ms-recipe--media) .ms-recipe__body { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
  .ms-recipe:not(.ms-recipe--media) .ms-recipe__facts { grid-column: 1 / -1; }
  .ms-recipe:not(.ms-recipe--media) .ms-recipe__note  { grid-column: 1 / -1; }
}
@container ms (max-width: 700px) {
  .ms-recipe--media { grid-template-columns: minmax(0, 1fr); }
  .ms-recipe__media { min-height: 200px; }
}

/* ---------- Подарочный сертификат ---------- */
.ms-gift {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  gap: clamp(20px, 3vw, 44px); align-items: center;
}
.ms-gift__card {
  aspect-ratio: 8 / 5; border-radius: var(--radius-md);
  background-size: cover; background-position: center;
  box-shadow: var(--shadow-2);
}
.ms-gift__card--blank {
  display: grid; place-items: center; padding: 20px; text-align: center;
  background-image: linear-gradient(135deg,
    var(--ms-accent, #2A9BC4),
    color-mix(in srgb, var(--ms-accent, #2A9BC4) 55%, #10202B));
  color: #fff; font-size: clamp(18px, 2vw, 26px); font-weight: 700;
}
.ms-gift__body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ms-gift__title { margin: 0; font-size: clamp(22px, 2.6vw, 34px); font-weight: 700; }
.ms-gift__lead { margin: 0; color: var(--fg-secondary, #4A5663); }
.ms-gift__values { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-gift__value {
  padding: 8px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-default, #E2E6EB); background: #fff;
  font-weight: 640; font-size: 15px;
}
.ms-gift__note { margin: 0; font-size: 13px; color: var(--fg-muted, #6C7682); }
.ms-gift__steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px); margin-top: clamp(20px, 3vw, 40px);
}
.ms-gift__step { display: flex; flex-direction: column; gap: 4px; }
.ms-gift__ico { color: var(--ms-accent, #2A9BC4); margin-bottom: 4px; }
.ms-gift__step-title { font-size: 15px; font-weight: 660; }
.ms-gift__step-text { font-size: 14px; line-height: 1.5; color: var(--fg-secondary, #4A5663); }

@container ms (max-width: 700px) {
  .ms-gift { grid-template-columns: minmax(0, 1fr); }
  .ms-gift__steps { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Точки продаж ---------- */
.ms-points { display: grid; gap: clamp(14px, 1.8vw, 24px); }
.ms-points--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-points--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-points--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-point { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ms-points--card .ms-point {
  background: #fff; border-radius: var(--radius-md);
  padding: clamp(16px, 2vw, 24px); box-shadow: var(--shadow-1);
}
.ms-point__name { font-size: 16px; font-weight: 680; }
.ms-point__row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 14px; line-height: 1.45; color: var(--fg-secondary, #4A5663);
}
.ms-point__row a { color: inherit; text-decoration: none; }
.ms-point__row a:hover { color: var(--ms-accent, #2A9BC4); }
.ms-point__ico { color: var(--ms-accent, #2A9BC4); flex: 0 0 auto; margin-top: 2px; }
.ms-point__note {
  align-self: flex-start; padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--bg-soft, #F6F8FA); font-size: 12px; color: var(--fg-muted, #6C7682);
}
.ms-point__map { margin-top: auto; padding-top: 4px; font-size: 14px; font-weight: 600; color: var(--ms-accent, #2A9BC4); text-decoration: none; }
.ms-point__map:hover { text-decoration: underline; }

@container ms (max-width: 860px) { .ms-points--3, .ms-points--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container ms (max-width: 560px) { .ms-points--2, .ms-points--3, .ms-points--4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Лукбук ---------- */
.ms-looks { display: grid; gap: clamp(12px, 1.6vw, 22px); }
.ms-looks--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-looks--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-looks--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-look {
  position: relative; display: flex; align-items: flex-end;
  min-height: 260px; padding: 18px;
  border-radius: var(--radius-md); overflow: hidden;
  background-size: cover; background-position: center;
  background-color: var(--bg-soft, #F6F8FA);
  text-decoration: none; color: #fff;
}
.ms-look::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(19,22,29,.62), rgba(19,22,29,0) 55%);
}
.ms-look__body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; }
.ms-look__badge {
  align-self: flex-start; margin-bottom: 6px;
  padding: 3px 9px; border-radius: var(--radius-pill);
  background: #fff; color: var(--ink, #14181F); font-size: 11px; font-weight: 700;
}
.ms-look__title { font-size: 17px; font-weight: 680; }
.ms-look__sub   { font-size: 13px; opacity: .9; }

@container ms (max-width: 860px) { .ms-looks--3, .ms-looks--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container ms (max-width: 560px) { .ms-looks { grid-template-columns: minmax(0, 1fr) !important; } }

/* ---------- Товары на фото ---------- */
.ms-hs { position: relative; border-radius: var(--radius-md); overflow: hidden; }
.ms-hs__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ms-hs__dot {
  position: absolute; z-index: 2; transform: translate(-50%, -50%);
  text-decoration: none; color: inherit;
}
.ms-hs__pin {
  display: block; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-2);
  position: relative;
}
.ms-hs__pin::before,
.ms-hs__pin::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--ink, #14181F);
}
.ms-hs__pin::before { width: 11px; height: 2px; }
.ms-hs__pin::after  { width: 2px; height: 11px; }
/* Пульсация привлекает внимание к точкам — но не у тех, кто просил покой. */
.ms-hs__pin { animation: ms-hs-pulse 2.4s ease-out infinite; }
@keyframes ms-hs-pulse {
  0%, 70%, 100% { box-shadow: var(--shadow-2), 0 0 0 0 rgba(255,255,255,.55); }
  35%           { box-shadow: var(--shadow-2), 0 0 0 10px rgba(255,255,255,0); }
}
@media (prefers-reduced-motion: reduce) { .ms-hs__pin { animation: none; } }

.ms-hs__card {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  min-width: 150px; padding: 9px 12px;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-3);
  display: none; flex-direction: column; gap: 2px;
  font-size: 13px; color: var(--ink, #14181F);
}
.ms-hs__dot:hover .ms-hs__card,
.ms-hs__dot:focus-visible .ms-hs__card,
.ms-hs__dot.is-open .ms-hs__card { display: flex; }
.ms-hs__name  { font-weight: 640; }
.ms-hs__price { color: var(--ms-accent, #2A9BC4); font-weight: 640; }

/* ---------- Фото покупателей ---------- */
.ms-ugc { display: grid; gap: 6px; }
.ms-ugc--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-ugc--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ms-ugc--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ms-ugc--8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.ms-ugc__item { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius-sm); }
.ms-ugc__img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 320ms var(--ease-out, ease);
}
.ms-ugc__item:hover .ms-ugc__img { transform: scale(1.06); }

@container ms (max-width: 860px) { .ms-ugc--6, .ms-ugc--8 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Видео-обложка ---------- */
.ms-vhero {
  position: relative; display: flex; align-items: center;
  overflow: hidden; isolation: isolate;
}
.ms-vhero--sm   { min-height: 320px; }
.ms-vhero--md   { min-height: 460px; }
.ms-vhero--lg   { min-height: 640px; }
.ms-vhero--full { min-height: 100svh; }
.ms-vhero__video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  background-size: cover; background-position: center;
}
.ms-vhero__veil { position: absolute; inset: 0; z-index: 1; }
.ms-vhero__body {
  position: relative; z-index: 2; color: #fff;
  max-width: var(--ms-maxw, 1216px); margin-inline: auto; width: 100%;
  padding: clamp(24px, 4vw, 64px);
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}
.ms-vhero--center .ms-vhero__body { align-items: center; text-align: center; }
.ms-vhero__eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .9;
}
.ms-vhero__title { margin: 0; font-size: clamp(28px, 5vw, 60px); font-weight: 720; line-height: 1.05; }
.ms-vhero__lead  { margin: 0; font-size: clamp(15px, 1.6vw, 19px); opacity: .92; max-width: 52ch; }
.ms-vhero__acts  { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ms-btn--ghost {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6);
}
.ms-btn--ghost:hover { background: rgba(255,255,255,.14); }

/* ---------- Заголовок со сменой слов ---------- */
.ms-ah { --ah-n: 3; --ah-dur: 9s; }
.ms-ah--center { text-align: center; }
.ms-ah__title { margin: 0; font-size: clamp(24px, 3.2vw, 42px); font-weight: 700; line-height: 1.15; }
.ms-ah--lg .ms-ah__title { font-size: clamp(30px, 5vw, 60px); }
.ms-ah__rotate {
  display: inline-grid; vertical-align: bottom;
  color: var(--ms-accent, #2A9BC4);
}
.ms-ah__word {
  grid-area: 1 / 1; opacity: 0;
  animation: ms-ah-cycle var(--ah-dur) linear infinite;
  animation-delay: calc(var(--ah-dur) / var(--ah-n) * var(--ah-i));
  white-space: nowrap;
}
/* Первое слово видно и без анимации — строка не «схлопывается». */
.ms-ah__word:first-child { opacity: 1; }
@keyframes ms-ah-cycle {
  0%   { opacity: 0; transform: translateY(.35em); }
  4%   { opacity: 1; transform: none; }
  30%  { opacity: 1; transform: none; }
  34%  { opacity: 0; transform: translateY(-.35em); }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-ah__word { animation: none; opacity: 0; }
  .ms-ah__word:first-child { opacity: 1; }
}
.ms-ah__lead { margin: 10px 0 0; color: var(--fg-secondary, #4A5663); font-size: 16px; }

/* =========================================================================
   ВАРИАТИВНОСТЬ: раскладки блоков и панель каталога
   ====================================================================== */

/* ---------- Hero: раскладки ---------- */
.ms-hero { position: relative; background-size: cover; background-position: center; }
.ms-hero__veil { position: absolute; inset: 0; z-index: 1; }
.ms-hero__inner { position: relative; z-index: 2; }
.ms-hero__img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); display: block; }

.ms-hero--h-sm   { min-height: 320px; display: flex; align-items: center; }
.ms-hero--h-lg   { min-height: 620px; display: flex; align-items: center; }
.ms-hero--h-full { min-height: 100svh; display: flex; align-items: center; }

/* Фото фоном: текст поверх, поэтому светлый. */
.ms-hero--media { color: #fff; }
.ms-hero--media .ms-hero__inner { grid-template-columns: minmax(0, 1fr); max-width: 46rem; }
.ms-hero--media :where(.ms-hero__title, .ms-hero__text, .ms-hero__eyebrow) { color: inherit; }
/* Акцент в заголовке по умолчанию красится акцентом скина, а у магазина одежды
   он почти чёрный (#1F1F1F) — поверх фотографии половина заголовка исчезала.
   На фото акцент берём тёплый вторичный цвет: он светлее фона у любого скина.
   Тень — страховка на светлых кадрах, где затемнения не хватает. */
.ms-hero--media .ms-hero__title { text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.ms-hero--media .ms-hero__title .ms-hl { color: var(--masla-bronze-300, #E4CFA6); }

/* Минимальный: только заголовок и одна кнопка, много воздуха. */
.ms-hero--minimal .ms-hero__inner { grid-template-columns: minmax(0, 1fr); text-align: center; max-width: 42rem; margin-inline: auto; }
.ms-hero--minimal .ms-hero__text { display: none; }
.ms-hero--minimal .ms-hero__actions { justify-content: center; }

/* С формой: слева текст, справа форма заявки. */
.ms-hero--form .ms-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); align-items: center; }
.ms-hero__form {
  background: #fff; border-radius: var(--radius-md);
  padding: clamp(20px, 2.4vw, 32px); box-shadow: var(--shadow-3);
}

/* С товаром: визуал уже, текст шире — карточка не должна забивать оффер. */
.ms-hero--product .ms-hero__inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; }

@media (max-width: 860px) {
  .ms-hero--form .ms-hero__inner,
  .ms-hero--product .ms-hero__inner { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Features: раскладки ---------- */
.ms-features--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-features--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-features--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.ms-feature--plain { background: transparent; box-shadow: none; padding-inline: 0; }

/* Чередование: иконка слева, текст справа, строки в столбик. */
.ms-features:has(> .ms-feature--alt) { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ms-feature--alt {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start;
  text-align: left;
}
.ms-feature--alt:nth-child(even) { background: var(--bg-soft, #F6F8FA); }

/* Нумерованный список: вместо иконки — порядковый номер. */
.ms-features:has(> .ms-feature--num) { counter-reset: msfeat; }
.ms-feature--num { counter-increment: msfeat; }
.ms-feature--num .ms-feature__icon { position: relative; }
.ms-feature--num .ms-feature__icon svg { display: none; }
.ms-feature--num .ms-feature__icon::before {
  content: counter(msfeat); font-size: 18px; font-weight: 720;
  color: var(--ms-accent, #2A9BC4);
}

@container ms (max-width: 860px) {
  .ms-features--3, .ms-features--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container ms (max-width: 560px) {
  .ms-features--2, .ms-features--3, .ms-features--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Плотность сетки товаров ---------- */
.ms-prods--d-compact { gap: 8px; }
.ms-prods--d-compact .wpc { gap: 6px; }
.ms-prods--d-compact .wpc__title { font-size: 14px; }
.ms-prods--d-roomy { gap: clamp(24px, 3vw, 44px); }
.ms-prods--d-roomy .wpc { gap: 14px; }

/* ---------- Панель каталога ---------- */
.ms-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: clamp(12px, 1.6vw, 20px);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-default, #E2E6EB);
}
.ms-toolbar__found { font-size: 14px; color: var(--fg-muted, #6C7682); }
.ms-toolbar__right { display: flex; align-items: center; gap: 12px; }

/* Сортировка — details/summary: раскрывается без JS. */
.ms-toolbar__sort { position: relative; }
.ms-toolbar__sortbtn {
  list-style: none; cursor: pointer;
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default, #E2E6EB);
  font-size: 14px; white-space: nowrap;
}
.ms-toolbar__sortbtn::-webkit-details-marker { display: none; }
.ms-toolbar__sortbtn::after {
  content: ''; display: inline-block; margin-left: 8px;
  width: 6px; height: 6px; vertical-align: middle;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.ms-toolbar__sortlist {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  min-width: 220px; padding: 6px;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-3);
  display: flex; flex-direction: column;
}
.ms-toolbar__sortopt {
  padding: 8px 10px; border-radius: var(--radius-xs);
  font-size: 14px; text-decoration: none; color: var(--fg-primary, #29333D);
  white-space: nowrap;
}
.ms-toolbar__sortopt:hover { background: var(--bg-soft, #F6F8FA); }
.ms-toolbar__sortopt.is-active { color: var(--ms-accent, #2A9BC4); font-weight: 640; }

.ms-toolbar__views { display: flex; gap: 4px; }
.ms-toolbar__radio { position: absolute; opacity: 0; pointer-events: none; }
.ms-toolbar__view {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default, #E2E6EB);
  display: grid; place-items: center; cursor: pointer;
  color: var(--fg-muted, #6C7682);
}
.ms-toolbar__radio:checked + .ms-toolbar__view {
  border-color: var(--ms-accent, #2A9BC4); color: var(--ms-accent, #2A9BC4);
}
.ms-toolbar__radio:focus-visible + .ms-toolbar__view { box-shadow: var(--shadow-focus, 0 0 0 3px rgba(42,155,196,.28)); }

.ms-toolbar__ico { display: block; width: 14px; height: 14px; }
.ms-toolbar__ico--grid {
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 6px 6px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 0 / 6px 6px no-repeat,
    linear-gradient(currentColor, currentColor) 0 8px / 6px 6px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 8px / 6px 6px no-repeat;
}
.ms-toolbar__ico--list {
  background:
    linear-gradient(currentColor, currentColor) 0 1px / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 6px / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 11px / 14px 2px no-repeat;
}

/* Переключатель вида управляет сеткой внутри того же .ms-catalog —
   без перезагрузки страницы и без JS. */
.ms-catalog:has(.ms-toolbar__radio--list:checked) .ms-prods {
  grid-template-columns: minmax(0, 1fr);
}
.ms-catalog:has(.ms-toolbar__radio--list:checked) .wpc {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start;
}
.ms-catalog:has(.ms-toolbar__radio--list:checked) .wpc__cart .button { width: auto; }

/* Каталог остаётся на медиазапросе: его обёртка НЕ объявлена контейнером —
   внутри живёт шторка фильтра с position: fixed, а containment сделал бы
   секцию системой координат и уронил бы шторку в середину страницы. */
@media (max-width: 560px) {
  .ms-catalog:has(.ms-toolbar__radio--list:checked) .wpc { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
}

/* =========================================================================
   ФОЛБЭК ДЛЯ БРАУЗЕРОВ БЕЗ КОНТЕЙНЕРНЫХ ЗАПРОСОВ
   ------------------------------------------------------------
   Раскладки выше спрашивают ширину КОНТЕЙНЕРА (@container ms) — блок в
   сайдбаре или в узкой колонке темы обязан складываться так же, как на
   телефоне, а ширина окна об этом ничего не говорит. Браузеру без
   поддержки контейнерных запросов отдаём прежние медиазапросы: раскладка
   будет как до 29.07.2026 — по вьюпорту.
   ====================================================================== */
@supports not (container-type: inline-size) {
  @media (max-width: 860px) {
  .ms-row { grid-template-columns: minmax(0, 1fr) !important; }
  .ms-col { grid-column: 1 / -1 !important; }
  .ms-row--rev-m { display: flex; flex-direction: column-reverse; }
  }
  @media (max-width: 860px) {
  .ms-carousel__track {
    grid-auto-columns: calc((100% - (var(--ms-per-m) - 1) * var(--ms-gap, 24px)) / var(--ms-per-m));
  }
  }
  @media (max-width: 860px) {
  .ms-cats--4, .ms-cats--5, .ms-cats--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-cats--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 860px) {
  .ms-banners--2, .ms-banners--3 { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 980px) { .ms-usps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 560px) {
  .ms-usps { grid-template-columns: minmax(0, 1fr); }
  .ms-usps--div .ms-usp:not(:first-child) { border-left: 0; padding-left: 0; }
  }
  @media (max-width: 860px) { .ms-carousel__nav { display: none !important; }
  }
  @media (max-width: 1100px) { .ms-prods--5, .ms-prods--6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }
  @media (max-width: 860px) { .ms-prods--3, .ms-prods--4, .ms-prods--5, .ms-prods--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 560px) { .ms-prods--list .pc { grid-template-columns: 110px minmax(0, 1fr); }
  }
  @media (max-width: 860px) { .ms-deal { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 860px) {
  .ms-brands--5, .ms-brands--6, .ms-brands--8 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @media (max-width: 860px) { .ms-reviews--3, .ms-reviews--4 { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 860px) { .ms-news--row { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 860px) {
  .ms-shopbys--4, .ms-shopbys--5, .ms-shopbys--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 860px) {
  .ms-spot { grid-template-columns: minmax(0, 1fr); }
  .ms-spot--right { direction: ltr; }
  }
  @media (max-width: 860px) {
  .ms-posts--3, .ms-posts--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 560px) {
  .ms-posts--2, .ms-posts--3, .ms-posts--4 { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 860px) { .ms-mates--3, .ms-mates--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 480px) { .ms-mates--2, .ms-mates--3, .ms-mates--4 { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 860px) {
  .ms-bundle { grid-template-columns: minmax(0, 1fr); }
  .ms-bundle__item { flex-basis: 140px; }
  }
  @media (max-width: 1000px) {
  .ms-bundle__items {
    display: grid; align-items: stretch;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .ms-bundle__plus { display: none; }
  }
  @media (max-width: 860px) { .ms-ingrs--3, .ms-ingrs--4 { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 860px) { .ms-howto--video { grid-template-columns: minmax(0, 1fr); }
  }
  @media (min-width: 721px) {
  .ms-specs--1 .ms-spec { grid-template-columns: minmax(140px, 300px) minmax(0, 1fr); }
  }
  @media (max-width: 720px) {
  .ms-specs--2 { grid-template-columns: minmax(0, 1fr); }
  .ms-spec { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  }
  @media (max-width: 560px) {
  .ms-cmp th, .ms-cmp td { padding: 10px; }
  .ms-cmp__val { min-width: 112px; }
  }
  @media (min-width: 861px) {
  .ms-recipe:not(.ms-recipe--media) .ms-recipe__body { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
  .ms-recipe:not(.ms-recipe--media) .ms-recipe__facts { grid-column: 1 / -1; }
  .ms-recipe:not(.ms-recipe--media) .ms-recipe__note  { grid-column: 1 / -1; }
  }
  @media (max-width: 860px) {
  .ms-recipe--media { grid-template-columns: minmax(0, 1fr); }
  .ms-recipe__media { min-height: 200px; }
  }
  @media (max-width: 860px) {
  .ms-gift { grid-template-columns: minmax(0, 1fr); }
  .ms-gift__steps { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 860px) { .ms-points--3, .ms-points--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 560px) { .ms-points--2, .ms-points--3, .ms-points--4 { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 860px) { .ms-looks--3, .ms-looks--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 560px) { .ms-looks { grid-template-columns: minmax(0, 1fr) !important; }
  }
  @media (max-width: 860px) { .ms-ugc--6, .ms-ugc--8 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @media (max-width: 860px) {
  .ms-hero--form .ms-hero__inner,
  .ms-hero--product .ms-hero__inner { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 860px) {
  .ms-features--3, .ms-features--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 560px) {
  .ms-features--2, .ms-features--3, .ms-features--4 { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 560px) {
  .ms-catalog:has(.ms-toolbar__radio--list:checked) .wpc { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
  }
}
