/* ==========================================================================
   Грин Мандарин — главная
   Палитра из логотипа: шалфей #66765b · мандарин #ea813d · крем #faf9f5
   Шрифты: Lora (заголовки) · Unbounded (меню, кикеры, цены) · Manrope (текст)
   ========================================================================== */

:root {
  /* поверхности */
  --cream: #faf9f5;
  --paper: #ffffff;
  --sand: #f3f0e8;
  --sand-deep: #ebe7dc;

  /* бренд */
  --sage-100: #e9ede4;
  --sage-200: #d2dbca;
  --sage-300: #b5c2ab;
  --sage: #66765b;
  --sage-700: #4f5d46;
  --sage-900: #2f3a2a;

  --mandarin-100: #fbe9dc;
  --mandarin-200: #f6cfb2;
  --mandarin: #ea813d;
  --mandarin-btn: #dc7029;   /* чуть глубже — белый текст читается */
  --mandarin-600: #c9621f;
  --mandarin-800: #a34a14;   /* текст на светло-мандариновом фоне: контраст 5:1 */

  /* текст */
  --ink: #23281f;
  --ink-2: #4b5246;
  --mute: #6f766b;
  --line: #e4e1d7;
  --line-soft: #f0f1ec;
  --line-strong: #cfcbbd;

  /* шрифты */
  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-label: "Unbounded", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* геометрия */
  --container: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* тени: один масштаб на весь сайт */
  --shadow-1: 0 1px 2px rgba(35, 40, 31, 0.05), 0 2px 8px rgba(35, 40, 31, 0.04);
  --shadow-2: 0 6px 18px rgba(35, 40, 31, 0.08), 0 1px 3px rgba(35, 40, 31, 0.05);
  --shadow-3: 0 24px 60px rgba(35, 40, 31, 0.16), 0 4px 12px rgba(35, 40, 31, 0.06);

  /* движение */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms;
  --t-base: 240ms;
  --t-slow: 420ms;

  --z-header: 100;
  --z-mega: 110;
  --z-drawer: 200;
  --z-toast: 300;
}

/* --------------------------------------------------------------------------
   Сброс и база
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
iframe { display: block; border: 0; }

:focus-visible { outline: 2px solid var(--mandarin); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--mandarin-200); color: var(--ink); }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  padding: 10px 16px; background: var(--ink); color: #fff; border-radius: var(--r-xs);
  transition: top var(--t-fast);
}
.skip-link:focus { top: 16px; }

.icon {
  width: 22px; height: 22px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.icon--sm { width: 18px; height: 18px; }
.icon--xs { width: 14px; height: 14px; stroke-width: 2; }

/* типографика */
h1, h2 {
  font-family: var(--font-display); font-weight: 500;
  letter-spacing: -0.01em; line-height: 1.12; color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5vw, 4.1rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-weight: 700; font-size: 1.0625rem; line-height: 1.35; }

/* кикер — Unbounded, как пункты меню */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-label); font-weight: 500;
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sage);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--mandarin); border-radius: 2px; }

.lead { font-size: 1.125rem; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.label {
  font-family: var(--font-label); font-weight: 400;
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute);
}

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: var(--r-md);
  font-weight: 700; font-size: 0.975rem;
  border: 1.5px solid transparent; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast),
              transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
  touch-action: manipulation;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--mandarin-btn); color: #fff; }
.btn--primary:hover { background: var(--mandarin-600); box-shadow: 0 8px 20px rgba(220, 112, 41, 0.28); }
.btn--ghost { border-color: var(--sage); color: var(--sage-700); }
.btn--ghost:hover { background: var(--sage-100); color: var(--sage-900); }
.btn--outline { border-color: var(--line); color: var(--sage-700); background: var(--paper); }
.btn--outline:hover { border-color: var(--sage-300); color: var(--sage-900); }
.btn--dark { background: var(--sage-900); color: #fff; }
.btn--dark:hover { background: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--cream); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 0.9rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--sage-700);
  transition: color var(--t-fast), gap var(--t-fast);
}
.link-arrow:hover { color: var(--mandarin-600); gap: 12px; }
.link-arrow--accent { color: var(--mandarin-600); }
.link-arrow--accent:hover { color: var(--mandarin-btn); }

/* секции: одинаковый ритм, соседние секции на одном фоне не удваивают отступ */
.section { padding-block: clamp(56px, 7vw, 96px); }
main > .section + .section { padding-top: 0; }
main > .section.handmade { padding-top: clamp(56px, 7vw, 96px); }
main > .handmade + .section { padding-top: clamp(56px, 7vw, 96px); }
main > .benefits-section + .section { padding-top: clamp(48px, 6vw, 80px); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: clamp(24px, 3.5vw, 40px);
}
.section-head__text { display: grid; gap: 12px; max-width: 640px; }
.section-head .link-arrow { flex: none; padding-bottom: 6px; }

