/* =====================================================================
   Tea-Coffee.ru — основной CSS (бренд 2026: «зерно-лист»)
   Mobile-first: базовые стили — телефон, @media (min-width) — шире.
   Брейкпоинты: 576 · 768 · 1024 (десктоп) · 1280 (широкий десктоп)
   ===================================================================== */

/* ---------- Шрифты: свой сервер, только кириллица и латиница ---------- */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("../fonts/cormorant-garamond-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500 600; font-display: swap;
  src: url("../fonts/cormorant-garamond-italic-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500 600; font-display: swap;
  src: url("../fonts/cormorant-garamond-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/manrope-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }

/* ---------- Токены бренда ---------- */
:root {
  /* кофе */
  --c-espresso: #1E140F;     /* основной текст, тёмные блоки */
  --c-roast: #3B2519;        /* тёмные карточки, зерно в логотипе */
  --c-cocoa: #6B4A35;        /* тёплый второстепенный */
  /* чай */
  --c-tea: #2E6B4F;          /* полоса меню, ссылки, «в наличии», лист в логотипе */
  --c-tea-deep: #1F4D39;     /* наведение, тёмно-зелёные блоки */
  --c-matcha: #A3B88C;       /* акцент на тёмном */
  /* фоны */
  --c-cream: #F6EFE4;        /* фон страницы */
  --c-milk: #FFFCF7;         /* карточки, поля, панели */
  --c-linen: #EDE3D3;        /* чередующиеся секции, подложка фото */
  --c-latte: #E2D4BF;        /* разделители */
  --c-leaf-tint: #E4ECDF;    /* чипы, плашки */
  /* акценты */
  --c-copper: #A9582B;       /* главная кнопка (фон кнопки; как мелкий текст на креме не годится) */
  --c-copper-hover: #8E4720; /* наведение; годится и как текст */
  --c-gold: #D4AF6A;         /* детали на тёмном: метки, надзаголовки */
  --c-star: #A87B24;
  --c-sale: #B3261E;
  --c-muted: #6B5848;        /* второстепенный текст */
  --c-field-border: #9A8470;

  --font-text: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Cormorant Garamond", "Times New Roman", Georgia, serif;

  --fs-xs: .8125rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-h1: clamp(2.125rem, 1.45rem + 2.7vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
  --fs-h3: 1.0625rem;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 28px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(30, 20, 15, .06), 0 2px 10px rgba(30, 20, 15, .05);
  --shadow-md: 0 8px 28px rgba(30, 20, 15, .12), 0 2px 6px rgba(30, 20, 15, .06);
  --shadow-lg: 0 22px 56px rgba(30, 20, 15, .22);

  --container: 1320px;
  --gutter: 16px;
  --topbar-h: 0px;
  --header-h: 60px;
  --bottom-nav-h: 64px;
  --tap: 44px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 768px)  { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; --topbar-h: 38px; --header-h: 84px; --bottom-nav-h: 0px; } }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 64px); }
body {
  margin: 0; min-height: 100vh;
  font: 400 var(--fs-md)/1.6 var(--font-text);
  color: var(--c-espresso); background: var(--c-cream);
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--c-tea); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-tea-deep); }
h1, h2, h3, h4 { margin: 0 0 var(--sp-4); line-height: 1.15; color: var(--c-espresso); }
h1 { font: 600 var(--fs-h1)/1.05 var(--font-head); letter-spacing: -.005em; }
h2 { font: 600 var(--fs-h2)/1.1 var(--font-head); }
h3 { font-size: var(--fs-h3); font-weight: 700; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--c-tea); }
p { margin: 0 0 var(--sp-4); }
ul, ol { margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 3px solid var(--c-copper); outline-offset: 2px; border-radius: 4px; }
html.is-locked { overflow: hidden; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -100px; z-index: 1000; padding: 10px 16px; background: var(--c-espresso); color: #fff; border-radius: var(--r-sm); }
.skip-link:focus { top: 8px; color: #fff; }
.icon { width: 24px; height: 24px; flex: none; }
.icon--sm { width: 18px; height: 18px; }
.eyebrow { display: inline-block; margin-bottom: var(--sp-2); color: var(--c-tea); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lead { max-width: 640px; color: var(--c-muted); font-size: var(--fs-lg); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--tap); padding: 10px 22px; border: 1.5px solid transparent; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--fs-md); line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .1s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--c-copper); color: #fff; box-shadow: 0 6px 18px rgba(169, 88, 43, .3); }
.btn--primary:hover { background: var(--c-copper-hover); color: #fff; }
.btn--tea { background: var(--c-tea); color: #fff; }
.btn--tea:hover { background: var(--c-tea-deep); color: #fff; }
.btn--outline { border-color: var(--c-tea); color: var(--c-tea); background: transparent; }
.btn--outline:hover { background: var(--c-leaf-tint); color: var(--c-tea-deep); }
.btn--ghost { background: transparent; color: var(--c-espresso); }
.btn--ghost:hover { background: var(--c-linen); }
.btn--light { background: var(--c-milk); color: var(--c-espresso); }
.btn--light:hover { background: #fff; color: var(--c-espresso); }
.btn--on-dark { border-color: rgba(246, 239, 228, .55); color: var(--c-cream); background: transparent; }
.btn--on-dark:hover { background: rgba(246, 239, 228, .12); color: #fff; }
.btn--lg { min-height: 54px; padding: 14px 30px; font-size: var(--fs-lg); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: var(--fs-sm); }
.btn--block { width: 100%; }
.icon-btn {
  position: relative; flex: none; display: inline-grid; place-items: center; width: var(--tap); height: var(--tap);
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--c-espresso);
}
.icon-btn:hover { background: var(--c-linen); color: var(--c-espresso); }
.badge-count {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--c-copper); color: #fff;
  font: 800 11px/20px var(--font-text); text-align: center;
}

/* ---------- Поля формы ---------- */
.field {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border: 1.5px solid var(--c-field-border);
  border-radius: var(--r-md); background: var(--c-milk); color: var(--c-espresso);
}
.field::placeholder { color: var(--c-muted); }
.field:focus { outline: none; border-color: var(--c-tea); box-shadow: 0 0 0 3px rgba(46, 107, 79, .2); }
textarea.field { min-height: 120px; resize: vertical; }
.form-grid { display: grid; gap: var(--sp-4); }
.form-grid label { display: grid; gap: 6px; font-size: var(--fs-sm); font-weight: 700; }
.form-note { margin: 0; color: var(--c-muted); font-size: var(--fs-xs); }
@media (min-width: 768px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } .form-grid--2 .span-2 { grid-column: span 2; } }

/* =====================================================================
   ШАПКА
   ===================================================================== */
.topbar { display: none; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 239, 228, .97); backdrop-filter: saturate(1.2) blur(8px);
  transition: box-shadow .2s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.header-main { display: flex; align-items: center; gap: var(--sp-2); height: var(--header-h); }
.header-main__burger { margin-left: -8px; }

.logo { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; text-decoration: none; }
.logo img { height: 30px; width: auto; }
.logo__full { display: none; }
@media (max-width: 359.98px) { .header-main { gap: 2px; } .logo img { height: 25px; } }

.header-search { display: none; }
.header-contacts { display: none; }
.header-actions { display: flex; align-items: center; margin-left: auto; }
.header-actions .is-desktop { display: none; }
.cart-btn { text-decoration: none; }
.cart-btn__sum { display: none; }
.main-nav { display: none; }

@media (min-width: 1024px) {
  .site-header { top: calc(var(--topbar-h) * -1); }       /* верхняя полоса уезжает, логотип, поиск и меню остаются */
  .topbar { display: block; height: var(--topbar-h); background: var(--c-espresso); color: var(--c-linen); font-size: var(--fs-sm); }
  .topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
  .topbar a { color: inherit; text-decoration: none; }
  .topbar a:hover { color: #fff; text-decoration: underline; }
  .topbar__links { display: flex; gap: var(--sp-5); list-style: none; }
  .topbar__info { display: flex; gap: var(--sp-5); align-items: center; margin: 0; }
  .topbar__info span { display: inline-flex; align-items: center; gap: 6px; }
  .topbar .icon { color: var(--c-gold); }

  .header-main { gap: var(--sp-6); }
  .header-main__burger { display: none; }
  .logo img { height: 58px; }
  .logo__full { display: block; }
  .logo__compact { display: none; }

  .header-search { display: flex; flex: 1; position: relative; max-width: 640px; }
  .header-search .field { min-height: 50px; padding-left: 50px; padding-right: 120px; border-radius: var(--r-pill); border-color: var(--c-latte); background: var(--c-milk); box-shadow: inset 0 1px 2px rgba(30,20,15,.05); }
  .header-search .field:focus { border-color: var(--c-tea); }
  .header-search__icon { position: absolute; left: 18px; top: 50%; translate: 0 -50%; color: var(--c-muted); pointer-events: none; }
  .header-search .btn { position: absolute; right: 5px; top: 5px; min-height: 40px; padding: 8px 20px; }

  .header-contacts { display: grid; flex: none; margin-left: auto; line-height: 1.25; }
  .header-contacts__phone { font-weight: 800; font-size: var(--fs-lg); color: var(--c-espresso); text-decoration: none; white-space: nowrap; }
  .header-contacts__phone:hover { color: var(--c-copper-hover); }
  .link-btn { padding: 0; border: 0; background: none; color: var(--c-tea); font-size: var(--fs-sm); font-weight: 600; text-align: left; text-decoration: underline dotted; text-underline-offset: 3px; }
  .link-btn:hover { color: var(--c-tea-deep); }

  .header-actions { margin-left: 0; gap: var(--sp-1); }
  .header-actions .is-mobile { display: none; }
  .header-actions .is-desktop { display: inline-grid; }
  .cart-btn { display: inline-flex; align-items: center; gap: 10px; width: auto; height: 50px; padding: 0 18px 0 12px; border-radius: var(--r-pill); background: var(--c-espresso); color: var(--c-cream); }
  .cart-btn:hover { background: var(--c-roast); color: #fff; }
  .cart-btn .badge-count { top: 2px; left: 28px; right: auto; }
  .cart-btn__sum { display: block; font-weight: 800; white-space: nowrap; }

  /* полоса меню — фирменный зелёный */
  .main-nav { display: block; background: var(--c-tea); }
  .main-nav__list { display: flex; gap: var(--sp-1); list-style: none; }
  .main-nav__item { position: static; }
  .main-nav__item--sale { margin-left: auto; }
  .main-nav__link {
    display: inline-flex; align-items: center; gap: 4px; height: 50px; padding: 0 16px;
    color: var(--c-milk); font-weight: 700; text-decoration: none; letter-spacing: .01em;
  }
  button.main-nav__link { border: 0; background: none; font: inherit; font-weight: 700; cursor: pointer; }   /* пункт без своей страницы */
  .main-nav__link:hover, .main-nav__item:focus-within > .main-nav__link, .main-nav__item.is-open > .main-nav__link { background: var(--c-tea-deep); color: #fff; }
  .main-nav__link--sale span { padding: 3px 12px; border-radius: var(--r-pill); background: var(--c-sale); color: #fff; }
  /* 8 пунктов на ноутбуках 1024–1199 px: плотнее, чтобы оставаться в одну строку */
  @media (max-width: 1199px) {
    .main-nav__list { gap: 0; }
    .main-nav__link { padding: 0 9px; font-size: .9375rem; gap: 2px; }
  }
  /* мегаменю: наведение, клавиатура (focus-within), касание (.is-open) */
  .mega {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
    visibility: hidden; opacity: 0; translate: 0 6px; transition: opacity .18s var(--ease), translate .18s var(--ease), visibility 0s .18s;
    background: var(--c-milk); box-shadow: var(--shadow-lg);
  }
  .main-nav__item:hover > .mega, .main-nav__item:focus-within > .mega, .main-nav__item.is-open > .mega {
    visibility: visible; opacity: 1; translate: 0 0; transition-delay: .08s, .08s, 0s;
  }
  /* мышью видно только меню под курсором — даже если другое осталось открытым по фокусу или касанию */
  .main-nav__list:hover > .main-nav__item:not(:hover) > .mega, .main-nav__item.is-dismissed > .mega { visibility: hidden; opacity: 0; transition: none; }
  .mega__inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--sp-5) var(--sp-6); padding-block: var(--sp-6); }
  .mega__title { margin-bottom: var(--sp-3); font: 700 1.375rem/1.2 var(--font-head); }
  .mega__list { list-style: none; display: grid; gap: 6px; }
  .mega__list a { color: var(--c-espresso); text-decoration: none; }
  .mega__list a:hover { color: var(--c-copper-hover); text-decoration: underline; }
  .mega__promo { position: relative; display: grid; align-content: end; min-height: 220px; padding: var(--sp-5); border-radius: var(--r-lg); overflow: hidden; color: var(--c-cream); text-decoration: none; isolation: isolate;
    background: radial-gradient(circle at 70% 30%, #4A2E20, var(--c-espresso)); }
  .mega__promo img { position: absolute; right: -30px; top: -20px; z-index: -1; width: 220px; }
  .mega__promo:hover { color: #fff; }
  .mega__promo strong { font: 600 1.625rem/1.1 var(--font-head); }
}

/* ---------- Нижняя навигация (телефон, планшет) ---------- */
.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--c-milk); border-top: 1px solid var(--c-latte); box-shadow: 0 -8px 24px rgba(30,20,15,.07);
}
.bottom-nav__list { display: grid; grid-template-columns: repeat(4, 1fr); height: var(--bottom-nav-h); list-style: none; }
.bottom-nav__link {
  position: relative; display: grid; place-items: center; align-content: center; gap: 2px; width: 100%; height: 100%;
  border: 0; background: none; color: var(--c-muted); font-size: 11px; font-weight: 700; text-decoration: none;
}
.bottom-nav__link[aria-current="page"], .bottom-nav__link:hover { color: var(--c-tea); }
.bottom-nav__link[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--c-tea); }
.bottom-nav__link .badge-count { top: 6px; right: calc(50% - 22px); }
@media (min-width: 1024px) { .bottom-nav { display: none; } }

/* ---------- Выезжающие панели: меню, фильтры ---------- */
.backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(30, 20, 15, .5); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
.backdrop.is-visible { opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 80; width: min(88vw, 400px);
  display: flex; flex-direction: column; background: var(--c-cream);
  translate: -100% 0; transition: translate .28s var(--ease); visibility: hidden;
}
.drawer.is-open { translate: 0 0; visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 64px; padding: 8px 8px 8px var(--sp-4); border-bottom: 1px solid var(--c-latte); }
.drawer__head img { height: 28px; width: auto; }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-4); }

.mobile-menu { list-style: none; }
.mobile-menu > li { border-bottom: 1px solid var(--c-latte); }
.mobile-menu details > summary, .mobile-menu > li > a {
  display: flex; align-items: center; justify-content: space-between; min-height: 54px;
  font-weight: 700; color: var(--c-espresso); text-decoration: none; list-style: none; cursor: pointer;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu details[open] > summary .icon { rotate: 180deg; }
.mobile-menu__sub { list-style: none; padding: 0 0 var(--sp-3) var(--sp-3); display: grid; gap: 2px; }
.mobile-menu__sub a { display: flex; align-items: center; min-height: 42px; color: var(--c-espresso); text-decoration: none; }
.mobile-menu__group { margin-top: var(--sp-2); padding-top: var(--sp-2); border-top: 1px dashed var(--c-latte); color: var(--c-muted); font-size: var(--fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mobile-menu__group a { min-height: 36px; color: inherit; }
.mobile-links { list-style: none; display: grid; gap: 4px; margin-top: var(--sp-5); }
.mobile-links a { display: flex; align-items: center; gap: 12px; min-height: 46px; color: var(--c-espresso); text-decoration: none; font-weight: 600; }
.mobile-links .icon { color: var(--c-tea); }
.mobile-contact { margin-top: var(--sp-5); padding: var(--sp-4); border-radius: var(--r-md); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.mobile-contact a.phone { display: block; margin-bottom: 2px; font-size: 1.25rem; font-weight: 800; color: var(--c-espresso); text-decoration: none; }
.mobile-contact p { margin-bottom: var(--sp-3); color: var(--c-muted); font-size: var(--fs-sm); }

/* ---------- Поиск на весь экран (телефон) ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--c-cream);
  opacity: 0; visibility: hidden; translate: 0 12px; transition: opacity .2s, translate .2s var(--ease), visibility 0s .2s;
}
.search-overlay.is-open { opacity: 1; visibility: visible; translate: 0 0; transition-delay: 0s; }
.search-overlay__bar { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--c-latte); }
.search-overlay__bar .field { border-radius: var(--r-pill); min-height: 48px; font-size: 16px; /* 16px — iOS не увеличивает страницу */ }
.search-overlay__body { flex: 1; overflow-y: auto; padding: var(--sp-4); }
.search-overlay__label { margin: var(--sp-4) 0 var(--sp-2); color: var(--c-muted); font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }

/* ---------- Чипы ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--c-latte); border-radius: var(--r-pill); background: var(--c-milk);
  color: var(--c-espresso); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--c-tea); color: var(--c-tea-deep); background: var(--c-leaf-tint); }
.chip--active { border-color: var(--c-tea); background: var(--c-leaf-tint); }
.chip__count, .check__count { color: var(--c-muted); font-size: 12px; font-weight: 600; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.chips--scroll::-webkit-scrollbar { display: none; }

/* ---------- Горизонтальные ленты: стрелки и «Все бренды» (main.js, [data-scroller]) ----------
   Лента прокручивается как раньше (свайп, тачпад, Shift+колесо); стрелки — для мыши: видны только при наведении
   указателем (any-hover) и только если есть куда листать. Затухание у края подсказывает, что справа есть ещё. */
.scroller { --scroller-bg: var(--c-cream); position: relative; display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.scroller > :is(ul, ol) { flex: 1 1 auto; min-width: 0; }
.section--alt .scroller { --scroller-bg: var(--c-linen); }
.scroller::before, .scroller::after { content: ""; position: absolute; top: 0; bottom: 0; z-index: 2; width: 56px; pointer-events: none; opacity: 0; transition: opacity .2s var(--ease); }
.scroller::before { left: 0; background: linear-gradient(to right, var(--scroller-bg) 15%, transparent); }
.scroller::after { right: var(--scroller-end, 0px); background: linear-gradient(to left, var(--scroller-bg) 15%, transparent); }
.scroller.can-prev::before, .scroller.can-next::after { opacity: 1; }
/* Стрелки — три вида, «Настройки» → «Отображение каталога» → «Стрелки лент» (html[data-arrows]):
   на краю (по умолчанию) — шеврон на затухании ленты, без кружка, места не занимает; pair — пара ‹ › справа, рядом
   с «Все бренды», ленту не перекрывает; round — круглые кнопки поверх ленты (прежний вид). */
.scroller__arrow { position: absolute; top: 0; bottom: 0; z-index: 3; display: none; align-items: center; width: 36px; padding: 0;
  border: 0; border-radius: 0; background: none; color: var(--c-espresso); cursor: pointer;
  transition: opacity .2s var(--ease), visibility 0s .2s, color .15s var(--ease); opacity: 0; visibility: hidden; }
.scroller__arrow .icon { width: 22px; height: 22px; transition: translate .15s var(--ease); }
.scroller__arrow:hover { color: var(--c-tea-deep); }
.scroller__arrow--prev:hover .icon { translate: -2px 0; }
.scroller__arrow--next:hover .icon { translate: 2px 0; }
.scroller__arrow:focus-visible { outline: 2px solid var(--c-copper); outline-offset: -2px; border-radius: 8px; }
.scroller__arrow--prev { left: 0; justify-content: flex-start; }
.scroller__arrow--next { right: var(--scroller-end, 0px); justify-content: flex-end; }
.scroller.can-prev .scroller__arrow--prev, .scroller.can-next .scroller__arrow--next { opacity: 1; visibility: visible; transition-delay: 0s; }
@media (any-hover: hover) { .scroller__arrow { display: flex; } }

html[data-arrows="round"] .scroller__arrow { top: 50%; bottom: auto; justify-content: center; width: 40px; height: 40px; translate: 0 -50%;
  border: 1px solid var(--c-latte); border-radius: 50%; background: var(--c-milk); box-shadow: var(--shadow-md); }
html[data-arrows="round"] .scroller__arrow:hover { border-color: var(--c-tea); background: var(--c-leaf-tint); }
html[data-arrows="round"] .scroller__arrow .icon { width: 16px; height: 16px; translate: none; }
html[data-arrows="round"] .scroller__arrow--prev { left: 4px; }
html[data-arrows="round"] .scroller__arrow--next { right: calc(var(--scroller-end, 0px) + 4px); }

@media (any-hover: hover) {
  html[data-arrows="pair"] .scroller__arrow { position: relative; inset: auto; order: 1; flex: none; justify-content: center; width: 34px; height: 34px;
    border: 1px solid var(--c-latte); background: var(--c-milk); opacity: .35; visibility: visible; pointer-events: none; }
  html[data-arrows="pair"] .scroller__arrow .icon { width: 16px; height: 16px; translate: none; }
  html[data-arrows="pair"] .scroller__arrow--prev { border-radius: 10px 0 0 10px; margin-right: calc(var(--sp-2) * -1 - 1px); }
  html[data-arrows="pair"] .scroller__arrow--next { border-radius: 0 10px 10px 0; }
  html[data-arrows="pair"] .scroller__arrow:hover { border-color: var(--c-tea); background: var(--c-leaf-tint); z-index: 4; }
  html[data-arrows="pair"] .scroller.can-prev .scroller__arrow--prev, html[data-arrows="pair"] .scroller.can-next .scroller__arrow--next { opacity: 1; pointer-events: auto; }
  html[data-arrows="pair"] .scroller:not(.can-prev):not(.can-next) .scroller__arrow { display: none; }
  html[data-arrows="pair"] .scroller:is(.can-prev, .can-next) > :is(ul, ol) { margin-right: 0; padding-right: 0; }
  html[data-arrows="pair"] .scroller__all { order: 2; }
  html[data-arrows="pair"] .scroller::after { right: calc(var(--scroller-end, 0px) + 67px); }   /* 34 + 34 − 9 (кнопки внахлёст) + 8 зазор */
}
.scroller__all { flex: none; cursor: pointer; }
.scroller__all[hidden] { display: none; }
.scroller__all::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -2px; }
.scroller__all[aria-expanded="true"]::after { rotate: -135deg; translate: 0 2px; }
.scroller__all[aria-expanded="true"] .scroller__more, .scroller__all[aria-expanded="false"] .scroller__less { display: none; }
@media (max-width: 575.98px) { .scroller__long { display: none; } }          /* на телефоне — «Все · 53» */
.scroller.has-all > .chips--scroll { margin-right: 0; padding-right: 0; }      /* лента не заходит под кнопку */
/* раскрыто: все бренды в несколько строк, стрелки и затухание не нужны */
.scroller.is-expanded { align-items: flex-start; }
.scroller.is-expanded > .chips--scroll { flex-wrap: wrap; overflow: visible; }
.scroller.is-expanded::before, .scroller.is-expanded::after, .scroller.is-expanded .scroller__arrow { display: none; }
@media (min-width: 1024px) {
  /* на компьютере лента не выходит за край контейнера: стрелки ровно по краям колонки */
  .scroller > .chips--scroll, .scroller > .stories { margin-inline: 0; padding-inline: 0; }
}
@media (prefers-reduced-motion: reduce) { .scroller::before, .scroller::after, .scroller__arrow { transition: none; } }
/* «магнит» ленты выравнивает первый элемент по отступу, а не по краю экрана: лента открывается с начала */
.stories, .product-rail, .social-band__posts { scroll-padding-inline: var(--gutter); }

/* =====================================================================
   ГЛАВНАЯ: «истории» и лента баннеров в стиле соцсетей
   ===================================================================== */
.section { padding-block: var(--sp-7); }
.section--alt { background: var(--c-linen); }
.section--leaves { background: url("../img/leaves.svg") var(--c-leaf-tint); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.section__head h2 { margin: 0; }
.section__more { display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: var(--tap); font-weight: 700; text-decoration: none; }
@media (min-width: 1024px) { .section { padding-block: var(--sp-8); } }

/* «Истории»-разделы: круги с градиентной обводкой, как в Instagram и VK */
.stories { display: flex; gap: var(--sp-4); overflow-x: auto; scrollbar-width: none; list-style: none;
  margin-inline: calc(var(--gutter) * -1); padding: var(--sp-3) var(--gutter) var(--sp-3); scroll-snap-type: x proximity; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; width: 76px; scroll-snap-align: start; }
.story a { display: grid; justify-items: center; gap: 6px; color: var(--c-espresso); font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; }
.story__ring { display: grid; place-items: center; width: 72px; height: 72px; padding: 3px; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--c-gold), var(--c-copper), var(--c-tea), var(--c-matcha), var(--c-gold));
  transition: transform .2s var(--ease); }
.story__ring img { width: 100%; height: 100%; border: 3px solid var(--c-cream); border-radius: 50%; background: var(--c-linen); object-fit: cover; }
.story--sale .story__ring { background: var(--c-sale); }
.story--sale .story__ring span { display: grid; place-items: center; width: 100%; height: 100%; border: 3px solid var(--c-cream); border-radius: 50%; background: var(--c-sale); color: #fff; font: 700 1.75rem/1 var(--font-head); }
.story a:hover .story__ring { transform: scale(1.05); }
@media (min-width: 1024px) {
  .stories { justify-content: space-between; overflow: visible; margin: 0; padding: var(--sp-6) 0 var(--sp-5); }
  .story { width: 100px; }
  .story__ring { width: 92px; height: 92px; }
  .story a { font-size: var(--fs-sm); }
}

/* Лента баннеров */
.feed { display: grid; gap: var(--sp-3); }
.post {
  --post-bg: radial-gradient(circle at 70% 35%, #4A2E20, var(--c-espresso) 70%);
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: var(--r-xl); overflow: hidden; isolation: isolate; color: var(--c-cream); text-decoration: none;
  background: var(--post-bg); box-shadow: var(--shadow-sm);
}
.post--tea { --post-bg: radial-gradient(circle at 50% 30%, #3F7D5E, var(--c-tea-deep) 75%); }
.post--kraft { --post-bg: radial-gradient(circle at 50% 30%, #F3E8D6, #CDB291 80%); color: var(--c-espresso); }
.post--cocoa { --post-bg: radial-gradient(circle at 50% 35%, #7A5640, #2A1A10 80%); }
.post--roast { --post-bg: radial-gradient(circle at 30% 30%, #4A2E20, #120B07 80%); }
.post__art { position: absolute; inset: 0; z-index: -1; }
.post__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post::after { content: ""; position: absolute; inset: 30% 0 0 0; z-index: -1; background: linear-gradient(rgba(30,20,15,0), rgba(30,20,15,.86) 58%); }
.post--kraft::after { background: linear-gradient(rgba(246,239,228,0), rgba(246,239,228,.97) 58%); }
.feed__rail .post__art, .aside-promos .post__art, .brand-posts .post__art { inset: 0 0 20% 0; }   /* картинка выше подписи */
.post:hover { color: var(--c-cream); }
.post--kraft:hover { color: var(--c-espresso); }
@media (hover: hover) { .post:hover .post__art img { transform: scale(1.04); } }
.post__tag { position: absolute; left: 14px; top: 14px; padding: 5px 12px; border-radius: var(--r-pill);
  background: rgba(30, 20, 15, .5); backdrop-filter: blur(6px); color: var(--c-cream); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.post--kraft .post__tag { background: rgba(255, 252, 247, .85); color: var(--c-espresso); }
.post__body { padding: var(--sp-5); }
.post__title { display: block; margin: 0 0 var(--sp-3); color: inherit; font: 600 clamp(1.375rem, 1.1rem + .9vw, 1.75rem)/1.05 var(--font-head); hyphens: auto; overflow-wrap: break-word; }
.post__cta { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--c-milk); color: var(--c-espresso); font-size: var(--fs-sm); font-weight: 800; }
.post--kraft .post__cta { background: var(--c-espresso); color: var(--c-cream); }
.post:hover .post__cta { background: #fff; }
.post--kraft:hover .post__cta { background: var(--c-roast); }

/* главный пост: H1 и кнопки поверх атмосферной картинки */
.post--hero { justify-content: flex-start; }
.post--hero::after { inset: 0; background: linear-gradient(180deg, rgba(30,20,15,.35) 0%, rgba(30,20,15,0) 45%); }
.post--hero .post__art { position: relative; inset: auto; z-index: 0; order: 2; display: flex; align-items: flex-end; justify-content: center; height: 200px; margin-top: -8px; overflow: hidden; }
.post--hero .post__art img { width: auto; height: 125%; max-width: none; object-fit: contain; margin-bottom: -14%; }
.post--hero .post__body { padding: var(--sp-6) var(--sp-5) var(--sp-5); }
.post__kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--sp-4); padding: 6px 14px; border-radius: var(--r-pill);
  background: rgba(246, 239, 228, .12); color: var(--c-gold); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.post--hero h1 { margin-bottom: var(--sp-3); color: var(--c-cream); font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem); }
.post--hero h1 em { color: var(--c-gold); }
.post--hero .lead { margin-bottom: 0; color: #E3D6C4; font-size: var(--fs-md); }
.post__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }
.post__actions .btn { flex: 1 1 220px; }
@media (min-width: 768px) { .post__actions .btn { flex: 0 0 auto; } }
.post__facts { display: none; gap: var(--sp-2); margin-top: var(--sp-5); list-style: none; color: var(--c-linen); font-size: var(--fs-sm); font-weight: 600; }
.post__facts li { display: inline-flex; align-items: center; gap: 8px; }
.post__facts .icon { color: var(--c-gold); }
.hero-facts { display: grid; gap: 10px; margin-top: var(--sp-4); list-style: none; font-size: var(--fs-sm); font-weight: 700; }
.hero-facts li { display: flex; align-items: center; gap: 10px; }
.hero-facts .icon { color: var(--c-tea); }

/* телефон: остальные посты — лента со свайпом и точками */
.feed__rail { display: grid; grid-auto-flow: column; grid-auto-columns: 80%; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter); scrollbar-width: none; list-style: none; }
.feed__rail::-webkit-scrollbar { display: none; }
.feed__rail > li { scroll-snap-align: center; display: grid; }
.feed__rail .post { aspect-ratio: 4 / 5; }
.feed__dots { display: flex; justify-content: center; gap: 6px; margin-top: var(--sp-3); }
.feed__dots button { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--c-latte); transition: width .2s var(--ease), background .2s; }
.feed__dots button[aria-current="true"] { width: 22px; background: var(--c-tea); }
.feed__dots button::after { content: ""; position: absolute; inset: -16px -5px; }   /* зона касания 44px */

@media (min-width: 768px) {
  .post--hero { min-height: 460px; }
  .post--hero::after { background: linear-gradient(90deg, rgba(30,20,15,.55) 0%, rgba(30,20,15,0) 60%); }
  .post--hero .post__art { position: absolute; inset: 0; z-index: -1; order: 0; height: auto; margin: 0; align-items: center; justify-content: flex-end; }
  .post--hero .post__art img { width: 50%; height: auto; max-width: 100%; margin: 0 2% 0 0; }
  .post--hero .post__body { max-width: 60%; padding: var(--sp-7) var(--sp-6); }
  .post__facts { display: grid; }
  .hero-facts { display: none; }
  .feed__rail { grid-auto-flow: row; grid-template-columns: 1fr 1fr; overflow: visible; margin: 0; padding: 0; }
  .feed__rail .post { aspect-ratio: 1; }
  .feed__dots { display: none; }
}
@media (min-width: 1024px) {
  .feed { grid-template-columns: 1.25fr 1fr; gap: var(--sp-4); }
  .post--hero { min-height: 0; height: 100%; }
  .post--hero .post__art img { width: 58%; margin: 0 -6% -6% 0; align-self: flex-end; }
  .post--hero .post__body { max-width: 72%; padding: var(--sp-7) var(--sp-6); }
  .post--hero h1 { font-size: clamp(2.5rem, 1.4rem + 1.6vw, 3.125rem); }
  .post__facts { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
  .feed__rail { gap: var(--sp-4); }
  .post__title { font-size: 1.5rem; }
}
@media (min-width: 1280px) { .post__title { font-size: 1.75rem; } }

/* Преимущества */
.benefits { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-5) var(--sp-4); list-style: none; }
.benefit { display: grid; gap: var(--sp-2); align-content: start; }
.benefit__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--c-milk); color: var(--c-tea); box-shadow: var(--shadow-sm); }
.benefit__title { margin: 0; font-weight: 800; }
.benefit__text { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
@media (min-width: 1024px) { .benefits { grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); } }

/* Мы ВКонтакте: текст + посты группы */
.social-band { display: grid; gap: var(--sp-5); align-items: center; }
.social-band__text .eyebrow { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: .02em; }
.social-band__text .lead { font-size: var(--fs-md); }
.social-band__posts { display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter); list-style: none; scrollbar-width: none; }
.social-band__posts::-webkit-scrollbar { display: none; }
.social-band__posts li { scroll-snap-align: start; }
.social-band__posts a { display: block; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s var(--ease), translate .2s var(--ease); }
.social-band__posts a:hover { box-shadow: var(--shadow-md); translate: 0 -3px; }
.social-band__posts img { width: 100%; aspect-ratio: 1; }
@media (min-width: 768px)  { .social-band__posts { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; } }
@media (min-width: 1024px) { .social-band { grid-template-columns: 1fr 2.2fr; gap: var(--sp-7); } }

/* Бренды */
.brands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); list-style: none; }
@media (min-width: 400px)  { .brands { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.brand-tile {
  display: grid; place-items: center; min-height: 80px; padding: var(--sp-3); border-radius: var(--r-md);
  background: var(--c-milk); box-shadow: var(--shadow-sm); color: var(--c-roast); text-align: center; text-decoration: none;
  font: 700 1.375rem/1.1 var(--font-head);
}
.brand-tile:hover { color: var(--c-copper-hover); box-shadow: var(--shadow-md); }
@media (min-width: 768px)  { .brands { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .brands { grid-template-columns: repeat(6, 1fr); gap: var(--sp-4); } }

/* Статьи */
.articles { display: grid; gap: var(--sp-4); list-style: none; }
.article-card { display: grid; grid-template-columns: 104px 1fr; gap: var(--sp-4); align-items: center; padding: var(--sp-3); border-radius: var(--r-md); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.article-card__img { border-radius: var(--r-sm); aspect-ratio: 1; object-fit: cover; }
.article-card h3 { margin-bottom: 4px; font: 600 1.375rem/1.15 var(--font-head); }
.article-card h3 a { color: var(--c-espresso); text-decoration: none; }
.article-card h3 a:hover { color: var(--c-copper-hover); }
.article-card p { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
@media (min-width: 1024px) {
  .articles { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
  .article-card { grid-template-columns: 1fr; padding: 0 0 var(--sp-4); overflow: hidden; }
  .article-card__img { aspect-ratio: 16 / 10; border-radius: 0; }
  .article-card > div { padding-inline: var(--sp-4); }
}

/* =====================================================================
   КАРТОЧКА ТОВАРА В СПИСКЕ
   ===================================================================== */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); list-style: none; }
/* с планшета число колонок — по доступной ширине (карточка не уже 200 px): 3 на планшете и 1024, 4 с 1280 рядом с фильтром */
@media (min-width: 768px)  { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); } }
@media (min-width: 768px)  { .catalog--wide .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }   /* широкая: столько, сколько влезает (≥ 200 px) */
.product-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) var(--sp-3); list-style: none; scrollbar-width: none; }
.product-rail::-webkit-scrollbar { display: none; }
.product-rail > li { scroll-snap-align: start; }
@media (min-width: 768px)  { .product-rail { grid-auto-columns: 31%; } }
@media (min-width: 1024px) { .product-rail { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; gap: var(--sp-4); } }

.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: box-shadow .2s var(--ease), translate .2s var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }
@media (hover: hover) { .card:hover { translate: 0 -3px; } }
.card__media { position: relative; aspect-ratio: 1; background: #fff; }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }   /* не растягивает квадрат: вертикальное фото раньше делало карточку выше */
/* фото любых пропорций — целиком, по центру, с одинаковым полем; белый фон снимка сливается с подложкой. Заглушка — на бежевом */
.card__media:not(.card__media--ph) img { padding: 6%; }
.card__media--ph { background: var(--c-linen); }
.card__badges { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.label { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; line-height: 1.4; }
.label--sale { background: var(--c-sale); color: #fff; }
.label--hit { background: var(--c-espresso); color: var(--c-gold); }
.label--new { background: var(--c-tea); color: #fff; }
.label--weight { background: var(--c-milk); color: var(--c-tea); box-shadow: var(--shadow-sm); }
.card__fav { position: absolute; right: 6px; top: 6px; z-index: 2; color: var(--c-cocoa); background: rgba(255,252,247,.88); }
.card__fav[aria-pressed="true"] { color: var(--c-sale); }
.card__fav[aria-pressed="true"] svg { fill: currentColor; }

.card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: var(--sp-3) var(--sp-3) 0; }
/* строка бренда и три строки названия зарезервированы всегда — у соседних карточек артикул, вес и наличие на одной высоте */
.card__brand { min-height: 1.4em; margin: 0; color: var(--c-muted); font-size: 12px; font-weight: 800; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; }
.card__title { min-height: calc(1.35em * 3); margin: 0; font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
.card__title a { color: var(--c-espresso); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* вся карточка — ссылка */
.card__title a:hover { color: var(--c-copper-hover); }
.card__meta { display: flex; flex-wrap: wrap; gap: 2px 10px; list-style: none; color: var(--c-muted); font-size: 12px; }
.card__stock { color: var(--c-tea); font-weight: 700; }
.card__stock--out { color: var(--c-muted); }
.card__rating { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; align-self: flex-start; color: var(--c-muted); font-size: 12px; text-decoration: none; }
.card__foot { display: grid; gap: var(--sp-2); padding: var(--sp-3); margin-top: auto; }

.stars { --rating: 0; position: relative; display: inline-block; width: 80px; height: 16px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23E2D4BF' d='m12 3 2.7 5.6 6.1.8-4.5 4.2 1.1 6.1L12 16.8 6.6 19.7l1.1-6.1-4.5-4.2 6.1-.8Z'/%3E%3C/svg%3E") repeat-x 0 0 / 16px 16px; }
.stars::after { content: ""; position: absolute; inset: 0; width: calc(var(--rating) / 5 * 100%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23A87B24' d='m12 3 2.7 5.6 6.1.8-4.5 4.2 1.1 6.1L12 16.8 6.6 19.7l1.1-6.1-4.5-4.2 6.1-.8Z'/%3E%3C/svg%3E") repeat-x 0 0 / 16px 16px; }
.stars--lg { width: 120px; height: 24px; background-size: 24px 24px; }
.stars--lg::after { background-size: 24px 24px; }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0; }
.price__current { font-size: 1.125rem; font-weight: 800; color: var(--c-espresso); white-space: nowrap; }
.price__current--sale { color: var(--c-sale); }
.price__old { color: var(--c-muted); font-size: var(--fs-sm); white-space: nowrap; }
.price__unit { color: var(--c-muted); font-size: 12px; }

.buy { position: relative; z-index: 2; }
.buy__btn { width: 100%; min-height: 44px; padding: 10px 12px; font-size: var(--fs-sm); }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 44px; border-radius: var(--r-pill); background: var(--c-leaf-tint); }
.stepper button { height: 44px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--c-tea-deep); display: grid; place-items: center; }
.stepper button:hover { background: rgba(46, 107, 79, .14); }
.stepper output { text-align: center; font-weight: 800; }
.buy[data-in-cart="false"] .stepper, .buy[data-in-cart="true"] .buy__btn { display: none; }
@media (min-width: 768px) {
  .card__body { padding: var(--sp-4) var(--sp-4) 0; }
  .card__foot { padding: var(--sp-4); }
  .card__title { font-size: var(--fs-md); }
  .price__current { font-size: 1.25rem; }
}

/* =====================================================================
   КАТАЛОГ
   ===================================================================== */
.breadcrumbs { padding-block: var(--sp-3); font-size: var(--fs-sm); }
.breadcrumbs ol { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; list-style: none; scrollbar-width: none; white-space: nowrap; }
.breadcrumbs ol::-webkit-scrollbar { display: none; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; color: var(--c-muted); }
.breadcrumbs li + li::before { content: "/"; color: var(--c-latte); }
.breadcrumbs a { color: var(--c-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--c-copper-hover); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--c-espresso); }

.catalog-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: var(--sp-4); }
.catalog-head h1 { margin: 0; }
.catalog-head__count { color: var(--c-muted); font-weight: 700; }
.subcats { margin-bottom: var(--sp-4); }

.catalog { display: grid; gap: var(--sp-5); padding-bottom: var(--sp-7); }
.catalog__main { min-width: 0; }
.toolbar { position: sticky; top: var(--header-h); z-index: 20; display: flex; align-items: center; gap: var(--sp-2); margin-inline: calc(var(--gutter) * -1); margin-bottom: var(--sp-3); padding: var(--sp-2) var(--gutter); background: var(--c-cream); border-bottom: 1px solid var(--c-latte); }
.toolbar__filters { flex: 1; position: relative; }
.toolbar__filters .badge-count { top: -6px; right: -4px; }
.toolbar__found { display: none; margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
.toolbar__sort { flex: 1; position: relative; }
.toolbar__sort select { appearance: none; width: 100%; padding-right: 36px; border-radius: var(--r-pill); background: var(--c-milk); font-weight: 700; font-size: var(--fs-sm); }
.toolbar__sort .icon { position: absolute; right: 12px; top: 50%; translate: 0 -50%; pointer-events: none; }
.catalog__seo { margin-top: var(--sp-7); }

.pagination { display: grid; justify-items: center; gap: var(--sp-4); margin-top: var(--sp-6); }
.pagination__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; }
.pagination__list a, .pagination__list span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--r-pill); background: var(--c-milk); color: var(--c-espresso); font-weight: 700; text-decoration: none; box-shadow: var(--shadow-sm); }
.pagination__list a:hover { color: var(--c-copper-hover); }
.pagination__list [aria-current="page"] { background: var(--c-espresso); color: var(--c-cream); }

/* Компоновка каталога — настройка «Отображение каталога», контейнер 1320 px в обеих:
   исходная (по умолчанию, как при создании сайта) — фильтр 280 px | товары по 3 в ряд | «Подборки», «Смотрите также»,
   «Полезно знать» справа 256 px (от 1280 px; на 1024–1279 — под товарами); текст о разделе — под товарами.
   Широкая (.catalog--wide) — фильтр 240 px, товары на всю ширину: 4 по 220–236 px с 1280 px; блоки под товарами в ряд,
   затем текст о разделе. Строки её сетки без зазоров: отступы у блоков, чтобы пустые не давали пробелов. */
@media (min-width: 1024px) {
  .catalog { grid-template-columns: 280px minmax(0, 1fr); gap: var(--sp-6); }
  .toolbar { position: static; margin-inline: 0; padding: 0; border: 0; background: none; justify-content: space-between; }
  .toolbar__filters { display: none; }
  .toolbar__found { display: block; }
  .toolbar__sort { flex: 0 0 240px; margin-left: auto; }
  .catalog__filters { grid-row: span 2; }
  .catalog__aside { grid-column: 2; }

  .catalog--wide { grid-template-columns: 240px minmax(0, 1fr); column-gap: var(--sp-5); row-gap: 0; }
  .catalog--wide .catalog__filters { grid-column: 1; grid-row: 1 / span 3; }
  .catalog--wide :is(.catalog__main, .catalog__aside, .catalog__seo) { grid-column: 2; }
  .catalog--wide .catalog__aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-5); align-items: start; margin-top: var(--sp-7); }
  .catalog--wide .catalog__aside .aside-block { margin-bottom: 0; }
}
@media (min-width: 1280px) {
  .catalog:not(.catalog--wide) { grid-template-columns: 280px minmax(0, 1fr) 256px; }
  .catalog:not(.catalog--wide) .catalog__filters { grid-row: auto; }
  .catalog:not(.catalog--wide) .catalog__aside { grid-column: 3; grid-row: 1; }
}

/* ---------- Фильтр ---------- */
.filters { display: flex; flex-direction: column; }
.filter { border-bottom: 1px solid var(--c-latte); }
.filter > summary { display: flex; align-items: center; justify-content: space-between; min-height: 54px; list-style: none; cursor: pointer; font-weight: 800; }
.filter > summary::-webkit-details-marker { display: none; }
.filter[open] > summary .icon { rotate: 180deg; }
.filter__body { padding-bottom: var(--sp-4); }
.filter__search { margin-bottom: var(--sp-3); min-height: 40px; padding-block: 8px; font-size: var(--fs-sm); }
.check-list { display: grid; gap: 2px; list-style: none; }
.js .check-list > li.is-extra { display: none; }     /* без JS виден весь список */
.js .check-list.is-expanded > li.is-extra { display: block; }
.check-list > li[hidden] { display: none !important; }
html:not(.js) .show-more { display: none; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border: 1.5px solid var(--c-field-border); border-radius: 6px; background: var(--c-milk); }
.check__box svg { width: 16px; height: 16px; color: #fff; opacity: 0; }
.check input:checked + .check__box { background: var(--c-tea); border-color: var(--c-tea); }
.check input:checked + .check__box svg { opacity: 1; }
.check input:focus-visible + .check__box { outline: 3px solid var(--c-copper); outline-offset: 2px; }
.check input:disabled ~ * { opacity: .45; }
.check__label { flex: 1; }
.show-more { margin-top: var(--sp-2); padding: 6px 0; border: 0; background: none; color: var(--c-tea); font-weight: 700; font-size: var(--fs-sm); }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.range label { display: grid; gap: 4px; font-size: 12px; color: var(--c-muted); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 54px; font-weight: 800; cursor: pointer; border-bottom: 1px solid var(--c-latte); }
.toggle input { appearance: none; width: 48px; height: 28px; border-radius: var(--r-pill); background: var(--c-latte); position: relative; transition: background .2s; flex: none; cursor: pointer; }
.toggle input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: translate .2s var(--ease); }
.toggle input:checked { background: var(--c-tea); }
.toggle input:checked::after { translate: 20px 0; }

/* телефон и планшет: фильтр — шторка (на весь экран до 576px, 420px справа до 1024px) */
@media (max-width: 1023.98px) {
  .catalog__filters { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--c-cream);
    translate: 100% 0; visibility: hidden; transition: translate .28s var(--ease), visibility 0s .28s; }
  .catalog__filters.is-open { translate: 0 0; visibility: visible; transition-delay: 0s; }
  .catalog__filters .filters { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sp-4) var(--sp-4); }
  html:not(.js) .catalog__filters { position: static; width: auto; translate: none; visibility: visible; box-shadow: none; }
  html:not(.js) .toolbar__filters, html:not(.js) .filters__head .icon-btn { display: none; }
}
@media (min-width: 576px) and (max-width: 1023.98px) { .catalog__filters { left: auto; width: 420px; box-shadow: var(--shadow-lg); } }
.filters__head { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 8px 8px 8px var(--sp-4); border-bottom: 1px solid var(--c-latte); }
.filters__title { margin: 0; font: 600 1.75rem/1.1 var(--font-head); }
.filters__foot { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--c-latte); background: var(--c-milk); }
@media (min-width: 1024px) {
  .catalog__filters { position: sticky; top: calc(var(--header-h) + 66px); align-self: start; max-height: calc(100vh - var(--header-h) - 84px); display: flex; flex-direction: column;
    border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); }
  .catalog__filters .filters { overflow-y: auto; padding: 0 var(--sp-4); }
  .filters__head .icon-btn { display: none; }
  .filters__head { border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .filters__foot { grid-template-columns: 1fr; gap: var(--sp-1); border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .filters__foot .btn--primary { order: -1; }
}

/* ---------- Правая колонка: подборки (SEO-теги) и баннеры ---------- */
.aside-block { margin-bottom: var(--sp-5); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.aside-block h2 { margin-bottom: var(--sp-3); font-size: 1.75rem; }
.aside-links { list-style: none; display: grid; gap: 2px; }
.aside-links a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; color: var(--c-espresso); text-decoration: none; font-weight: 700; font-size: var(--fs-sm); }
.aside-links a:hover { color: var(--c-copper-hover); }
.aside-links .icon--sm { color: var(--c-muted); }
/* блоки «Чай по странам», «Сиропы по вкусам»…: плотнее, открытая страница — без ссылки, остальное — под «Показать все» */
.aside-links--nav :is(a, [aria-current]) { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; color: var(--c-espresso); text-decoration: none; font-weight: 700; font-size: var(--fs-sm); }
.aside-links--nav [aria-current] { color: var(--c-copper-hover); }
.aside-links__name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.aside-flag { flex: none; width: 20px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
span.aside-flag { box-shadow: none; }
.aside-more { margin-top: 2px; }
.aside-more > summary { min-height: 34px; display: flex; align-items: center; color: var(--c-tea-deep); font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }
.aside-more[open] > summary { order: 2; }
.aside-more[open] { display: flex; flex-direction: column; }
.aside-more > summary::-webkit-details-marker { display: none; }
.aside-more > summary { list-style: none; }
.aside-more:not([open]) .aside-more__hide, .aside-more[open] .aside-more__show { display: none; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.tag-cloud a { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--c-leaf-tint); color: var(--c-tea-deep); font-size: 13px; font-weight: 700; text-decoration: none; }
.tag-cloud a:hover { background: var(--c-tea); color: #fff; }
.aside-promos { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.aside-promos .post { aspect-ratio: 4 / 5; }
.aside-promos .post__title { font-size: 1.625rem; }
@media (max-width: 1279.98px) { .aside-promos { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } .aside-promos .post { aspect-ratio: 1; } }

/* ---------- SEO-текст с «Читать далее» (текст всегда в HTML) ---------- */
.seo-text { position: relative; max-width: 860px; }
.seo-text__content { position: relative; }
.js .seo-text__content { max-height: 240px; overflow: hidden; }
.js .seo-text__content::after { content: ""; position: absolute; inset: auto 0 0 0; height: 100px; background: linear-gradient(rgba(246,239,228,0), var(--c-cream)); transition: opacity .2s; }
.seo-text.is-expanded .seo-text__content { max-height: none; }
.seo-text.is-expanded .seo-text__content::after { opacity: 0; }
.seo-text__content h2 { margin-top: 0; }
.seo-text__content h3 { margin-top: var(--sp-5); font: 600 1.5rem/1.2 var(--font-head); }
.seo-text__toggle { margin-top: var(--sp-3); }
.js .section--alt .seo-text__content::after { background: linear-gradient(rgba(237,227,211,0), var(--c-linen)); }

/* =====================================================================
   ИНФОСТРАНИЦЫ: доставка, оплата, контакты
   ===================================================================== */
.page-head { padding-bottom: var(--sp-5); }
.page-head h1 { margin-bottom: var(--sp-3); }
.info-section { padding-block: var(--sp-6); border-top: 1px solid var(--c-latte); }
.info-section > h2 { margin-bottom: var(--sp-2); }
.info-section > .lead { margin-bottom: var(--sp-5); font-size: var(--fs-md); }
@media (min-width: 1024px) { .info-section { padding-block: var(--sp-7); } }

/* ключевые цифры */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); list-style: none; }
.fact { display: grid; gap: 4px; align-content: start; padding: var(--sp-4); border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.fact .icon { width: 30px; height: 30px; margin-bottom: 6px; color: var(--c-tea); }
.fact strong { font: 600 1.75rem/1 var(--font-head); color: var(--c-espresso); }
.fact span { color: var(--c-muted); font-size: var(--fs-sm); }
.fact--dark { background: var(--c-espresso); }
.fact--dark .icon { color: var(--c-gold); }
.fact--dark strong { color: var(--c-cream); }
.fact--dark span { color: var(--c-latte); }
@media (min-width: 1024px) { .facts { grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); } .fact { padding: var(--sp-5); } .fact strong { font-size: 2.25rem; } }

/* шаги: номер в круге, линия между шагами */
.steps { display: grid; gap: var(--sp-5); list-style: none; counter-reset: step; }
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: var(--sp-3); align-items: start; counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--c-tea); color: #fff; font: 600 1.75rem/1 var(--font-head); box-shadow: 0 0 0 6px var(--c-leaf-tint); }
.step:not(:last-child)::after { content: ""; position: absolute; left: 27px; top: 66px; bottom: calc(var(--sp-5) * -1 + 6px); width: 2px; background: var(--c-latte); }
.step h3 { margin: 6px 0 4px; }
.step p { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
a[href^="tel:"] { white-space: nowrap; }
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { grid-template-columns: 1fr; justify-items: start; }
  .step:not(:last-child)::after { left: 72px; right: calc(var(--sp-5) * -1 + 8px); top: 27px; bottom: auto; width: auto; height: 2px; }
}

/* шкала тарифа: стоимость доставки от суммы заказа */
.tariff__bar { display: grid; gap: var(--sp-2); list-style: none; }
.tariff__seg { display: grid; gap: 2px; padding: var(--sp-4); border-radius: var(--r-md); background: var(--c-milk); box-shadow: var(--shadow-sm); border-left: 6px solid var(--c-latte); }
.tariff__seg b { font-size: var(--fs-sm); color: var(--c-muted); font-weight: 700; }
.tariff__seg strong { font: 600 1.75rem/1.1 var(--font-head); }
.tariff__seg span { color: var(--c-muted); font-size: var(--fs-sm); }
.tariff__seg--paid { border-left-color: var(--c-copper); }
.tariff__seg--free { border-left-color: var(--c-tea); background: var(--c-leaf-tint); }
.tariff__seg--free strong { color: var(--c-tea-deep); }
@media (min-width: 768px) {
  .tariff__bar { grid-template-columns: 1fr 1.3fr 1.3fr; gap: 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
  .tariff__seg { border-radius: 0; box-shadow: none; border-left: 0; border-top: 8px solid var(--c-latte); padding: var(--sp-5); }
  .tariff__seg + .tariff__seg { border-left: 1px solid var(--c-latte); }
  .tariff__seg--paid { border-top-color: var(--c-copper); }
  .tariff__seg--free { border-top-color: var(--c-tea); }
}

/* таблица */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.table { min-width: 560px; font-size: var(--fs-sm); }
.table th, .table td { padding: 14px 16px; border-bottom: 1px solid var(--c-latte); text-align: left; vertical-align: top; }
.table thead th { background: var(--c-espresso); color: var(--c-cream); font-weight: 700; }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table tbody th { font-weight: 800; }
.table .is-free { color: var(--c-tea); font-weight: 800; }

/* карточки способов доставки и оплаты */
.methods { display: grid; gap: var(--sp-3); list-style: none; }
.method { display: grid; grid-template-columns: 52px 1fr; gap: var(--sp-3); align-content: start; padding: var(--sp-4); border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.method__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--c-leaf-tint); color: var(--c-tea); }
.method--accent .method__icon { background: var(--c-espresso); color: var(--c-gold); }
.method h3 { margin: 4px 0 4px; }
.method p { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
.method__tag { display: inline-block; margin-top: var(--sp-2); padding: 2px 10px; border-radius: var(--r-pill); background: var(--c-linen); color: var(--c-roast); font-size: 12px; font-weight: 800; }
@media (min-width: 768px)  { .methods { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); } }
@media (min-width: 1024px) { .methods--3 { grid-template-columns: repeat(3, 1fr); } }

.info-sub { margin: var(--sp-6) 0 var(--sp-3); font: 600 1.75rem/1.2 var(--font-head); }

/* чек-лист «как получить посылку» */
.checklist { display: grid; gap: var(--sp-3); list-style: none; counter-reset: chk; }
.checklist > li { position: relative; padding: var(--sp-4) var(--sp-4) var(--sp-4) 66px; border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); counter-increment: chk; }
.checklist > li::before { content: counter(chk); position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-leaf-tint); color: var(--c-tea-deep); font: 700 1.375rem/1 var(--font-head); }
.checklist > li:last-child::before { background: var(--c-copper); color: #fff; }
.checklist h3 { margin: 6px 0 4px; }
.checklist p { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
@media (min-width: 768px)  { .checklist { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .checklist { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); } }
@media (min-width: 1280px) { .checklist { grid-template-columns: repeat(5, 1fr); } .checklist > li { padding: 64px var(--sp-4) var(--sp-4); } }

.note { display: grid; grid-template-columns: 28px 1fr; gap: var(--sp-3); margin-top: var(--sp-4); padding: var(--sp-4); border-radius: var(--r-md); background: #FBF1DE; color: var(--c-roast); font-size: var(--fs-sm); }
.note .icon { color: var(--c-copper-hover); }
.note p { margin: 0; }

.faq { display: grid; gap: var(--sp-2); }
.faq details { border-radius: var(--r-md); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 56px; padding: 0 var(--sp-4); font-weight: 800; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary .icon { rotate: 180deg; }
.faq details > div { padding: 0 var(--sp-4) var(--sp-4); color: var(--c-muted); font-size: var(--fs-sm); }
.faq details > div p:last-child { margin: 0; }

.cta-band { display: grid; gap: var(--sp-4); align-items: center; margin-block: var(--sp-6); padding: var(--sp-6) var(--sp-5); border-radius: var(--r-xl); background: radial-gradient(circle at 85% 20%, #3F7D5E, var(--c-tea-deep) 70%); color: var(--c-cream); }
.cta-band h2 { margin: 0 0 var(--sp-2); color: var(--c-cream); }
.cta-band p { margin: 0; color: var(--c-leaf-tint); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
@media (min-width: 1024px) { .cta-band { grid-template-columns: 1fr auto; padding: var(--sp-7); } }

/* контакты */
.contact-cards { display: grid; gap: var(--sp-3); list-style: none; }
.contact-card { display: grid; gap: 4px; align-content: start; padding: var(--sp-5); border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.contact-card .icon { width: 30px; height: 30px; margin-bottom: 6px; color: var(--c-tea); }
.contact-card b { color: var(--c-muted); font-size: var(--fs-sm); font-weight: 700; }
.contact-card a, .contact-card strong { color: var(--c-espresso); font-size: 1.125rem; font-weight: 800; text-decoration: none; }
.contact-card a:hover { color: var(--c-copper-hover); }
.contact-card span { color: var(--c-muted); font-size: var(--fs-sm); }
@media (min-width: 768px)  { .contact-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .contact-cards { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); } }
@media (min-width: 1280px) { .contact-cards { grid-template-columns: repeat(5, 1fr); } }
.contacts-layout { display: grid; gap: var(--sp-5); padding-block: var(--sp-6); }
@media (min-width: 1024px) { .contacts-layout { grid-template-columns: 1.3fr 1fr; gap: var(--sp-6); align-items: start; } }
.map { position: relative; display: grid; place-items: center; min-height: 380px; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-sm);
  background: url("../img/map-pattern.svg") center / cover var(--c-linen); }
.map__pin { position: relative; display: grid; justify-items: center; gap: var(--sp-3); max-width: 300px; padding: var(--sp-5); border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-md); text-align: center; }
.map__pin .icon { width: 36px; height: 36px; color: var(--c-copper-hover); }
.map__pin p { margin: 0; font-weight: 800; }
.map__pin span { color: var(--c-muted); font-size: var(--fs-sm); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.panel { padding: var(--sp-5); border-radius: var(--r-xl); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 2.125rem; }
@media (min-width: 1024px) { .panel { padding: var(--sp-6); } }

/* =====================================================================
   СТРАНИЦА ТОВАРА
   ===================================================================== */
.product { display: grid; gap: var(--sp-5); padding-bottom: var(--sp-5); }
@media (min-width: 1024px) { .product { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--sp-7); align-items: start; } }
.gallery { display: grid; gap: var(--sp-3); }
.gallery__main { position: relative; aspect-ratio: 1; border-radius: var(--r-xl); background: #fff; overflow: hidden; }
.gallery__main img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 5%; object-fit: contain; }   /* фото любых пропорций целиком, белый фон снимка сливается с подложкой */
.gallery__main--ph { background: var(--c-linen); }
.gallery__main--ph img { padding: 0; }
.gallery__main .card__badges { left: 16px; top: 16px; }
.gallery__thumbs { display: flex; gap: var(--sp-2); list-style: none; overflow-x: auto; scrollbar-width: none; }
.gallery__thumbs button { width: 76px; height: 76px; padding: 4px; border: 2px solid var(--c-latte); border-radius: var(--r-md); background: #fff; overflow: hidden; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs button[aria-current="true"] { border-color: var(--c-tea); }
@media (min-width: 1024px) { .gallery { position: sticky; top: calc(var(--header-h) + 74px); } }

.product__brand { display: inline-flex; margin-bottom: var(--sp-2); color: var(--c-muted); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.product h1 { font-size: clamp(2rem, 1.4rem + 1.8vw, 2.875rem); }
.product__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-bottom: var(--sp-4); list-style: none; color: var(--c-muted); font-size: var(--fs-sm); }
.product__rating { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--c-muted); }
.key-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); margin-bottom: var(--sp-5); list-style: none; }
.key-specs li { display: grid; gap: 2px; padding: 10px 14px; border-radius: var(--r-md); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.key-specs b { color: var(--c-muted); font-size: 12px; font-weight: 700; }
.key-specs a, .key-specs span { color: var(--c-espresso); font-weight: 800; text-decoration: none; font-size: var(--fs-sm); }
.key-specs a:hover { color: var(--c-copper-hover); text-decoration: underline; }
.buybox { display: grid; gap: var(--sp-4); padding: var(--sp-5); border-radius: var(--r-xl); background: var(--c-milk); box-shadow: var(--shadow-md); }
.buybox .price__current { font-size: 2rem; }
.buybox__stock { display: inline-flex; align-items: center; gap: 6px; color: var(--c-tea); font-weight: 800; }
.buybox__actions { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-2); }
.buybox .buy__btn, .buybox .stepper { min-height: 54px; height: 54px; font-size: var(--fs-md); }
.buybox .stepper { grid-template-columns: 54px 1fr 54px; }
.buybox .stepper button { height: 54px; }
.buybox__fav { width: 54px; height: 54px; border: 1.5px solid var(--c-latte); }
.buybox__weight { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
.buybox__weight b { display: block; margin-top: 2px; color: var(--c-espresso); }
.stepper output { white-space: nowrap; }
.buybox__fav[aria-pressed="true"] { color: var(--c-sale); }
.buybox__fav[aria-pressed="true"] svg { fill: currentColor; }
.buybox__delivery { display: grid; gap: var(--sp-3); padding-top: var(--sp-4); border-top: 1px solid var(--c-latte); list-style: none; font-size: var(--fs-sm); }
.buybox__delivery li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
.buybox__delivery .icon { color: var(--c-tea); }
.buybox__delivery b { display: block; }
.buybox__delivery span { color: var(--c-muted); }

.subnav { position: sticky; top: var(--header-h); z-index: 15; display: flex; gap: var(--sp-1); overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: var(--sp-2) var(--gutter); background: var(--c-cream); border-bottom: 1px solid var(--c-latte); scrollbar-width: none; list-style: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); color: var(--c-espresso); font-weight: 700; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; }
.subnav a:hover { background: var(--c-linen); }
@media (min-width: 1024px) { .subnav { top: calc(var(--header-h) + 50px); margin: 0; padding-inline: 0; } }
.product-section { padding-block: var(--sp-6); }
.product-section > h2 { margin-bottom: var(--sp-4); }
.prose { max-width: 760px; }
/* Тексты сайта — по ширине, с переносами (lang="ru": браузер переносит по-русски). Выравнивание, выбранное в редакторе
   (по центру, по правому краю), сильнее: оно стоит у самого абзаца. Заголовки, таблицы и подписи — как были. */
.prose :is(p, li, blockquote, dd), .lead, .page-head .lead { text-align: justify; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.prose img { border-radius: var(--r-md); }
.prose :is(ul, ol) { margin: 0 0 var(--sp-4); padding-left: 1.4em; }      /* общий сброс у списков — в текстах нужен отступ */
.prose li + li { margin-top: 4px; }
.specs { display: grid; max-width: 760px; margin: 0; border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); overflow: hidden; }
.specs > div { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: var(--sp-3); padding: 12px 16px; border-bottom: 1px solid var(--c-latte); font-size: var(--fs-sm); }
.specs > div:last-child { border-bottom: 0; }
.specs dt { color: var(--c-muted); }
.specs dd { margin: 0; font-weight: 700; }
.reviews { display: grid; gap: var(--sp-5); }
@media (min-width: 1024px) { .reviews { grid-template-columns: 320px 1fr; gap: var(--sp-6); align-items: start; } }
.reviews__summary { display: grid; gap: var(--sp-3); justify-items: start; padding: var(--sp-5); border-radius: var(--r-xl); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.reviews__summary strong { font: 600 2.25rem/1 var(--font-head); }
.reviews__summary p { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
/* оценка звёздами: радиокнопки в обратном порядке, подсветка «до выбранной» без JS */
.rating-input { margin: 0; padding: 0; border: 0; }
.rating-input legend { margin-bottom: 6px; font-size: var(--fs-sm); font-weight: 800; }
.rating-input__stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rating-input__stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-input__stars label { width: 44px; height: 44px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23E2D4BF' d='m12 3 2.7 5.6 6.1.8-4.5 4.2 1.1 6.1L12 16.8 6.6 19.7l1.1-6.1-4.5-4.2 6.1-.8Z'/%3E%3C/svg%3E") center / 34px no-repeat; }
.rating-input__stars input:checked ~ label, .rating-input__stars label:hover, .rating-input__stars label:hover ~ label {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23A87B24' d='m12 3 2.7 5.6 6.1.8-4.5 4.2 1.1 6.1L12 16.8 6.6 19.7l1.1-6.1-4.5-4.2 6.1-.8Z'/%3E%3C/svg%3E"); }
.rating-input__stars input:focus-visible + label { outline: 3px solid var(--c-copper); outline-offset: -2px; border-radius: 8px; }

/* липкая кнопка покупки на телефоне */
.buybar { position: fixed; left: 0; right: 0; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); z-index: 55; display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--gutter); background: var(--c-milk); border-top: 1px solid var(--c-latte); box-shadow: 0 -8px 24px rgba(30,20,15,.08);
  translate: 0 120%; visibility: hidden; transition: translate .25s var(--ease), visibility 0s .25s; }
.buybar.is-visible { translate: 0 0; visibility: visible; transition-delay: 0s; }
.buybar .price__current { font-size: 1.25rem; }
.buybar .btn { flex: 1; }
@media (min-width: 1024px) { .buybar { display: none; } }

/* =====================================================================
   ПОДВАЛ
   ===================================================================== */
.site-footer { margin-top: var(--sp-8); padding-block: var(--sp-7) var(--sp-5); background: url("../img/beans-dark.svg") var(--c-espresso); color: var(--c-latte); font-size: var(--fs-sm); }
.site-footer a { color: var(--c-linen); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: var(--sp-6); }
.footer-brand img { height: 72px; width: auto; }
.footer-brand p { margin-top: var(--sp-4); max-width: 320px; color: #CDBBA5; }
.footer-col h2 { margin-bottom: var(--sp-3); color: var(--c-cream); font-size: 1.625rem; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-contacts { display: grid; gap: 10px; font-style: normal; }
.footer-contacts a, .footer-contacts span { display: inline-flex; align-items: center; gap: 10px; }
.footer-contacts .icon { color: var(--c-gold); }
.footer-phone { font-size: 1.25rem; font-weight: 800; }
.socials { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); list-style: none; }
.socials a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(246,239,228,.08); }
.socials a:hover { background: var(--c-tea); text-decoration: none; }
.footer-bottom { display: grid; gap: var(--sp-3); margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid rgba(246,239,228,.12); color: #CDBBA5; }
.footer-bottom p { margin: 0; }
.pay-methods { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; }
.pay-methods li { padding: 4px 10px; border: 1px solid rgba(246,239,228,.22); border-radius: 6px; font-size: 12px; font-weight: 800; }
@media (min-width: 768px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; } .footer-bottom { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------- Окно «Заказать звонок» ---------- */
.modal { width: min(92vw, 440px); padding: 0; border: 0; border-radius: var(--r-xl); background: var(--c-cream); color: var(--c-espresso); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(30, 20, 15, .55); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) var(--sp-3) 0 var(--sp-5); }
.modal__head h2 { margin: 0; font-size: 2rem; }
.modal__body { display: grid; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5) var(--sp-5); }
.modal__body label { display: grid; gap: 6px; font-size: var(--fs-sm); font-weight: 700; }
.modal__note { margin: 0; color: var(--c-muted); font-size: 12px; }

/* =====================================================================
   ДВИЖОК: блоки, которых не было в прототипах
   ===================================================================== */
[hidden] { display: none !important; }   /* hidden сильнее любых display у классов */
.icon--flip { transform: scaleX(-1); }
.card__foot { grid-template-columns: minmax(0, 1fr); }
.card__foot > .buy__btn { white-space: normal; padding-inline: 10px; }   /* «Сообщить о поступлении» в узкой карточке — в две строки */
.mega__title a { color: inherit; text-decoration: none; }
.mega__title a:hover { color: var(--c-copper-hover); }

/* сообщение после отправки формы */
.toast { position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + var(--sp-3)); z-index: 120;
  display: grid; grid-template-columns: 24px 1fr 40px; gap: var(--sp-3); align-items: center; max-width: 520px; margin-inline: auto;
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--c-tea-deep); color: var(--c-cream); box-shadow: var(--shadow-lg);
  transition: opacity .3s var(--ease), translate .3s var(--ease); }
.toast p { margin: 0; font-weight: 700; }
.toast .icon-btn { color: inherit; }
.toast--error { background: var(--c-sale); }
.toast.is-hidden { opacity: 0; translate: 0 12px; }
@media (min-width: 1024px) { .toast { left: auto; right: var(--sp-6); bottom: var(--sp-6); } }

/* выбранные фильтры */
.applied { margin-bottom: var(--sp-4); }
.chip--applied { gap: 6px; border-color: var(--c-tea); background: var(--c-leaf-tint); }
.chip--reset { border-style: dashed; color: var(--c-muted); }
.catalog--nofilters .catalog__filters, .catalog--nofilters .toolbar__filters { display: none; }
@media (min-width: 1024px) { .catalog--nofilters { grid-template-columns: minmax(0, 1fr); } .catalog--nofilters :is(.catalog__main, .catalog__aside, .catalog__seo) { grid-column: 1; } }
@media (min-width: 1280px) { .catalog--nofilters:not(.catalog--wide) { grid-template-columns: minmax(0, 1fr) 256px; } .catalog--nofilters:not(.catalog--wide) .catalog__aside { grid-column: 2; } }

/* пусто: ничего не нашлось, корзина пуста */
.empty-state { display: grid; justify-items: center; gap: var(--sp-3); padding: var(--sp-7) var(--sp-4); border-radius: var(--r-xl); background: var(--c-milk); text-align: center; box-shadow: var(--shadow-sm); }
.empty-state > .icon { width: 40px; height: 40px; color: var(--c-tea); }
.empty-state__links { justify-content: center; max-width: 560px; }
.empty-state p { max-width: 460px; margin: 0; color: var(--c-muted); }

/* поиск и 404 */
.search-page__form { display: flex; gap: var(--sp-2); max-width: 640px; margin-block: var(--sp-3) var(--sp-4); }
.search-page__form .field { flex: 1; min-width: 0; }
.search-page__pages { margin-bottom: var(--sp-5); }
@media (min-width: 1024px) { .product-grid--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.notfound { padding-top: var(--sp-6); }

/* статьи */
.articles--grid { margin-bottom: var(--sp-6); }
@media (min-width: 768px) { .articles--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .articles--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.article-card__img--art { background: var(--c-linen); object-fit: contain; padding: 10%; }
.page-head__meta { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
.content-page { padding-bottom: var(--sp-5); }
.prose img { max-width: 100%; height: auto; margin-block: var(--sp-3); }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose td, .prose th { padding: 6px 10px; border: 1px solid var(--c-latte); }

/* товар: нет в наличии, отзывы */
.buybox__stock--out { color: var(--c-muted); }
.reviews__body { display: grid; gap: var(--sp-5); min-width: 0; }
.review-list { display: grid; gap: var(--sp-3); list-style: none; }
.review { padding: var(--sp-4); border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.review p { margin: var(--sp-2) 0 0; }
.review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.review__head time { color: var(--c-muted); font-size: var(--fs-sm); }
.review__verified { display: inline-flex; align-items: center; gap: 4px; color: var(--c-tea); font-size: var(--fs-xs); font-weight: 800; }
.review__answer { margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-left: 3px solid var(--c-tea); border-radius: var(--r-sm); background: var(--c-leaf-tint); }
.review__answer p { margin-top: 4px; }

/* корзина */
.cart { display: grid; gap: var(--sp-5); padding-bottom: var(--sp-7); }
@media (min-width: 1024px) { .cart { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: var(--sp-6); } .cart__summary { position: sticky; top: calc(var(--header-h) + 66px); } }
.cart__loading { color: var(--c-muted); }
.cart-list { display: grid; gap: var(--sp-3); list-style: none; }
.cart-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) 40px; grid-template-areas: "img info rm" "img qty sum"; gap: var(--sp-2) var(--sp-3); align-items: center;
  padding: var(--sp-3); border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.cart-item__img { grid-area: img; align-self: start; width: 72px; height: 72px; border-radius: var(--r-sm); background: var(--c-linen); object-fit: contain; }
.cart-item__info { grid-area: info; display: grid; gap: 2px; min-width: 0; }
.cart-item__name { color: var(--c-espresso); font-weight: 700; text-decoration: none; }
.cart-item__name:hover { color: var(--c-copper-hover); }
.cart-item__meta { color: var(--c-muted); font-size: var(--fs-sm); }
.cart-item__out { color: var(--c-sale); font-size: var(--fs-sm); font-weight: 700; }
.cart-item__qty { grid-area: qty; width: 156px; }   /* «1 500 г» помещается */
.cart-item__sum { grid-area: sum; justify-self: end; grid-column: 2 / 4; font-size: var(--fs-lg); white-space: nowrap; }
.cart-item__remove { grid-area: rm; align-self: start; color: var(--c-muted); }
@media (min-width: 768px) {
  .cart-item { grid-template-columns: 88px minmax(0, 1fr) 156px minmax(110px, auto) 40px; grid-template-areas: "img info qty sum rm"; }
  .cart-item__img { width: 88px; height: 88px; }
  .cart-item__sum { grid-column: auto; }
  .cart-item__remove { align-self: center; }
}
.cart__summary h2 { margin-bottom: var(--sp-3); }
.cart__summary h3 { margin: var(--sp-5) 0 var(--sp-2); font: 600 1.5rem/1.2 var(--font-head); }
.cart-total { display: grid; gap: var(--sp-2); margin: 0; }
.cart-total div { display: flex; justify-content: space-between; gap: var(--sp-3); }
.cart-total dt { color: var(--c-muted); }
.cart-total dd { margin: 0; font-weight: 800; }
.progress { margin-top: var(--sp-4); }
.progress__track { display: block; height: 8px; border-radius: var(--r-pill); background: var(--c-latte); overflow: hidden; }
.progress__bar { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c-tea); transition: width .3s var(--ease); }
.progress p { margin: var(--sp-2) 0 0; color: var(--c-tea-deep); font-size: var(--fs-sm); font-weight: 700; }
.cart-total__sum { padding-top: var(--sp-2); border-top: 1px solid var(--c-latte); }
.cart-total .cart-total__sum dt { color: var(--c-espresso); font-weight: 800; }
.cart-total__sum dd { font-size: var(--fs-lg); text-align: right; }
.cart__submit { margin-top: var(--sp-4); }
.cart__summary .form-note { margin-top: var(--sp-3); }
.co-warn { margin: var(--sp-3) 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: #FBE9E7; color: var(--c-sale); font-size: var(--fs-sm); font-weight: 700; }

/* ---------- Оформление заказа: шаги с номерами (скрытый шаг «Адрес» не считается) ---------- */
.checkout { display: grid; gap: var(--sp-3); margin-top: var(--sp-6); counter-reset: co-step; }
.checkout > h2 { margin: 0 0 var(--sp-2); }
.co-step { min-width: 0; margin: 0; padding: var(--sp-4); border: 0; border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); }
.co-step__title { float: left; width: 100%; display: flex; align-items: center; gap: var(--sp-3); margin: 0 0 var(--sp-4); padding: 0;
  font: 600 1.5rem/1.2 var(--font-head); color: var(--c-espresso); counter-increment: co-step; }
.co-step__title::before { content: counter(co-step); flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-pill);
  background: var(--c-tea); color: #fff; font: 800 15px/1 var(--font-text); }
.co-step__title + * { clear: both; }
@media (min-width: 768px) { .co-step { padding: var(--sp-5); } }

.checkout input[type="radio"] { appearance: none; flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; margin: 0;
  border: 2px solid var(--c-field-border); border-radius: 50%; background: var(--c-milk); transition: border-color .15s var(--ease); }
.checkout input[type="radio"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-tea); transform: scale(0); transition: transform .15s var(--ease); }
.checkout input[type="radio"]:checked { border-color: var(--c-tea); }
.checkout input[type="radio"]:checked::before { transform: scale(1); }
.checkout input[type="radio"]:focus-visible { outline: 3px solid var(--c-copper); outline-offset: 2px; }

.co-seg { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.co-seg__opt { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; border: 1.5px solid var(--c-latte); border-radius: var(--r-md);
  font-weight: 700; line-height: 1.25; cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease); }
.co-opts { display: grid; gap: var(--sp-2); }
@media (min-width: 768px) { .co-opts--2 { grid-template-columns: 1fr 1fr; } }
.co-opt { display: grid; grid-template-columns: auto 40px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: 12px 14px;
  border: 1.5px solid var(--c-latte); border-radius: var(--r-md); cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease); }
.co-opt--compact { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.co-opt--compact input { margin-top: 2px; }
.co-seg__opt:hover, .co-opt:hover { border-color: var(--c-field-border); }
.co-seg__opt:has(input:checked), .co-opt:has(input:checked) { border-color: var(--c-tea); background: var(--c-leaf-tint); }
.co-opt__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill); background: var(--c-linen); color: var(--c-tea); }
.co-opt__text { display: grid; gap: 2px; min-width: 0; }
.co-opt__text small { color: var(--c-muted); font-size: var(--fs-sm); line-height: 1.4; }
.co-opt__text .co-opt__why { color: var(--c-sale); font-weight: 700; }
.co-opt__price { justify-self: end; color: var(--c-tea-deep); font-size: var(--fs-sm); font-weight: 800; text-align: right; }
.co-opt.is-off { cursor: not-allowed; background: transparent; }
.co-opt.is-off input, .co-opt.is-off .co-opt__icon, .co-opt.is-off b, .co-opt.is-off small:not(.co-opt__why), .co-opt.is-off .co-opt__price { opacity: .55; }
@media (max-width: 559px) {
  .co-opt { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .co-opt input { margin-top: 2px; }
  .co-opt__icon { display: none; }
  .co-opt__price { grid-column: 2; justify-self: start; text-align: left; }
}
.co-hint { display: flex; gap: 8px; align-items: flex-start; margin: var(--sp-3) 0 0; color: var(--c-muted); font-size: var(--fs-sm); }
.co-hint .icon { flex: none; margin-top: 2px; color: var(--c-tea); }
.co-opt-label { color: var(--c-muted); font-weight: 400; }

.order-done { display: flex; gap: var(--sp-4); align-items: flex-start; max-width: 760px; margin-bottom: var(--sp-7); }
.order-done__icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-pill); background: var(--c-tea); color: #fff; }
.order-done h2 { margin-bottom: var(--sp-3); font-size: 1.75rem; }
.order-done p { margin: 0 0 var(--sp-3); }
.order-done .btn { margin-top: var(--sp-2); }

/* ---------- Меньше движения — по настройке системы ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   «СЕТКА / СПИСОК» — выбор хранится в браузере, html[data-view="list"]
   ===================================================================== */
.view-switch { display: none; flex: none; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--c-milk); box-shadow: inset 0 0 0 1px var(--c-latte); }
.js .view-switch { display: inline-flex; }
.view-switch__btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--r-pill); background: none; color: var(--c-muted); cursor: pointer; }
.view-switch__btn:hover { color: var(--c-tea-deep); }
.view-switch__btn[aria-pressed="true"] { background: var(--c-leaf-tint); color: var(--c-tea-deep); }
.view-switch__btn:focus-visible { outline: 2px solid var(--c-tea); outline-offset: 1px; }
@media (max-width: 1023px) {
  .toolbar__filters { flex: none; padding-inline: 14px; }
  .toolbar__sort { min-width: 0; }
  .toolbar__sort select { padding-left: 12px; padding-right: 28px; font-size: 13px; text-overflow: ellipsis; }
  .toolbar__sort .icon { right: 9px; }
}
@media (max-width: 400px) {
  .toolbar__filters { padding-inline: 12px; font-size: var(--fs-sm); }
  .view-switch__btn { width: 34px; }
}
/* самые узкие телефоны: у «Фильтров» — значок и счётчик, подпись остаётся для экранных дикторов */
@media (max-width: 374px) {
  .toolbar__filters { width: 48px; padding-inline: 0; }
  .toolbar__filters-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

html[data-view="list"] .product-grid--switch { grid-template-columns: minmax(0, 1fr); }
html[data-view="list"] .product-grid--switch .card {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "media body" "media foot"; align-items: start;
}
html[data-view="list"] .product-grid--switch .card__media { grid-area: media; align-self: stretch; aspect-ratio: auto; min-height: 112px; }
html[data-view="list"] .product-grid--switch .card__body { grid-area: body; padding: var(--sp-3) var(--sp-3) 0; }
html[data-view="list"] .product-grid--switch .card__foot { grid-area: foot; grid-template-columns: auto minmax(0, 1fr); align-items: center; margin: 0; padding: var(--sp-2) var(--sp-3) var(--sp-3); }
html[data-view="list"] .product-grid--switch .card__foot > :only-child { grid-column: 1 / -1; }
html[data-view="list"] .product-grid--switch .card__brand:empty { display: none; }
html[data-view="list"] .product-grid--switch .card__title { min-height: 0; }
html[data-view="list"] .product-grid--switch .card__title a { -webkit-line-clamp: 2; }
/* избранное — в углу фото, метки — внизу фото: справа в строке цена и кнопка */
html[data-view="list"] .product-grid--switch .card__fav { left: 4px; right: auto; top: 4px; width: 36px; height: 36px; }
html[data-view="list"] .product-grid--switch .card__badges { top: auto; bottom: 6px; left: 6px; }
html[data-view="list"] .product-grid--switch .card__badges .label { padding: 2px 7px; font-size: 11px; }
@media (min-width: 768px) {
  html[data-view="list"] .product-grid--switch .card { grid-template-columns: 168px minmax(0, 1fr) 236px; grid-template-areas: "media body foot"; }
  html[data-view="list"] .product-grid--switch .card__media { min-height: 168px; }
  html[data-view="list"] .product-grid--switch .card__body { align-self: center; padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-5); }
  html[data-view="list"] .product-grid--switch .card__foot { align-self: stretch; grid-template-columns: minmax(0, 1fr); align-content: center; padding: var(--sp-4) var(--sp-5); border-left: 1px solid var(--c-latte); }
  html[data-view="list"] .product-grid--switch .card__title a { -webkit-line-clamp: 3; }
}

