/* AVRELLA BEAUTY — визуальная система. Молочный камень, тёплый свет, тонкие линии. */

/* шрифты Montserrat и Manrope лежат у нас (assets/fonts): браузер берёт только нужные алфавиты */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/manrope-cyrillic-ext-5d8e0798.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/manrope-cyrillic-d8fc94bf.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: 300; font-display: swap; src: url(fonts/manrope-latin-ext-1f62546f.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/manrope-latin-b4295101.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/manrope-cyrillic-ext-5d8e0798.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/manrope-cyrillic-d8fc94bf.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; font-display: swap; src: url(fonts/manrope-latin-ext-1f62546f.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/manrope-latin-b4295101.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/manrope-cyrillic-ext-5d8e0798.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/manrope-cyrillic-d8fc94bf.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: 500; font-display: swap; src: url(fonts/manrope-latin-ext-1f62546f.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/manrope-latin-b4295101.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/manrope-cyrillic-ext-5d8e0798.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/manrope-cyrillic-d8fc94bf.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: 600; font-display: swap; src: url(fonts/manrope-latin-ext-1f62546f.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/manrope-latin-b4295101.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/montserrat-cyrillic-ext-9f10d294.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/montserrat-cyrillic-520cd39b.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/montserrat-latin-ext-a63797c1.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/montserrat-latin-a5ec5492.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/montserrat-cyrillic-ext-9f10d294.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/montserrat-cyrillic-520cd39b.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/montserrat-latin-ext-a63797c1.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/montserrat-latin-a5ec5492.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/montserrat-cyrillic-ext-9f10d294.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/montserrat-cyrillic-520cd39b.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/montserrat-latin-ext-a63797c1.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/montserrat-latin-a5ec5492.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --milk: #F6F2EC;
  --stone: #E8E0D5;
  --stone-2: #EFE9E1;
  --ink: #292521;
  --ink-2: #5A524A;
  --ink-3: #6F665D;
  --line: #DCD3C7;
  --nude: #C59B88;
  --nude-ink: #A57A66;
  --olive: #747967;
  --white: #FFFFFF;

  --display: "Montserrat", "Manrope", "Segoe UI", system-ui, sans-serif;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1400px;
  /* шапка: верхняя строка + навигация + линия; скрипт уточняет --head-h по факту */
  --head-top: 72px;
  --nav-h: 34px;
  --head-h: 73px;
  /* типографика: мелкие подписи, межбуквенные интервалы капса — одна шкала на весь сайт */
  --fs-xs: .6875rem;
  --fs-label: .75rem;
  --ls-nav: .07em;
  --ls-caps: .1em;
  --ls-title: .12em;
  --ls-display: .06em;
  /* отступы: между секциями, под заголовком секции, между колонками */
  --gap-section: clamp(44px, 6vw, 96px);
  --gap-head: clamp(24px, 2.6vw, 36px);
  --gap-cols: clamp(24px, 3vw, 48px);
  --pad: clamp(18px, 3.4vw, 56px);
  --r: 2px;
  --t: .22s cubic-bezier(.2, .7, .2, 1);

  --fs-s: .8125rem;
  --fs: .9375rem;
  --fs-m: 1.0625rem;
  --fs-l: 1.375rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--milk); color: var(--ink);
  font: 400 var(--fs)/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.has-bar { padding-bottom: 88px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); font-weight: 400; }
.muted { color: var(--ink-2); }
.small { font-size: var(--fs-s); }

/* тонкие полосы прокрутки в цвет линий */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* фото Sephora на белом: белый растворяем в фоне, цвета упаковки остаются */
.blend img, img.blend { mix-blend-mode: multiply; }

/* ---------- заголовки ---------- */
h1, h2, h3 { font-weight: 400; margin: 0; }
.t-display { font-family: var(--display); font-weight: 300; text-transform: uppercase; letter-spacing: var(--ls-display); line-height: 1.18; font-size: clamp(1.7rem, 3.4vw, 3.1rem); }
.t-section { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: var(--ls-title); line-height: 1.2; font-size: clamp(1rem, 1.35vw, 1.25rem); }
.t-sub { font-size: var(--fs); color: var(--ink-2); margin: 8px 0 0; max-width: 52ch; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 28px; border-radius: var(--r); border: 1px solid var(--ink);
  background: var(--ink); color: var(--milk); font-family: var(--display); font-weight: 500; font-size: var(--fs-label); letter-spacing: var(--ls-caps); text-transform: uppercase; white-space: nowrap;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.btn:hover { background: #3a342e; border-color: #3a342e; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--stone); }
.btn.line { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.line:hover { border-color: var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--stone); border-color: var(--stone); color: var(--ink-3); cursor: not-allowed; }
.link { border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: color var(--t); }
.link:hover { color: var(--nude-ink); }

/* ---------- шапка: поиск · логотип · корзина, под ними — навигация по сайту ---------- */
.head { position: sticky; top: 0; z-index: 30; background: var(--milk); border-bottom: 1px solid var(--line); }
/* три колонки 1fr · auto · 1fr: логотип остаётся ровно по центру экрана при любой ширине краёв */
.head-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; min-height: var(--head-top); }
.logo { display: inline-flex; align-items: center; justify-self: center; line-height: 1; color: var(--ink); }
.logo b, .logo small { display: none; }
.logo svg { display: block; height: 30px; width: auto; }
.foot-brand .logo svg { height: 34px; }
.tools { display: flex; align-items: center; gap: 2px; justify-self: end; margin-right: -10px; }

/* поиск слева: строка с тонкой линией снизу */
.search-toggle { border: 0; background: none; padding: 0; color: inherit; display: inline-flex; cursor: pointer; }
.search { position: relative; display: flex; align-items: center; gap: 10px; height: 34px; border-bottom: 1px solid var(--line); width: clamp(252px, 28vw, 340px); justify-self: start; }
.sug { position: absolute; top: calc(100% + 8px); left: 0; width: min(420px, 92vw); background: var(--milk); border: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(41, 37, 33, .3); z-index: 40; padding: 8px 0; max-height: 70vh; overflow: auto; }
.sug h5 { margin: 8px 16px 4px; font-size: var(--fs-xs); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.sug a { display: flex; align-items: center; gap: 12px; padding: 8px 16px; font-size: var(--fs-s); color: var(--ink); }
.sug a:hover, .sug a.is-focus { background: var(--stone-2); }
.sug a small { margin-left: auto; color: var(--ink-3); white-space: nowrap; }
.sug img { width: 36px; height: 36px; object-fit: contain; background: var(--stone-2); mix-blend-mode: multiply; flex: none; }
.sug .sug-name { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sug .sug-brand { color: var(--ink-3); font-size: var(--fs-label); display: block; }
.search .clear { border: 0; background: none; padding: 0 2px; color: var(--ink-3); display: none; line-height: 1; }
.search .clear svg { width: 14px; height: 14px; }
.search.has-q .clear { display: inline-flex; }
.search:focus-within { border-bottom-color: var(--ink); }
.search input { border: 0; outline: 0; background: none; width: 100%; font-size: var(--fs-s); }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.search svg, .cart-btn svg, .icon-btn svg { width: 20px; height: 20px; stroke-width: 1.5; }
.search svg, .icon-btn svg { width: 20px; height: 20px; stroke-width: 1.5; }

/* ============ греческие мотивы в подсказках поиска ============ */
:root {
  --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M0 11H16M2 11V2H13V9H6V5.5H9.5' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  --greek-key: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 11V1.5H10.5V8.5H4.5V4.5H7.5V6.5' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E");
  --olive-branch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M8 112C48 92 90 62 152 10'/%3E%3Cpath d='M0 0C7-6 19-6 27 0C19 6 7 6 0 0Z' transform='translate(34 97) rotate(-78)'/%3E%3Cpath d='M0 0C7-6 19-6 27 0C19 6 7 6 0 0Z' transform='translate(36 96) rotate(8)'/%3E%3Cpath d='M0 0C7-6 19-6 27 0C19 6 7 6 0 0Z' transform='translate(59 81) rotate(-82)'/%3E%3Cpath d='M0 0C7-6 19-6 27 0C19 6 7 6 0 0Z' transform='translate(61 80) rotate(4)'/%3E%3Cpath d='M0 0C7-6 19-6 27 0C19 6 7 6 0 0Z' transform='translate(86 62) rotate(-86)'/%3E%3Cpath d='M0 0C7-6 19-6 27 0C19 6 7 6 0 0Z' transform='translate(88 61) rotate(0)'/%3E%3Cpath d='M0 0C7-6 19-6 27 0C19 6 7 6 0 0Z' transform='translate(116 39) rotate(-90)'/%3E%3Cpath d='M0 0C7-6 19-6 27 0C19 6 7 6 0 0Z' transform='translate(118 38) rotate(-4)'/%3E%3Cpath d='M0 0C6-5 15-5 22 0C15 5 6 5 0 0Z' transform='translate(146 15) rotate(-40)'/%3E%3Cellipse cx='50' cy='103' rx='4' ry='5.5' transform='rotate(-30 50 103)'/%3E%3Cellipse cx='102' cy='67' rx='4' ry='5.5' transform='rotate(-30 102 67)'/%3E%3C/svg%3E");
}
/* панель подсказок: кайма-меандр сверху, греческий ключ у заголовков, оливковая ветвь в углу */
.sug::before { content: ""; display: block; height: 7px; margin: 6px 16px 4px; background-color: var(--ink-3); -webkit-mask: var(--meander) repeat-x left center / 9.33px 7px; mask: var(--meander) repeat-x left center / 9.33px 7px; opacity: .5; }
.sug::after { content: ""; position: absolute; right: 8px; bottom: 6px; width: 150px; height: 112px; background-color: var(--ink); -webkit-mask: var(--olive-branch) no-repeat center / contain; mask: var(--olive-branch) no-repeat center / contain; opacity: .07; pointer-events: none; z-index: -1; }
.sug h5 { display: flex; align-items: center; gap: 8px; }
.sug h5::before { content: ""; flex: none; width: 9px; height: 9px; background-color: currentColor; -webkit-mask: var(--greek-key) no-repeat center / contain; mask: var(--greek-key) no-repeat center / contain; }

/* иконки: меню и поиск (на телефоне), корзина со счётчиком */
.menu-btn, .tool-btn, .cart-btn { position: relative; display: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .2s ease, color .2s ease; }
.cart-btn { display: grid; }
.menu-btn svg { width: 24px; height: 24px; }
.tool-btn svg, .cart-btn svg { width: 22px; height: 22px; stroke-width: 1.5; }
/* значок с числом сидит на уголке сумки и не закрывает ручку */
.cart-count { --cc: 15px; position: absolute; top: 3px; right: 1px; min-width: var(--cc); height: var(--cc); padding: 0 4px; border-radius: 8px; background: var(--ink); color: var(--milk); font: 600 .5625rem/var(--cc) var(--sans); letter-spacing: 0; text-align: center; box-shadow: 0 0 0 2px var(--milk); }
.cart-count[data-n="0"] { display: none; }
/* при наведении — без заливки: реагируют сами значки (линии бургера, ручка сумки) */
/* фокус у круглых иконок — мягкий круглый фон с тонким кольцом, только при управлении с клавиатуры */
.menu-btn:focus-visible, .tool-btn:focus-visible, .cart-btn:focus-visible, .mnav-close:focus-visible, .nav-caret:focus-visible { outline: 1px solid currentColor; outline-offset: -5px; background: none; box-shadow: none; }

/* навигация под логотипом: текстовые пункты, тонкая линия у активного и при наведении */
.nav-list { list-style: none; margin: 0 auto; padding: 0 var(--pad); max-width: var(--wrap); height: var(--nav-h); display: flex; justify-content: center; align-items: stretch; gap: clamp(24px, 2.8vw, 44px); }
.nav-list > li { position: relative; display: flex; align-items: center; }
.nav-link { position: relative; display: inline-flex; align-items: center; height: 100%; font-family: var(--display); font-size: var(--fs-s); font-weight: 500; line-height: 1; letter-spacing: var(--ls-nav); text-transform: uppercase; white-space: nowrap; color: var(--ink-2); transition: color .2s ease; }
.nav-link::after { content: ""; position: absolute; left: 0; right: var(--ls-nav); bottom: 8px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left center; transition: transform .2s ease; }
.nav-link:hover, .nav-link.is-active, .nav-cat.is-open > .nav-link { color: var(--ink); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link:focus-visible { outline-offset: 4px; }
.nav-caret { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: 0 -8px 0 3px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.nav-caret svg { width: 14px; height: 14px; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.nav-cat:hover .nav-caret, .nav-cat.is-open .nav-caret { color: var(--ink); }
.nav-cat.is-open .nav-caret svg { transform: rotate(180deg); }
@media (pointer: coarse) { .nav-caret { width: 40px; height: 40px; margin: 0 -14px 0 -4px; } }

/* выпадающий список разделов под «Каталогом» */
.nav-drop { position: absolute; top: 100%; left: 50%; z-index: 35; min-width: 232px; padding-top: 1px; transform: translate(-50%, 6px); opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .2s; }
/* невидимый мостик между пунктом и списком: курсор не «проваливается» в щель */
.nav-drop::before { content: ""; position: absolute; left: -20px; right: -20px; top: -16px; height: 17px; }
.nav-cat.is-open .nav-drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s ease, transform .2s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.nav-drop-in { list-style: none; margin: 0; padding: 8px 0; background: var(--milk); border: 1px solid var(--line); box-shadow: 0 22px 40px -28px rgba(41, 37, 33, .32); }
.nav-drop a { display: flex; align-items: baseline; justify-content: space-between; gap: 28px; padding: 11px 24px; font-family: var(--display); font-weight: 500; letter-spacing: var(--ls-nav); text-transform: uppercase; font-size: var(--fs-s); line-height: 1.35; color: var(--ink-2); transition: color .2s ease, background-color .2s ease; }
.nav-drop a small { font-size: var(--fs-label); color: var(--ink-3); }
.nav-drop li:first-child a { margin-bottom: 6px; padding-bottom: 13px; border-bottom: 1px solid var(--line); color: var(--ink); }
.nav-drop a:hover { color: var(--ink); background: var(--stone-2); }
.nav-drop a:focus-visible { outline: 1.5px solid var(--ink); outline-offset: -4px; color: var(--ink); background: var(--stone-2); }
.nav-drop a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- меню для телефона и планшета ---------- */
html.menu-open { overflow: hidden; }
.mnav-bg { position: fixed; inset: 0; z-index: 50; background: rgba(41, 37, 33, .38); opacity: 0; transition: opacity .3s ease; }
.mnav-bg.open { opacity: 1; }
.mnav { position: fixed; top: 0; bottom: 0; left: 0; z-index: 51; width: min(400px, 88vw); display: flex; flex-direction: column; background: var(--milk); transform: translateX(-100%); transition: transform .36s cubic-bezier(.22, .61, .36, 1); }
.mnav.open { transform: none; }
.mnav-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--head-top); padding: 0 8px 0 max(var(--pad), env(safe-area-inset-left)); border-bottom: 1px solid var(--line); }
.mnav-head .logo svg { height: 26px; }
.mnav-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; transition: background-color .2s ease; }
.mnav-close svg { width: 22px; height: 22px; stroke-width: 1.5; }
.mnav-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px var(--pad) 24px max(var(--pad), env(safe-area-inset-left)); }
.mnav-list { list-style: none; margin: 0; padding: 0; }
.mnav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-family: var(--display); font-size: .875rem; font-weight: 500; letter-spacing: var(--ls-nav); text-transform: uppercase; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mnav-row[aria-current="page"] span { padding-bottom: 3px; border-bottom: 1px solid currentColor; }
.mnav-row svg { flex: none; width: 18px; height: 18px; color: var(--ink-3); transition: transform .3s cubic-bezier(.2, .7, .2, 1), color .2s ease; }
.mnav-cat.is-open > .mnav-row svg { transform: rotate(180deg); color: var(--ink); }
/* раскрывающийся список каталога: высота плавно от нуля; свёрнутые ссылки недоступны для Tab */
.mnav-cats { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .3s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .3s; }
.mnav-cat.is-open .mnav-cats { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .3s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.mnav-cats > ul { min-height: 0; overflow: hidden; list-style: none; margin: 0; padding: 0; }
.mnav-cat.is-open .mnav-cats > ul { border-bottom: 1px solid var(--line); }
.mnav-cats li:first-child { margin-top: 6px; }
.mnav-cats li:last-child { margin-bottom: 10px; }
.mnav-cats a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; padding-left: 14px; font-family: var(--display); font-weight: 500; letter-spacing: var(--ls-nav); text-transform: uppercase; font-size: var(--fs-s); color: var(--ink-2); }
.mnav-cats a small { font-size: var(--fs-s); color: var(--ink-3); }
.mnav-cats li:first-child a { color: var(--ink); }
.mnav-cats a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.mnav-row:active, .mnav-cats a:active { background: var(--stone-2); }
@media (hover: hover) { .mnav-cats a:hover { color: var(--ink); } .mnav-row:hover svg { color: var(--ink); } }
.mnav-foot { padding: 16px var(--pad) calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.mnav-foot .btn { width: 100%; }
@media (min-width: 1025px) { .mnav, .mnav-bg { display: none !important; } }

/* ---------- шапка на планшете и телефоне: меню · логотип · поиск и корзина ---------- */
@media (max-width: 1024px) {
  :root { --head-top: 56px; --head-h: 57px; }
  .head-top { gap: 0 8px; }
  .nav { display: none; }
  .menu-btn { display: grid; justify-self: start; margin-left: -10px; }
  .head-top > .search { display: none; }
  .head .search-toggle { pointer-events: none; }
  .search-btn { display: grid; }
  .logo svg { height: 28px; }
  /* поиск по кнопке — полем во всю ширину под шапкой */
  .head.search-open .head-top > .search { display: flex; grid-column: 1 / -1; grid-row: 2; width: 100%; height: 48px; margin: 0 0 10px; border-bottom-color: var(--ink); }
  .head.search-open .search input { font-size: 16px; }
  .head .sug { left: 0; right: 0; width: auto; max-height: min(64vh, 560px); }
}
@media (max-width: 600px) {
  :root { --head-top: 52px; --head-h: 53px; }
  .logo svg { height: 26px; }
}
/* самые узкие телефоны (320–374): логотип и иконки чуть компактнее, чтобы ничего не наезжало */
@media (max-width: 374px) {
  .head-top { gap: 0 4px; }
  .logo svg { height: 22px; }
  .menu-btn, .tool-btn, .cart-btn { width: 40px; height: 40px; }
  .cart-count { top: 1px; right: -1px; }
  .menu-btn { margin-left: -8px; }
  .tools { margin-right: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .mnav, .mnav-bg, .mnav-cats, .nav-drop, .nav-link, .nav-link::after, .nav-caret svg { transition: none !important; }
}

/* ---------- плитка товара ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.tile { display: flex; flex-direction: column; gap: 5px; position: relative; }
.tile-img { aspect-ratio: 1; background: var(--stone-2); display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; }
.tile-img img { width: 84%; height: 84%; object-fit: contain; mix-blend-mode: multiply; transition: transform .5s ease; }
.tile:hover .tile-img img { transform: scale(1.03); }
.tile-brand { font-family: var(--display); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--ls-caps); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.tile-name { font-size: var(--fs-s); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.4em * 2); }
.tile .price { margin-top: 2px; }
.tile-meta { font-size: var(--fs-label); color: var(--ink-3); min-height: 1.2em; }
.tile-flag { position: absolute; top: 10px; left: 10px; font-size: var(--fs-xs); letter-spacing: .02em; padding: 4px 8px; background: var(--milk); color: var(--ink-2); }
.tile-flag.sale { color: var(--nude-ink); }
.tile.is-out .tile-img img { opacity: .5; }
.tile.is-out .price .now { color: var(--ink-3); }

.price { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.price .now { font-weight: 500; }
.price.is-sale .now { color: var(--nude-ink); }
.price s { color: var(--ink-3); font-weight: 300; }
.stars { position: relative; display: inline-block; font-size: 11px; letter-spacing: 1px; color: var(--line); line-height: 1; }
.stars i { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--ink); font-style: normal; white-space: nowrap; }
.rating { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: var(--fs-s); }

/* ---------- полки с горизонтальным скроллом ---------- */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 72px) / 4); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.shelf::-webkit-scrollbar { display: none; }
.shelf .tile { scroll-snap-align: start; }

/* ---------- главная ---------- */
/* главный экран: кадр во всю ширину, текст поверх */
/* главный экран занимает ровно весь экран под шапкой (высоту шапки ставит скрипт в --head-h) */
.hero { position: relative; height: calc(100vh - var(--head-h)); height: calc(100svh - var(--head-h)); min-height: 440px; background: #2e2823; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); opacity: 0; transition: opacity 1.4s cubic-bezier(.4, 0, .2, 1); }
.hero-v.on { opacity: 1; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(41, 37, 33, .42), rgba(41, 37, 33, 0) 22%), linear-gradient(to top, rgba(41, 37, 33, .62), rgba(41, 37, 33, .18) 45%, rgba(41, 37, 33, 0) 72%); pointer-events: none; }
/* пока шапка не нарисована (грузится база товаров), она уже занимает свою высоту — экран не прыгает */
.head:empty { height: var(--head-h); }
body.has-intro .intro { margin-top: calc(var(--head-h, 110px) * -1); }
.hero[hidden] { display: none !important; }
/* условия и контакты на главной */
.terms-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px var(--gap-cols); }
.terms-grid > div { padding-top: 18px; border-top: 1px solid var(--line); }
.terms-grid h3 { margin: 0 0 12px; font-family: var(--display); font-weight: 500; font-size: var(--fs-label); letter-spacing: var(--ls-caps); text-transform: uppercase; }
.terms-grid p { margin: 0; color: var(--ink-2); font-size: var(--fs); line-height: 1.55; }
.contacts { display: flex; flex-wrap: wrap; gap: 20px; }
.contacts a { display: grid; gap: 8px; min-width: 240px; padding: 22px 24px; border: 1px solid var(--line); transition: border-color var(--t); }
.contacts a:hover { border-color: var(--ink); }
.contacts a b { font-family: var(--display); font-weight: 500; font-size: var(--fs-label); letter-spacing: var(--ls-caps); text-transform: uppercase; }
.contacts a span { color: var(--ink-2); }
.hero-text { position: absolute; left: 0; right: 0; bottom: clamp(30px, 5vw, 68px); color: var(--milk); display: flex; flex-direction: column; align-items: flex-start; }
.t-hero { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .05em; line-height: 1; font-size: clamp(2.6rem, 6vw, 6rem); margin: 0 0 22px; max-width: 12ch; text-wrap: balance; text-shadow: 0 2px 40px rgba(41, 37, 33, .22); }
.t-hero .w { display: inline-block; animation: wordIn 1.1s cubic-bezier(.16, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 110ms + 40ms); }
@keyframes wordIn { from { opacity: 0; transform: translateY(.32em); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
.hero-text { transition: opacity .38s ease, transform .38s ease; }
.hero-text.is-leaving { opacity: 0; transform: translateY(10px); }
.hero-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-family: var(--display); font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--ls-caps); text-transform: uppercase; color: rgba(246, 242, 236, .9); }
.hero-kicker[hidden] { display: none; }
.hero-kicker .dash { width: 28px; height: 1px; background: rgba(246, 242, 236, .7); font-size: 0; }
/* логотип бренда на видео-экране — белый, по левому краю, как заголовок */
.t-hero .hero-logo-w { display: block; }
.hero-logo { display: block; width: clamp(240px, 30vw, 460px); height: 104px; object-fit: contain; object-position: left bottom; filter: brightness(0) invert(1) drop-shadow(0 2px 28px rgba(41, 37, 33, .28)); }
.hero-sub { margin: 0 0 28px; font-size: clamp(1rem, 1.25vw, 1.2rem); color: rgba(246, 242, 236, .9); max-width: 46ch; text-wrap: balance; }
.hero-sub[hidden] { display: none; }
.btn.milk { background: var(--milk); color: var(--ink); border-color: var(--milk); }
.btn.milk:hover { background: var(--stone); border-color: var(--stone); }
/* пауза стоит на одной линии с кнопкой и у правого края контента */
.hero-pause { position: absolute; right: max(var(--pad), calc((100% - var(--wrap)) / 2 + var(--pad))); bottom: calc(clamp(30px, 5vw, 68px) + 5px); width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(246, 242, 236, .55); background: rgba(41, 37, 33, .22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: pointer; display: grid; place-items: center; transition: border-color var(--t), background var(--t); }
.hero-pause:hover { border-color: var(--milk); }
.hero-pause:focus-visible { outline: 1px solid var(--milk); outline-offset: 3px; }
.hero-pause span { width: 8px; height: 12px; border-left: 2px solid var(--milk); border-right: 2px solid var(--milk); }
.hero-pause[aria-pressed="true"] span { width: 0; height: 0; border: 0; border-left: 10px solid var(--milk); border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }

.section { padding: var(--gap-section) 0 0; }
.section:last-of-type { padding-bottom: var(--gap-section); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: var(--gap-head); }
.section-head a.link { white-space: nowrap; font-size: var(--fs-s); }

.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.cat { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--stone); }
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.cat:hover img { transform: scale(1.03); }
.cat-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 26px; display: flex; flex-direction: column; gap: 4px; color: var(--milk); background: linear-gradient(to top, rgba(41, 37, 33, .42), rgba(41, 37, 33, 0)); }
.cat-label b { font-family: var(--display); font-weight: 500; font-size: clamp(.85rem, 1.1vw, 1rem); line-height: 1.2; letter-spacing: var(--ls-title); text-transform: uppercase; }
.cat-label span { font-size: var(--fs-s); opacity: .85; }

.spot { position: relative; margin-top: var(--gap-section); background: var(--stone); overflow: hidden; }
.spot-media { position: relative; aspect-ratio: 21 / 9; }
.spot-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 1.3s cubic-bezier(.4, 0, .2, 1); }
.spot-media video.on { opacity: 1; }
/* текст на матовой молочной подложке: читается на любом кадре видео */
.spot-text {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  min-width: min(280px, calc(100% - 40px)); max-width: calc(100% - 40px); padding: clamp(22px, 2.6vw, 32px) clamp(26px, 3.6vw, 48px);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px;
  background: rgba(246, 242, 236, .58); -webkit-backdrop-filter: blur(16px) saturate(1.05); backdrop-filter: blur(16px) saturate(1.05);
  border: 1px solid rgba(246, 242, 236, .35);
}
.spot-text h2 { margin: 0; font-weight: 500; letter-spacing: var(--ls-title); font-size: clamp(1.5rem, 3vw, 2.6rem); max-width: 22ch; }
.spot-logo { display: block; height: clamp(26px, 3vw, 40px); width: auto; max-width: 100%; margin: 0 auto; }
.spot-text .btn { margin: 0; height: 44px; padding: 0 22px; font-size: var(--fs-label); white-space: nowrap; }
.spot-dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 10px; }
.spot-dots button { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.spot-dots button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(246, 242, 236, .6); box-shadow: 0 0 0 1px rgba(41, 37, 33, .25); transition: transform var(--t), background var(--t); }
.spot-dots button[aria-selected="true"]::before { background: var(--milk); transform: scale(1.5); }
.spot-dots button:focus-visible { outline: 1px solid var(--milk); outline-offset: -2px; }

