/* =========================================================================
   КлинИрис — единый файл стилей (под WordPress)
   БЭМ. CSS-переменные. Без Google Fonts CDN.
   ========================================================================= */

/* ---------- Шрифты (локально). Файлы в assets/fonts/) ----------- */
@font-face {
    font-family: 'Involve';
    src: url('../fonts/Involve-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Involve';
    src: url('../fonts/Involve-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Involve';
    src: url('../fonts/Involve-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Involve';
    src: url('../fonts/Involve-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ---------- Переменные ---------- */
:root {
    /* Брендовая палитра (из Figma) */
    --brand-blue: #106DE7;         /* основной синий, заголовок «Лучшие товары!» */
    --brand-cyan: #5DA7C6;         /* голубой s1: nav, footer, «Новинки», «ХИТ» */
    --brand-cyan-dark: #4793b3;
    --brand-violet: #B8A3CD;       /* фиолетовый s2: кнопки «В корзину», иконки сайдбара */
    --brand-violet-deep: #9E7FBA;  /* фиолетовый акцент / hover для violet */
    --brand-violet-dark: var(--brand-violet-deep);
    --brand-green: #00A46A;        /* зелёный s3: каталог-меню header, статус «в наличии» */
    --brand-green-dark: #008556;
    --brand-green-badge: #008000;  /* плотный зелёный для бейджа NEW */

    /* Цветовые роли заголовков секций */
    --heading-primary: var(--brand-blue);     /* «Лучшие товары!» — главный акцент */
    --heading-secondary: var(--brand-cyan);   /* «Новинки», «Блог», «Отзывы» */

    /* Палитра */
    --color-primary: var(--brand-cyan);   /* основной акцент сайта — голубой */
    --color-primary-dark: var(--brand-cyan-dark);
    --color-text: #1F1F1F;
    --color-text-muted: #9F9E9E;
    --color-heading: #212529;
    --color-bg: #fff;
    --color-bg-soft: #F3F3F3;
    --color-border: #DDDDDD;
    --color-white: #fff;
    --color-danger: #e74c3c;

    /* Типографика */
    --font-base: 'Involve', 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --fs-base: 16px;
    --lh-base: 1.6;

    /* Раскладка */
    --container-max: 1440px;
    --container-pad: 20px;
    --radius-md: 10px;
    --radius-lg: 14px;

    /* Отступы секций */
    --section-pad-block: clamp(30px, 5vw, 70px);

    /* Высота фиксированного хедера (для sticky-смещений и scroll-margin-top) */
    --header-h: 140px;

    /* Брейкпоинты как справка (используются в @media) */

    /* ---- LEGACY-алиасы переменных (для блока стилей body.legacy-page) ---- */
    --primary-blue: var(--color-primary);
    --primary-dark: var(--color-primary-dark);
    --accent-cyan: var(--color-primary);
    --accent-green: #22c55e;
    --text-dark: var(--color-text);
    --text-gray: #666;
    --text-light: #999;
    --bg-light: #f5f7fa;
    --bg-white: var(--color-white);
    --border-color: #e5e7eb;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 8px;
}

/* ---------- Базовый сброс ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-base);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--color-primary); }
a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}
button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--color-heading);
    font-weight: 700;
    line-height: 1.3;
}

/* Якоря под фиксированный хедер */
:target,
section[id] {
    scroll-margin-top: var(--header-h);
}

/* ---------- Контейнер ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* ---------- Иконка через SVG sprite ---------- */
.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex-shrink: 0;
}

/* ---------- Утилиты ---------- */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================================
   HEADER
   ========================================================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--brand-cyan);
    color: var(--color-white);
    transition: background-color .25s ease;
}

.header__top {
    padding-block: 18px;
    background: var(--brand-cyan);
    color: var(--color-white);
    transition: background-color .25s ease, color .25s ease;
}
.header__top .header__phone,
.header__top .header__icon-link {
    color: var(--color-white);
}
.header__top .header__cart-count {
    background: var(--color-white);
    color: var(--brand-cyan);
}

/* ---- Главная: хедер поверх hero, при скролле — закреплён и весь голубой ----
   В исходном состоянии: header__top — почти белый (видны лого/телефон/иконки),
   nav — голубой полупрозрачный поверх hero.
   После скролла за hero: весь хедер плотный голубой, цвет иконок белый. */
.home-page .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
}
.home-page .header__top {
    background: transparent;
    color: var(--color-white);
}
.home-page .header__top .header__phone,
.home-page .header__top .header__icon-link {
    color: var(--color-white);
}
.home-page .header__top .header__cart-count {
    background: var(--color-white);
    color: var(--brand-cyan);
}
.home-page .nav {
    background: var(--brand-cyan);
    border-top: 0;
}
/* После скролла — весь хедер плотный голубой */
.home-page .header.is-scrolled {
    background: var(--brand-cyan);
    box-shadow: 0 2px 14px rgba(0,0,0,.08);
}
.home-page .header.is-scrolled .header__top {
    background: var(--brand-cyan);
    color: var(--color-white);
}
.home-page .header.is-scrolled .header__top .header__phone,
.home-page .header.is-scrolled .header__top .header__icon-link {
    color: var(--color-white);
}
.home-page .header.is-scrolled .header__top .header__cart-count {
    background: var(--color-white);
    color: var(--brand-cyan);
}
/* На главной hero уходит под фикс-хедер */
.home-page main { padding-top: 0; }

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.header__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header__logo-img {
    height: 56px;
    width: auto;
    max-width: 160px;
    display: block;
    object-fit: contain;
}

.header__search {
    flex: 1;
    min-width: 220px;
    max-width: 640px;
    display: flex;
    background: var(--color-white);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.home-page .header__search {
    background: rgba(255,255,255,0.92);
    border-color: rgba(255,255,255,0.5);
}
.home-page .header.is-scrolled .header__search {
    background: var(--color-white);
    border-color: transparent;
}

.header__search-input {
    flex: 1;
    border: none;
    padding: 10px 16px;
    font: inherit;
    font-size: 14px;
    outline: none;
    color: var(--color-text);
    background: transparent;
}

.header__search-input::placeholder { color: #bbb; }

.header__search-btn {
    background: var(--color-white);
    border: none;
    padding: 10px 16px;
    color: #888;
    display: inline-flex;
    align-items: center;
    font-size: 20px;
}
.header__search-btn:hover { color: var(--color-primary); }

.header__contacts {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header__phone {
    font-weight: 600;
    font-size: 16px;
    color: var(--color-white);
    white-space: nowrap;
}

.header__icons {
    display: flex;
    gap: 16px;
    align-items: center;
}

.header__icon-link {
    color: var(--color-white);
    background: transparent;
    border: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    position: relative;
    font-size: 24px;
    cursor: pointer;
    font: inherit;
}
.header__icon-link:hover { color: rgba(255,255,255,0.8); }

.header__cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--color-white);
    color: var(--color-primary);
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
}

/* =========================================================================
   NAV (под wp_nav_menu: .menu-item, .current-menu-item, .menu-item-has-children, .sub-menu)
   ========================================================================= */
.nav {
    background: var(--brand-cyan);
    border-top: 0;
    transition: background-color .25s ease;
}

/* Бургер — скрыт на десктопе */
.burger {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    color: var(--color-white);
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.burger__box {
    position: relative;
    width: 24px;
    height: 18px;
}
.burger__box::before,
.burger__box::after,
.burger__box span {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .25s, top .25s, opacity .2s;
}
.burger__box::before { top: 0; }
.burger__box span { top: 8px; }
.burger__box::after  { top: 16px; }
.burger.is-open .burger__box::before { top: 8px; transform: rotate(45deg); }
.burger.is-open .burger__box::after  { top: 8px; transform: rotate(-45deg); }
.burger.is-open .burger__box span    { opacity: 0; }

.nav__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.nav__list > li > a,
.nav__link {
    display: block;
    padding: 14px 45px;
    color: var(--color-white);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s;
}

.nav__list > li > a:hover,
.nav__link:hover,
.nav__list > li > a:focus-visible,
.nav__link:focus-visible {
    background: rgba(255,255,255,0.15);
    color: var(--color-white);
    outline: none;
}
.nav__link.is-active,
.nav__link[aria-current="page"],
.nav__list .current-menu-item > a,
.nav__list .current_page_item > a {
    background: transparent;
    color: var(--color-white);
    outline: none;
}

/* Подменю (WP) */
.nav__list .menu-item-has-children { position: relative; }
.nav__list .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-primary-dark);
    display: none;
    z-index: 10;
}
.nav__list .menu-item-has-children:hover > .sub-menu,
.nav__list .menu-item-has-children:focus-within > .sub-menu {
    display: block;
}
.nav__list .sub-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--color-white);
    font-size: 13px;
}
.nav__list .sub-menu a:hover { background: rgba(255,255,255,0.15); }

/* =========================================================================
   BREADCRUMBS
   ========================================================================= */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 30px;
}
.breadcrumbs__link { color: var(--color-text-muted); }
.breadcrumbs__link:hover { color: var(--color-primary); }
.breadcrumbs__sep { color: var(--color-text-muted); }
.breadcrumbs__current { color: var(--color-text-muted); }

/* =========================================================================
   PAGE TITLE
   ========================================================================= */