/* Варианты «Списка» Б и В — настройка «Отображение каталога» в админке (html[data-list]); А — правила выше, без изменений.
   Карточка растёт в высоту, ширина та же, три зоны те же: фото крупнее (целиком, по центру, без растяжения и обрезки),
   название крупнее, зона цены уже. Б: высота 210, фото 176 px; В: 236 и 196 px (на 1280+; уже — пропорционально меньше). */
html[data-list="b"] { --list-photo: 120px; --list-h: 128px; --list-pad: 8px; --list-title: 15px; }
html[data-list="c"] { --list-photo: 128px; --list-h: 140px; --list-pad: 8px; --list-title: 15px; }
@media (min-width: 768px) {
  html[data-list="b"] { --list-photo: 176px; --list-h: 188px; --list-pad: 12px; --list-title: 17px; --list-price: 200px; --list-gap: 20px; }
  html[data-list="c"] { --list-photo: 192px; --list-h: 204px; --list-pad: 12px; --list-title: 17px; --list-price: 204px; --list-gap: 24px; }
}
@media (min-width: 1280px) {
  html[data-list="b"] { --list-photo: 200px; --list-h: 210px; --list-pad: 12px; --list-title: 17px; --list-price: 212px; --list-gap: 24px; }
  html[data-list="c"] { --list-photo: 224px; --list-h: 236px; --list-pad: 14px; --list-title: 18px; --list-price: 220px; --list-gap: 32px; }
}
html[data-view="list"][data-list] .product-grid--switch .card { grid-template-columns: var(--list-photo) minmax(0, 1fr); }
html[data-view="list"][data-list] .product-grid--switch .card__media { min-height: var(--list-h); }
html[data-view="list"][data-list] .product-grid--switch .card__media:not(.card__media--ph) img { padding: var(--list-pad); }
html[data-view="list"][data-list] .product-grid--switch .card__title { font-size: var(--list-title); line-height: 1.4; }
html[data-view="list"][data-list] .product-grid--switch .card__meta { font-size: 13px; }
@media (max-width: 767.98px) {   /* телефон: длинная «Сообщить о поступлении» — под ценой, иначе на 320 px ей тесно рядом с крупным фото */
  html[data-view="list"][data-list] .product-grid--switch .card__foot:has(> .btn--outline) { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 768px) {
  html[data-view="list"][data-list] .product-grid--switch .card { grid-template-columns: var(--list-photo) minmax(0, 1fr) var(--list-price); }
  html[data-view="list"][data-list] .product-grid--switch .card__body { gap: 8px; padding: var(--sp-4) var(--list-gap); }
  html[data-view="list"][data-list] .product-grid--switch .card__foot { gap: var(--sp-3); padding: var(--sp-4) var(--list-gap); }
  html[data-view="list"][data-list] .product-grid--switch .price__current { font-size: 1.375rem; }
}

/* ---------- Подборки над товарами (настройка «Отображение каталога»): строка-лента или кнопка у сортировки ---------- */
.quick-picks { margin-bottom: var(--sp-3); }
.quick-picks__label { display: block; margin-bottom: 6px; color: var(--c-muted); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.chip--pick { border-color: transparent; background: var(--c-leaf-tint); color: var(--c-tea-deep); }
.chip--pick:hover { border-color: var(--c-tea); background: var(--c-tea); color: #fff; }
.chip--pick:hover .chip__count { color: inherit; }
.picks-menu { display: none; position: relative; }
.picks-menu > summary { list-style: none; cursor: pointer; }
.picks-menu > summary::-webkit-details-marker { display: none; }
.picks-menu > summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -2px; }
.picks-menu[open] > summary { border-color: var(--c-tea); background: var(--c-leaf-tint); }
.picks-menu[open] > summary::after { rotate: -135deg; translate: 0 2px; }
.picks-menu__pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 340px; max-height: min(70vh, 560px); overflow-y: auto;
  padding: var(--sp-4); border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-lg); }