/* ---------- о нас: предметная съёмка и колонка с заголовком, преимуществами и кнопкой ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 104px); align-items: center; }
.about-photo { margin: 0; aspect-ratio: 1; overflow: hidden; background: var(--stone); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text { max-width: 540px; }
.about-kicker { margin: 0 0 18px; font-family: var(--display); font-weight: 500; font-size: var(--fs-label); line-height: 1.2; letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.about-title { margin: 0 0 20px; font-family: var(--display); font-weight: 300; font-size: clamp(1.75rem, 2.8vw, 2.625rem); line-height: 1.14; color: var(--ink); text-wrap: balance; }
.about-lead { margin: 0; max-width: 46ch; font-size: var(--fs-m); line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.about-perks { list-style: none; margin: 30px 0 34px; padding: 0; border-top: 1px solid var(--line); }
.about-perks li { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 4px 24px; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--line); }
.about-perks b { font-family: var(--display); font-weight: 500; font-size: var(--fs-label); line-height: 1.4; letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink); }
.about-perks span { font-size: var(--fs); line-height: 1.5; color: var(--ink-2); }

/* ---------- как сделать заказ: три шага на светлом камне ---------- */
.section.steps { margin-top: var(--gap-section); padding: var(--gap-section) 0; background: var(--stone-2); }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px var(--gap-cols); }
.steps-list li { display: grid; align-content: start; gap: 10px; }
.step-n { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; font-family: var(--display); font-weight: 300; font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1; letter-spacing: var(--ls-display); color: var(--ink); }
/* тонкая линия от номера к следующему шагу */
.step-n::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.steps-list h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: var(--fs-label); line-height: 1.4; letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink); }
.steps-list p { margin: 0; max-width: 36ch; font-size: var(--fs); line-height: 1.55; color: var(--ink-2); }