.page-title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: var(--color-heading);
    margin: 0 0 35px;
}

/* =========================================================================
   BLOG (страница списка постов)
   ========================================================================= */
section.blog {
    padding-block: var(--section-pad-block);
    background: var(--color-bg);
}

.blog__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px 24px;
}

.blog__more {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.blog__more-btn {
    background: var(--brand-violet);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 60px;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
    cursor: pointer;
}
.blog__more-btn:hover,
.blog__more-btn:focus-visible { background: var(--brand-violet-deep); }

/* ---------- Карточка поста ---------- */
.post-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: inherit;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover,
.post-card:focus-visible {
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
    transform: translateY(-3px);
    color: inherit;
    outline: none;
}

.post-card__media {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #f5f5f5;
}
.post-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card__body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

.post-card__title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--color-heading);
    margin: 0;
}

.post-card__date {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: auto;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
    background: var(--brand-cyan);
    color: var(--color-white);
    padding-block: 24px 28px;
    margin-top: auto;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
}

.footer__logo {
    margin-bottom: 10px;
}

.footer__desc {
    font-size: 12px;
    color: var(--color-white);
    line-height: 1.6;
    margin: 0;
}

.footer__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 18px;
    color: var(--color-white);
}

.footer__link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-white);
    font-size: 14px;
    margin-bottom: 10px;
    width: fit-content;
    max-width: 100%;
}
.footer__link:last-child { margin-bottom: 0; }
.footer__link:hover { color: rgba(255,255,255,0.8); }

.footer__socials {
    display: flex;
    gap: 16px;
    align-items: center;
}
.footer__social {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid var(--color-white);
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: background .2s, color .2s;
}
.footer__social:hover { background: var(--color-white); color: var(--brand-cyan); }

/* =========================================================================
   КНОПКИ (общие)
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--brand-cyan);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 28px;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    transition: background .2s;
}
.btn--primary { background: var(--brand-violet); }
.btn--primary:hover,
.btn--primary:focus-visible { background: var(--brand-violet-dark); color: var(--color-white); }
.btn--cyan { background: var(--brand-cyan); }
.btn--cyan:hover { background: var(--brand-cyan-dark); }
.btn--green { background: var(--brand-green); }
.btn--green:hover { background: var(--brand-green-dark); }
.btn:hover,
.btn:focus-visible { background: var(--color-primary-dark); color: var(--color-white); }
.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary); color: var(--color-white); }
.btn--block { width: 100%; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
    position: relative;
    min-height: clamp(560px, 48vw, 720px);
    aspect-ratio: 1920 / 720;
    background-color: #444;
    color: var(--color-white);
    display: flex;
    align-items: center;
    isolation: isolate;
    overflow: hidden;
}
.hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
.hero__overlay,
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.15));
    z-index: -1;
}
.hero__content {
    position: relative;
    z-index: 1;
}
.hero__title {
    color: var(--color-white);
    font-size: clamp(28px, 3.2vw, 56px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
    max-width: 720px;
}

/* =========================================================================
   MAIN GRID (sidebar + content)
   ========================================================================= */
.layout {
    padding-block: var(--section-pad-block);
}
.layout__grid {
    display: grid;
    grid-template-columns: clamp(280px, 28.9vw, 416px) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.catalog-menu {
    background: var(--color-bg-soft);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}
.catalog-menu__header {
    background: var(--brand-green);
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    font-weight: 600;
    font-size: 22px;
    border-radius: 10px 10px 0 0;
}
.catalog-menu__header .icon { font-size: 22px; }

.catalog-menu__list,
.catalog-menu__list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.catalog-menu__list > li + li { border-top: 1px solid rgba(0, 0, 0, 0.08); }

.catalog-menu__row {
    display: flex;
    align-items: stretch;
    background: var(--color-bg-soft);
}
.catalog-menu__link {
    flex: 1 1 auto;
    padding: 18px 0 18px 24px;
    font-size: 16px;
    color: var(--color-text);
}
.catalog-menu__link:hover { color: var(--brand-violet-deep); }
.catalog-menu__toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 24px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: inherit;
}
.catalog-menu__toggle:hover { background: rgba(0, 0, 0, 0.04); }
.catalog-menu__chevron {
    font-size: 18px;
    color: var(--brand-violet);
    transition: transform .25s ease;
}
.catalog-menu__toggle[aria-expanded="true"] .catalog-menu__chevron {
    transform: rotate(180deg);
}

.catalog-menu__sublist {
    background: var(--color-bg);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.catalog-menu__sublist li + li {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.catalog-menu__sublist a {
    display: block;
    padding: 12px 24px 12px 44px;
    font-size: 14px;
    color: var(--color-text);
    background: transparent;
}
.catalog-menu__sublist a:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--brand-violet-deep);
}

.sidebar__actions {
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    overflow: hidden;
}
.sidebar__action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 15px;
    color: var(--brand-violet);
}
.sidebar__action + .sidebar__action {
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.sidebar__action:hover { background: var(--color-bg-soft); color: var(--brand-violet-deep); }
.sidebar__action .icon { font-size: 20px; color: var(--brand-violet); }

/* =========================================================================
   SECTION TITLE
   ========================================================================= */
.section-title {
    font-size: clamp(22px, 2.4vw, 36px);
    font-weight: 500;
    color: var(--color-heading);
    text-transform: uppercase;
    letter-spacing: 0;
    margin: 0 0 24px;
    text-align: center;
}
/* Заголовки секций — primary (главный акцент) и secondary (остальные) */
.section-title--primary,
.home-page .products-block.is-best .section-title { color: var(--heading-primary); }

.section-title--secondary,
.home-page .catalog-sections .section-title,
.home-page .products-block.is-new .section-title,
.home-page .blog-section .section-title,
.home-page .reviews-section .section-title,
.home-page .reviews .section-title { color: var(--heading-secondary); }

/* =========================================================================
   PRODUCT CARD
   ========================================================================= */
.products-block { margin-bottom: 50px; }
.products-block:last-child { margin-bottom: 0; }
.products-block--standalone { padding-block: clamp(24px, 3vw, 48px); margin-bottom: 0; }

.products-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.products-block__head .section-title { margin: 0; }
.products-block .products-block__nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    width: 100%;
}

.swiper-nav {
    display: inline-flex;
    gap: 8px;
}
.swiper-nav__btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background .2s, color .2s, border-color .2s;
}
.swiper-nav__btn:hover { background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }
.swiper-nav__btn.swiper-button-disabled { opacity: .4; cursor: not-allowed; }

/* Fallback: пока Swiper не инициализирован (или JS отключён) —
   карточки отображаются как сетка 3 в ряд. После .swiper-initialized
   Swiper сам управляет лейаутом через inline-стили. */
.swiper:not(.swiper-initialized) { overflow: hidden; }
.swiper:not(.swiper-initialized) .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    transform: none !important;
}
.swiper:not(.swiper-initialized) .swiper-slide {
    width: auto !important;
    margin: 0 !important;
}
@media (max-width: 991px) {
    .swiper:not(.swiper-initialized) .swiper-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 575px) {
    .swiper:not(.swiper-initialized) .swiper-wrapper {
        grid-template-columns: 1fr;
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: box-shadow .2s, transform .2s;
}
/* Swiper сам управляет слайдом — никаких overrides */
.product-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.07); transform: translateY(-2px); }

.product-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    z-index: 1;
}
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-white);
    letter-spacing: .5px;
}
.badge--new { background: var(--brand-green-badge); }
.badge--hit { background: var(--brand-cyan); }
.badge--sale { background: var(--color-danger); }

.product-card__image {
    width: 100%;
    height: 220px;
    background: var(--color-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card__image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
}

.product-card__price {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 8px;
}

.product-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.product-card__stock { color: var(--brand-green); font-weight: 700; text-transform: lowercase; }
.product-card__stock--out { color: var(--color-danger); }

.product-card__name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-heading);
    margin: 0 0 16px;
    flex: 1;
}
.product-card__name a { color: inherit; }
.product-card__name a:hover { color: var(--color-primary); }

.product-card__actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    margin-top: auto;
}

.btn-cart {
    background: var(--brand-violet);
    color: var(--color-white);
    border: none;
    border-radius: 7px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    transition: background .2s;
}
.btn-cart:hover { background: var(--brand-violet-dark); }

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 38px;
}
.qty__btn {
    width: 30px;
    height: 100%;
    background: var(--color-bg);
    border: none;
    font-size: 16px;
    color: var(--color-text);
}
.qty__btn:hover { background: var(--color-bg-soft); color: var(--color-primary); }
.qty__input {
    width: 36px;
    height: 100%;
    border: none;
    text-align: center;
    font: inherit;
    font-size: 14px;
    -moz-appearance: textfield;
    background: transparent;
}
.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn-fav {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: color .2s, border-color .2s;
}
.btn-fav:hover,
.btn-fav.is-active,
.btn-fav--active {
    color: var(--brand-violet);
    border-color: var(--brand-violet);
}
.btn-fav--active .icon,
.btn-fav.is-active .icon {
    fill: var(--brand-violet);
}

/* =========================================================================
   CATALOG CARDS (разделы каталога — 4 в ряд, не слайдер)
   ========================================================================= */