/* --------------------------------------------------------------------------
   Шапка
   -------------------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(250, 249, 245, 0.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow var(--t-base);
}
.header.is-scrolled { box-shadow: 0 1px 0 var(--line), var(--shadow-1); }

.header__main {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center; gap: clamp(16px, 2.5vw, 28px);
  min-height: 84px; padding-block: 12px;
}

.logo { display: inline-flex; align-items: center; }
/* у знака сверху торчит листик — оптически логотип кажется опущенным, поднимаем */
.logo img { height: 40px; width: auto; transform: translateY(-2px); }

.search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 560px; width: 100%; }
.search__input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px 0 46px;
  border: 1.5px solid transparent; border-radius: var(--r-md);
  background: var(--sage-100); color: var(--ink); font-size: 0.95rem;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.search__input::placeholder { color: var(--mute); }
.search__input:focus { outline: none; background: var(--paper); border-color: var(--sage); box-shadow: 0 0 0 4px var(--sage-100); }
.search__btn {
  position: absolute; left: 4px; top: 4px; width: 38px; height: 38px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--sage-700);
}
.search__btn:hover { color: var(--ink); }
/* «Искать» выезжает, когда в поле встали */
.search__go {
  flex: none; height: 46px; max-width: 0; padding: 0;
  overflow: hidden; white-space: nowrap; opacity: 0;
  border-radius: var(--r-md); background: var(--mandarin-btn); color: #fff;
  font-weight: 700; font-size: 0.9rem;
  transition: max-width var(--t-base) var(--ease-out), padding var(--t-base) var(--ease-out),
              opacity var(--t-fast), background var(--t-fast);
}
.search__go:hover { background: var(--mandarin-600); }
.search.is-active .search__go { max-width: 120px; padding: 0 20px; opacity: 1; }

/* выпадающие подсказки — общие для всех полей поиска */
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30;
  padding: 6px; border-radius: var(--r-md);
  background: var(--paper); box-shadow: var(--shadow-3);
  max-height: min(64vh, 440px); overflow-y: auto; overscroll-behavior: contain;
}
.suggest__item {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px; align-items: center;
  padding: 8px; border-radius: var(--r-sm);
  transition: background var(--t-fast);
}
.suggest__item:hover, .suggest__item.is-active { background: var(--sand); }
.suggest__item img {
  width: 44px; height: 44px; object-fit: contain; padding: 3px;
  background: var(--sage-100); border-radius: var(--r-xs);
}
.suggest__item > span { display: grid; gap: 2px; min-width: 0; }
.suggest__name {
  font-size: 0.9rem; font-weight: 600; line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.suggest__name mark { background: var(--mandarin-200); color: inherit; border-radius: 3px; }
.suggest__cat { font-size: 0.72rem; color: var(--mute); }
.suggest__price {
  font-family: var(--font-label); font-weight: 500; font-size: 0.9rem;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.suggest__all {
  display: block; margin-top: 4px; padding: 12px;
  border-top: 1px solid var(--line); text-align: center;
  font-weight: 700; font-size: 0.9rem; color: var(--sage-700);
}
.suggest__all:hover { color: var(--mandarin-600); }
.suggest__empty { padding: 14px 10px; color: var(--mute); font-size: 0.9rem; line-height: 1.5; }

.contact { display: grid; justify-items: end; line-height: 1.2; }
.contact a { font-weight: 700; font-size: 1rem; color: var(--ink); white-space: nowrap; }
.contact a:hover { color: var(--mandarin-600); }
.contact span { font-size: 0.75rem; color: var(--mute); white-space: nowrap; }

.actions { display: flex; align-items: center; gap: 8px; }
.action {
  position: relative; width: 46px; height: 46px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--sage-100); color: var(--sage-700);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.action:hover { background: var(--sage-200); color: var(--sage-900); }
.action:active { transform: scale(0.96); }
.action__badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--mandarin); color: #fff;
  font-size: 0.68rem; font-weight: 800; line-height: 20px; text-align: center;
  box-shadow: 0 0 0 2px var(--cream);
}
.action--burger { display: none; }
.action--phone { display: none; }

/* корзина подпрыгивает, когда в неё что-то положили */
@keyframes cart-bump {
  0%   { transform: scale(1) translateY(0); }
  28%  { transform: scale(1.16) translateY(-4px); }
  55%  { transform: scale(0.94) translateY(0); }
  100% { transform: scale(1) translateY(0); }
}
.action--cart.is-bump { animation: cart-bump 520ms var(--ease-out); }
.action__badge { transition: transform var(--t-base) var(--ease-out); }
.action--cart.is-bump .action__badge { transform: scale(1.3); }