/* ---------- каталог ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-3); font-size: var(--fs-s); padding-top: 22px; min-height: 42px; }
.crumbs a:hover { color: var(--ink); }
.cat-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 18px 0 26px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 30px; min-height: 92px; }
.cat-top .count { color: var(--ink-3); font-size: var(--fs-s); margin-top: 8px; min-height: 1.3em; }
.cat-controls { display: flex; gap: 10px; align-items: center; }
.select { height: 40px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 0 28px 0 0; font-size: var(--fs-s); appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23292521' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; background-size: 14px; }
.select:focus { border-bottom-color: var(--ink); outline: none; }
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: var(--fs-s); white-space: nowrap; }
.dd-btn::after { content: ""; width: 7px; height: 7px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: translateY(-2px) rotate(45deg); transition: transform var(--t); }
.dd-btn[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.dd-btn:hover, .dd-btn[aria-expanded="true"] { border-bottom-color: var(--ink); }
.dd-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 100%; margin: 0; padding: 6px 0; list-style: none; background: var(--milk); border: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(41, 37, 33, .3); z-index: 20; }
.dd-list li { padding: 9px 16px; font-size: var(--fs-s); white-space: nowrap; cursor: pointer; color: var(--ink-2); }
.dd-list li:hover, .dd-list li.is-focus { background: var(--stone-2); color: var(--ink); }
.dd-list li[aria-selected="true"] { color: var(--ink); font-weight: 500; }
.side-close { display: none; }
@media (min-width: 901px) { .filters-toggle, .side-close { display: none !important; } }

.catalog { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 80px; }
.side { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; scrollbar-width: thin; padding-right: 8px; }
.side-block { padding: 18px 0; border-bottom: 1px solid var(--line); }
.side-block:first-of-type { padding-top: 0; }
.side-block h2 { font-family: var(--display); font-weight: 500; font-size: var(--fs-label); letter-spacing: var(--ls-caps); text-transform: uppercase; margin: 0 0 12px; }
.side-cats { list-style: none; margin: 0; padding: 0; }
.side-cats a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; color: var(--ink-2); font-family: var(--display); font-weight: 500; letter-spacing: var(--ls-nav); text-transform: uppercase; font-size: var(--fs-label); line-height: 1.4; }
.side-cats a:hover, .side-cats a[aria-current="true"] { color: var(--ink); }
.side-cats a[aria-current="true"] { font-weight: 600; }
.side-cats a small { color: var(--ink-3); }
.side-cats .up { justify-content: flex-start; color: var(--ink); }
.side-cats .up::before { content: "← "; }
.check { display: flex; gap: 10px; align-items: center; padding: 5px 0; font-size: var(--fs-s); cursor: pointer; color: var(--ink-2); }
.check:hover { color: var(--ink); }
.check input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0; border: 1px solid var(--ink-3); background: transparent; border-radius: 2px; flex: none; display: grid; place-items: center; transition: border-color var(--t), background var(--t); }
.check input[type="radio"] { border-radius: 50%; }
.check:hover input { border-color: var(--ink); }
.check input:checked { border-color: var(--ink); background: var(--ink); }
.check input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23F6F2EC' stroke-width='1.8'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E"); background-size: 12px; background-position: center; background-repeat: no-repeat; }
.check input[type="radio"]:checked { background: transparent; box-shadow: inset 0 0 0 4.5px var(--milk), inset 0 0 0 16px var(--ink); }
.check input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.check small { margin-left: auto; color: var(--ink-3); }
.brand-find { width: 100%; height: 34px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 0; margin-bottom: 8px; font-size: var(--fs-s); }
.brand-find:focus { outline: none; border-bottom-color: var(--ink); }
.brand-list { max-height: 260px; overflow: auto; scrollbar-width: thin; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { display: inline-flex; gap: 6px; align-items: center; height: 30px; padding: 0 10px; border: 1px solid var(--line); background: transparent; font-size: var(--fs-s); border-radius: var(--r); }
.chip svg { width: 14px; height: 14px; }
.chip:hover { border-color: var(--ink); }
.chip.clear { border-color: transparent; text-decoration: underline; padding: 0; }
.pager { display: flex; gap: 4px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.pager button { min-width: 40px; height: 40px; border: 0; background: transparent; border-bottom: 1px solid transparent; font-size: var(--fs-s); }
.pager button:hover { border-bottom-color: var(--line); }
.pager button[aria-current="true"] { border-bottom-color: var(--ink); font-weight: 600; }
.pager button:disabled { opacity: .35; cursor: default; }
.empty { padding: 60px 20px; text-align: center; border: 1px solid var(--line); }
.empty h2 { font-family: var(--display); font-weight: 400; font-size: 1.1rem; letter-spacing: var(--ls-title); text-transform: uppercase; margin-bottom: 10px; }
.empty p { color: var(--ink-2); margin: 0 0 22px; }
/* каталог грузится дольше обычного / фильтры не пришли */
.slow-note { margin: 0 0 18px; padding: 12px 16px; font-size: var(--fs-s); color: var(--ink-2); background: var(--stone-2); }
.side-note { margin: 0; font-size: var(--fs-s); color: var(--ink-2); }
.linkish { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- карточка товара ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: clamp(28px, 5vw, 88px); padding: 20px 0 60px; align-items: start; }
/* галерея стоит на месте и уезжает вместе со страницей (не «следует» при прокрутке) */
.gallery { position: relative; }
.stage { background: var(--stone-2); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; cursor: zoom-in; }
.stage img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; }
/* просмотр фото на весь экран */
.lb { position: fixed; inset: 0; z-index: 90; background: var(--milk); animation: lbfade .18s ease both; }
/* область фото с точными границами — картинка всегда целиком вписана в экран */
.lb-img { position: absolute; inset: 72px 88px 60px; display: flex; align-items: center; justify-content: center; }
.lb-img img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; cursor: zoom-out; }
/* значок загрузки появляется, только если фото готовится дольше четверти секунды */
.lb-img::after { content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 1.5px solid rgba(41, 37, 33, .15); border-top-color: var(--ink); opacity: 0; transition: opacity .2s ease 0s; animation: lbspin .9s linear infinite; pointer-events: none; }
.lb.loading .lb-img::after { opacity: 1; transition-delay: .25s; }
@keyframes lbspin { to { transform: rotate(360deg); } }
.lb-x, .lb-prev, .lb-next { position: absolute; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: var(--milk); color: var(--ink); cursor: pointer; display: grid; place-items: center; font-size: .95rem; transition: border-color var(--t), background var(--t); }
.lb-x { top: 16px; right: 16px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-x:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--ink); }
.lb-x:focus-visible, .lb-prev:focus-visible, .lb-next:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.lb-n { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: var(--fs-s); color: var(--ink-2); }
body.lb-open { overflow: hidden; }
@keyframes lbfade { from { opacity: 0; } to { opacity: 1; } }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.thumbs button { flex: none; width: 68px; aspect-ratio: 1; background: var(--stone-2); border: 1px solid transparent; padding: 6px; transition: border-color var(--t); }
.thumbs button:hover { border-color: var(--line); }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
/* Safari (iPhone): рамка фото не должна подстраиваться под само фото. Когда фото оттенка скачано заранее, Safari берёт его
   «родной» размер (1000 px): слайд раздувался втрое, и было видно увеличенный обрезанный кусок. Размер рамки — только от ширины
   и пропорции; всё, что больше, обрезается */