.catalog-sections {
    padding-bottom: clamp(28px, 3vw, 50px);
}
.cat-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    justify-items: stretch;
}
.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    color: var(--color-text);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    transition: transform .2s;
}
.cat-card:hover {
    transform: translateY(-2px);
    color: var(--brand-cyan);
}
.cat-card__media {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-bg-soft);
    border-radius: 0;
    overflow: hidden;
}
.cat-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.cat-card:hover .cat-card__media img { transform: scale(1.05); }
.cat-card__title {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}

/* =========================================================================
   ABOUT (текстовый блок)
   ========================================================================= */
.about-section {
    padding: clamp(10px, 1.2vw, 20px) clamp(20px, 3vw, 60px) clamp(28px, 3.5vw, 56px);
    background: var(--color-bg-soft);
    border-radius: 16px;
    margin-block: 30px;
    color: var(--color-text);
}
.about-section > h2 {
    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--color-heading);
    line-height: 1.4;
}
.about-section > h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 24px 0 12px;
    color: var(--color-heading);
}
.about-section > h4 {
    font-size: 16px;
    font-weight: 500;
    margin: 22px 0 8px;
    color: var(--brand-cyan);
}
.about-section > p {
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 14px;
    color: inherit;
}
.about-section > .btn {
    display: flex;
    width: max-content;
    max-width: 100%;
    margin: 28px auto 0;
    text-align: center;
    white-space: normal;
}

/* =========================================================================
   BLOG-SECTION (превью на главной)
   ========================================================================= */
.blog-section { padding-block: var(--section-pad-block); }
.blog-section__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.blog-section__more { display: flex; justify-content: center; }

/* =========================================================================
   REVIEWS
   ========================================================================= */
.reviews-section {
    padding-block: clamp(28px, 3.5vw, 56px);
    background: transparent;
    margin-block: 30px;
}
.reviews-section .section-title { margin-bottom: 32px; }
.reviews-section__nav {
    display: flex !important;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    width: 100%;
}
.review-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
}
.review-card__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}
.review-card__name {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0;
}
.review-card__text {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px;
    color: var(--color-text);
}
.review-card__date {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 18px;
}
.review-card__rating {
    color: #f5b50a;
    display: inline-flex;
    gap: 4px;
    font-size: 18px;
    line-height: 1;
}

/* =========================================================================
   ABOUT PAGE (страница «О компании»)
   ========================================================================= */
.about-page {
    padding-block: var(--section-pad-block);
}
.about-page__text {
    max-width: 1000px;
}
.about-page__text p {
    font-size: 15px;
    line-height: 1.75;
    margin: 0 0 18px;
    color: var(--color-text);
}
.about-page__text p:last-child { margin-bottom: 0; }
.about-page__text strong { color: var(--color-heading); }

/* =========================================================================
   REVIEWS (секция-слайдер)
   ========================================================================= */
.reviews {
    padding-block: var(--section-pad-block);
}
.reviews__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.reviews__head .section-title { margin: 0; }

.reviews__slider {
    overflow: hidden;
}
.reviews__slider .swiper-slide {
    height: auto;
}

/* =========================================================================
   POST SINGLE (страница статьи блога)
   ========================================================================= */
.post-single {
    padding-block: var(--section-pad-block);
}
.post-single__title {
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.3;
    margin: 0 0 12px;
}
.post-single__date {
    display: block;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}