/* строка «Каталог + поиск» под логотипом — только на узких экранах */
.header__mobile { display: none; align-items: center; gap: 8px; padding-bottom: 12px; }
.catalog-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 46px; padding: 0 18px; max-width: 180px;
  overflow: hidden; white-space: nowrap;
  border-radius: var(--r-md); background: var(--mandarin-btn); color: #fff;
  font-family: var(--font-label); font-weight: 500; font-size: 0.68rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: max-width var(--t-base) var(--ease-out), padding var(--t-base) var(--ease-out),
              opacity var(--t-fast), background var(--t-fast);
  touch-action: manipulation;
}
.catalog-btn:active { background: var(--mandarin-600); }
.catalog-btn .icon { flex: none; }
/* при наборе поиска кнопка уезжает, строка занимает всю ширину */
.header__mobile.is-searching .catalog-btn { max-width: 0; padding-inline: 0; opacity: 0; }

.msearch { position: relative; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.msearch__input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px 0 44px;
  border: 1.5px solid transparent; border-radius: var(--r-md);
  background: var(--sage-100); color: var(--ink);
  /* 16px обязательно: при меньшем размере Safari на iOS зумит страницу по тапу в поле */
  font-size: 1rem;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.msearch__input::placeholder { color: var(--mute); font-size: 0.9rem; }
.msearch__input:focus {
  outline: none; background: var(--paper);
  border-color: var(--sage); box-shadow: 0 0 0 4px var(--sage-100);
}
.msearch__btn {
  position: absolute; left: 6px; top: 6px; width: 34px; height: 34px;
  border-radius: var(--r-sm); display: grid; place-items: center; color: var(--sage-700);
}
/* «Найти» появляется, только когда поле активно */
.msearch__go {
  flex: none; height: 46px; max-width: 0; padding: 0;
  overflow: hidden; white-space: nowrap; opacity: 0;
  border-radius: var(--r-md); background: var(--mandarin-btn); color: #fff;
  font-weight: 700; font-size: 0.9rem;
  transition: max-width var(--t-base) var(--ease-out), padding var(--t-base) var(--ease-out), opacity var(--t-fast);
}
.header__mobile.is-searching .msearch__go { max-width: 110px; padding: 0 18px; opacity: 1; }

/* навигация — Unbounded, шалфей, оранжевое подчёркивание */
.nav { border-top: 1px solid var(--line); }
.nav__list { position: relative; display: flex; align-items: stretch; gap: clamp(0px, 0.8vw, 10px); margin-inline: -12px; }
.nav__item { position: static; display: flex; }
.nav__link {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 12px 13px; margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-family: var(--font-label); font-weight: 500;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sage); white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-base) var(--ease-out);
}
.nav__link:hover, .nav__item.is-open > .nav__link { color: var(--sage-900); }
.nav__item.is-open > .nav__link { border-color: var(--mandarin); }

/* подсветка пункта — одна «пилюля», которая скользит между пунктами */
.nav__pill {
  position: absolute; top: 7px; bottom: 8px; left: 0; width: 0;
  border-radius: var(--r-sm); background: var(--sage-100);
  opacity: 0; pointer-events: none;
  transition: transform 280ms var(--ease-out), width 280ms var(--ease-out), opacity 160ms;
  will-change: transform, width;
}
.nav__pill.is-visible { opacity: 1; }
.nav__pill.is-jump { transition: opacity 160ms; }
.nav__link .icon { width: 14px; height: 14px; stroke-width: 2; transition: transform var(--t-base) var(--ease-out); }
.nav__item.is-open > .nav__link .icon { transform: rotate(180deg); }
.nav__link--accent { color: var(--mandarin-600); }
.nav__link--accent:hover { color: var(--mandarin-btn); }
.nav__spacer { flex: 1; }