.thumbs button { min-width: 0; min-height: 0; overflow: hidden; contain: size; }
.thumbs img { display: block; max-width: 100%; }
.stage { grid-template: 100% / 100%; }
.stage img, .lb-img img { min-width: 0; min-height: 0; }
.lb-img { overflow: hidden; }
.dots { display: none; }

.buy-box { max-width: 520px; }
.buy-brand { display: inline-block; font-family: var(--display); font-weight: 500; font-size: var(--fs-label); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.buy-brand:hover { color: var(--ink); }
.buy-box h1 { font-family: var(--display); font-weight: 400; font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.35; letter-spacing: .02em; margin: 0 0 12px; }
.buy-short { color: var(--ink-2); font-size: var(--fs); margin: 0 0 14px; max-width: 46ch; }
.buy-box .rating { margin-bottom: 22px; }
.buy-price { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.buy-price .now { font-size: 1.5rem; font-weight: 500; }
.buy-price.is-sale .now { color: var(--nude-ink); }
.buy-price s { color: var(--ink-3); font-weight: 300; font-size: var(--fs-m); }
.buy-price .save { color: var(--nude-ink); font-size: var(--fs-s); }
.verified { font-size: var(--fs-label); color: var(--ink-3); margin: 0 0 22px; }
.stock { display: flex; gap: 10px; align-items: baseline; font-size: var(--fs-s); margin: 0 0 22px; flex-wrap: wrap; }
.stock b { font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.stock .ok { color: #5C6150; }
.stock .no { color: var(--nude-ink); }
.stock-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.stock .when { color: var(--ink-3); font-size: var(--fs-label); }
.variants { margin: 0 0 26px; }
.shades-head { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-s); margin-bottom: 12px; color: var(--ink-2); }
.shades-head b { color: var(--ink); font-weight: 500; }
.shades { display: flex; flex-wrap: wrap; gap: 10px; }
.shade { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); padding: 0; background: var(--stone); position: relative; display: grid; place-items: center; overflow: hidden; transition: box-shadow var(--t), border-color var(--t); }
.shade-dot, .shade-sw { grid-area: 1 / 1; display: block; width: 100%; height: 100%; border-radius: 50%; }
/* образец Sephora — макроснимок текстуры 36×36: смягчаем до ровного пятна цвета. Обрезка по кругу — на обёртке (маска нужна Safari,
   который иначе не обрезает размытую картинку по скруглению); scale убирает за край кружка полупрозрачную кайму размытия */
.shade-sw { overflow: hidden; isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(white, black); mask-image: radial-gradient(white, black); }
.shade-sw img { display: block; width: 100%; height: 100%; object-fit: cover; filter: blur(4px); transform: scale(1.5); }
/* вместо образца — мини-фото товара: показываем целиком, вписав квадрат в круг */
.shade-sw.is-mini { display: grid; place-items: center; background: #fff; }
.shade-sw.is-mini img { width: 72%; height: 72%; object-fit: contain; filter: none; transform: none; }
.shade-ini { grid-area: 1 / 1; font-size: var(--fs-xs); color: var(--ink-2); }
.shade-dot + .shade-ini, .shade-sw + .shade-ini { display: none; }
.shade:hover { border-color: var(--ink); }
.shade[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--milk), 0 0 0 3px var(--ink); }
.shade.oos .shade-dot, .shade.oos .shade-sw { opacity: .4; }
.shade.oos::after { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--ink); transform: rotate(45deg); }
.shade-list { display: grid; gap: 8px; }
.shade-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); background: transparent; text-align: left; font-size: var(--fs-s); border-radius: var(--r); transition: border-color var(--t); }
.shade-row:hover { border-color: var(--ink); }
.shade-row[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.shade-row.oos { color: var(--ink-3); border-style: dashed; }
.buy-row { display: flex; gap: 10px; align-items: stretch; margin-bottom: 14px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); height: 52px; border-radius: var(--r); background: transparent; flex: none; }
.qty button { width: 42px; height: 100%; border: 0; background: none; font-size: 1.1rem; color: var(--ink-2); }
.qty button:hover { color: var(--ink); }
.qty-in { width: 44px; height: 100%; border: 0; background: none; text-align: center; font-weight: 500; font-size: 16px; padding: 0; -moz-appearance: textfield; appearance: textfield; }
.qty-in::-webkit-outer-spin-button, .qty-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-in:focus { outline: none; }
.buy-row .btn { flex: 1; }
.terms { font-size: var(--fs-s); color: var(--ink-2); margin: 0 0 8px; display: flex; gap: 10px; align-items: baseline; }
.terms::before { content: ""; width: 8px; height: 1px; background: var(--olive); flex: none; position: relative; top: -.35em; }
.hl-line { font-size: var(--fs-s); color: var(--ink-3); margin: 18px 0 0; }
.acc { margin-top: 30px; border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-weight: 500; font-size: var(--fs); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-family: var(--display); font-size: 1.25rem; font-weight: 300; color: var(--ink-2); line-height: 1; transition: transform var(--t); }
.acc details[open] summary::after { transform: rotate(45deg); }
.acc-body { padding: 0 0 20px; color: var(--ink-2); white-space: pre-line; line-height: 1.6; font-size: var(--fs-s); max-width: 62ch; }
.acc-body[lang="en"] { font-size: var(--fs-s); }