.post-single__body {
    padding-bottom: 30px;
    border-bottom: 1px solid var(--color-border);
}
.post-single__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0 10px;
}
.post-single__nav-link {
    font-size: 14px;
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.post-single__nav-link:hover,
.post-single__nav-link:focus-visible {
    color: var(--color-primary);
}

/* =========================================================================
   ENTRY-CONTENT (стили под редактор WordPress)
   ========================================================================= */
.entry-content p { margin: 0 0 16px; }
.entry-content p:last-child { margin-bottom: 0; }
.entry-content h2 { font-size: 22px; margin: 28px 0 14px; }
.entry-content h3 { font-size: 18px; margin: 24px 0 12px; }
.entry-content ul,
.entry-content ol { margin: 0 0 16px 22px; }
.entry-content li { margin-bottom: 6px; }
.entry-content blockquote {
    border-left: 3px solid var(--color-primary);
    padding: 6px 0 6px 16px;
    margin: 16px 0;
    color: var(--color-text);
    font-style: italic;
}
.entry-content img,
.entry-content .wp-caption,
.entry-content figure { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.entry-content .alignleft  { float: left;  margin: 6px 20px 12px 0; }
.entry-content .alignright { float: right; margin: 6px 0 12px 20px; }
.entry-content .aligncenter{ display: block; margin: 12px auto; }
.entry-content .alignwide  { margin-inline: -40px; max-width: calc(100% + 80px); }
.entry-content .alignfull  { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.entry-content th,
.entry-content td {
    border: 1px solid var(--color-border);
    padding: 10px 12px;
    text-align: left;
}

/* =========================================================================
   CATALOG PAGE (страница категории каталога)
   ========================================================================= */
.cat-page {
    padding-block: var(--section-pad-block);
}
.cat-page__title {
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 600;
    color: var(--heading-primary);
    margin: 0 0 25px;
}

.cat-page__filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg);
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 10px 18px;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: border-color .2s, color .2s, background .2s;
}
.filter-btn:hover { border-color: var(--brand-violet); color: var(--brand-violet-deep); }
.filter-btn--active {
    background: var(--brand-violet);
    color: var(--color-white);
    border-color: var(--brand-violet);
}
.filter-btn .icon { font-size: 14px; }

.cat-page__products,
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.cat-page__more {
    display: flex;
    justify-content: center;
    margin: 32px 0;
}

.cat-page__about {
    background: var(--color-bg-soft);
    border-radius: var(--radius-md);
    padding: 35px 40px;
    margin-top: 30px;
}
.cat-page__about h2 {
    font-size: 18px;
    color: var(--color-heading);
    margin: 0 0 15px;
    font-weight: 700;
}
.cat-page__about h3 {
    font-size: 16px;
    color: var(--color-heading);
    margin: 20px 0 10px;
    font-weight: 700;
}
.cat-page__about p,
.cat-page__about li {
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: 10px;
}
.cat-page__about ul { padding-left: 20px; margin: 0 0 10px; }

@media (max-width: 991px) {
    .cat-page__products,
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .cat-page__products,
    .products-grid { grid-template-columns: 1fr; }
    .cat-page__about { padding: 24px 20px; }
}

/* =========================================================================
   DELIVERY PAGE (страница «Оплата и доставка»)
   ========================================================================= */
.delivery-page {
    padding-block: var(--section-pad-block);
}
.delivery-page__intro {
    font-size: 16px;
    color: var(--color-heading);
    margin: 0 0 25px;
    line-height: 1.5;
}
.delivery-page__list {
    list-style: disc;
    padding-left: 22px;
    margin: 0 0 60px;
    color: var(--color-heading);
}
.delivery-page__list li {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 14px;
    padding-left: 6px;
}
.delivery-page__list li::marker { color: var(--color-heading); }

.payment {
    padding-bottom: var(--section-pad-block);
}
.payment__title {
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 700;
    color: var(--color-heading);
    margin: 0 0 50px;
}
.payment__methods {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    align-items: start;
}
.payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 28px;
}
.payment-method__icon {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.payment-method__icon svg {
    max-width: 100%;
    height: 90px;
    width: auto;
}
.payment-method__label {
    font-size: 15px;
    color: var(--color-heading);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 991px) {
    .payment__methods { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 20px; }
}
@media (max-width: 575px) {
    .payment__methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================================
   PRODUCT PAGE (страница товара)
   ========================================================================= */
.product-page {
    padding-block: var(--section-pad-block);
}
.product-page__title {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 600;
    color: var(--heading-primary);
    margin: 0 0 30px;
    line-height: 1.35;
}

.product__top {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 1fr;
    gap: 40px;
    align-items: start;
}

/* ---------- Галерея ---------- */
.product__gallery {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.product__image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-bg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.product__image-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}
.product__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.product__thumb {
    aspect-ratio: 1 / 1;
    background: var(--color-bg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: border-color .2s;
}
.product__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.product__thumb:hover,
.product__thumb.is-active { border-color: var(--brand-violet); }

/* ---------- Инфо ---------- */
.product__info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.product__info-top {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.product__fav { margin-right: auto; }
.product__rating {
    color: #f5b50a;
    letter-spacing: 2px;
    font-size: 16px;
}
.product__sku {
    font-size: 13px;
    color: var(--color-text-muted);
}
.product__price {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-heading);
}

.product__option {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.product__option-label {
    font-size: 14px;
    color: var(--color-heading);
    font-weight: 500;
}
.product__option-value {
    color: var(--color-text-muted);
    font-weight: 400;
}
.product__option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.product__option-btn {
    background: var(--color-bg);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 10px 18px;
    font: inherit;
    font-size: 14px;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
}
.product__option-btn:hover {
    border-color: var(--brand-violet);
    color: var(--brand-violet-deep);
}
.product__option-btn.is-active {
    background: var(--brand-violet);
    border-color: var(--brand-violet);
    color: var(--color-white);
}

.product__cart {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.product__cart .qty { height: 46px; }
.product__cart .qty__btn { width: 38px; }
.product__cart .qty__input { width: 44px; font-size: 15px; }
.product__cart-btn {
    flex: 1;
    min-width: 180px;
    padding: 14px 30px;
    font-size: 15px;
}

.product__delivery-note {
    background: var(--color-bg-soft);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 13px;
    color: var(--color-text);
    margin: 0;
    line-height: 1.5;
}

/* ---------- Табы ---------- */
.product-tabs {
    margin-top: 50px;
}
.product-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 24px;
}
.product-tabs__btn {
    background: transparent;
    border: none;
    padding: 14px 22px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .2s, border-color .2s;
}
.product-tabs__btn:hover { color: var(--brand-cyan); }
.product-tabs__btn.is-active {
    color: var(--brand-cyan);
    border-bottom-color: var(--brand-cyan);
}
/* Tab panels — все рендерятся в одной grid-cell, контейнер берёт max-height,
   соседние блоки не прыгают при переключении. */
.product-tabs { display: grid; grid-template-rows: auto 1fr; }
.product-tabs__nav   { grid-row: 1; grid-column: 1; }
.product-tabs__panel {
    grid-row: 2;
    grid-column: 1;
    display: block;
    visibility: hidden;
    pointer-events: none;
}
.product-tabs__panel.is-active { visibility: visible; pointer-events: auto; }
.product-tabs__panel[hidden]   { visibility: hidden; pointer-events: none; }

/* Чекаут: terms-and-conditions мелким шрифтом */
.checkout__terms,
.checkout .woocommerce-terms-and-conditions-wrapper,
.checkout .form-row.terms,
.checkout .wc-terms-and-conditions { font-size: 12px; color: #777; line-height: 1.4; margin-top: 12px; }
.checkout__terms a,
.checkout .wc-terms-and-conditions a { color: var(--brand-cyan); text-decoration: underline; }

/* Скрытая "submit" под update_cart (для no-JS не нужен, у нас auto-submit на change qty) */
.cart-update .visually-hidden { position: absolute; clip: rect(0 0 0 0); width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; border: 0; }

/* WC после успешного AJAX add-to-cart рисует "Просмотр корзины" — счётчик в шапке нам уже даёт нужный фидбэк */
.added_to_cart.wc-forward { display: none !important; }

/* Товар уже в корзине — нейтральная кнопка с переходом на /checkout/ */
.btn-cart.btn-cart--in-cart {
    background: transparent;
    color: var(--color-text-muted, #666);
    border: 1px solid var(--color-border, #d8d8d8);
}
.btn-cart.btn-cart--in-cart:hover {
    background: var(--color-bg-soft, #f4f4f4);
    color: var(--brand-violet, #b73f5e);
    border-color: var(--brand-violet, #b73f5e);
}

/* Сердечко: outline по умолчанию, заполнено когда .is-active */
.btn-fav .icon,
.cart-item__action .icon { fill: none; stroke: currentColor; }
.btn-fav.is-active,
.btn-fav.btn-fav--active,
.cart-item__action.is-active { color: var(--brand-violet, #b73f5e); }
.btn-fav.is-active .icon,
.btn-fav.btn-fav--active .icon,
.cart-item__action.is-active .icon { fill: currentColor; stroke: currentColor; }

/* =========================================================================
   ADAPTIVE
   Breakpoints: 1200 / 992 / 768 / 576
   Desktop = ≥992. Tablet = 768–991. Mobile = ≤767. Small mobile = ≤575.
   ========================================================================= */

/* ---- Tablet и ниже: <992 ---- */
@media (max-width: 991px) {
    .layout__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
    .sidebar { position: static; }
    .content,
    .product-page__content,
    .cat-page__content { min-width: 0; }

    /* На мобильном sidebar превращается в свёрнутый блок:
       зелёная шапка «Каталог» — кнопка, по клику разворачивается весь список. */
    .sidebar .catalog-menu__header {
        cursor: pointer;
        justify-content: space-between;
    }
    .sidebar .catalog-menu__header::after {
        content: "";
        width: 12px;
        height: 12px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        margin-left: auto;
        transition: transform .25s;
    }
    .sidebar .catalog-menu.is-collapsed .catalog-menu__list {
        display: none;
    }
    .sidebar .catalog-menu:not(.is-collapsed) .catalog-menu__header::after {
        transform: rotate(-135deg);
    }

    /* Карточки 3 → 2 */
    .products-grid,
    .cat-page__products { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* Отзывы 3 → 1 */
    .swiper:not(.swiper-initialized) .swiper-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Продукт — галерея + инфо в столбик */
    .product__top { grid-template-columns: 1fr; gap: 24px; }

    /* Cat-cards 4 → 3 */
    .cat-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    /* Hero текст */
    .hero__title { max-width: 100%; }

    /* About-section — меньше padding */
    .about-section { padding-inline: clamp(18px, 4vw, 28px); }

    /* Nav на tablet — уменьшаем padding пунктов чтобы все помещалось в одну строку */
    .nav__list > li > a,
    .nav__link { padding: 14px 20px; font-size: 12px; letter-spacing: 0.3px; }

    /* Блог-сетка: на десктопе 4, на tablet 3 в ряд */
    .blog__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- Mobile: <768 ---- */
@media (max-width: 767px) {
    :root { --header-h: 72px; }

    /* Header переезжает: лого + бургер + иконки на одной строке, поиск под ним */
    .header__top { padding-block: 12px; }
    .header__inner { gap: 12px; flex-wrap: wrap; }
    .header__phone { display: none; }
    .header__search {
        order: 5;
        flex-basis: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .header__contacts { gap: 14px; margin-left: auto; }
    .burger { display: inline-flex; }

    /* Скрываем nav-полосу по умолчанию. Открывается классом is-open
       на самом <ul.nav__list> (JS навешивает через aria-controls). */
    .nav {
        position: absolute;
        left: 0;
        right: 0;
        background: var(--brand-cyan);
        z-index: 90;
        display: none;
    }
    /* Если открыт список — показываем nav обёртку */
    .nav:has(.nav__list.is-open) { display: block; }
    .nav__list {
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding-block: 6px;
    }
    .nav__list.is-open { display: flex; }
    .nav__list > li > a,
    .nav__link {
        padding: 14px 20px;
        text-align: left;
        font-size: 14px;
    }

    /* На главной хедер должен оставаться поверх hero без перекрытия контента */
    .home-page main { padding-top: 0; }

    /* Карточки в одну колонку */
    .products-grid,
    .cat-page__products { grid-template-columns: 1fr; }
    .swiper:not(.swiper-initialized) .swiper-wrapper { grid-template-columns: 1fr; }

    /* Cat-cards (разделы каталога) 3 → 2 */
    .cat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

    /* Блог-секция — 1 колонка */
    .blog__grid,
    .blog-section__grid { grid-template-columns: 1fr; }

    /* Footer 4 → 2 */
    .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

    /* Reviews head без flex space-between */
    .reviews__head { flex-wrap: wrap; }

    /* About-section компактнее */
    .about-section { padding: 24px 18px; border-radius: 12px; margin-block: 20px; }
    .about-section > h2 { font-size: 18px; }
    .about-section > h3 { font-size: 16px; }
    .about-section > h4 { font-size: 15px; }

    /* Catalog page title чуть меньше */
    .cat-page__title { font-size: clamp(22px, 6vw, 28px); }

    /* Container padding меньше на мобильном */
    :root { --container-pad: 16px; }

    /* Entry content alignment fixes */
    .entry-content .alignleft,
    .entry-content .alignright { float: none; margin: 12px 0; }
    .entry-content .alignwide,
    .entry-content .alignfull { margin-inline: 0; max-width: 100%; }
}

/* ---- Small mobile: <576 ---- */
@media (max-width: 575px) {
    .footer__grid { grid-template-columns: 1fr; }
    .cat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { min-height: clamp(360px, 95vw, 480px); aspect-ratio: auto; }
    .hero__title { font-size: clamp(22px, 7vw, 32px); }
    .section-title { font-size: clamp(20px, 6vw, 28px); }
    .product__cart-btn { flex: 1 0 100%; min-width: 0; }

    /* Modal на маленьких экранах — почти fullscreen */
    .modal { padding: 0; align-items: flex-end; }
    .modal__dialog { max-width: 100%; border-radius: 12px 12px 0 0; }
    .modal__header { padding: 22px 18px; }
    .modal__title { font-size: 18px; }
    .modal__body { padding: 16px; }
    .auth__form { padding: 18px; }
}

/* =========================================================================
   CART PAGE (корзина + оформление заказа)
   ========================================================================= */
.cart-page { padding-block: var(--section-pad-block); }
.cart-page__title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-block: 10px 24px; }
.cart-page__count { font-size: 0.5em; font-weight: 400; color: var(--color-text-muted); }

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    align-items: start;
}

.cart-main { min-width: 0; display: flex; flex-direction: column; gap: 30px; }

/* ---- Список товаров ---- */
.cart-items {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.cart-items__head {
    display: grid;
    grid-template-columns: 1fr 140px 120px;
    gap: 20px;
    padding: 14px 20px;
    background: var(--color-bg-soft);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cart-items__head span:nth-child(2),
.cart-items__head span:nth-child(3) { text-align: center; }

.cart-item {
    display: grid;
    grid-template-columns: 90px 1fr 140px 120px;
    gap: 20px;
    align-items: center;
    padding: 18px 20px;
    border-top: 1px solid var(--color-border);
}
.cart-item__image {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-soft);
}
.cart-item__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item__info { min-width: 0; }
.cart-item__title { font-size: 14px; font-weight: 500; line-height: 1.4; margin: 0 0 6px; color: var(--color-heading); }
.cart-item__sku { font-size: 12px; color: var(--color-text-muted); margin-bottom: 8px; }
.cart-item__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.cart-item__action {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--color-text-muted);
    background: transparent; border: 0; padding: 0; cursor: pointer;
    font-family: inherit;
}
.cart-item__action .icon { width: 14px; height: 14px; }
.cart-item__action:hover { color: var(--color-primary); }
.cart-item__action--remove:hover { color: var(--color-danger); }
.cart-item__qty { justify-self: center; }
.cart-item__price { text-align: right; font-weight: 600; font-size: 16px; color: var(--color-heading); }

/* ---- Форма оформления ---- */
.checkout {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.checkout__section { display: flex; flex-direction: column; gap: 14px; }
.checkout__title { font-size: 20px; font-weight: 600; margin: 0; color: var(--color-heading); }
.checkout__subtitle { font-size: 16px; font-weight: 600; margin: 0; color: var(--color-text); }
.checkout__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkout__group { display: flex; flex-direction: column; }
.checkout__group--full { grid-column: 1 / -1; }
.checkout__label { font-size: 14px; color: var(--color-text-muted); }
.checkout__input {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.checkout__input:focus-visible {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59,138,232,0.15);
}
.checkout__input--textarea { min-height: 100px; resize: vertical; }

.checkout__city { position: relative; }
.checkout__city .checkout__input { padding-right: 38px; }
.checkout__city-clear {
    position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
    background: none; border: 0; cursor: pointer; font-size: 22px; line-height: 1;
    color: var(--color-text-muted);
}
.checkout__city-clear:hover { color: var(--color-danger); }

.checkout__address {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
}

.checkout__radio-group { display: flex; flex-direction: column; gap: 12px; }

/* ---- Радио-кнопки ---- */
.radio { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); transition: border-color 0.2s, background 0.2s; }
.radio:hover { border-color: var(--color-primary); }
.radio input { margin-top: 4px; accent-color: var(--color-primary); }
.radio__label { font-size: 14px; line-height: 1.5; color: var(--color-text); }
.radio__label strong { color: var(--color-heading); display: inline-block; margin-right: 4px; }
.radio:has(input:checked) { border-color: var(--color-primary); background: rgba(59,138,232,0.04); }

/* ---- Sidebar ---- */
.cart-summary {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cart-summary__head {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-bottom: 14px; border-bottom: 1px solid var(--color-border);
    font-size: 18px; font-weight: 600; color: var(--color-heading);
}
.cart-summary__total { color: var(--color-primary); font-size: 22px; }
.cart-summary__row { display: flex; justify-content: space-between; font-size: 14px; color: var(--color-text-muted); }
.cart-summary__row span:last-child { color: var(--color-text); font-weight: 500; }
.cart-summary__total-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-top: 12px; margin-top: 6px;
    border-top: 1px solid var(--color-border);
    font-weight: 600; font-size: 16px; color: var(--color-heading);
}
.cart-summary__btn { width: 100%; margin-top: 10px; padding: 14px; font-size: 15px; }

/* ---- Дополнительный модификатор ghost ---- */
.btn--ghost { background: transparent; color: var(--color-primary); border: 1px solid var(--color-border); }
.btn--ghost:hover,
.btn--ghost:focus-visible { background: var(--color-bg-soft); border-color: var(--color-primary); color: var(--color-primary); }

/* ---- Адаптив CART ---- */
@media (max-width: 991px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
}
@media (max-width: 767px) {
    .cart-items__head { display: none; }
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-areas:
            "img info"
            "qty price";
        row-gap: 14px;
    }
    .cart-item__image { grid-area: img; }
    .cart-item__info { grid-area: info; }
    .cart-item__qty { grid-area: qty; justify-self: start; }
    .cart-item__price { grid-area: price; text-align: right; align-self: center; }
    .checkout__row { grid-template-columns: 1fr; }
    .checkout__address { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
    .checkout { padding: 16px; }
    .checkout__address { grid-template-columns: 1fr; }
}

/* =========================================================================
   ACCOUNT (личный кабинет: profile / orders / favorites)
   ========================================================================= */
.account { padding-block: var(--section-pad-block); }
.account__title { font-size: clamp(24px, 3vw, 34px); font-weight: 600; color: var(--color-heading); margin: 14px 0 24px; }

.account__layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.account__sidebar {
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 24px;
    position: sticky;
    top: calc(var(--header-h) + 20px);
}
.account__menu { display: flex; flex-direction: column; gap: 14px; }
.account__menu-item {
    display: block;
    padding: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    transition: color 0.2s;
}
.account__menu-item:hover {
    color: var(--heading-primary);
}
.account__menu-item.is-active,
.account__menu-item[aria-current="page"] {
    color: var(--heading-primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}
.account__menu-item--logout {
    color: var(--color-text);
    margin-top: 24px;
}
.account__menu-item--logout:hover {
    background: transparent;
    color: var(--brand-violet-deep);
}

.account__content {
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 32px;
    min-width: 0;
}

/* Профиль — форма данных */
.profile-form { display: flex; flex-direction: column; gap: 16px; }
.profile-form__title {
    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: 700;
    color: var(--color-heading);
    margin: 0;
}
.profile-form__note {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0 0 8px;
}
.profile-form__fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.profile-form__input {
    width: 100%;
    padding: 16px 22px;
    font: inherit;
    font-size: 15px;
    color: var(--color-text);
    background: #F0F0F0;
    border: 0;
    border-radius: 8px;
    transition: background 0.2s, box-shadow 0.2s;
}
.profile-form__input::placeholder { color: #8C8C8C; }
.profile-form__input:focus-visible {
    outline: none;
    background: #EAEAEA;
    box-shadow: 0 0 0 2px rgba(93,167,198,0.25);
}

.profile-form__gender {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    margin: 4px 0 12px;
}
.profile-form__gender-label {
    font-weight: 600;
    color: var(--color-heading);
}
.profile-form__radio {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: var(--color-text);
}
.profile-form__radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.profile-form__radio-mark {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--brand-cyan);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s;
}
.profile-form__radio-mark::after {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand-cyan);
    transform: scale(0);
    transition: transform 0.2s;
}
.profile-form__radio input:checked + .profile-form__radio-mark::after {
    transform: scale(1);
}
.profile-form__radio input:focus-visible + .profile-form__radio-mark {
    box-shadow: 0 0 0 3px rgba(93,167,198,0.25);
}

.profile-form__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.profile-form__submit { min-width: 220px; }

/* Старая универсальная account-form — оставим базовые селекторы для совместимости */
.account-form { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.account-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.account-form__group { display: flex; flex-direction: column; gap: 6px; }
.account-form__group--full { grid-column: 1 / -1; }
.account-form__label { font-size: 13px; color: var(--color-text-muted); }
.account-form__input,
.account-form__textarea,
.account-form__select {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.account-form__input:focus-visible,
.account-form__textarea:focus-visible,
.account-form__select:focus-visible {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59,138,232,0.15);
}
.account-form__textarea { min-height: 100px; resize: vertical; }
.account-form__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* Заказы */
.orders { display: flex; flex-direction: column; gap: 16px; }
.order-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.order-card__head {
    display: flex; flex-wrap: wrap; gap: 10px 20px;
    justify-content: space-between; align-items: center;
    padding-bottom: 12px; border-bottom: 1px solid var(--color-border);
}
.order-card__id { font-weight: 600; color: var(--color-heading); font-size: 15px; }
.order-card__date { font-size: 13px; color: var(--color-text-muted); }
.order-card__status {
    display: inline-flex; align-items: center; padding: 4px 10px;
    border-radius: 999px; font-size: 12px; font-weight: 600;
    background: var(--color-bg-soft); color: var(--color-text-muted);
}
.order-card__status--paid { background: rgba(76,175,80,0.12); color: #2e7d32; }
.order-card__status--processing { background: rgba(59,138,232,0.12); color: var(--color-primary-dark); }
.order-card__status--cancelled { background: rgba(231,76,60,0.12); color: var(--color-danger); }
.order-card__items { display: flex; flex-direction: column; gap: 10px; }
.order-card__item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: center;
    font-size: 14px;
}
.order-card__item-image {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-soft);
}
.order-card__item-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.order-card__item-name { color: var(--color-text); }
.order-card__item-qty { font-size: 13px; color: var(--color-text-muted); }
.order-card__item-price { font-weight: 600; color: var(--color-heading); white-space: nowrap; }
.order-card__foot {
    display: flex; flex-wrap: wrap; gap: 10px 20px;
    justify-content: space-between; align-items: center;
    padding-top: 12px; border-top: 1px solid var(--color-border);
}
.order-card__total { font-size: 16px; font-weight: 600; color: var(--color-heading); }
.order-card__total span { color: var(--color-primary); }

/* Empty state */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 15px;
    background: var(--color-bg-soft);
    border-radius: var(--radius-md);
}
.empty-state a { color: var(--color-primary); }
.empty-state a:hover { color: var(--color-primary-dark); }

/* =========================================================================
   AUTH (login / register) — используется внутри модалки [data-modal="auth"]
   ========================================================================= */
.auth {
    display: flex;
    flex-direction: column;
}
.auth__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 0;
}
.auth__tab {
    padding: 18px;
    text-align: center;
    font-weight: 600;
    color: var(--brand-cyan);
    background: var(--color-white);
    border: 0;
    cursor: pointer;
    font: inherit;
    transition: color 0.2s, background 0.2s;
}
.auth__tab.is-active,
.auth__tab[aria-selected="true"] {
    color: var(--color-white);
    background: var(--brand-cyan);
}
.auth__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
}
.auth__form[hidden] { display: none; }
.auth__input {
    width: 100%;
    padding: 16px 22px;
    font: inherit;
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 8px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth__input::placeholder { color: #8C8C8C; text-align: center; }
.auth__input:focus-visible {
    outline: none;
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 3px rgba(93,167,198,0.20);
}
.auth__remember {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text);
}
.auth__remember input { accent-color: var(--brand-cyan); width: 18px; height: 18px; }
.auth__submit {
    padding: 16px;
    font-size: 16px;
    width: 100%;
    margin-top: 6px;
}
.auth__forgot {
    align-self: center;
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 14px;
}
.auth__forgot:hover { color: var(--brand-violet-deep); }
.auth__hint { text-align: center; font-size: 13px; color: var(--color-text-muted); margin: 0; }
.auth__hint a { color: var(--brand-violet-deep); }

/* =========================================================================
   MODAL (универсальная модалка)
   ========================================================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.is-open { display: flex; }
body.modal-open { overflow: hidden; }

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 30, 40, 0.55);
    backdrop-filter: blur(2px);
}
.modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    background: #F3F3F3;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--color-white);
    cursor: pointer;
    border-radius: 50%;
    z-index: 2;
    transition: background 0.2s;
}
.modal__close:hover { background: rgba(255, 255, 255, 0.18); }
.modal__header {
    background: var(--brand-cyan);
    color: var(--color-white);
    padding: 28px 24px;
    text-align: center;
}
.modal__title {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-white);
}
.modal__body {
    padding: 24px;
    background: #F3F3F3;
}
.modal__body .auth {
    background: var(--color-white);
    border-radius: 10px;
    overflow: hidden;
    padding: 0;
}

/* Адаптив account/auth */
@media (max-width: 991px) {
    .account__layout { grid-template-columns: 1fr; }
    .account__sidebar { position: static; }
    .account__menu { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }
    .account__menu-item { flex: 0 0 auto; text-align: left; }
    .account__menu-item--logout { margin-top: 0; margin-left: auto; }
}
@media (max-width: 575px) {
    .account__content { padding: 18px; }
    .account-form__row { grid-template-columns: 1fr; }
    .order-card__item { grid-template-columns: 50px 1fr; grid-template-areas: "img name" "img qty" "price price"; }
    .order-card__item-image { grid-area: img; }
    .order-card__item-name { grid-area: name; }
    .order-card__item-qty { grid-area: qty; }
    .order-card__item-price { grid-area: price; text-align: right; }
}










/* =========================================================================
   LEGACY: \u0441\u0442\u0438\u043b\u0438 \u0434\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446 same.html \u0438 catalog.html (body.legacy-page).
   \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 \u0434\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u0441\u0442\u043a\u0438 \u043d\u0430 BEM, \u0441\u043e\u0431\u0440\u0430\u043d \u0438\u0437 \u0431\u044b\u0432\u0448\u0438\u0445 src/styles.css + catalog.css.
   ========================================================================= */
.legacy-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


.legacy-page .header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary-blue);
}

.legacy-page .header-top {
    background: var(--primary-blue);
    padding: 18px 0;
}

.legacy-page .header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.legacy-page .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legacy-page .logo-img {
    height: 60px;
    width: auto;
    display: block;
}

.legacy-page .logo-icon {
    width: 40px;
    height: 40px;
}

.legacy-page .logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.legacy-page .search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.legacy-page .search-input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #fff;
    border-radius: 25px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: #fff;
    transition: border-color 0.3s;
}

.legacy-page .search-input:focus {
    border-color: #fff;
}

.legacy-page .search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
}

.legacy-page .header-contacts {
    display: flex;
    align-items: center;
    gap: 25px;
}

.legacy-page .phone {
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.legacy-page .header-icons {
    display: flex;
    gap: 15px;
}

.legacy-page .icon-link {
    color: #fff;
    position: relative;
    transition: opacity 0.2s;
}

.legacy-page .icon-link:hover {
    opacity: 0.8;
}

.legacy-page .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 18px;
    height: 18px;
    background: #fff;
    color: var(--primary-blue);
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}


.legacy-page .nav {
    background: var(--primary-blue);
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 15px 0;
}

.legacy-page .nav-list {
    display: flex;
    justify-content: center;
    gap: 50px;
    list-style: none;
}

.legacy-page .nav-link {
    color: white;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
}

.legacy-page .nav-link:hover,\n.legacy-page .nav-link.active {
    color: #fff;
}

.legacy-page .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s;
}

.legacy-page .nav-link:hover::after,\n.legacy-page .nav-link.active::after {
    width: 100%;
}


.legacy-page .hero {
    position: relative;
    /* Резиновая высота: ~56% ширины окна, в коридоре 320–520px */
    min-height: clamp(20rem, 56vw, 32.5rem);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.legacy-page .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(20, 40, 80, 0.75) 0%, rgba(20, 40, 80, 0.35) 55%, rgba(20, 40, 80, 0) 100%);
}


.legacy-page .home-page .header {
    position: relative;
    z-index: 10;
}

.legacy-page .home-page .nav {
    background: var(--primary-blue);
}

.legacy-page .home-page .hero {
    margin-top: -52px; 
}

.legacy-page .hero-content {
    position: relative;
    z-index: 1;
    text-align: left;
}

.legacy-page .hero-title {
    font-size: 40px;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.35;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    max-width: 560px;
    margin: 0;
}


.legacy-page .main {
    padding: 40px 0;
}

.legacy-page .main-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}


.legacy-page .sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.legacy-page .catalog-menu {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.legacy-page .catalog-header {
    background: var(--primary-blue);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.legacy-page .catalog-list {
    list-style: none;
}

.legacy-page .catalog-list li {
    border-bottom: 1px solid var(--border-color);
}

.legacy-page .catalog-list li:last-child {
    border-bottom: none;
}

.legacy-page .catalog-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-dark);
    transition: all 0.3s;
}

.legacy-page .catalog-list a:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

.legacy-page .sidebar-actions {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.legacy-page .sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-blue);
    font-size: 14px;
    transition: color 0.3s;
}

.legacy-page .sidebar-link:hover {
    color: var(--primary-dark);
}


.legacy-page .products-section {
    margin-bottom: 50px;
}

.legacy-page .section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.legacy-page .products-slider {
    position: relative;
}

.legacy-page .products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.legacy-page .product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    transition: all 0.3s;
}

.legacy-page .product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.legacy-page .product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.legacy-page .badge {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.legacy-page .badge-new {
    background: var(--primary-blue);
    color: white;
}

.legacy-page .badge-hit {
    background: var(--accent-green);
    color: white;
}

.legacy-page .product-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.legacy-page .product-image img {
    max-height: 100%;
    object-fit: contain;
}

.legacy-page .product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.legacy-page .product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 10px;
}

.legacy-page .product-id {
    color: var(--text-light);
}

.legacy-page .product-stock {
    font-weight: 500;
}

.legacy-page .product-stock.in-stock {
    color: var(--accent-green);
}

.legacy-page .product-name {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.4;
    margin-bottom: 15px;
    min-height: 55px;
}

.legacy-page .product-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legacy-page .btn-cart {
    background: var(--accent-cyan);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.legacy-page .btn-cart:hover {
    background: #3b8ae8;
    transform: scale(1.02);
}

.legacy-page .quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.legacy-page .qty-btn {
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-gray);
    transition: background 0.3s;
}

.legacy-page .qty-btn:hover {
    background: var(--bg-light);
}

.legacy-page .qty-input {
    width: 35px;
    height: 30px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-family: inherit;
}

.legacy-page .qty-input::-webkit-outer-spin-button,\n.legacy-page .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.legacy-page .btn-favorite {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.3s;
}

.legacy-page .btn-favorite:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.legacy-page .btn-favorite.is-fav {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #fff;
}
.legacy-page .btn-favorite.is-fav svg { fill: #fff; }

.legacy-page .prod-fav.is-fav { color: var(--primary-blue); }
.legacy-page .prod-fav.is-fav svg { fill: var(--primary-blue); }

.legacy-page .cart-item-actions a.is-fav { color: var(--primary-blue); }
.legacy-page .cart-item-actions a.is-fav svg { fill: var(--primary-blue); }

.legacy-page .slider-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.legacy-page .slider-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.3s;
}

.legacy-page .slider-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}


.legacy-page .catalog-sections {
    margin-bottom: 50px;
}

.legacy-page .catalog-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.legacy-page .catalog-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.legacy-page .catalog-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.legacy-page .catalog-card-image {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.legacy-page .catalog-card-image img {
    max-height: 100%;
    object-fit: contain;
}

.legacy-page .catalog-card-title {
    font-size: 13px;
    color: var(--text-dark);
}


.legacy-page .about-section {
    background: var(--bg-light);
    padding: 60px 0;
}

.legacy-page .about-content {
    max-width: 900px;
}

.legacy-page .about-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.4;
}

.legacy-page .about-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 30px 0 15px;
}