/* мега-меню: ссылки · популярное в разделе · баннер */
.mega {
  position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-mega);
  background: var(--paper);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  box-shadow: var(--shadow-3);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out), visibility 0s linear var(--t-base);
}
.nav__item.is-open > .mega { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mega__inner {
  display: grid; grid-template-columns: 380px minmax(0, 1fr) 220px;
  gap: 32px;
  padding-block: 30px 34px;
}
.mega__links { position: relative; display: grid; gap: 6px; align-content: start; }
.mega__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.mega__col { min-width: 0; }
.mega__title {
  font-family: var(--font-label); font-weight: 500;
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 6px;
}
.mega__col a {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 7px 10px; margin-inline: -10px; border-radius: var(--r-xs);
  color: var(--ink-2); font-size: 0.875rem; line-height: 1.35;
  transition: color var(--t-fast);
}
.mega__col a::after {
  /* тонкая линия под текстом; под «пилюлей» её не видно */
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0;
  height: 1px; background: var(--line-soft);
  transition: opacity var(--t-fast);
}
.mega__col li:last-child a::after { display: none; }
.mega__col a:hover::after { opacity: 0; }
.mega__col a:hover { color: var(--mandarin-800); }
.mega__col a small {
  flex: none; color: var(--mute); font-size: 0.75rem;
  font-variant-numeric: tabular-nums; transition: color var(--t-fast);
}
/* на светло-мандариновой подсветке серый даёт контраст 3,97 — цифру затемняем */
.mega__col a:hover small { color: var(--mandarin-800); }
.mega__all {
  position: relative; z-index: 1; justify-self: start;
  margin-top: 4px; padding: 6px 10px; margin-inline: -10px; border-radius: var(--r-xs);
  font-size: 0.925rem;
}
.mega__all:hover { gap: 8px; color: var(--mandarin-800); }   /* ширина не меняется — «пилюля» совпадает со ссылкой */

/* та же «пилюля», что в меню, но двигается по двум осям */
.mega__pill {
  position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 0;
  border-radius: var(--r-xs); background: var(--mandarin-100);
  opacity: 0; pointer-events: none;
  transition: transform 240ms var(--ease-out), width 240ms var(--ease-out), height 240ms var(--ease-out), opacity 140ms;
  will-change: transform, width, height;
}
.mega__pill.is-visible { opacity: 1; }
.mega__pill.is-jump { transition: opacity 140ms; }

.mega__popular { display: grid; gap: 14px; align-content: start; }
.mega__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mini {
  display: grid; gap: 8px; padding: 10px;
  background: var(--sand); border-radius: 16px;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base);
}
.mini:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.mini__media { aspect-ratio: 1; border-radius: 12px; background: var(--paper); overflow: hidden; }
.mini__media img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.mini__media img.is-cover { object-fit: cover; padding: 0; }
.mini__name { font-size: 0.85rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.mini__price { font-family: var(--font-label); font-weight: 500; font-size: 0.85rem; color: var(--mandarin-600); }

.mega__banner {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  padding: 24px; border-radius: var(--r-lg); background: var(--sage-100);
}
.mega__banner h3 { font-family: var(--font-label); font-weight: 500; font-size: 1rem; line-height: 1.35; color: var(--sage-900); margin-bottom: 8px; }
.mega__banner p { font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
.mega__banner .btn { align-self: flex-start; }

/* --------------------------------------------------------------------------
   Мобильная шторка
   -------------------------------------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); visibility: hidden; transition: visibility 0s linear var(--t-slow); }
.drawer.is-open { visibility: visible; transition-delay: 0s; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(47, 58, 42, 0.5); opacity: 0; transition: opacity var(--t-slow) var(--ease-out); }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(400px, 88vw);
  background: var(--cream); border-radius: 0 var(--r-xl) var(--r-xl) 0;
  display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform var(--t-slow) var(--ease-out);
  box-shadow: var(--shadow-3); padding-bottom: env(safe-area-inset-bottom);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px 20px; }
.drawer__head img { height: 30px; width: auto; }
.drawer__close { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--sage-100); display: grid; place-items: center; color: var(--sage-700); }
.drawer__search { margin: 0 16px 8px; }
.drawer__search .search__input { height: 48px; }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 24px; }
.drawer__group { border-bottom: 1px solid var(--line); }
.drawer__toggle {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 12px; min-height: 56px; text-align: left;
  font-family: var(--font-label); font-weight: 500; font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--sage-900);
}
/* вертикальный штрих слева — маркер раздела, загорается у раскрытого */
.drawer__bar {
  width: 4px; height: 18px; border-radius: 2px; background: var(--sage-200);
  transition: background var(--t-fast), height var(--t-base) var(--ease-out);
}
.drawer__toggle[aria-expanded="true"] .drawer__bar { background: var(--mandarin); height: 28px; }
.drawer__count {
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 700;
  color: var(--mute); font-variant-numeric: tabular-nums;
}
.drawer__toggle .icon { width: 16px; height: 16px; color: var(--mute); transition: transform var(--t-base) var(--ease-out); }
.drawer__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }

.drawer__sub { display: none; padding: 0 0 14px 16px; }
.drawer__toggle[aria-expanded="true"] + .drawer__sub { display: block; }
/* заголовок подгруппы — плашкой, иначе «Чай» неотличим от ссылки «Листовой чай» */
.drawer__sub h4 {
  margin: 14px 0 2px; padding: 7px 10px;
  background: var(--sage-100); border-radius: var(--r-xs);
  font-family: var(--font-label); font-weight: 500; font-size: 0.6rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage-700);
}
.drawer__sub h4:first-child { margin-top: 4px; }
.drawer__sub a {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  min-height: 44px; padding: 0 10px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2); font-size: 0.95rem;
}
.drawer__sub a:last-child { border-bottom: 0; }
.drawer__sub a small { color: var(--mute); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.drawer__sub a strong { color: var(--mandarin-600); font-weight: 700; }
.drawer__link {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px;
  min-height: 56px; border-bottom: 1px solid var(--line);
  font-family: var(--font-label); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sage-900);
}
.drawer__link.nav__link--accent { color: var(--mandarin-600); }
.drawer__contacts { padding: 20px 0 0; display: grid; gap: 6px; font-size: 0.9rem; color: var(--ink-2); }
.drawer__contacts strong { font-size: 1rem; color: var(--ink); }
.drawer__contacts .btn { margin-top: 8px; justify-self: start; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(28px, 3.5vw, 52px) clamp(36px, 5vw, 64px); }
.hero::before {
  content: ""; position: absolute; right: -10%; top: -20%;
  width: 60vw; height: 60vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(234, 129, 61, 0.14), transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 72px); }