/* мобильная нижняя панель */
.buybar { display: none; }

/* ---------- корзина ---------- */
.drawer-bg { position: fixed; inset: 0; background: rgba(41, 37, 33, .35); z-index: 50; opacity: 0; transition: opacity .25s; }
.drawer-bg.open { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--milk); z-index: 51; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); border-left: 1px solid var(--line); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-family: var(--display); font-weight: 400; font-size: .95rem; letter-spacing: var(--ls-title); text-transform: uppercase; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; border-radius: var(--r); }
.icon-btn:hover { border-color: var(--ink); }
.drawer-body { flex: 1; overflow: auto; padding: 8px 26px; }
/* строка товара в корзине (у обведённой кнопки .btn.line свой вид — не путаем) */
.line:not(.btn) { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line img { width: 76px; height: 76px; object-fit: contain; background: var(--stone-2); padding: 6px; mix-blend-mode: multiply; }
.line-brand { font-family: var(--display); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-2); }
.line-name { font-size: var(--fs-s); }
.line-shade { font-size: var(--fs-label); color: var(--ink-3); }
.line-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.line .qty { height: 34px; }
.line .qty button { width: 30px; }
.line .qty-in { width: 36px; font-size: var(--fs-s); }
.line-remove { border: 0; background: none; color: var(--ink-3); text-decoration: underline; font-size: var(--fs-label); padding: 0; margin-top: 6px; }
.drawer-foot { padding: 18px 26px 24px; border-top: 1px solid var(--line); max-height: 70vh; overflow: auto; }
.total { display: flex; justify-content: space-between; font-size: var(--fs-m); font-weight: 500; margin-bottom: 6px; }
.note { color: var(--ink-2); font-size: var(--fs-s); margin: 8px 0 0; }
.drawer-foot .btn { width: 100%; margin-top: 12px; }
.drawer-empty { text-align: center; padding: 60px 10px; color: var(--ink-2); }
.drawer-empty h3 { font-family: var(--display); font-weight: 400; font-size: 1rem; letter-spacing: var(--ls-title); text-transform: uppercase; color: var(--ink); margin: 0 0 10px; }
.order-form { display: grid; gap: 12px; margin-top: 12px; }
.order-form .btn { width: 100%; }
.field { display: grid; gap: 6px; font-size: var(--fs-s); color: var(--ink-2); }
.field input, .field textarea { border: 1px solid var(--line); border-radius: var(--r); background: transparent; padding: 11px 12px; font-size: 16px; color: var(--ink); resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field small { color: var(--ink-3); font-size: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; color: var(--nude-ink); font-size: var(--fs-s); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); background: var(--ink); color: var(--milk); padding: 12px 20px; z-index: 60; opacity: 0; transition: .25s; pointer-events: none; font-size: var(--fs-s); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.has-bar .toast { bottom: 100px; }

/* ---------- подвал ---------- */
.foot { border-top: 1px solid var(--line); margin-top: var(--gap-section); color: var(--ink-2); font-size: var(--fs-s); }
/* страница заканчивается цветной полосой (шаги заказа) — подвал идёт сразу за ней, без пустой полоски */
main:has(> .section.steps:last-child) + .foot { margin-top: 0; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding: clamp(40px, 5vw, 64px) 0 clamp(32px, 4vw, 48px); }
.foot-brand .logo { justify-self: start; align-items: flex-start; }
.foot-brand p { margin: 18px 0 0; max-width: 28ch; }
.foot-col h2 { margin: 0 0 14px; font-family: var(--display); font-weight: 500; font-size: var(--fs-label); color: var(--ink); letter-spacing: var(--ls-caps); text-transform: uppercase; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-col a, .linkbtn { color: var(--ink-2); transition: color var(--t); }
.foot-col a:hover, .linkbtn:hover { color: var(--ink); }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
.foot-col p { margin: 0 0 10px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 18px 0 28px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-label); }
.foot-sync { color: var(--ink-3); }

/* ---------- движение: мягкие появления, дыхание фото ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; } .rv-d3 { transition-delay: .24s; } .rv-d4 { transition-delay: .32s; }
.hero-photo img, .story-photo img, .cat img { animation: photoIn 1.6s cubic-bezier(.2, .7, .2, 1) backwards; }
@keyframes photoIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
.hero-text > :not(.t-hero) { animation: rise .9s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero-text > :nth-child(2) { animation-delay: .12s; } .hero-text > :nth-child(3) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.tile-img img, .stage img, .thumbs img, .sug img { opacity: 0; transition: opacity .6s ease, transform .5s ease; }
.tile-img img.ld, .stage img.ld, .thumbs img.ld, .sug img.ld { opacity: 1; }
.tile:hover .tile-img img { transform: scale(1.03); }
.acc-body { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.dd-list, .sug { animation: rise .22s cubic-bezier(.2, .7, .2, 1) both; }
.spot-text > * { animation: rise 1s cubic-bezier(.2, .7, .2, 1) backwards; }
.spot-text > :nth-child(2) { animation-delay: .15s; }
.spot-text { animation-play-state: paused; }
.spot.in .spot-text > * { animation-play-state: running; }
.spot:not(.in) .spot-text > * { animation-play-state: paused; }
.btn { transition: background var(--t), color var(--t), border-color var(--t), transform .25s ease; }
.btn:active { transform: scale(.985); }

.skeleton { background: linear-gradient(90deg, var(--stone-2) 0, #f3eee7 50%, var(--stone-2) 100%); background-size: 200% 100%; animation: sk 1.3s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shelf { grid-auto-columns: calc((100% - 48px) / 3); }
}
@media (max-width: 900px) {
  .terms-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero { min-height: 380px; }
  .hero-scrim { background: linear-gradient(to top, rgba(41, 37, 33, .66), rgba(41, 37, 33, .22) 44%, rgba(41, 37, 33, 0) 68%); }
  .hero-text { bottom: 24px; }
  .t-hero { font-size: clamp(2rem, 9.5vw, 2.8rem); letter-spacing: .04em; margin-bottom: 14px; max-width: 11ch; }
  .hero-kicker { margin-bottom: 12px; font-size: .62rem; }
  .hero-logo { width: clamp(190px, 58vw, 280px); height: 72px; }
  .hero-sub { font-size: var(--fs-s); margin-bottom: 16px; max-width: 30ch; }
  .hero-text .btn { height: 44px; padding: 0 18px; font-size: var(--fs-label); }
  .hero-pause { width: 44px; height: 44px; right: var(--pad); bottom: 24px; }
  .about { grid-template-columns: 1fr; }
  .about-photo { aspect-ratio: 4 / 3; }
  .about-photo img { object-position: 50% 42%; }
  .about-text { max-width: none; }
  .steps-list { grid-template-columns: 1fr; gap: 30px; }
  .step-n { margin-bottom: 4px; }
  .catalog { grid-template-columns: 1fr; gap: 0; }
  .side { position: fixed; inset: 0 0 0 auto; width: min(360px, 92vw); max-height: none; background: var(--milk); z-index: 52; padding: 20px; transform: translateX(100%); transition: transform .3s; border-left: 1px solid var(--line); }
  .side.open { transform: none; }
  .side-close { display: flex; justify-content: flex-end; padding-bottom: 10px; }
  .filters-toggle { display: inline-flex; height: 44px; padding: 0 18px; }
  /* minmax(0, …), а не 1fr: иначе Safari на iPhone растягивал колонку под «бесконечную» ширину галереи — слайд и фото
     раздувались до 33 млн точек (увеличенное обрезанное фото), Chrome так не делает */
  .pdp { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 12px; }
  .gallery, .buy-box { min-width: 0; }
  .gallery { position: static; margin: 0 calc(var(--pad) * -1); }
  .stage { display: none; }
  .thumbs { display: flex; gap: 0; margin: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .thumbs::-webkit-scrollbar { display: none; }
  .thumbs button { width: 100%; flex: 0 0 100%; scroll-snap-align: start; border: 0; padding: 8%; background: var(--stone-2); cursor: zoom-in; }
  .lb-img { inset: 60px 8px 70px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; width: 40px; height: 40px; }
  .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); }
  .lb-n { bottom: 18px; }
  .thumbs button[aria-pressed="true"] { border: 0; }
  .dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0 0; }
  .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background var(--t); }
  .dots i.on { background: var(--ink); }
  .buy-box { max-width: none; }
  .buy-row { display: none; }
  .buybar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--milk); border-top: 1px solid var(--line); padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom)); }
  .buybar .price-l { font-size: var(--fs-label); color: var(--ink-3); display: block; }
  .buybar .now { font-weight: 500; font-size: var(--fs-m); }
  .buybar .btn { height: 48px; padding: 0 18px; }
  .buybar .bar-qty { display: none; }
}
@media (max-width: 600px) {
  .tile-name { font-size: .875rem; }
  .tile-meta { font-size: var(--fs-label); }
  .foot { font-size: .9375rem; }
  .foot-col ul { gap: 0; }
  .foot-col a, .foot-col .linkbtn { display: inline-flex; align-items: center; min-height: 40px; }
  .foot-bottom { font-size: .8125rem; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
  .cat-label { padding: 14px 14px; }
  .spot-media { aspect-ratio: 4 / 5; }
  .spot-text { min-width: 0; max-width: calc(100% - 32px); padding: 20px 22px; gap: 16px; }
  .spot-media video { object-position: var(--pos, 50% 50%); }
  .spot-text h2 { font-size: 1.8rem; }
  .spot-logo { height: 30px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .shelf { grid-auto-columns: calc((100% - 14px) / 2); gap: 14px; }
  .section-head { flex-wrap: wrap; align-items: start; }
  .about-perks li { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }
  .about-text .btn { width: 100%; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .foot-brand { grid-column: 1 / -1; }
  .drawer-head, .drawer-body, .drawer-foot { padding-left: 18px; padding-right: 18px; }
}
/* ---------- отклик на наведение: заметный, но спокойный ---------- */
.btn { transition: background .3s ease, color .3s ease, border-color .3s ease, transform .25s ease; }
.cat { isolation: isolate; }
.cat img { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.cat::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(41, 37, 33, 0); transition: background .6s ease; pointer-events: none; }
.cat-label { z-index: 2; }
.cat-label b { position: relative; align-self: flex-start; }
.cat-label b::after { content: ""; position: absolute; left: 0; right: .24em; bottom: -6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .55s cubic-bezier(.2, .7, .2, 1); }
.cat:focus-visible .cat-label b::after { transform: scaleX(1); }
.tile-img img { transition: opacity .6s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.shade { transition: box-shadow var(--t), border-color var(--t), transform .25s ease; }
@media (hover: hover) {
  /* кнопки меняются местами цветом */
  .btn:hover { background: var(--milk); color: var(--ink); border-color: var(--ink); }
  .btn.milk:hover { background: transparent; color: var(--milk); border-color: var(--milk); }
  .btn.line:hover { background: var(--ink); color: var(--milk); border-color: var(--ink); }
  .btn.ghost:hover { background: var(--stone); color: var(--ink); border-color: var(--ink); }
  .btn:disabled:hover, .btn[aria-disabled="true"]:hover { background: var(--stone); color: var(--ink-3); border-color: var(--stone); }
  /* плитки разделов: фото медленно приближается, чуть темнеет, под названием проявляется линия */
  .cat:hover img { transform: scale(1.06); }
  .cat:hover::before { background: rgba(41, 37, 33, .14); }
  .cat:hover .cat-label b::after { transform: scaleX(1); }
  /* товары */
  .tile:hover .tile-img img { transform: scale(1.05); }
  .tile:hover .tile-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
  /* мелочи */
  .shade:hover { transform: scale(1.08); }
  .thumbs button:hover { border-color: var(--ink-3); }
  .pager button:hover { border-bottom-color: var(--ink-3); }
  .acc summary:hover { color: var(--nude-ink); }
  .foot-col a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
  .hero-pause:hover { background: rgba(41, 37, 33, .45); border-color: var(--milk); }
  .lb-x:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--ink); }
}

/* ---------- вступительный экран: Греция, камень, море ---------- */
.intro { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #E9E2D6; color: var(--ink); isolation: isolate; }
.intro-media { position: absolute; inset: 0; transform: translate3d(0, calc(var(--p, 0) * 22vh), 0) scale(calc(1 - var(--p, 0) * .05)); will-change: transform; }
.intro-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; animation: introZoom 9s cubic-bezier(.2, .6, .2, 1) both; }
@keyframes introZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.intro-veil { position: absolute; inset: 0; pointer-events: none; opacity: calc(1 - var(--p, 0)); background: radial-gradient(ellipse 40% 56% at 57% 50%, rgba(246, 242, 236, .55), rgba(246, 242, 236, 0) 72%), linear-gradient(to bottom, rgba(246, 242, 236, .38), rgba(246, 242, 236, 0) 28%); }
.intro-text { position: absolute; left: 0; right: 0; top: 50%; z-index: 2; transform: translateY(calc(-52% - var(--p, 0) * 9vh)); opacity: calc(1 - var(--p, 0) * 1.7); transition: opacity .45s ease; }
.intro-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.intro-copy { grid-column: 6 / span 5; text-align: left; }
.intro-kicker { margin: 0 0 24px; font-family: var(--display); font-size: .68rem; font-weight: 500; letter-spacing: .36em; text-transform: uppercase; color: var(--ink-2); animation: introFade 1s .55s ease both; }
.intro-h { margin: 0 0 26px; font-family: "Playfair Display", Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(2.6rem, 5vw, 5rem); line-height: 1.04; letter-spacing: -.01em; }
.intro-h .l { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.intro-h .l > span { display: block; animation: introLine 1.15s cubic-bezier(.16, .8, .2, 1) both; }
.intro-h .l:nth-child(1) > span { animation-delay: .6s; } .intro-h .l:nth-child(2) > span { animation-delay: .75s; } .intro-h .l:nth-child(3) > span { animation-delay: .9s; }
@keyframes introLine { from { transform: translateY(108%); opacity: 0; } to { transform: none; opacity: 1; } }
.intro-sub { margin: 0 0 34px; font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.5; color: var(--ink-2); animation: introFade 1s 1.15s ease both; }
.intro-cta { display: inline-flex; align-items: center; gap: 12px; height: 50px; padding: 0 28px; border: 1px solid var(--ink); background: rgba(246, 242, 236, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink); font-family: var(--display); font-size: .74rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; transition: background .35s ease, color .35s ease; animation: introFade 1s 1.35s ease both; }
.intro-cta span { transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.intro-cta:hover { background: var(--ink); color: var(--milk); }
.intro-cta:hover span { transform: translateX(5px); }
.intro-scroll { position: absolute; left: 50%; bottom: 26px; z-index: 2; width: 1px; height: 58px; margin-left: -1px; overflow: hidden; animation: introFade 1s 1.9s ease both; opacity: calc(1 - var(--p, 0) * 3); }
.intro-scroll span { display: block; width: 100%; height: 100%; background: var(--ink); animation: introScroll 2.4s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes introScroll { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes introFade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.shop-anchor { height: 0; }
/* уход к каталогу: экран мягко светлеет и гаснет */
.intro-media { transition: transform .5s ease, filter .5s ease; }
.intro.is-leaving .intro-media { transform: scale(1.03); filter: brightness(1.12); }
.intro.is-leaving .intro-text, .intro.is-leaving .intro-scroll { opacity: 0; }
/* герой магазина оживает, когда доезжаем до него, а не при загрузке страницы */
body.has-intro #hero:not(.in) .hero-text > *, body.has-intro #hero:not(.in) .t-hero .w { animation-play-state: paused; }
/* плитки разделов с фото товаров Sephora */
.cats.products .cat { background: var(--stone-2); }
.cats.products .cat::before { display: none; }
.cats.products .cat img { object-fit: contain; padding: 12% 14% 28%; mix-blend-mode: multiply; }
.cats.products .cat-label { background: none; color: var(--ink); }
.cats.products .cat-label span { color: var(--ink-2); opacity: 1; }
.cats.products .cat-label b::after { background: var(--ink); }
.cat-label .arr { display: inline-block; margin-left: 10px; font-style: normal; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) { .cat:hover .cat-label .arr { transform: translateX(6px); } }
@media (max-width: 900px) {
            .intro-h { font-size: clamp(2.1rem, 9.8vw, 2.7rem); }
  .intro-text { top: 40%; }
  .intro-copy { grid-column: 1 / -1; }
  .intro-kicker { margin-bottom: 16px; }
  .intro-sub { margin-bottom: 24px; }
  .intro-cta { height: 46px; padding: 0 22px; font-size: .68rem; }
  .intro-scroll { height: 44px; bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- сенсорные экраны: зоны нажатия не меньше 44px ---------- */
@media (pointer: coarse) {
  .dd-btn { height: 44px; }
  .dd-list li { padding: 13px 18px; }
  .shade { width: 42px; height: 42px; }
  .shade-list { gap: 10px; }
  /* корзина: количество и «Убрать» под палец; поле 16px — iPhone не приближает страницу */
  .line .qty { height: 40px; }
  .line .qty button { width: 40px; }
  .line .qty-in { width: 40px; font-size: 16px; }
  .line-remove { padding: 9px 0; margin-top: 0; font-size: .8125rem; }
}
/* телефоны с вырезами: содержимое не уходит под «чёлку» в горизонтальном положении и под полоску «домой» */
.wrap { padding-left: max(var(--pad), env(safe-area-inset-left)); padding-right: max(var(--pad), env(safe-area-inset-right)); }
.drawer-foot { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
@media (max-width: 900px) {
  .side { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  /* фильтры на телефоне — строки под палец */
  .side-block h2 { font-size: .75rem; margin-bottom: 8px; }
  .side-cats a { align-items: center; min-height: 42px; padding: 0; font-size: var(--fs-s); }
  .side-cats a small { font-size: .8125rem; }
  .check { min-height: 42px; padding: 0; font-size: .9375rem; }
  .check input { width: 20px; height: 20px; }
  .check input[type="radio"]:checked { box-shadow: inset 0 0 0 5.5px var(--milk), inset 0 0 0 20px var(--ink); }
}

/* аудит: пальцем удобно попадать по ссылкам на телефоне */
@media (max-width: 600px) {
  .crumbs { min-height: 62px; }
  .crumbs a, .link, .buy-brand { display: inline-flex; align-items: center; min-height: 40px; }
  .head .logo { min-height: 44px; justify-content: center; }
}

/* аудит: место под списки фильтров и сортировку зарезервировано — страница не прыгает после загрузки данных */
#side-cats { min-height: 151px; }
#price-list { min-height: 121px; }
.cat-controls { min-height: 44px; align-items: center; }
@media (max-width: 900px) { #side-cats, #price-list { min-height: 0; } }

/* секции, на которые ведёт меню, при переходе встают сразу под шапкой */
section[id] { scroll-margin-top: var(--head-h); }

/* ---------- на главной у самого верха шапка прозрачная поверх видео ----------
   начали листать, навели мышь, открыли поиск или список — снова светлая */
body.head-over .hero { margin-top: calc(var(--head-h) * -1); height: 100vh; height: 100svh; }
.head { transition: background-color .35s ease, border-color .35s ease, color .35s ease; }
.head .logo, .head .nav-link, .head .nav-caret, .head .menu-btn, .head .tool-btn, .head .cart-btn, .head .search, .head .search input { transition: color .35s ease, border-color .35s ease, background-color .2s ease; }
.head.is-over:not(:hover):not(.search-open) { background-color: transparent; border-bottom-color: transparent; color: var(--milk); }
.head.is-over:not(:hover):not(.search-open) :is(.logo, .nav-link, .nav-caret, .menu-btn, .tool-btn, .cart-btn, .search-toggle) { color: var(--milk); }
.head.is-over:not(:hover):not(.search-open) .nav-link { text-shadow: 0 1px 14px rgba(41, 37, 33, .35); }
.head.is-over:not(:hover):not(.search-open) .search { border-bottom-color: rgba(246, 242, 236, .6); }
.head.is-over:not(:hover):not(.search-open) .search input { color: var(--milk); }
.head.is-over:not(:hover):not(.search-open) .search input::placeholder { color: rgba(246, 242, 236, .88); }
.head.is-over:not(:hover):not(.search-open) .cart-count { background: var(--milk); color: var(--ink); box-shadow: none; }
/* сверху видео чуть темнее — белые меню и логотип читаются на любом кадре */
body.head-over .hero-scrim { background: linear-gradient(to bottom, rgba(41, 37, 33, .5), rgba(41, 37, 33, .16) 16%, rgba(41, 37, 33, 0) 30%), linear-gradient(to top, rgba(41, 37, 33, .62), rgba(41, 37, 33, .18) 45%, rgba(41, 37, 33, 0) 72%); }
@media (max-width: 900px) {
  body.head-over .hero-scrim { background: linear-gradient(to bottom, rgba(41, 37, 33, .45), rgba(41, 37, 33, 0) 20%), linear-gradient(to top, rgba(41, 37, 33, .66), rgba(41, 37, 33, .22) 44%, rgba(41, 37, 33, 0) 68%); }
}
@media (prefers-reduced-motion: reduce) { .head, .head * { transition: none !important; } }

/* ---------- страница контактов: розовый жидкий глянец на весь экран, шапка прозрачная поверх ---------- */
.contact-page { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; min-height: 100vh; min-height: 100svh;
  margin-top: calc(var(--head-h) * -1); padding: calc(var(--head-h) + var(--gap-section)) 0 var(--gap-section); color: var(--milk);
  /* пока глянец не нарисован и без WebGL — просто розовый */
  background: radial-gradient(120% 90% at 22% 18%, #e389a8 0%, #c65c82 46%, #8a2c4f 100%); }
.contact-page .liquid, .page-hero .liquid { position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%; }
/* мягкая тень под текстом: белый читается на любых складках */
.contact-page::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 72% at 24% 54%, rgba(70, 14, 36, .5), rgba(70, 14, 36, 0) 74%); }
.contact-in { width: 100%; }
.contact-in > * { max-width: 680px; }
.contact-kicker { margin: 0 0 20px; font-family: var(--display); font-weight: 500; font-size: var(--fs-label); letter-spacing: var(--ls-caps); text-transform: uppercase; color: rgba(246, 242, 236, .88); }
.contact-title { margin: 0 0 24px; font-family: var(--display); font-weight: 300; font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 2px 30px rgba(58, 18, 30, .25); }
.contact-lead { margin: 0 0 34px; max-width: 52ch; font-size: var(--fs-m); line-height: 1.6; color: rgba(246, 242, 236, .94); text-wrap: pretty; text-shadow: 0 1px 18px rgba(70, 14, 36, .45); }
.contact-list { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 34px; }
.contact-list a { display: grid; gap: 6px; min-width: 220px; padding: 18px 22px; border: 1px solid rgba(246, 242, 236, .45); background: rgba(246, 242, 236, .08);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--milk); transition: background-color .2s ease, border-color .2s ease; }
.contact-list a b { font-family: var(--display); font-weight: 500; font-size: var(--fs-label); letter-spacing: var(--ls-caps); text-transform: uppercase; }
.contact-list a:hover { background: rgba(246, 242, 236, .16); border-color: var(--milk); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn.ghost-milk { background: transparent; color: var(--milk); border-color: rgba(246, 242, 236, .7); }
@media (hover: hover) { .btn.ghost-milk:hover { background: var(--milk); color: var(--ink); border-color: var(--milk); } }
.contact-page .btn:focus-visible { outline-color: var(--milk); }
@media (max-width: 600px) {
  .contact-actions .btn { flex: 1 1 100%; }
  .contact-list a { min-width: 0; flex: 1 1 100%; }
}

/* ---------- внутренние страницы: розовая полоса-заголовок с жидким глянцем (как у «Контактов», только ниже) ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: min(620px, 70vh); min-height: min(620px, 70svh);
  margin-top: calc(var(--head-h) * -1); padding: calc(var(--head-h) + 56px) 0 clamp(40px, 5.4vw, 76px); color: var(--milk);
  background: radial-gradient(120% 90% at 22% 18%, #e389a8 0%, #c65c82 46%, #8a2c4f 100%); }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(80% 90% at 20% 80%, rgba(70, 14, 36, .5), rgba(70, 14, 36, 0) 72%); }
.page-hero-in { width: 100%; }
.page-hero-in > * { max-width: 680px; }
.page-hero-title { margin: 0 0 20px; font-family: var(--display); font-weight: 300; font-size: clamp(2.2rem, 5.4vw, 4.4rem); line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 2px 30px rgba(58, 18, 30, .25); }
.page-hero .contact-lead { margin-bottom: 0; }
/* «Остались вопросы?» — строка с кнопками в конце страницы */
.page-cta-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; padding-top: var(--gap-head); border-top: 1px solid var(--line); }
.page-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 600px) { .page-cta-actions, .page-cta-actions .btn { flex: 1 1 100%; } }

/* ============ движение в шапке: логотип по буквам, иконки из штрихов, счётчик корзины ============ */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-roll: cubic-bezier(.62, .02, .16, 1); }

/* логотип: каждая буква — лента из двух копий в окошке высотой в букву. Вступление — буквы выезжают снизу по очереди;
   наведение — лента проезжает вверх, на место старой буквы встаёт её копия (после чего всё незаметно возвращается в начало) */
.logo.is-intro .lg-l { animation: lgIn 1.1s var(--ease-out) backwards; animation-delay: calc(var(--i) * 70ms + 60ms); }
.logo.is-intro .lg-sub { animation: lgSub .9s var(--ease-out) backwards .66s; }
.logo.is-rolling .lg-l { animation: lgRoll .85s var(--ease-roll) both; animation-delay: calc(var(--i) * 50ms); }
@keyframes lgIn { from { transform: translateY(760px); } to { transform: translateY(0); } }
@keyframes lgRoll { from { transform: translateY(0); } to { transform: translateY(-760px); } }
@keyframes lgSub { from { opacity: 0; transform: translateY(110px); } to { opacity: 1; transform: translateY(0); } }

/* круглые иконки: при нажатии сжимаются и сразу отпускают */
.head :is(.menu-btn, .tool-btn, .cart-btn), .mnav-close { transition: color .35s ease, background-color .2s ease, transform .24s var(--ease-out); }
:is(.menu-btn, .tool-btn, .cart-btn, .mnav-close):active { transform: scale(.86); transition-duration: .35s, .2s, .07s; }

/* меню: нижняя линия короткая и дотягивается при наведении и нажатии; когда меню открыто, линии по очереди уезжают вправо
   (вслед за выезжающей панелью), после закрытия — возвращаются слева */
.menu-btn .mb-3 { stroke-dasharray: 11 17; transition: stroke-dasharray .35s var(--ease-out); }
@media (hover: hover) { .menu-btn:hover .mb-3 { stroke-dasharray: 17 17; } }
.menu-btn:active .mb-3 { stroke-dasharray: 17 17; }
.head.is-intro .menu-btn path, .menu-btn.was-open path { animation: mbIn .6s var(--ease-out) backwards; }
.menu-btn .mb-1 { animation-delay: .12s; } .menu-btn .mb-2 { animation-delay: .19s; } .menu-btn .mb-3 { animation-delay: .26s; }
.head .menu-btn[aria-expanded="true"] path { animation: mbOut .3s cubic-bezier(.5, 0, .75, 0) forwards; }
.head .menu-btn[aria-expanded="true"] .mb-1 { animation-delay: 0s; } .head .menu-btn[aria-expanded="true"] .mb-2 { animation-delay: .04s; } .head .menu-btn[aria-expanded="true"] .mb-3 { animation-delay: .08s; }
@keyframes mbIn { from { transform: translateX(-10px); opacity: 0; } }
@keyframes mbOut { to { transform: translateX(10px); opacity: 0; } }

/* лупа: ручка — начало длинной диагонали. Поиск открыт — линза сматывается в ручку, диагонали дорисовываются в крестик */
.s-lens { stroke-dasharray: 42.8; stroke-dashoffset: 0; transition: stroke-dashoffset .42s var(--ease-out), opacity .3s ease; }
.s-a { stroke-dasharray: 4.81 18.7; transition: stroke-dasharray .42s var(--ease-out); }
.s-b { stroke-dasharray: 0 18.7; opacity: 0; transition: stroke-dasharray .36s var(--ease-out), opacity .1s ease; }
.s-x { transition: transform .42s var(--ease-out); }
.search-btn[aria-expanded="true"] .s-lens { stroke-dashoffset: 42.8; opacity: 0; }
.search-btn[aria-expanded="true"] .s-a { stroke-dasharray: 18.7 18.7; }
.search-btn[aria-expanded="true"] .s-b { stroke-dasharray: 18.7 18.7; opacity: 1; transition-delay: .08s; }
.search-btn[aria-expanded="true"] .s-x { transform: translate(-1px, -1px); }
/* на компьютере: курсор встал в поле поиска — лупа «присматривается» */
.search:focus-within .search-toggle svg { animation: sLook .7s var(--ease-out); }
@keyframes sLook { 35% { transform: rotate(-18deg) scale(1.12); } }

/* корзина: при наведении ручка приподнимается; товар добавили — сумка приседает, ручка подпрыгивает */
.bag-body, .bag-handle { transform-box: fill-box; transform-origin: 50% 100%; }
.bag-handle { transition: transform .3s var(--ease-out); }
@media (hover: hover) { .cart-btn:hover .bag-handle { transform: translateY(-1.5px); } }
.cart-btn:active .bag-handle { transform: translateY(-1.5px); }

/* вступление шапки (когда человек пришёл на сайт или обновил страницу): иконки дорисовываются, меню проявляется по пунктам */
.head.is-intro .s-a { animation: drawHandle .45s var(--ease-out) backwards .3s; }
.head.is-intro .s-lens { animation: drawLens .75s var(--ease-out) backwards .42s; }
.head.is-intro .bag-body { animation: drawBag .8s var(--ease-out) backwards .4s; }
.head.is-intro .bag-handle { animation: drawBagHandle .5s var(--ease-out) backwards .8s; }
.head.is-intro .head-top > .search { animation: navIn .7s var(--ease-out) backwards .25s; }
.head.is-intro .nav-list > li { animation: navIn .7s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 55ms + 380ms); }
.nav-list > li:nth-child(1), .mnav-list > li:nth-child(1) { --i: 0; } .nav-list > li:nth-child(2), .mnav-list > li:nth-child(2) { --i: 1; }
.nav-list > li:nth-child(3), .mnav-list > li:nth-child(3) { --i: 2; } .nav-list > li:nth-child(4), .mnav-list > li:nth-child(4) { --i: 3; }
.nav-list > li:nth-child(5), .mnav-list > li:nth-child(5) { --i: 4; } .nav-list > li:nth-child(6), .mnav-list > li:nth-child(6) { --i: 5; }
@keyframes drawHandle { from { stroke-dasharray: 0 18.7; } }
@keyframes drawLens { from { stroke-dashoffset: 42.8; } }
@keyframes drawBag { from { stroke-dasharray: 50.2; stroke-dashoffset: 50.2; } to { stroke-dasharray: 50.2; stroke-dashoffset: 0; } }
@keyframes drawBagHandle { from { stroke-dasharray: 13.5; stroke-dashoffset: 13.5; } to { stroke-dasharray: 13.5; stroke-dashoffset: 0; } }
@keyframes navIn { from { opacity: 0; transform: translateY(8px); } }

/* отклик сумки на добавление товара — после правил вступления, чтобы перебивать их */
.cart-btn.is-added .bag-body { animation: bagSquash .6s var(--ease-out); }
.cart-btn.is-added .bag-handle { animation: bagLift .6s var(--ease-out); }
@keyframes bagSquash { 28% { transform: translateY(1px) scale(1.07, .88); } }
@keyframes bagLift { 28% { transform: translateY(-2.6px); } }

/* счётчик: из пустой корзины появляется с увеличением, дальше цифры прокручиваются, как буквы логотипа */
.cart-count { overflow: hidden; }
.cart-count.is-pop { animation: ccPop .5s var(--ease-out); }
.cc-roll { display: block; animation: ccUp .5s var(--ease-roll) both; }
.cc-roll.down { animation-name: ccDown; }
.cc-roll > span { display: block; height: var(--cc); }
@keyframes ccPop { from { transform: scale(.2); opacity: 0; } }
@keyframes ccUp { from { transform: translateY(0); } to { transform: translateY(calc(var(--cc) * -1)); } }
@keyframes ccDown { from { transform: translateY(calc(var(--cc) * -1)); } to { transform: translateY(0); } }

/* боковое меню: пункты выезжают по очереди вслед за панелью, крестик доворачивается */
.mnav.open .mnav-list > li { animation: rowIn .6s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 45ms + 160ms); }
.mnav.open .mnav-foot { animation: rowIn .6s var(--ease-out) backwards .46s; }
.mnav.open .mnav-close svg { animation: xIn .6s var(--ease-out) backwards .22s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-16px); } }
@keyframes xIn { from { opacity: 0; transform: rotate(-90deg) scale(.5); } }

/* ============ скорость: ничего не прыгает, пока данные в пути ============ */
/* пока товары не пришли, страница уже занимает экран: подвал не мелькает наверху и не уезжает потом вниз (это и был скачок вёрстки) */
body[data-page="catalog"] main, body[data-page="product"] main { min-height: 100vh; min-height: 100svh; }
/* фото не загрузилось ни напрямую, ни через наш домен — прячем значок битой картинки, остаётся спокойная плашка */
img.is-broken { visibility: hidden; }
/* смена оттенка, пока новое фото в пути: прежнее приглушено (оно от другого оттенка), сверху бежит тонкая полоска */
.gallery.is-loading { position: relative; }
.gallery.is-loading .stage img, .gallery.is-loading .thumbs img { opacity: .25; transition: opacity .15s ease; }
.gallery.is-loading::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 2; background: linear-gradient(90deg, transparent, var(--ink), transparent) no-repeat; background-size: 40% 100%; animation: galLoad 1s linear infinite; }
@keyframes galLoad { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.sug .sug-wait { color: var(--ink-3); pointer-events: none; }

/* ============ шапка в одну строку (22.09): лупа · каталог · о нас | логотип | доставка · контакты · корзина ============ */
.head-l { display: flex; align-items: center; justify-self: start; min-width: 0; }
.head-nav .nav-list { height: var(--head-top); margin: 0; padding: 0; max-width: none; justify-content: flex-start; gap: clamp(22px, 2.3vw, 38px); }
.head-nav .nav-link { height: auto; padding: 10px 0; }
.head-nav .nav-link::after { bottom: 3px; }
/* список разделов у «Каталога» стоит у левого края — открывается вправо от пункта, а не по его центру */
.head-nav--l .nav-drop { left: -24px; transform: translate(0, 6px); }
.head-nav--l .nav-cat.is-open .nav-drop { transform: translate(0, 0); }
/* «Весь каталог» и «Новинки» — вместе над чертой, дальше разделы */
.nav-drop li:first-child a { margin-bottom: 0; padding-bottom: 11px; border-bottom: 0; }
.nav-drop li:nth-child(2) a { margin-bottom: 6px; padding-bottom: 13px; border-bottom: 1px solid var(--line); color: var(--ink); }
.mnav-cats li:nth-child(2) a { border-bottom: 1px solid var(--line); }
.head-top > .search { display: none; }
@media (min-width: 1025px) {
  .head-l { margin-left: -10px; }
  .head-nav--l { margin-left: clamp(8px, 1vw, 16px); }
  .head-nav--r { margin-right: clamp(12px, 1.4vw, 22px); }
  .search-btn--l { display: grid; }
  #search-open { display: none; }
  /* поиск по лупе — полем по центру под строкой шапки */
  .head.search-open .head-top > .search { display: flex; grid-column: 1 / -1; grid-row: 2; justify-self: center; width: min(720px, 100%); height: 52px; margin: 2px 0 18px; border-bottom-color: var(--ink); }
  .head.search-open .search input { font-size: 1rem; }
  .head .sug { left: 0; right: 0; width: auto; }
}
/* узкий ноутбук: пункты чуть плотнее, чтобы строка не упиралась в логотип */
@media (min-width: 1025px) and (max-width: 1240px) {
  .head-nav .nav-list { gap: 18px; }
  .head-nav .nav-link { font-size: .78rem; letter-spacing: .05em; }
}
@media (max-width: 1024px) { .head-nav, .search-btn--l { display: none; } }

/* рамка фокуса у логотипа — тонкая и с отступом (видна только при переходе с клавиатуры) */
.logo:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; border-radius: 2px; }