.legacy-page .about-heading {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 20px 0 10px;
}

.legacy-page .about-text {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 15px;
}

.legacy-page .btn-about {
    display: inline-block;
    background: var(--accent-cyan);
    color: white;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s;
}

.legacy-page .btn-about:hover {
    background: #3b8ae8;
    transform: scale(1.02);
}


.legacy-page .blog-section {
    padding: 60px 0;
    background: white;
}

.legacy-page .blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.legacy-page .blog-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.legacy-page .blog-card:hover {
    transform: translateY(-5px);
}

.legacy-page .blog-image {
    height: 180px;
    overflow: hidden;
}

.legacy-page .blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.legacy-page .blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.legacy-page .blog-content {
    padding: 20px;
}

.legacy-page .blog-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 10px;
}

.legacy-page .blog-date {
    font-size: 12px;
    color: var(--text-light);
}

.legacy-page .blog-more {
    text-align: center;
}

.legacy-page .btn-blog {
    display: inline-block;
    background: var(--accent-cyan);
    color: white;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.legacy-page .btn-blog:hover {
    background: #3b8ae8;
}


.legacy-page .reviews-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.legacy-page .reviews-slider {
    position: relative;
}

.legacy-page .reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.legacy-page .review-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.legacy-page .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.legacy-page .review-name {
    font-weight: 700;
    color: var(--primary-blue);
}

.legacy-page .review-rating {
    color: #fbbf24;
    font-size: 18px;
}

.legacy-page .review-text {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 10px;
}

.legacy-page .review-date {
    font-size: 12px;
    color: var(--text-light);
}


.legacy-page .footer {
    background: var(--primary-blue);
    color: white;
    padding: 50px 0;
}

.legacy-page .footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.legacy-page .footer .logo-text {
    color: white;
}

.legacy-page .footer-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-top: 10px;
}