.hero__copy { display: grid; gap: 24px; max-width: 600px; }
.hero__copy h1 .accent { color: var(--sage); font-style: italic; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero__stats div { display: grid; }
.hero__stats strong { font-family: var(--font-label); font-weight: 500; font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hero__stats span { font-size: 0.8125rem; color: var(--mute); }

.hero__mosaic { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; aspect-ratio: 1.05; }
.hero__tile { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--sand); }
.hero__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 800ms var(--ease-out); }
.hero__tile:hover img { transform: scale(1.03); }
.hero__tile--main { grid-row: 1 / 3; border-radius: var(--r-xl); }
.hero__chip {
  position: absolute; left: 16px; bottom: 16px; display: grid; gap: 1px;
  padding: 10px 14px 11px; border-radius: var(--r-md);
  background: rgba(250, 249, 245, 0.92); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-2); font-size: 0.8rem; line-height: 1.3;
}
.hero__chip small { font-family: var(--font-label); color: var(--mandarin-600); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; }
.hero__chip strong { font-weight: 700; }
.hero__chip span { color: var(--mute); }

/* на маленьких плитках плашка всплывает по наведению, чтобы не спорить с главной */
.hero__tile:not(.hero__tile--main) .hero__chip {
  right: 16px; padding: 9px 12px 10px; font-size: 0.75rem;
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-out);
}
.hero__tile:not(.hero__tile--main):hover .hero__chip,
.hero__tile:not(.hero__tile--main):focus-visible .hero__chip { opacity: 1; transform: none; }

/* наводить нечем — плашку на маленьких плитках просто не показываем,
   она закрывает половину и без того небольшого фото */
@media (hover: none) {
  .hero__tile:not(.hero__tile--main) .hero__chip { display: none; }
}

/* --------------------------------------------------------------------------
   Полоса преимуществ
   -------------------------------------------------------------------------- */
.benefits {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 28px;
  padding: 22px 32px; border-radius: var(--r-lg); background: var(--sage-100);
}
.benefits li { display: flex; align-items: center; gap: 14px; font-size: 0.95rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.benefits li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mandarin); flex: none; }