.picks-menu__head { margin: 0 0 6px; color: var(--c-muted); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.picks-menu__head ~ .picks-menu__head { margin-top: var(--sp-4); }
@media (min-width: 1024px) {
  .quick-picks { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
  .quick-picks__label { flex: none; margin: 0; }
  .quick-picks > .scroller { flex: 1 1 auto; }
  .quick-picks:has(.is-expanded) { align-items: flex-start; }
  .quick-picks:has(.is-expanded) .quick-picks__label { padding-top: 12px; }
  .quick-picks--compact { display: none; }                                 /* на компьютере — кнопка у сортировки */
  .picks-menu { display: block; margin-left: auto; }
  .picks-menu + .toolbar__sort { margin-left: 0; }
}

/* Б и В в исходной компоновке: от 1280 px колонка товаров 656 px (справа подборки) — фото и отступы меньше, пропорции те же.
   Б — фото 176 px, высота 186; В — фото 192 px, высота 204, название 17 px. На 1024–1279 — значения планшета (колонка 648–903 px). */
@media (min-width: 1280px) {
  html[data-list="b"] .catalog:not(.catalog--wide) .product-grid--switch { --list-photo: 176px; --list-h: 186px; --list-price: 188px; --list-gap: 18px; }
  html[data-list="c"] .catalog:not(.catalog--wide) .product-grid--switch { --list-photo: 192px; --list-h: 204px; --list-price: 192px; --list-gap: 20px; --list-title: 17px; }
}

/* ---------- «Справа в „Списке“, внизу в „Сетке“» (.catalog--side): в «Списке» от 1280 px — фильтры | товары | подборки ----------
   Те же блоки «Подборки», «Смотрите также», «Полезно знать», без копий: в «Сетке», на планшете и телефоне — под товарами, как обычно.
   Колонка товаров уже (688–736 px вместо 952–992), поэтому карточки А/Б/В здесь чуть компактнее, пропорции те же:
   Б — фото 184 px, высота 194; В — фото 200 px, высота 212, название 17 px; у всех зона цены 196–208 px и отступы 20 px. */
@media (min-width: 1280px) {
  html[data-view="list"] .catalog--side { grid-template-columns: 240px minmax(0, 1fr) 220px; }
  html[data-view="list"] .catalog--side.catalog--nofilters { grid-template-columns: minmax(0, 1fr) 220px; }
  html[data-view="list"] .catalog--side > .catalog__aside {
    grid-column: -2 / -1; grid-row: 1 / span 3; align-self: start; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); margin-top: 0;
    position: sticky; top: calc(var(--header-h) + 66px); max-height: calc(100vh - var(--header-h) - 84px); overflow-y: auto; overscroll-behavior: contain;
    margin-inline: -6px; padding: 0 6px 8px; scrollbar-width: thin;       /* поле под тени блоков: прокрутка их не срезает */
  }
  html[data-view="list"] .catalog--side .aside-block h2 { font-size: 1.5rem; }
  html[data-view="list"]:not([data-list]) .catalog--side .product-grid--switch .card { grid-template-columns: 168px minmax(0, 1fr) 208px; }
  html[data-view="list"]:not([data-list]) .catalog--side .product-grid--switch .card__body { padding-left: 20px; }
  html[data-view="list"]:not([data-list]) .catalog--side .product-grid--switch .card__foot { padding-inline: 20px; }
  html[data-list="b"] .catalog--side .product-grid--switch { --list-photo: 184px; --list-h: 194px; --list-price: 196px; --list-gap: 20px; }
  html[data-list="c"] .catalog--side .product-grid--switch { --list-photo: 200px; --list-h: 212px; --list-price: 200px; --list-gap: 20px; --list-title: 17px; }
}
@media (min-width: 1366px) {
  html[data-view="list"] .catalog--side { grid-template-columns: 240px minmax(0, 1fr) 240px; }
  html[data-view="list"] .catalog--side.catalog--nofilters { grid-template-columns: minmax(0, 1fr) 240px; }
}

/* ---------- Полоса предпросмотра оформления (только у сотрудника, включившего предпросмотр в админке) ---------- */
.design-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px var(--gutter); background: var(--c-gold); color: var(--c-espresso); font-size: var(--fs-sm); }
.design-preview__group { display: inline-flex; align-items: center; gap: 4px; }
.design-preview a { padding: 2px 8px; border-radius: var(--r-pill); color: inherit; font-weight: 700; }
.design-preview a[aria-current] { background: var(--c-espresso); color: var(--c-cream); text-decoration: none; }
.design-preview__link { margin-left: auto; }
.design-preview__link + .design-preview__link { margin-left: 0; }