.legacy-page .footer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.legacy-page .footer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.legacy-page .footer-link:hover {
    color: var(--accent-cyan);
}

.legacy-page .social-links {
    display: flex;
    gap: 15px;
}

.legacy-page .social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.legacy-page .social-link:hover {
    transform: scale(1.1);
}

.legacy-page .social-link.vk {
    background: #4a76a8;
}

.legacy-page .social-link.ok {
    background: #ee8208;
}

.legacy-page .social-link.tg {
    background: #0088cc;
}


@media (max-width: 1024px) {
.legacy-page .main-grid {
        grid-template-columns: 1fr;
    }
.legacy-page .sidebar {
        display: none;
    }
.legacy-page .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
.legacy-page .catalog-cards {
        grid-template-columns: repeat(2, 1fr);
    }
.legacy-page .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
.legacy-page .header-top-inner {
        flex-wrap: wrap;
    }
.legacy-page .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 15px;
    }
.legacy-page .nav-list {
        gap: 20px;
        flex-wrap: wrap;
    }
.legacy-page .hero-title {
        font-size: 28px;
    }
.legacy-page .products-grid {
        grid-template-columns: 1fr;
    }
.legacy-page .catalog-cards {
        grid-template-columns: repeat(2, 1fr);
    }
.legacy-page .blog-grid {
        grid-template-columns: 1fr;
    }