/* --------------------------------------------------------------------------
   Разделы каталога
   -------------------------------------------------------------------------- */
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.cat {
  display: grid; gap: 14px; padding: 14px;
  background: var(--paper); border-radius: var(--r-lg);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base);
}
.cat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.cat--wide { grid-column: span 2; }
.cat__media { height: 180px; border-radius: var(--r-md); overflow: hidden; background: var(--sand); }
.cat__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.cat:hover .cat__media img { transform: scale(1.04); }
.cat__body { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 4px 4px; }
.cat__body h3 { font-size: 1rem; }
.cat__body span { font-size: 0.8rem; color: var(--mute); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Карточки товаров
   -------------------------------------------------------------------------- */
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.product {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 12px;
  background: var(--paper); border-radius: var(--r-lg);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base);
}
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.product__media { position: relative; aspect-ratio: 1; padding: 10px; border-radius: var(--r-md); background: var(--sand); overflow: hidden; }
.product__media img {
  width: 100%; height: 100%; object-fit: contain; padding: 7%;
  background: #fff; border-radius: var(--r-sm);
  transition: transform 600ms var(--ease-out);
}
.product__media img.is-cover { object-fit: cover; padding: 0; }
.product:hover .product__media img { transform: scale(1.03); }
.product__badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 1; }
.badge {
  display: inline-block; padding: 4px 9px; border-radius: var(--r-xs);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  background: var(--sage-100); color: var(--ink);
}
.badge--hit { background: var(--mandarin); color: #fff; }
.badge--new { background: var(--sage); color: #fff; }
.badge--sale { background: #c8452f; color: #fff; }
.product__fav {
  position: absolute; right: 8px; top: 8px; z-index: 2;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.9); color: var(--ink-2);
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--t-fast), transform var(--t-fast), color var(--t-fast);
}
.product:hover .product__fav, .product__fav:focus-visible, .product__fav.is-active { opacity: 1; transform: none; }
.product__fav:hover { color: var(--mandarin-600); }
.product__fav.is-active { color: #c8452f; }
.product__fav.is-active .icon { fill: currentColor; }
.product__body { display: grid; gap: 3px; padding: 0 4px; align-content: start; }
.product__title {
  font-weight: 600; font-size: 0.9rem; line-height: 1.35; color: var(--ink); min-height: 2.7em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product__title a::after { content: ""; position: absolute; inset: 0; }
.product__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px 2px; }
.price { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.price strong { font-family: var(--font-label); font-weight: 500; font-size: 1rem; color: var(--ink); }
.price s { color: var(--mute); font-size: 0.8rem; }
.product__cart {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--mandarin-btn); color: #fff; font-size: 0.8125rem; font-weight: 700; white-space: nowrap;
  transition: background var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.product__cart:hover { background: var(--mandarin-600); }
.product__cart:active { transform: scale(0.96); }
/* товар уже в корзине — кнопка остаётся зелёной и показывает количество */
.product__cart.is-in-cart { background: var(--sage); }
.product__cart.is-in-cart:hover { background: var(--sage-700); }

/* --------------------------------------------------------------------------
   Подарочные наборы
   -------------------------------------------------------------------------- */
.gifts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.gift {
  position: relative; display: grid; grid-template-rows: auto 1fr; gap: 14px; padding: 14px;
  background: var(--sage-100); border-radius: var(--r-lg);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base);
}
.gift:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.gift__media { height: 200px; border-radius: var(--r-md); background: var(--paper); overflow: hidden; }
.gift__media img { width: 100%; height: 100%; object-fit: cover; }
.gift__media img.is-contain { object-fit: contain; padding: 6%; }
.gift__body { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; padding: 0 4px 4px; }
.gift__body h3 { font-size: 1rem; }
.gift__body h3 a::after { content: ""; position: absolute; inset: 0; }
.gift__body p { font-size: 0.8125rem; line-height: 1.45; color: var(--ink-2); }
.gift__price { margin-top: 6px; font-family: var(--font-label); font-weight: 500; font-size: 1rem; color: var(--mandarin-600); }

/* --------------------------------------------------------------------------
   Ручная работа — полоса
   -------------------------------------------------------------------------- */
.handmade { background: var(--sage-900); color: #fff; overflow: hidden; }
.handmade__inner { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.handmade__copy { display: grid; gap: 22px; }
.handmade__copy .eyebrow { color: var(--sage-300); }
.handmade__copy h2 { color: #fff; }
.handmade__copy p { color: rgba(255, 255, 255, 0.78); font-size: 1.05rem; }
.handmade__list { display: grid; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.handmade__list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.95rem; }
.handmade__list span { font-family: var(--font-label); font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; white-space: nowrap; }
.handmade__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.handmade__gallery figure { border-radius: var(--r-lg); overflow: hidden; background: var(--sage-700); }
.handmade__gallery figure:first-child { grid-row: 1 / 3; }
.handmade__gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4; transition: transform 800ms var(--ease-out); }
.handmade__gallery figure:not(:first-child) img { aspect-ratio: 4 / 3; }
.handmade__gallery figure:hover img { transform: scale(1.04); }

/* --------------------------------------------------------------------------
   Почему натуральное
   -------------------------------------------------------------------------- */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.fact { display: grid; gap: 16px; align-content: start; padding: 28px; background: var(--paper); border-radius: var(--r-lg); }
.fact__n {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sand); font-family: var(--font-label); font-weight: 500; font-size: 0.85rem; color: var(--mandarin-600);
}
.fact h3 { font-size: 1.05rem; }
.fact p { font-size: 0.925rem; line-height: 1.55; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Новинки — лента
   -------------------------------------------------------------------------- */
/* на десктопе — обычная сетка 2×4, на мобильных — лента со свайпом (см. адаптив) */
.rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.rail__hint {
  display: none; align-items: center; gap: 8px;
  margin: -12px 0 16px;
  font-size: 0.8125rem; font-weight: 600; color: var(--mute);
  transition: opacity var(--t-base);
}
.rail__hint .icon { color: var(--mandarin); animation: swipe-hint 1.6s var(--ease-out) infinite; }
/* подсказка уходит, как только пролистали */
.rail__hint.is-done { opacity: 0; }
@keyframes swipe-hint {
  0%, 55%, 100% { transform: translateX(0); }
  25%           { transform: translateX(7px); }
  40%           { transform: translateX(2px); }
}

/* --------------------------------------------------------------------------
   Отзывы
   -------------------------------------------------------------------------- */
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.review { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--paper); border-radius: var(--r-lg); }
.stars { display: flex; gap: 3px; color: var(--mandarin); }
.stars .icon { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.review blockquote { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--ink); }
.review footer { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; font-size: 0.8125rem; color: var(--mute); }
.review footer strong { font-weight: 600; color: var(--sage-700); }
.review footer a:hover { color: var(--mandarin-600); }
.reviews-head { display: flex; align-items: center; gap: 12px; }

/* --------------------------------------------------------------------------
   Мы в Череповце
   -------------------------------------------------------------------------- */
.location { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(28px, 4vw, 44px); padding: clamp(24px, 3.5vw, 40px); background: var(--paper); border-radius: var(--r-xl); }
.location__copy { display: flex; flex-direction: column; gap: 22px; }
.location__text { color: var(--ink-2); }
.location__dl { display: grid; gap: 14px; }
.location__dl dt { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.location__dl dd { font-weight: 600; font-size: 0.975rem; color: var(--ink); }
.location__dl dd a:hover { color: var(--mandarin-600); }
.location__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.location__note { margin-top: auto; font-size: 0.8125rem; color: var(--mute); }
.location__media { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.location__media > * { height: 340px; border-radius: 18px; overflow: hidden; background: var(--sage-100); }
/* кадр горизонтальный, вывеска в верхней трети — смещаем окно кадрирования вверх */
.location__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.location__media iframe { width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   Рассылка
   -------------------------------------------------------------------------- */
.subscribe {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 48px);
  padding: clamp(28px, 4vw, 48px); border-radius: var(--r-xl);
  background: var(--sage); color: #fff;
}
.subscribe h2 { color: #fff; font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin-bottom: 8px; }
.subscribe p { font-size: 0.925rem; color: rgba(255, 255, 255, 0.82); }
.subscribe p a { text-decoration: underline; text-underline-offset: 3px; }
.subscribe p a:hover { color: #fff; }
.subscribe__form { display: flex; gap: 10px; }
.subscribe__form input {
  flex: 1; min-width: 0; height: 54px; padding: 0 18px; border: 0; border-radius: var(--r-md);
  background: var(--cream); color: var(--ink); font-size: 0.95rem;
}
.subscribe__form input::placeholder { color: var(--mute); }
.subscribe__form input:focus { outline: 2px solid var(--mandarin); outline-offset: 2px; }
.subscribe__form .btn { min-height: 54px; }

/* --------------------------------------------------------------------------
   Подвал
   -------------------------------------------------------------------------- */
.footer { background: var(--paper); border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 72px); }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; padding-bottom: 40px; }
.footer__brand { display: grid; gap: 16px; align-content: start; }
.footer__brand img { height: 54px; width: auto; }
.footer__brand p { color: var(--ink-2); font-size: 0.9rem; line-height: 1.5; max-width: 300px; }
.footer__col h3 {
  font-family: var(--font-label); font-weight: 500; font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 14px;
}
.footer__col ul { display: grid; gap: 9px; }
.footer__col a { color: var(--ink-2); font-size: 0.9rem; transition: color var(--t-fast); }
.footer__col a:hover { color: var(--mandarin-600); }
.footer__col address { font-style: normal; display: grid; gap: 9px; color: var(--ink-2); font-size: 0.9rem; }
.footer__col address strong { color: var(--ink); }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 20px 0 28px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--mute);
}
.footer__bottom a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Тост
   -------------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: var(--z-toast);
  transform: translate(-50%, 16px);
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  background: var(--ink); color: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-3);
  font-size: 0.9rem; font-weight: 600; max-width: calc(100vw - 32px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-out), visibility 0s linear var(--t-base);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }
.toast .icon { color: var(--mandarin); }

/* --------------------------------------------------------------------------
   Появление при скролле
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Адаптив
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .nav__list { gap: 0; margin-inline: -10px; }
  .nav__link { letter-spacing: 0.06em; padding-inline: 10px; }
  .mega__inner { grid-template-columns: 380px minmax(0, 1fr); }
  .mega__banner { display: none; }
  .contact { display: none; }
}

@media (max-width: 1100px) {
  .nav__item--secondary { display: none; }
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail > :nth-child(n+7) { display: none; }
  .gifts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr; gap: 24px; }
}

@media (max-width: 960px) {
  /* колонок сетки не хватает, когда поиск и телефон скрыты: иконки прилипали
     к логотипу вместо правого края — на узких экранах строим шапку флексом */
  .header__main { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding-block: 10px; }
  .search, .contact { display: none; }
  /* поля ввода не меньше 16px — иначе iOS зумит страницу при фокусе */
  .search__input, .subscribe__form input { font-size: 1rem; }
  .action--user, .action--fav { display: none; }
  .action--phone, .action--burger { display: grid; }
  .header__mobile { display: flex; }
  .nav { display: none; }
  .logo img { height: 34px; transform: translateY(-3px); }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__mosaic { aspect-ratio: 1.4; }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 24px; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .cat__media { height: 160px; }
  .facts, .reviews { grid-template-columns: 1fr; }
  .handmade__inner, .location, .subscribe { grid-template-columns: 1fr; }

  /* Новинки: лента со свайпом, следующая карточка выглядывает из-за края экрана */
  .rail {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(66vw, 300px); gap: 12px;
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); padding-bottom: 6px;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail.is-end { -webkit-mask-image: none; mask-image: none; }
  .rail > * { scroll-snap-align: start; }
  .rail > :nth-child(n+7) { display: grid; }
  .rail .reveal { opacity: 1; transform: none; }
  .rail__hint { display: inline-flex; }
  .location__media > * { height: 280px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .header__main { gap: 12px; }
  .actions { gap: 6px; }
  .action { width: 44px; height: 44px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero { padding-top: 24px; }
  .hero__mosaic { gap: 10px; aspect-ratio: 1.2; }
  .hero__tile, .hero__tile--main { border-radius: var(--r-md); }
  .hero__chip { left: 10px; bottom: 10px; padding: 8px 10px; }
  .hero__tile:not(.hero__tile--main) .hero__chip { display: none; }
  /* на телефоне обе кнопки дублируют шапку: «Каталог» уже есть в строке поиска,
     «Как нас найти» — в меню; цифры кладём в один ряд */
  .hero__actions { display: none; }
  .hero__stats { display: flex; flex-wrap: nowrap; gap: 12px; justify-content: space-between; }
  .hero__stats div { min-width: 0; }
  .hero__stats strong { font-size: 1.05rem; }
  .hero__stats span { font-size: 0.68rem; line-height: 1.25; }
  .benefits { grid-template-columns: 1fr; gap: 12px; padding: 18px 20px; }
  .benefits li { font-size: 0.875rem; align-items: flex-start; }
  .benefits li::before { margin-top: 6px; width: 8px; height: 8px; }
  .cats { gap: 10px; }
  .cat { padding: 10px; gap: 10px; }
  .cat__media { height: 120px; }
  .cat__body { padding: 0 2px 2px; flex-direction: column; align-items: flex-start; gap: 2px; }
  .cat__body h3 { font-size: 0.9rem; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product { padding: 10px; gap: 8px; }
  .product__fav { opacity: 1; transform: none; }
  .product__foot { flex-direction: column; align-items: stretch; gap: 8px; padding-bottom: 0; }
  .product__cart { min-height: 44px; }
  .gifts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .gift { padding: 10px; gap: 10px; }
  .gift__media { height: 128px; }
  .gift__body { padding: 0 2px 2px; }
  .gift__body h3 { font-size: 0.9rem; }
  .gift__body p { font-size: 0.75rem; line-height: 1.4; }
  .gift__price { font-size: 0.9rem; }
  .rail { grid-auto-columns: min(70vw, 280px); }
  .handmade__gallery { gap: 10px; }
  .location__media { grid-template-columns: 1fr; }
  .location__media > * { height: 220px; }
  .location__actions .btn { flex: 1; }
  .subscribe__form { flex-direction: column; }
  /* «Каталог» длинный — ставим его в первый столбец, а короткие списки
     складываем во второй, чтобы подвал не растягивался на два экрана */
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .footer__grid > :nth-child(1) { grid-column: 1 / -1; }
  .footer__grid > :nth-child(2) { grid-column: 1; grid-row: 2; }   /* Каталог */
  .footer__grid > :nth-child(3) { grid-column: 2; grid-row: 2; }   /* Покупателям */
  .footer__grid > :nth-child(4) { grid-column: 1; grid-row: 3; }   /* О магазине */
  .footer__grid > :nth-child(5) { grid-column: 2; grid-row: 3; }   /* Контакты */
  .footer__grid > * { align-self: start; }
  .footer__bottom { flex-direction: column; }
}
