/* ==========================================================================
   DaDuNya — «С любовью к знаниям!»
   Магазин образовательных постеров. Основная таблица стилей.
   Структура: 1) Токены 2) Сброс 3) Типографика 4) Утилиты 5) Кнопки/формы
              6) Хедер 7) Главная 8) Карточки товара 9) Каталог 10) Товар
              11) Корзина/Заказ 12) Контент-страницы 13) Футер 14) Адаптив
   ========================================================================== */

/* ------------------------------------------------------------------ 1. Токены */
:root {
    /* Цвет */
    --white: #ffffff;
    --cream: #faf7f2;
    --cream-2: #f3ede4;
    --cream-3: #ece4d8;
    --ink: #1a1a1a;
    --ink-2: #4a4a4a;
    --muted: #857e73;
    --line: #e7e2d9;
    --line-2: #d9d2c6;

    --accent: #e1252c;
    --accent-dark: #bd1b21;
    --accent-soft: #fdeeee;

    --green: #3f7a5e;
    --gold: #e8a359;

    /* Геометрия */
    --r-btn: 8px;
    --r: 12px;
    --r-card: 16px;
    --r-lg: 24px;
    --r-pill: 999px;

    /* Тени */
    --sh-sm: 0 2px 8px rgba(26, 26, 26, .05);
    --sh: 0 4px 20px rgba(26, 26, 26, .06);
    --sh-md: 0 10px 30px rgba(26, 26, 26, .09);
    --sh-lg: 0 24px 60px rgba(26, 26, 26, .13);

    /* Сетка */
    --container: 1280px;
    --gutter: 32px;
    --section: 96px;

    /* Шрифты */
    --font-display: 'Montserrat', 'Segoe UI', 'DejaVu Sans', system-ui, sans-serif;
    --font-body: 'Inter', 'Segoe UI', 'DejaVu Sans', system-ui, sans-serif;
    --font-hand: 'Caveat', 'Segoe Script', cursive;

    --header-h: 92px;
}

/* ------------------------------------------------------------------ 2. Сброс */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection { background: var(--accent); color: #fff; }

/* ------------------------------------------------------------------ 3. Типографика */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    letter-spacing: -.015em;
}

h1, .h1 { font-size: clamp(32px, 4.3vw, 54px); line-height: 1.08; }
h2, .h2 { font-size: clamp(26px, 2.9vw, 40px); line-height: 1.15; }
h3, .h3 { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.25; }
h4 { font-size: 17px; line-height: 1.35; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lead { font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.eyebrow {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 18px;
}

.hand {
    font-family: var(--font-hand);
    font-size: 30px;
    line-height: 1.25;
    color: var(--ink);
    font-weight: 600;
}

.accent { color: var(--accent); }

/* ------------------------------------------------------------------ 4. Утилиты */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section { padding: var(--section) 0; }
.section--tight { padding: 64px 0; }
.section--cream { background: var(--cream); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
}

.link-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-2);
    white-space: nowrap;
    transition: color .18s, gap .18s;
}
.link-more:hover { color: var(--accent); gap: 12px; }
.link-more svg { width: 16px; height: 16px; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 200;
    background: var(--accent); color: #fff; padding: 10px 18px; border-radius: var(--r-btn);
    transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ------------------------------------------------------------------ 5. Кнопки и формы */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border: 1px solid transparent;
    border-radius: var(--r-btn);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background .18s, color .18s, border-color .18s, transform .18s, box-shadow .18s;
    text-align: center;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(225, 37, 44, .26); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(26, 26, 26, .03); }

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

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }

.btn--wide { width: 100%; }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--lg { padding: 17px 34px; font-size: 16px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn-underline {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 15px; padding: 14px 4px;
    border-bottom: 2px solid var(--line-2); transition: border-color .2s, color .2s;
}
.btn-underline:hover { border-color: var(--accent); color: var(--accent); }

.field { display: block; margin-bottom: 18px; }
.field__label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field__label .req { color: var(--accent); }

.input, .select, .textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-btn);
    background: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    transition: border-color .18s, box-shadow .18s;
}
.input::placeholder, .textarea::placeholder { color: #b3aca1; }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { min-height: 120px; resize: vertical; }
.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23857e73' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
}
.field--error .input, .field--error .select { border-color: var(--accent); }
.field__error { display: none; font-size: 12.5px; color: var(--accent); margin-top: 6px; }
.field--error .field__error { display: block; }