.legacy-page .reviews-grid {
        grid-template-columns: 1fr;
    }
.legacy-page .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
.legacy-page .social-links {
        justify-content: center;
    }
}


.legacy-page .page-header {
    background: var(--bg-white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.legacy-page .breadcrumb {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.legacy-page .breadcrumb a {
    color: var(--text-gray);
    transition: color 0.3s;
}

.legacy-page .breadcrumb a:hover {
    color: var(--primary-blue);
}

.legacy-page .page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 15px;
}

.legacy-page .page-title span {
    color: var(--accent-cyan);
    font-size: 18px;
    font-weight: 500;
}


.legacy-page .cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    padding: 40px 0;
}

.legacy-page .cart-items {
    background: var(--bg-white);
}

.legacy-page .cart-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-gray);
}

.legacy-page .cart-item {
    display: grid;
    grid-template-columns: 120px 1fr 150px 100px;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.legacy-page .cart-item-image {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legacy-page .cart-item-image img {
    max-height: 100%;
    object-fit: contain;
}

.legacy-page .cart-item-info h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.legacy-page .cart-item-sku {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.legacy-page .cart-item-actions {
    display: flex;
    gap: 20px;
    font-size: 13px;
}

.legacy-page .cart-item-actions a {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-gray);
    transition: color 0.3s;
}

.legacy-page .cart-item-actions a:hover {
    color: var(--primary-blue);
}

.legacy-page .cart-item-price {
    font-size: 18px;
    font-weight: 600;
    text-align: right;
}


.legacy-page .cart-summary {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.legacy-page .cart-summary-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

.legacy-page .cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
}

.legacy-page .cart-summary-row span:first-child {
    color: var(--text-gray);
}

.legacy-page .cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    margin-top: 15px;
    font-size: 18px;
    font-weight: 700;
}

.legacy-page .btn-checkout {
    width: 100%;
    background: var(--accent-cyan);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
    font-family: inherit;
}

.legacy-page .btn-checkout:hover {
    background: #3b8ae8;
}


.legacy-page .checkout-form {
    margin-top: 40px;
}

.legacy-page .form-section {
    margin-bottom: 30px;
}

.legacy-page .form-section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.legacy-page .form-section-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.legacy-page .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.legacy-page .form-group {
    display: flex;
    flex-direction: column;
}

.legacy-page .form-group.full-width {
    grid-column: 1 / -1;
}

.legacy-page .form-input {
    padding: 15px 20px;
    border: none;
    background: #f0f2f5;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: background 0.3s;
}

.legacy-page .form-input:focus {
    background: #e8eaed;
}

.legacy-page .form-input::placeholder {
    color: var(--text-light);
}

.legacy-page textarea.form-input {
    min-height: 120px;
    resize: vertical;
}


.legacy-page .radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.legacy-page .radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.legacy-page .radio-option input {
    margin-top: 3px;
    accent-color: var(--primary-blue);
}

.legacy-page .radio-label {
    font-size: 14px;
}

.legacy-page .radio-label strong {
    color: var(--text-dark);
}

.legacy-page .radio-label span {
    color: var(--text-gray);
}


.legacy-page .address-fields {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}


.legacy-page .product-page {
    padding: 30px 0;
}

.legacy-page .product-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.legacy-page .product-main {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.legacy-page .product-gallery {
    position: relative;
}

.legacy-page .product-main-image {
    width: 100%;
    height: 350px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.legacy-page .product-main-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.legacy-page .product-thumbnails {
    display: flex;
    gap: 15px;
}

.legacy-page .product-thumb {
    width: 80px;
    height: 80px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s;
}

.legacy-page .product-thumb:hover,\n.legacy-page .product-thumb.active {
    border-color: var(--primary-blue);
}

.legacy-page .product-thumb img {
    max-height: 90%;
    object-fit: contain;
}

.legacy-page .product-info {
    display: flex;
    flex-direction: column;
}

.legacy-page .product-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.legacy-page .product-info-header .product-badges {
    position: static;
    flex-direction: row;
}

.legacy-page .product-sku {
    font-size: 13px;
    color: var(--text-light);
}

.legacy-page .product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.legacy-page .product-rating .stars {
    color: #fbbf24;
}

.legacy-page .product-main-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.legacy-page .product-option {
    margin-bottom: 20px;
}

.legacy-page .product-option-label {
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
}

.legacy-page .product-option-label span {
    font-weight: 600;
}

.legacy-page .option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legacy-page .option-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.legacy-page .option-btn:hover,\n.legacy-page .option-btn.active {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
}

.legacy-page .product-add-to-cart {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.legacy-page .product-accordion {
    margin-top: 20px;
}

.legacy-page .accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.legacy-page .accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    font-weight: 500;
}

.legacy-page .product-delivery-note {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 15px;
    font-style: italic;
}


.legacy-page .product-tabs {
    margin-top: 40px;
}

.legacy-page .tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    gap: 30px;
}

.legacy-page .tab-btn {
    padding: 15px 0;
    background: none;
    border: none;
    font-size: 15px;
    color: var(--text-gray);
    cursor: pointer;
    position: relative;
    font-family: inherit;
    transition: color 0.3s;
}

.legacy-page .tab-btn:hover,\n.legacy-page .tab-btn.active {
    color: var(--primary-blue);
}

.legacy-page .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-blue);
}

.legacy-page .tab-content {
    padding: 30px 0;
}

.legacy-page .tab-content h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.legacy-page .tab-content h3 {
    font-size: 16px;
    margin: 25px 0 10px;
}

.legacy-page .tab-content p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 15px;
}