/* =====================================================================
   ПОДСКАЗКИ ПОИСКА (/api/suggest)
   ===================================================================== */
.suggest { margin-bottom: var(--sp-4); border-radius: var(--r-lg); background: var(--c-milk); box-shadow: var(--shadow-sm); overflow: hidden; }
.header-search .suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 70; margin: 0; max-height: min(70vh, 640px); overflow-y: auto; box-shadow: var(--shadow-lg); }
.suggest__item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: 8px var(--sp-4); color: var(--c-espresso); text-decoration: none; border-bottom: 1px solid var(--c-latte); }
.suggest__item img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; }
.suggest__item:hover, .suggest__item.is-active { background: var(--c-leaf-tint); }
.suggest__item--page { grid-template-columns: auto minmax(0, 1fr); padding-block: 10px; }
.suggest__label { padding: 2px 8px; border-radius: var(--r-pill); background: var(--c-latte); color: var(--c-cocoa); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.suggest__name { display: grid; gap: 2px; font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; }
.suggest__name small, .suggest__price small { color: var(--c-muted); font-size: 12px; font-weight: 500; }
.suggest__price { display: grid; justify-items: end; font-weight: 800; white-space: nowrap; }
.suggest__out { color: var(--c-muted); }
.suggest__all { display: block; padding: 12px var(--sp-4); color: var(--c-tea-deep); font-weight: 700; text-decoration: none; }
.suggest__all:hover { background: var(--c-leaf-tint); }
.suggest__note, .suggest__empty { margin: 0; padding: 10px var(--sp-4); color: var(--c-muted); font-size: var(--fs-sm); }
.suggest__note { border-bottom: 1px solid var(--c-latte); }