.check {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13.5px; color: var(--ink-2); line-height: 1.5; cursor: pointer;
}
.check input { margin: 3px 0 0; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check a { text-decoration: underline; text-underline-offset: 2px; }

/* Радио-карточки (доставка, оплата, размер) */
.radio-card {
    display: flex; align-items: flex-start; gap: 12px;
    border: 1px solid var(--line-2); border-radius: var(--r);
    padding: 15px 17px; cursor: pointer; background: var(--white);
    transition: border-color .18s, background .18s, box-shadow .18s;
}
.radio-card:hover { border-color: var(--ink-2); }
.radio-card input { margin: 3px 0 0; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.radio-card--active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(225, 37, 44, .1); }
.radio-card > span { display: block; }
.radio-card__title { display: block; font-weight: 600; font-size: 15px; }
.radio-card__meta { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; }
.radio-card__price { margin-left: auto; font-weight: 700; white-space: nowrap; align-self: center; }
.radio-card { align-items: center; }

/* ------------------------------------------------------------------ 6. Хедер */
.header {
    position: sticky; top: 0; z-index: 90;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header__inner {
    display: flex; align-items: center; gap: 28px;
    min-height: var(--header-h);
}

.logo { display: flex; align-items: center; gap: 12px; flex: none; }
.logo__mark { width: 44px; height: 44px; flex: none; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__word {
    font-family: var(--font-display);
    font-weight: 700; font-size: 23px; letter-spacing: -.01em; color: var(--ink);
}
.logo__word b { color: var(--accent); font-weight: 700; }
.logo__slogan {
    font-family: var(--font-hand); font-size: 16px; color: var(--muted); margin-top: 2px; white-space: nowrap;
}
.logo__slogan--inline { display: none; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
    font-size: 15px; font-weight: 500; color: var(--ink-2);
    padding: 6px 0; position: relative; transition: color .18s;
}
.nav a::after {
    content: ''; position: absolute; left: 0; right: 100%; bottom: -2px;
    height: 2px; background: var(--accent); transition: right .22s;
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { right: 0; }

.header__search { flex: 1; max-width: 330px; margin-left: auto; position: relative; }
.header__search .input { padding-left: 42px; background: var(--cream); border-color: transparent; height: 44px; }
.header__search .input:focus { background: #fff; border-color: var(--accent); }
.header__search svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--muted); pointer-events: none;
}

.header__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn {
    position: relative; display: grid; place-items: center;
    width: 44px; height: 44px; border: 0; background: transparent;
    border-radius: var(--r-pill); cursor: pointer; color: var(--ink);
    transition: background .18s, color .18s;
}
.icon-btn:hover { background: var(--cream-2); color: var(--accent); }
.icon-btn svg { width: 21px; height: 21px; }
.badge {
    position: absolute; top: 5px; right: 4px;
    min-width: 18px; height: 18px; padding: 0 5px;
    display: grid; place-items: center;
    background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 700; line-height: 1;
    border-radius: var(--r-pill); border: 2px solid #fff;
}
.badge:empty, .badge[data-count="0"] { background: var(--muted); }

.burger { display: none; }

/* Живой поиск */
.search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r);
    box-shadow: var(--sh-md); overflow: hidden; display: none;
}
.search-results.is-open { display: block; }
.search-results a {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    border-bottom: 1px solid var(--line); transition: background .15s;
}
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover { background: var(--cream); }
.search-results img { width: 34px; height: 46px; object-fit: cover; border-radius: 3px; background: var(--cream-2); }
.search-results__title { font-size: 14px; font-weight: 500; }
.search-results__price { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.search-results__empty { padding: 16px; font-size: 14px; color: var(--muted); }

/* Мобильное меню */
.mobile-menu {
    position: fixed; inset: 0; z-index: 120;
    background: #fff; padding: 22px var(--gutter) 40px;
    transform: translateX(100%); transition: transform .28s ease;
    overflow-y: auto; display: flex; flex-direction: column;
}
.mobile-menu.is-open { transform: none; }
.mobile-menu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a {
    font-family: var(--font-display); font-size: 22px; font-weight: 600;
    padding: 12px 0; border-bottom: 1px solid var(--line);
}
.mobile-menu__foot { margin-top: auto; padding-top: 30px; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ 7. Главная — Hero */
.hero { background: var(--white); overflow: hidden; }
.hero__grid {
    display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
    gap: 52px; align-items: center; padding: 64px 0 72px;
}
.hero__title { margin-bottom: 20px; font-size: clamp(31px, 3.6vw, 49px); }
.hero__title span { display: block; }
.hero__lead { max-width: 470px; margin-bottom: 30px; }
.hero__cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 18px; }
.hero__micro { font-size: 13.5px; color: var(--muted); margin-bottom: 38px; }
.hero__micro b { color: var(--ink-2); font-weight: 600; }

.hero__features { display: flex; gap: 34px; flex-wrap: wrap; }
.hero__feature { display: flex; align-items: center; gap: 11px; max-width: 190px; }
.hero__feature svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.hero__feature span { font-size: 13px; line-height: 1.35; color: var(--ink-2); }

/* Композиция-витрина вместо фотографии (легко заменить на <img>) */
.scene {
    position: relative;
    border-radius: var(--r-lg);
    background: linear-gradient(160deg, #f7f2ea 0%, #efe6d8 62%, #e9dccb 100%);
    padding: 44px 40px 0;
    min-height: 520px;
    display: flex; align-items: flex-end; justify-content: center; gap: 28px;
    overflow: hidden;
}
.scene::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 78px;
    background: linear-gradient(#e3d5c1, #dccdb6);
}
.scene__frame {
    position: relative; z-index: 2;
    background: #fff;
    border: 12px solid #cba97e;
    border-radius: 4px;
    box-shadow: var(--sh-lg);
    transform: translateY(-46px);
}
.scene__frame img { width: 100%; height: auto; }
.scene__frame--a { width: 46%; max-width: 268px; }
.scene__frame--b { width: 40%; max-width: 232px; transform: translateY(-88px); border-color: #d8bf9c; }
.scene__plant {
    position: absolute; z-index: 3; left: 18px; bottom: 0; width: 116px; color: var(--green);
}
.scene__globe { position: absolute; z-index: 3; right: 18px; bottom: 4px; width: 84px; }
.scene__note {
    position: absolute; z-index: 4; right: 26px; top: 38px; width: 168px;
    font-family: var(--font-hand); font-size: 25px; line-height: 1.2; color: #6d6154;
    text-align: center; transform: rotate(-4deg);
}
.scene__note .heart { color: var(--accent); font-size: 20px; }

/* ------------------------------------------------------------------ Категории */
.cats {
    display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cat {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 30px 10px; text-align: center;
    border-right: 1px solid var(--line);
    transition: background .18s, color .18s;
}
.cat:last-child { border-right: 0; }
.cat:hover { background: var(--cream); }
.cat svg { width: 42px; height: 42px; color: var(--ink); transition: color .18s, transform .18s; }
.cat:hover svg { color: var(--accent); transform: translateY(-3px); }
.cat span { font-size: 13.5px; font-weight: 500; line-height: 1.3; }

/* ------------------------------------------------------------------ 8. Карточка товара */
.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
    gap: 22px;
}
.grid-products--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.card { position: relative; display: flex; flex-direction: column; }
.card__media {
    position: relative;
    background: var(--cream);
    border-radius: var(--r-card);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    display: grid; place-items: center;
    padding: 16px;
    transition: box-shadow .25s, transform .25s;
}
.card:hover .card__media { box-shadow: var(--sh-md); transform: translateY(-3px); }
.card__media img {
    width: auto; height: 100%; max-width: 100%; object-fit: contain;
    background: #fff;
    border: 7px solid #d3b78f;
    border-radius: 2px;
    box-shadow: 0 6px 18px rgba(26, 26, 26, .14);
    transition: transform .3s;
}
.card:hover .card__media img { transform: scale(1.025); }

.card__fav {
    position: absolute; top: 12px; right: 12px; z-index: 3;
    width: 34px; height: 34px; display: grid; place-items: center;
    background: #fff; border: 0; border-radius: var(--r-pill);
    box-shadow: var(--sh-sm); cursor: pointer; color: var(--ink-2);
    transition: color .18s, transform .18s;
}
.card__fav svg { width: 17px; height: 17px; }
.card__fav:hover { transform: scale(1.08); color: var(--accent); }
.card__fav.is-active { color: var(--accent); }
.card__fav.is-active svg { fill: currentColor; }

.card__tag {
    position: absolute; top: 12px; left: 12px; z-index: 3;
    background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: 5px 10px; border-radius: var(--r-pill);
}
.card__tag--soft { background: var(--ink); }

.card__body { padding: 15px 2px 0; display: flex; flex-direction: column; flex: 1; }
.card__title { font-family: var(--font-body); font-size: 15px; font-weight: 500; line-height: 1.35; margin: 0 0 4px; }
.card__title a:hover { color: var(--accent); }
.card__meta { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.card__price { font-size: 20px; font-weight: 700; font-family: var(--font-display); margin-bottom: 12px; }
.card__price s { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.card__body .btn { margin-top: auto; }

.card--out .card__media { opacity: .55; }

/* Звёзды рейтинга */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars svg { width: 13px; height: 13px; color: var(--gold); fill: currentColor; }
.stars svg.is-empty { color: var(--line-2); }

/* ------------------------------------------------------------------ Философия */
.philosophy { background: var(--cream); }
.philosophy__grid {
    display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 60px; align-items: center;
}
.philosophy__text h2 { margin-bottom: 18px; }
.philosophy__text .lead { margin-bottom: 26px; }
.philosophy__vignette {
    position: relative; border-radius: var(--r-lg); overflow: hidden;
    background: linear-gradient(150deg, #fbf8f3, #efe7da);
    min-height: 430px; display: grid; place-items: center; padding: 46px 46px 46px 30px;
}
.philosophy__vignette .frame-poster {
    /* height: auto обязателен: у <img> есть атрибуты width/height,
       и без него браузер возьмёт высоту 980px из атрибута. */
    background: #fff; border: 12px solid #c9a97f; border-radius: 3px;
    box-shadow: var(--sh-lg);
    width: 252px; height: auto;
    transform: translate(-30px, -6px) rotate(-1.2deg);
}
.philosophy__books { position: absolute; left: 52%; bottom: 30px; width: 124px; }
.philosophy__note {
    position: absolute; right: 30px; top: 64px; width: 172px;
    font-family: var(--font-hand); font-size: 26px; line-height: 1.18;
    color: #6d6154; text-align: center; transform: rotate(-3deg);
}
.philosophy__leaf { position: absolute; left: 14px; bottom: -6px; width: 120px; color: var(--green); opacity: .9; }

/* ------------------------------------------------------------------ Преимущества */
.perks {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    padding-top: 44px; border-top: 1px solid var(--line);
}
.perk { display: flex; gap: 16px; align-items: flex-start; }
.perk svg { width: 34px; height: 34px; color: var(--ink); flex: none; }
.perk__title { font-weight: 600; font-size: 15px; margin-bottom: 3px; }
.perk__text { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* ------------------------------------------------------------------ Подписка */
.subscribe {
    background: var(--ink); color: #fff; border-radius: var(--r-lg);
    padding: 54px 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center;
}
.subscribe h2 { color: #fff; margin-bottom: 12px; }
.subscribe p { color: rgba(255, 255, 255, .72); font-size: 15px; }
.subscribe__form { display: flex; gap: 10px; }
.subscribe__form .input {
    background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; height: 52px;
}
.subscribe__form .input::placeholder { color: rgba(255, 255, 255, .5); }
.subscribe__form .input:focus { background: rgba(255, 255, 255, .14); box-shadow: none; border-color: #fff; }
.subscribe__note { font-size: 12.5px; color: rgba(255, 255, 255, .5); margin-top: 12px; }
.subscribe__note a { text-decoration: underline; }

/* ------------------------------------------------------------------ 9. Каталог */
.page-head { padding: 40px 0 34px; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { color: var(--line-2); }

.catalog { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 42px; padding: 40px 0 90px; align-items: start; }

.filters { position: sticky; top: calc(var(--header-h) + 20px); }
.filters__group { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.filters__group:last-child { border-bottom: 0; }
.filters__title { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.filters__list { display: flex; flex-direction: column; gap: 9px; }
.filters__list label { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.filters__list input { accent-color: var(--accent); width: 16px; height: 16px; }
.filters__list label:hover { color: var(--ink); }
.filters__count { margin-left: auto; font-size: 12px; color: var(--muted); }

.range { display: flex; align-items: center; gap: 10px; }
.range .input { padding: 10px 12px; font-size: 14px; }

.catalog__bar {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    margin-bottom: 26px; flex-wrap: wrap;
}
.catalog__count { font-size: 14px; color: var(--muted); }
.catalog__sort { display: flex; align-items: center; gap: 10px; }
.catalog__sort .select { width: auto; min-width: 210px; padding-top: 10px; padding-bottom: 10px; font-size: 14px; }
.filters-toggle { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--cream-2); border: 0; border-radius: var(--r-pill);
    padding: 7px 13px; font-size: 13px; cursor: pointer; color: var(--ink-2);
}
.chip:hover { background: var(--cream-3); }
.chip svg { width: 12px; height: 12px; }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty h3 { margin-bottom: 10px; color: var(--ink); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 46px; }
.pagination button {
    min-width: 42px; height: 42px; border: 1px solid var(--line-2); background: #fff;
    border-radius: var(--r-btn); cursor: pointer; font-size: 14.5px; font-weight: 500;
    transition: border-color .18s, background .18s, color .18s;
}
.pagination button:hover { border-color: var(--ink); }
.pagination button.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ------------------------------------------------------------------ 10. Карточка товара (страница) */
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 58px; padding: 40px 0 80px; align-items: start; }

.gallery__main {
    background: var(--cream); border-radius: var(--r-lg);
    display: grid; place-items: center; padding: 44px;
}
/* Ширина ведущая, высота считается от неё — так кадр не «растягивается»
   на узких экранах и вокруг плаката не появляется белых полей. */
.gallery__main img {
    width: min(100%, 430px); height: auto;
    border: 12px solid #d3b78f; border-radius: 3px; box-shadow: var(--sh-lg);
}
.gallery__thumbs { display: flex; gap: 12px; margin-top: 14px; }
.gallery__thumbs button {
    width: 74px; aspect-ratio: 700/980; padding: 6px; background: var(--cream);
    border: 1px solid transparent; border-radius: var(--r); cursor: pointer;
    display: grid; place-items: center;
}
.gallery__thumbs button.is-active { border-color: var(--accent); }
.gallery__thumbs img { max-height: 100%; width: auto; }

.product__cat { font-size: 13px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.product__title { margin-bottom: 12px; }
.product__rating { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); margin-bottom: 20px; }
.product__price { font-family: var(--font-display); font-size: 34px; font-weight: 700; margin-bottom: 4px; }
.product__price-note { font-size: 13px; color: var(--muted); margin-bottom: 26px; }
.product__desc { color: var(--ink-2); margin-bottom: 26px; }

.opt-group { margin-bottom: 24px; }
.opt-group__label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.opt-list { display: flex; gap: 10px; flex-wrap: wrap; }
.opt {
    border: 1px solid var(--line-2); background: #fff; border-radius: var(--r-btn);
    padding: 11px 16px; cursor: pointer; font-size: 14px; line-height: 1.2;
    transition: border-color .18s, background .18s;
    text-align: left;
}
.opt small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.opt:hover { border-color: var(--ink-2); }
.opt.is-active { border-color: var(--accent); background: var(--accent-soft); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-btn); overflow: hidden; }
.qty button { width: 42px; height: 46px; border: 0; background: #fff; cursor: pointer; font-size: 18px; color: var(--ink-2); }
.qty button:hover { background: var(--cream); color: var(--accent); }
.qty input { width: 46px; height: 46px; border: 0; text-align: center; font-size: 15px; font-weight: 600; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { appearance: none; margin: 0; }

.product__buy { display: flex; gap: 12px; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.product__buy .btn--primary { flex: 1; min-width: 200px; height: 48px; }

.product__usp { display: grid; gap: 14px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.product__usp div { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--ink-2); }
.product__usp svg { width: 20px; height: 20px; color: var(--accent); flex: none; }

.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__head {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 0; background: none; border: 0; cursor: pointer;
    font-family: var(--font-display); font-size: 15.5px; font-weight: 600; text-align: left;
}
.accordion__head svg { width: 16px; height: 16px; transition: transform .22s; flex: none; color: var(--muted); }
.accordion__item.is-open .accordion__head svg { transform: rotate(45deg); color: var(--accent); }
.accordion__body { display: none; padding: 0 0 20px; font-size: 14.5px; color: var(--ink-2); }
.accordion__item.is-open .accordion__body { display: block; }
.accordion__body table { width: 100%; border-collapse: collapse; }
.accordion__body td { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.accordion__body td:first-child { color: var(--muted); width: 46%; }

/* ------------------------------------------------------------------ 11. Корзина и заказ */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 42px; padding: 40px 0 90px; align-items: start; }

.cart-item {
    display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 18px;
    padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center;
}
.cart-item__media { background: var(--cream); border-radius: var(--r); padding: 8px; aspect-ratio: 3/4; display: grid; place-items: center; }
.cart-item__media img { max-height: 100%; width: auto; border: 4px solid #d3b78f; background: #fff; }
.cart-item__title { font-weight: 600; font-size: 15.5px; margin-bottom: 4px; }
.cart-item__meta { font-size: 13px; color: var(--muted); }
.cart-item__right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-item__price { font-family: var(--font-display); font-weight: 700; font-size: 18px; white-space: nowrap; }
.cart-item__remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.cart-item__remove:hover { color: var(--accent); }
.cart-item__remove svg { width: 14px; height: 14px; }

.summary {
    background: var(--cream); border-radius: var(--r-lg); padding: 28px;
    position: sticky; top: calc(var(--header-h) + 20px);
}
.summary h3 { margin-bottom: 20px; }
.summary__row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 14.5px; color: var(--ink-2); }
.summary__row b { color: var(--ink); }
.summary__total {
    display: flex; justify-content: space-between; align-items: baseline;
    margin: 16px 0 20px; padding-top: 16px; border-top: 1px solid var(--line-2);
    font-family: var(--font-display); font-size: 15px; font-weight: 600;
}
.summary__total b { font-size: 26px; }
.summary__promo { display: flex; gap: 8px; margin: 16px 0; }
.summary__hint { font-size: 12.5px; color: var(--muted); margin-top: 14px; text-align: center; }

.progress-free { margin-bottom: 18px; }
.progress-free__bar { height: 6px; background: var(--cream-3); border-radius: var(--r-pill); overflow: hidden; margin-bottom: 8px; }
.progress-free__fill { height: 100%; background: var(--accent); border-radius: var(--r-pill); transition: width .35s; }
.progress-free__text { font-size: 12.5px; color: var(--muted); }

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 42px; padding: 40px 0 90px; align-items: start; }
.checkout__block { margin-bottom: 38px; }
.checkout__block h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.checkout__num {
    width: 30px; height: 30px; border-radius: var(--r-pill); background: var(--accent); color: #fff;
    display: grid; place-items: center; font-size: 14px; font-weight: 700; flex: none;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.delivery-options { display: grid; gap: 10px; }
.pay-logos { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.pay-logos img, .pay-logos svg { height: 24px; width: auto; opacity: .8; }

.notice {
    display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r);
    background: var(--accent-soft); font-size: 13.5px; color: var(--ink-2); line-height: 1.45;
}
.notice svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 2px; }
.notice--info { background: #eef4f7; }
.notice--info svg { color: #2b5a6e; }

/* Успех заказа */
.thanks { text-align: center; max-width: 620px; margin: 0 auto; padding: 90px 0 110px; }
.thanks__icon {
    width: 84px; height: 84px; margin: 0 auto 26px; border-radius: var(--r-pill);
    background: var(--accent-soft); display: grid; place-items: center; color: var(--accent);
}
.thanks__icon svg { width: 40px; height: 40px; }
.thanks__order {
    display: inline-block; margin: 22px 0 28px; padding: 12px 24px;
    background: var(--cream); border-radius: var(--r); font-size: 15px;
}
.thanks__order b { font-family: var(--font-display); font-size: 20px; }

/* ------------------------------------------------------------------ 12. Контент-страницы */
.prose { max-width: 760px; }
.prose h2 { margin: 44px 0 16px; }
.prose h3 { margin: 30px 0 12px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { list-style: disc; padding-left: 22px; margin: 0 0 18px; }
.prose ol { list-style: decimal; padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--cream); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px 0; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.value { background: var(--cream); border-radius: var(--r-lg); padding: 30px; }
.value svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 16px; }
.value h3 { font-size: 19px; margin-bottom: 8px; }
.value p { font-size: 14.5px; color: var(--ink-2); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; counter-reset: s; }
.step { position: relative; padding-top: 46px; }
.step::before {
    counter-increment: s; content: counter(s);
    position: absolute; top: 0; left: 0;
    width: 34px; height: 34px; border-radius: var(--r-pill);
    background: var(--accent); color: #fff; display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.step h4 { margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); }

.faq { max-width: 800px; }

.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 46px 0 90px; }
.contact-list { display: grid; gap: 22px; margin-bottom: 34px; }
.contact-list div { display: flex; gap: 14px; align-items: flex-start; }
.contact-list svg { width: 22px; height: 22px; color: var(--accent); flex: none; margin-top: 3px; }
.contact-list b { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.contact-list span { font-size: 16px; }
.requisites { background: var(--cream); border-radius: var(--r-lg); padding: 28px; font-size: 14px; line-height: 1.8; }
.requisites b { color: var(--muted); font-weight: 500; }

.socials { display: flex; gap: 10px; }
.socials a {
    width: 42px; height: 42px; border-radius: var(--r-pill); border: 1px solid var(--line-2);
    display: grid; place-items: center; transition: background .18s, color .18s, border-color .18s;
}
.socials a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.socials svg { width: 19px; height: 19px; }

/* Блог */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.post__media { border-radius: var(--r-card); overflow: hidden; background: var(--cream); aspect-ratio: 16/10; display: grid; place-items: center; padding: 20px; }
.post__media img { max-height: 100%; width: auto; border: 6px solid #d3b78f; background: #fff; }
.post__date { font-size: 12.5px; color: var(--muted); margin: 14px 0 6px; }
.post h3 { font-size: 19px; margin-bottom: 8px; }
.post:hover h3 { color: var(--accent); }
.post p { font-size: 14.5px; color: var(--ink-2); }

/* 404 */
.error-page { text-align: center; padding: 110px 0 130px; }
.error-page .code { font-family: var(--font-display); font-size: clamp(80px, 14vw, 150px); font-weight: 700; line-height: 1; color: var(--accent); }

/* ------------------------------------------------------------------ 13. Футер */
.footer { border-top: 1px solid var(--line); padding: 62px 0 0; background: var(--white); }
.footer__grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: 44px; padding-bottom: 52px;
}
.footer__about { max-width: 300px; }
.footer__about p { font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.footer h4 { font-size: 15px; margin-bottom: 18px; }
.footer ul { display: grid; gap: 10px; }
.footer ul a { font-size: 14.5px; color: var(--ink-2); transition: color .18s; }
.footer ul a:hover { color: var(--accent); }
.footer__form { display: flex; gap: 8px; margin: 0 0 14px; }
.footer__form .input { height: 46px; }
.footer__form .btn { height: 46px; padding: 0 18px; }
.footer__note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.footer__note a { text-decoration: underline; }
.footer__bottom {
    border-top: 1px solid var(--line); padding: 22px 0 30px;
    display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    font-size: 13px; color: var(--muted);
}
.footer__bottom nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__bottom a:hover { color: var(--accent); }

/* Тост */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; }
.toast {
    display: flex; align-items: center; gap: 12px;
    background: var(--ink); color: #fff; padding: 14px 18px; border-radius: var(--r);
    box-shadow: var(--sh-lg); font-size: 14px; max-width: 340px;
    animation: toast-in .28s ease;
}
.toast svg { width: 18px; height: 18px; color: #6fce9f; flex: none; }
.toast a { text-decoration: underline; margin-left: auto; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Скелетоны загрузки */
.skeleton { background: linear-gradient(90deg, #f2ede6 25%, #e8e1d7 37%, #f2ede6 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--r); }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.card--skeleton .card__media { background: none; padding: 0; }
.card--skeleton .card__media, .card--skeleton .sk-line { border-radius: var(--r-card); }
.sk-line { height: 13px; margin-top: 10px; }
.sk-line--short { width: 55%; }

/* ------------------------------------------------------------------ 14. Адаптив */
@media (max-width: 1180px) {
    :root { --gutter: 24px; --section: 76px; }
    .header__search { max-width: 240px; }
    .nav { gap: 20px; }
    .grid-products--6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cat:nth-child(4n) { border-right: 0; }
    .cat:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 1023px) {
    :root { --header-h: 74px; --section: 64px; }
    .nav, .header__search { display: none; }
    .burger { display: grid; }
    .header__actions { margin-left: auto; }

    .hero__grid { grid-template-columns: 1fr; gap: 40px; padding: 40px 0 56px; }
    .scene { min-height: 440px; }

    .philosophy__grid { grid-template-columns: 1fr; gap: 36px; }
    .perks { grid-template-columns: repeat(2, 1fr); gap: 26px; }
    .subscribe { grid-template-columns: 1fr; padding: 40px 32px; gap: 26px; }

    .catalog { grid-template-columns: 1fr; gap: 26px; }
    .filters {
        position: fixed; inset: 0; z-index: 130; background: #fff;
        padding: 22px var(--gutter) 100px; overflow-y: auto;
        transform: translateX(-100%); transition: transform .28s;
    }
    .filters.is-open { transform: none; }
    .filters__close { display: flex !important; }
    .filters-toggle { display: inline-flex; }

    .product { grid-template-columns: 1fr; gap: 34px; }
    .cart-layout, .checkout { grid-template-columns: 1fr; }
    .summary { position: static; }

    .about-hero, .contacts-grid { grid-template-columns: 1fr; gap: 34px; }
    .values, .posts { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 34px; }
    .grid-products--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    :root { --gutter: 16px; --section: 52px; }
    body { font-size: 15px; }
    .lead { font-size: 16px; }

    .logo__slogan { display: none; }
    .logo__mark { width: 38px; height: 38px; }

    .hero__cta { gap: 14px; }
    .hero__cta .btn { width: 100%; }
    .hero__features { gap: 18px; }
    .hero__feature { max-width: none; width: calc(50% - 9px); }
    .scene { min-height: 340px; padding: 34px 20px 0; gap: 14px; }
    .scene__note { display: none; }
    .scene__globe { width: 62px; }
    .scene__plant { width: 82px; }

    .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .cat:nth-child(2n) { border-right: 0; }

    .grid-products, .grid-products--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .card__media { padding: 12px; border-radius: 12px; }
    .card__title { font-size: 14px; }
    .card__price { font-size: 17px; }
    .card .btn { padding: 11px 14px; font-size: 13.5px; }

    .section-head { margin-bottom: 22px; flex-wrap: wrap; gap: 8px 16px; }
    .section-head .link-more { font-size: 14px; }
    .perks, .values, .posts, .steps, .grid-2 { grid-template-columns: 1fr; }
    .subscribe { padding: 30px 20px; border-radius: var(--r); }
    .subscribe__form { flex-direction: column; }

    .philosophy__vignette { min-height: 320px; padding: 26px; }
    .gallery__main { padding: 24px; }
    .philosophy__note { display: none; }

    .cart-item { grid-template-columns: 70px minmax(0, 1fr); }
    .cart-item__right { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }

    .footer__grid { grid-template-columns: 1fr; gap: 30px; }
    .footer__bottom { flex-direction: column; gap: 12px; }
    .toast-wrap { left: 16px; right: 16px; bottom: 16px; }
    .toast { max-width: none; }
}

@media print {
    .header, .footer, .btn, .toast-wrap { display: none !important; }
}

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