.legacy-page .tab-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}

.legacy-page .tab-content li {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 8px;
}


.legacy-page .catalog-page {
    padding: 30px 0;
}

.legacy-page .catalog-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 30px;
}

.legacy-page .catalog-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.legacy-page .catalog-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.legacy-page .filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.legacy-page .filter-btn:hover {
    border-color: var(--primary-blue);
}

.legacy-page .filter-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.legacy-page .catalog-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.legacy-page .catalog-load-more {
    text-align: center;
    margin-top: 40px;
}

.legacy-page .btn-load-more {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.legacy-page .btn-load-more:hover {
    background: #3a8fd8;
}

.legacy-page .catalog-seo {
    margin-top: 50px;
    padding: 30px;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.legacy-page .catalog-seo h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.legacy-page .catalog-seo h3 {
    font-size: 16px;
    margin: 25px 0 10px;
}

.legacy-page .catalog-seo p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 15px;
}

.legacy-page .catalog-seo ul {
    list-style: disc;
    padding-left: 20px;
}

.legacy-page .catalog-seo li {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 8px;
}


/* Фон-картинка (если нужна) подаётся через CSS-переменную --bg на секции:
   <section class="login-page" style="--bg: url('...')"> ... </section>
   Контентное изображение — только тегом <img>, см. правила проекта. */
.legacy-page .login-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(26, 53, 99, 0.85) 0%, rgba(74, 159, 234, 0.7) 100%),
        var(--bg, none) center/cover no-repeat;
    background-color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.legacy-page .login-modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 550px;
    position: relative;
    overflow: hidden;
}

.legacy-page .login-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.3s;
}

.legacy-page .login-close:hover {
    color: var(--text-dark);
}

.legacy-page .login-header {
    background: var(--primary-blue);
    color: white;
    padding: 30px;
    text-align: center;
}

.legacy-page .login-header h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
}

.legacy-page .login-tabs {
    display: flex;
}

.legacy-page .login-tab {
    flex: 1;
    padding: 20px;
    background: white;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    color: var(--primary-blue);
}

.legacy-page .login-tab.active {
    background: var(--primary-blue);
    color: white;
}

.legacy-page .login-form {
    padding: 30px;
}

.legacy-page .login-input {
    width: 100%;
    padding: 18px 25px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    margin-bottom: 15px;
    text-align: center;
    transition: border-color 0.3s;
}

.legacy-page .login-input:focus {
    border-color: var(--primary-blue);
}

.legacy-page .login-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.legacy-page .login-remember input {
    accent-color: var(--primary-blue);
}

.legacy-page .btn-login {
    width: 100%;
    background: var(--accent-cyan);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.legacy-page .btn-login:hover {
    background: #3b8ae8;
}

.legacy-page .login-forgot {
    text-align: center;
    margin-top: 20px;
}

.legacy-page .login-forgot a {
    color: var(--text-dark);
    font-size: 14px;
    text-decoration: underline;
}


.legacy-page .hits-section {
    padding: 60px 0;
}

@media (max-width: 768px) {
.legacy-page .cart-layout {
        grid-template-columns: 1fr;
    }
.legacy-page .cart-item {
        grid-template-columns: 80px 1fr;
    }
.legacy-page .cart-item-price {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 10px;
    }
.legacy-page .product-layout {
        grid-template-columns: 1fr;
    }
.legacy-page .product-main {
        grid-template-columns: 1fr;
    }
.legacy-page .catalog-layout {
        grid-template-columns: 1fr;
    }
.legacy-page .catalog-products {
        grid-template-columns: repeat(2, 1fr);
    }
.legacy-page .address-fields {
        grid-template-columns: 1fr 1fr;
    }
.legacy-page .form-row {
        grid-template-columns: 1fr;
    }
}


.legacy-page .cat-breadcrumbs {
    padding: 20px 0 10px;
    font-size: 14px;
    color: var(--text-gray);
}
.legacy-page .cat-breadcrumbs a { color: var(--text-gray); }
.legacy-page .cat-breadcrumbs a:hover { color: var(--primary-blue); }

.legacy-page .cat-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding-bottom: 40px;
}

.legacy-page .cat-title {
    font-size: 28px;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 25px;
}

.legacy-page .cat-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.legacy-page .filter-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}
.legacy-page .filter-btn:hover { border-color: var(--primary-blue); }
.legacy-page .filter-btn.filter-active {
    background: var(--accent-cyan);
    color: white;
    border-color: var(--accent-cyan);
}

.legacy-page .cat-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.legacy-page .cat-card {
    display: block;
    color: inherit;
}

.legacy-page .cat-more {
    text-align: center;
    margin: 40px 0;
}

.legacy-page .btn-show-more {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 14px 50px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.legacy-page .btn-show-more:hover { background: #3a8ed8; }

.legacy-page .cat-about {
    background: #f3f5f8;
    border-radius: 10px;
    padding: 35px 40px;
    margin-top: 30px;
}
.legacy-page .cat-about h2 {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 700;
}
.legacy-page .cat-about h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin: 20px 0 10px;
    font-weight: 700;
}
.legacy-page .cat-about p,\n.legacy-page .cat-about li {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 10px;
}
.legacy-page .cat-about ul {
    padding-left: 20px;
}

@media (max-width: 900px) {
.legacy-page .cat-grid { grid-template-columns: 1fr; }
.legacy-page .cat-products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
.legacy-page .cat-products { grid-template-columns: 1fr; }
}


.legacy-page .prod-breadcrumbs {
    padding: 20px 0 10px;
    font-size: 14px;
    color: var(--text-gray);
}
.legacy-page .prod-breadcrumbs a { color: var(--text-gray); }
.legacy-page .prod-breadcrumbs a:hover { color: var(--primary-blue); }

.legacy-page .prod-title {
    font-size: 26px;
    color: var(--primary-blue);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 25px;
}

.legacy-page .prod-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding-bottom: 40px;
}

.legacy-page .prod-main {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
}

.legacy-page .prod-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.legacy-page .prod-gallery .prod-image-big {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}
.legacy-page .prod-gallery .prod-image-big img {
    max-height: 100%;
    object-fit: contain;
}
.legacy-page .prod-gallery .product-badges {
    top: 15px; left: 15px;
    flex-direction: row;
}

.legacy-page .prod-thumbs {
    display: flex;
    gap: 10px;
}
.legacy-page .prod-thumbs .thumb {
    width: 90px;
    height: 90px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    cursor: pointer;
    background: white;
}
.legacy-page .prod-thumbs .thumb.active {
    border-color: var(--accent-cyan);
    border-width: 2px;
}
.legacy-page .prod-thumbs .thumb img {
    max-height: 100%;
    object-fit: contain;
}

.legacy-page .prod-info-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}
.legacy-page .prod-fav {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
}
.legacy-page .prod-rating {
    color: #d1d5db;
    font-size: 20px;
    letter-spacing: 2px;
}
.legacy-page .prod-article {
    color: var(--text-gray);
    font-size: 13px;
    margin-left: auto;
}

.legacy-page .prod-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.legacy-page .prod-option-label {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 10px;
}
.legacy-page .prod-option-label .selected {
    color: var(--text-gray);
}

.legacy-page .prod-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.legacy-page .opt-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-dark);
    transition: all 0.2s;
}
.legacy-page .opt-btn:hover { border-color: var(--accent-cyan); }
.legacy-page .opt-btn.active {
    background: var(--accent-cyan);
    color: white;
    border-color: var(--accent-cyan);
}

.legacy-page .prod-cart-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0 15px;
}
.legacy-page .prod-cart-row .quantity-control { height: 42px; }
.legacy-page .prod-cart-row .qty-btn { width: 36px; height: 40px; }
.legacy-page .prod-cart-row .qty-input { width: 45px; height: 40px; }
.legacy-page .prod-cart-row .btn-cart {
    padding: 12px 30px;
    font-size: 14px;
}

.legacy-page .prod-desc-toggle {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: var(--text-dark);
    cursor: pointer;
    font-weight: 500;
}
.legacy-page .prod-desc-toggle .plus-sign {
    font-size: 22px;
    color: var(--text-gray);
}

.legacy-page .prod-delivery-note {
    margin-top: 15px;
    font-size: 12px;
    color: var(--text-light);
}


.legacy-page .prod-tabs {
    margin-top: 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 40px;
}
.legacy-page .prod-tab {
    background: none;
    border: none;
    padding: 15px 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    position: relative;
}
.legacy-page .prod-tab.active { color: var(--accent-cyan); }
.legacy-page .prod-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 3px;
    background: var(--accent-cyan);
}

.legacy-page .prod-tab-content {
    padding: 30px 0;
}
.legacy-page .prod-tab-content h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}
.legacy-page .prod-tab-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 10px;
    color: var(--text-dark);
}
.legacy-page .prod-tab-content p,\n.legacy-page .prod-tab-content li {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 10px;
}
.legacy-page .prod-tab-content ul { padding-left: 20px; }

.legacy-page .prod-hits-title {
    text-align: center;
    color: var(--primary-blue);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 40px 0 30px;
}

@media (max-width: 900px) {
.legacy-page .prod-grid { grid-template-columns: 1fr; }
.legacy-page .prod-top { grid-template-columns: 1fr; }
}

