/*
 * Onest подключается локально: assets/css/fonts-onest.css + assets/fonts/onest/*.woff2
 * Нет файлов — см. tools/download-onest-fonts.ps1 или .sh
 */

:root {
    /* Полоса контента: фиксированный максимум, по бокам — отступ от края экрана */
    --site-max-width: 1440px;
    --site-side-margin: 16px;
    --site-content-width: min(var(--site-max-width), calc(100vw - 2 * var(--site-side-margin)));
    --font-sans: "Onest", sans-serif;
    --bg: #f7f7f7;
    --surface: #ffffff;
    --text: #1d2330;
    --muted: #667085;
    --primary: #ff6700;
    --primary-dark: #e55c00;
    --border: #ececec;
    --shadow: 0 8px 24px rgba(17, 34, 68, 0.08);
    --catalog-grid-gap: 12px;
    /* Заголовки блоков витрины: ~+44% к исходным 28px (два шага по +20%) */
    --catalog-section-title-size: 40.32px;
    --catalog-section-title-weight: 900;
    --catalog-section-title-size-md: 34.56px;
    --catalog-section-title-size-sm: 31.68px;
    --catalog-section-title-size-xs: 28.8px;
    --catalog-category-title-size: 36.43px;
    --catalog-category-title-size-compact: 33.12px;
    --home-category-chip-size: 20.16px;
    --home-category-chip-weight: 900;
    --mega-menu-category-size: 15px;
    --mega-menu-category-weight: 600;
    --catalog-section-head-gap: 4px;
    --catalog-section-head-pad: 0;
    --catalog-section-head-divider: var(--primary);
    --catalog-section-head-divider-width: 3px;
    --category-filter-sticky-top: calc(var(--desktop-top-bar-height, 78px) + 12px);
    /* Скругления в стиле Ozon (единые на витрине) */
    --catalog-card-radius: 12px;
    --ozon-banner-radius-lg: 24px;
    --ozon-banner-radius-md: 16px;
    --ozon-banner-radius-sm: 12px;
    --ozon-media-radius: 12px;
    --ozon-panel-radius: 16px;
    --ozon-thumb-radius: 8px;
    /* Единый формат фото товара (витрина Ozon): вертикаль 3:4 */
    --product-photo-aspect: 3 / 4;
    --product-card-gallery-controls-height: 9px;
    /* Стрелки горизонтальных лент (витрина, новости, рекомендации, промо): светлая тема — светлые кнопки */
    --carousel-rail-arrow-bg: #ffffff;
    --carousel-rail-arrow-border: rgba(15, 23, 42, 0.14);
    --carousel-rail-arrow-fg: #334155;
    --carousel-rail-arrow-bg-hover: #f1f5f9;
    --carousel-rail-arrow-fg-hover: #0f172a;
    --carousel-rail-arrow-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    font-family: var(--font-sans);
    /* 100vw шире, чем layout со скроллбаром — после Ctrl±зума часто появляется горизонтальный скролл и «уезд» вправо до F5 */
    scrollbar-gutter: stable;
    overflow-x: clip;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    overflow-x: clip;
    max-width: 100%;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #0f172a;
}

p {
    line-height: 1.55;
}

input,
select,
textarea,
button,
option,
optgroup {
    font-family: var(--font-sans);
    font-size: inherit;
    line-height: inherit;
}

input,
select,
textarea,
button {
    font: inherit;
    font-family: var(--font-sans);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: var(--site-content-width);
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1025px) {
    :root {
        --site-side-margin: 48px;
        --site-content-width: min(var(--site-max-width), calc(100vw - 2 * var(--site-side-margin)));
    }
}

.breadcrumbs {
    margin-top: 12px;
    margin-bottom: 8px;
}

.breadcrumbs ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
}

.breadcrumbs li + li::before {
    content: "/";
    margin-right: 6px;
    color: #94a3b8;
}

.breadcrumbs a {
    color: #475569;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(17, 34, 68, 0.06);
}

/* Только верхняя полоса зафиксирована; категории и контент прокручиваются (десктоп) */
@media (min-width: 1025px) {
    :root {
        --desktop-top-bar-height: 78px;
    }

    .desktop-top-bar-fixed {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: var(--surface);
        box-shadow: 0 2px 8px rgba(17, 34, 68, 0.06);
    }

    .site-header {
        position: static;
        padding-top: var(--desktop-top-bar-height);
        box-shadow: none;
    }

    /* При масштабе Windows 125% и узком окне логотип + «Каталог» не должны уезжать на вторую строку */
    .top-bar-brand-slot {
        flex-wrap: nowrap;
    }

    .top-bar-brand-slot .brand {
        flex-shrink: 1;
        min-width: 0;
    }

    .top-bar .search-form {
        min-width: 0;
    }
}

.mobile-info-wrap {
    display: block;
    margin-bottom: 10px;
}

/*
 * Полоса уведомления на всю ширину окна (не .container — иначе узкая колонка по центру экрана).
 * Нужна и для статичного текста, и для бегущей строки.
 */
.mobile-info-wrap--info-full {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    box-sizing: border-box;
}

.mobile-info-wrap--info-full .mobile-info-bar {
    width: 100%;
    box-sizing: border-box;
}

/* Статичный режим: текст по центру полосы */
.mobile-info-bar.mobile-info-bar--static {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.mobile-info-bar.mobile-info-bar--static .mobile-info-text {
    flex: 0 1 auto;
    min-width: 0;
    text-align: center;
}

.mobile-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    background: #fff4ed;
    color: #a64500;
    padding: 8px 12px;
    text-align: center;
    font-size: 13px;
    line-height: 1.35;
}

.mobile-info-text {
    display: block;
}

/*
 * Бегущая строка: только проверенный цикл translateX(0) → translateX(-50%) по ширине дорожки
 * (две одинаковые копии текста в разметке). Без JS — без «заезда справа» и без сложных calc.
 */
.mobile-info-bar.mobile-info-bar--marquee {
    display: block;
    position: relative;
    padding: 8px 12px;
    text-align: left;
}

.mobile-info-bar.mobile-info-bar--marquee .mobile-info-marquee-viewport {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 1.35em;
    overflow: hidden;
    text-align: left;
}

.mobile-info-bar.mobile-info-bar--marquee .mobile-info-marquee-track {
    position: absolute;
    left: 0;
    top: 50%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    white-space: nowrap;
    margin: 0;
    transform: translateY(-50%) translateX(0);
    animation: header-info-marquee-simple var(--mobile-info-marquee-sec, 25s) linear infinite;
    will-change: transform;
}

.mobile-info-bar.mobile-info-bar--marquee .mobile-info-marquee-segment {
    flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
    .mobile-info-bar.mobile-info-bar--marquee .mobile-info-marquee-track {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        animation: none;
        justify-content: flex-start;
        text-align: left;
        width: 100%;
        white-space: normal;
    }

    .mobile-info-bar.mobile-info-bar--marquee .mobile-info-marquee-segment:nth-child(2) {
    display: none;
    }

    .mobile-info-bar.mobile-info-bar--marquee {
        text-align: left;
    }

    .mobile-info-bar.mobile-info-bar--marquee .mobile-info-marquee-viewport {
        min-height: 0;
        mask-image: none;
        -webkit-mask-image: none;
    }
}

@keyframes header-info-marquee-simple {
    from {
        transform: translateY(-50%) translateX(0);
    }
    to {
        transform: translateY(-50%) translateX(-50%);
    }
}

.mobile-promo-wrap {
    display: block;
    margin: 14px auto 10px;
    width: var(--site-content-width);
}

.mobile-promo-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-height: 170px;
    margin: 0 auto;
    border-radius: var(--ozon-banner-radius-md);
    background: #e8f1ff;
}

.mobile-promo-slide {
    position: absolute;
    inset: 0;
    display: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    visibility: hidden;
}

.mobile-promo-slide.is-active {
    display: block;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.mobile-promo-slide img {
    width: 100%;
    height: 100%;
    min-height: 170px;
    object-fit: cover;
    object-position: center;
    transform: scale(1.03);
    display: block;
}

.promo-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--carousel-rail-arrow-border);
    background: var(--carousel-rail-arrow-bg);
    color: var(--carousel-rail-arrow-fg);
    box-shadow: var(--carousel-rail-arrow-shadow);
    cursor: pointer;
    z-index: 3;
}

.promo-nav-btn:hover:not(:disabled) {
    background: var(--carousel-rail-arrow-bg-hover);
    color: var(--carousel-rail-arrow-fg-hover);
}

.promo-nav-prev {
    left: 10px;
}

.promo-nav-next {
    right: 10px;
}

.mobile-promo-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 8px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.mobile-promo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.7);
    padding: 0;
    cursor: pointer;
}

.mobile-promo-dot.is-active {
    background: #229ed9;
}

.mobile-promo-slider[data-promo-adaptive-height="1"] {
    min-height: 0 !important;
}

.mobile-promo-slider[data-promo-adaptive-height="1"] .mobile-promo-slide img {
    width: 100%;
    min-height: 0 !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    transform: none !important;
}

.mobile-promo-wrap--mini {
    margin-top: 10px;
    margin-bottom: 12px;
}

.mobile-promo-wrap--mini .mobile-promo-slider[data-promo-adaptive-height="1"] {
    min-height: 72px !important;
}

.layout-home-catalog .mobile-promo-wrap--mini .mobile-promo-slider,
.mobile-promo-wrap--mini .mobile-promo-slider {
    min-height: 0;
    height: auto;
    border-radius: 14px;
    background: #dff4ee;
}

.layout-home-catalog .mobile-promo-wrap--mini .mobile-promo-slide img,
.mobile-promo-wrap--mini .mobile-promo-slide img {
    min-height: 0;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: none;
}

.mobile-promo-wrap--mini .promo-nav-btn {
    width: 30px;
    height: 30px;
}

.mobile-promo-wrap--mini .mobile-promo-dots {
    bottom: 6px;
}

.mobile-promo-wrap--mini .mobile-promo-dot {
    width: 6px;
    height: 6px;
}

.top-bar {
    display: grid;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}

/*
 * Десктоп: логотип | каталог | поиск (растёт) | иконки | язык + часы + тема.
 * Без transform — только сетка и выравнивание.
 */
@media (min-width: 1025px) {
    .desktop-top-bar-fixed {
        overflow: visible;
    }

    .desktop-top-bar-fixed .top-bar {
        grid-template-columns: max-content auto minmax(0, 1fr) max-content;
        gap: 10px 14px;
        overflow: visible;
    }

    .desktop-top-bar-fixed .top-bar > .search-form {
        grid-column: 3;
        justify-self: stretch;
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .header-topbar-end {
        grid-column: 4;
        display: flex;
        align-items: center;
        gap: 10px 12px;
        flex-shrink: 0;
    }

    .header-topbar-end > .header-actions {
        margin-left: 0;
    }

    .header-topbar-trailing {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
    }
}

@media (min-width: 1025px) and (max-width: 1400px) {
    .desktop-top-bar-fixed .top-bar {
        gap: 8px 10px;
    }

    .header-topbar-trailing {
        gap: 10px;
    }
}

.top-bar-brand-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.brand {
    color: var(--primary);
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: lowercase;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
}

.brand-logo-image {
    display: block;
    max-width: 220px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.theme-toggle-btn {
    border: 0;
    background: transparent;
    border-radius: 999px;
    height: 36px;
    width: 62px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-clock {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    width: max-content;
    min-width: max-content;
    max-width: none;
    line-height: 1.1;
    color: #6b7280;
    overflow: visible;
    position: relative;
    z-index: 3;
}

.header-clock-time {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.header-clock-date {
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
}

.theme-toggle-track {
    width: 56px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid #e7e7e7;
    background: #fafafa;
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
    opacity: 0.9;
    pointer-events: none;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-icon svg {
    width: 14px;
    height: 14px;
}

.theme-toggle-icon-sun {
    left: 7px;
}

.theme-toggle-icon-moon {
    right: 7px;
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
    transition: transform 0.2s ease;
}

.theme-toggle-btn.is-on .theme-toggle-track {
    background: #1b273b;
    border-color: #33455f;
}

.theme-toggle-btn.is-on .theme-toggle-icon-sun {
    opacity: 0.45;
}

.theme-toggle-btn.is-on .theme-toggle-icon-moon {
    opacity: 1;
}

.theme-toggle-btn.is-on .theme-toggle-thumb {
    transform: translateX(26px);
}

.theme-toggle-btn:not(.is-on) .theme-toggle-icon-sun {
    opacity: 1;
}

.theme-toggle-btn:not(.is-on) .theme-toggle-icon-moon {
    opacity: 0.45;
}

.search-form {
    display: flex;
    align-items: stretch;
    gap: 0;
    /* Как на макете: белое поле + оранжевая «Найти» в одной обводке */
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: visible;
    position: relative;
    width: 100%;
    max-width: none;
    min-height: 40px;
    box-sizing: border-box;
}

.search-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: #ffffff;
    padding: 0 12px;
    min-height: 38px;
    line-height: 38px;
    border-radius: 11px 0 0 11px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    align-self: stretch;
    box-sizing: border-box;
}

.search-form button {
    border: 0;
    margin: 0;
    background: var(--primary);
    color: #fff;
    padding: 0 18px;
    min-height: 38px;
    line-height: 1.25;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border-radius: 0 11px 11px 0;
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: none;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-suggest-box {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 28px rgba(17, 34, 68, 0.12);
    display: none;
    z-index: 30;
    max-height: 300px;
    overflow: auto;
}

.search-suggest-box.is-open {
    display: block;
}

.search-suggest-item {
    display: block;
    padding: 10px 12px;
    border-bottom: 1px solid #eef2fa;
    font-size: 14px;
}

.search-suggest-item:last-child {
    border-bottom: 0;
}

.search-suggest-item:hover {
    background: #f5f8ff;
}

.header-actions {
    display: flex;
    gap: 10px;
    font-size: 14px;
    overflow: visible;
}

.header-actions a {
    border: 1px solid #e1e8f5;
    background: linear-gradient(180deg, #fff, #f8fbff);
    border-radius: 10px;
    min-height: 38px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.header-actions a[data-open-mini-cart="1"],
.header-actions a.header-cart-link,
.header-actions a.header-account-link,
.header-actions a.header-favorites-link,
.header-actions a.header-compare-link,
.header-actions a.header-points-link {
    gap: 6px;
    padding-right: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.header-actions a.header-cart-link,
.header-actions a.header-compare-link,
.header-actions a.header-favorites-link,
.header-actions a.header-points-link {
    gap: 0;
}

.header-account-link__icon,
.header-cart-link__icon,
.header-favorites-link__icon,
.header-compare-link__icon,
.header-points-link__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-account-link__label {
    font-weight: 600;
    letter-spacing: 0.01em;
    font-size: 13px;
    max-width: 12em;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Подпись имени у вошедшего — как цвет иконок избранного / корзины */
.header-actions a.header-account-link--with-label .header-account-link__label {
    color: #64748b;
}

.header-actions a.header-account-link--with-label:hover .header-account-link__label {
    color: #475569;
}

.header-actions a.header-account-link.is-active .header-account-link__label {
    color: var(--primary);
}

/* При активной странице кабинета hover даёт иконке slate; подпись — тот же оттенок, как у избранного */
.header-actions a.header-account-link.is-active:hover .header-account-link__label {
    color: #475569;
}

.header-actions a.header-account-link--guest,
.header-actions a.header-account-link--with-label {
    padding-left: 8px;
}

.header-account-guest-hint-wrap {
    position: relative;
    align-self: center;
    width: fit-content;
    max-width: 100%;
}

/* «Мост» под ссылкой — курсор не выходит из :hover при переходе к окошку */
.header-account-guest-hint-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;
    z-index: 229;
}

.header-account-guest-hint {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(300px, calc(100vw - 32px));
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    padding: 12px 14px 14px;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid #e1e8f5;
    background: linear-gradient(180deg, #fff, #f8fbff);
    box-shadow: 0 14px 36px rgba(17, 34, 68, 0.14);
    font-size: 12.5px;
    line-height: 1.45;
    font-weight: 500;
    color: #334155;
    text-align: center;
    z-index: 230;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease;
}

/* Ссылки внутри подсказки: не наследовать оформление .header-actions a (иначе «Войти» теряет фон и текст) */
.header-actions .header-account-guest-hint a {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border: 0;
    background: transparent;
    min-height: 0;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    font-weight: inherit;
    box-shadow: none;
    transition: none;
}

.header-actions .header-account-guest-hint a:hover {
    border: 0;
    box-shadow: none;
}

.header-account-guest-hint__text {
    margin: 0 0 12px;
    width: 100%;
    min-width: 0;
    text-align: center;
}

.header-account-guest-hint__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

/* Селектор с `a` — иначе общее `.header-actions .header-account-guest-hint a` (0,2,1) перебивает два класса (0,2,0) и срезает фон/padding у «Войти» */
.header-actions .header-account-guest-hint a.header-account-guest-hint__login.buy-btn {
    margin-top: 0;
    text-decoration: none;
    display: block;
    width: 100%;
    max-width: none;
    text-align: center;
    box-sizing: border-box;
    background: var(--primary);
    color: #fff;
    padding: 10px 12px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 13px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.header-actions .header-account-guest-hint a.header-account-guest-hint__login.buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 91, 255, 0.24);
    filter: brightness(1.02);
}

.header-actions .header-account-guest-hint a.header-account-guest-hint__register {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 6px 4px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.header-actions .header-account-guest-hint a.header-account-guest-hint__register:hover {
    background: rgba(255, 103, 0, 0.08);
    text-decoration: underline;
}

.header-account-guest-hint-wrap:hover .header-account-guest-hint,
.header-account-guest-hint-wrap:focus-within .header-account-guest-hint {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.header-actions-icon-svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: block;
}

.header-actions-icon-svg--favorites,
.header-actions-icon-svg--points {
    color: #64748b;
}

.header-actions a.header-favorites-link:hover .header-actions-icon-svg--favorites,
.header-actions a.header-points-link:hover .header-actions-icon-svg--points {
    color: #475569;
}

.header-actions-icon-svg--cart {
    color: #64748b;
}

.header-actions a.header-cart-link:hover .header-actions-icon-svg--cart {
    color: #475569;
}

.header-actions-icon-svg--account {
    color: #64748b;
}

.header-actions a.header-account-link:hover .header-actions-icon-svg--account {
    color: #475569;
}

.header-actions-icon-svg--compare {
    color: #64748b;
}

.header-actions a.header-compare-link:hover .header-actions-icon-svg--compare {
    color: #475569;
}

.header-actions a.header-favorites-link {
    padding-left: 8px;
}

/* Бейджи счётчиков на иконках: баллы, сравнение, избранное, корзина */
.header-action-badge-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-icon-badge-count {
    position: absolute;
    top: -9px;
    right: -11px;
    z-index: 1;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 999px;
    border: 2px solid #fff;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}

.header-icon-badge-count.is-empty {
    display: none;
}

.header-actions a.header-cart-link {
    padding-left: 8px;
}

.header-actions a.header-compare-link {
    padding-left: 8px;
}

.header-actions a.header-points-link {
    position: relative;
    z-index: 0;
    padding-left: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.header-actions a.header-points-link:hover,
.header-actions a.header-points-link:focus-within {
    z-index: 60;
}

.header-points-link__tooltip {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    width: min(300px, calc(100vw - 32px));
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    padding: 12px 14px 14px;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid #e1e8f5;
    background: linear-gradient(180deg, #fff, #f8fbff);
    box-shadow: 0 14px 36px rgba(17, 34, 68, 0.14);
    font-size: 12.5px;
    line-height: 1.45;
    font-weight: 500;
    color: #334155;
    text-align: center;
    z-index: 230;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-4px);
    pointer-events: none;
    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease;
    white-space: normal;
}

.header-actions a.header-points-link:focus-within .header-points-link__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (hover: hover) and (pointer: fine) {
    .header-actions a.header-points-link:hover .header-points-link__tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

.header-actions a.header-points-link:not(.is-active):hover {
    border-color: #b8c5db;
    box-shadow: 0 10px 22px rgba(17, 34, 68, 0.11);
    transform: translateY(-1px);
}

.header-actions a:hover {
    border-color: #cdd8ed;
    box-shadow: 0 8px 16px rgba(17, 34, 68, 0.08);
}

.header-actions a.is-active {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(255, 103, 0, 0.12), rgba(255, 103, 0, 0.05));
    box-shadow: inset 0 0 0 1px rgba(255, 103, 0, 0.28), 0 4px 14px rgba(255, 103, 0, 0.12);
}

.header-actions a.is-active .header-actions-icon-svg {
    color: var(--primary);
}

.header-actions a.is-active:hover {
    border-color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px rgba(255, 103, 0, 0.35), 0 6px 18px rgba(255, 103, 0, 0.16);
}

.header-actions a#headerCartLink.is-added-highlight,
.header-actions a#headerFavoritesLink.is-added-highlight,
.header-actions a#headerCompareLink.is-added-highlight {
    border-color: #3b82f6;
    background: linear-gradient(180deg, #eff6ff, #dbeafe);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    animation: variationRequiredPulse 0.45s ease 2;
}

.header-icon-badge-count.is-bump {
    animation: cartCountBump 0.35s ease;
}

.lang-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.lang-switcher a {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fff, #f8fbff);
    border-radius: 10px;
    height: 38px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 13px;
    font-weight: 700;
}

.lang-switcher a.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.lang-separator {
    color: var(--muted);
    font-size: 13px;
}

.catalog-mobile-scrim {
    display: none;
}

.category-nav {
    border-top: 0;
    border-bottom: 1px solid var(--border);
}

.category-nav-home {
    border-bottom: 0;
}

.categories-bar {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
}

.catalog-btn {
    border: 0;
    background: linear-gradient(135deg, var(--primary), #ff8a3d);
    color: #fff;
    border-radius: 11px;
    height: 40px;
    padding: 0 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.catalog-btn-top {
    white-space: nowrap;
    min-height: 40px;
}

.category-nav-static {
    position: relative;
    border-bottom: 0;
}

.category-nav-static .mega-menu {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 14px;
    position: absolute;
    top: 100%;
    left: 50%;
    width: var(--site-content-width);
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 34px rgba(15, 23, 42, 0.12);
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%);
    pointer-events: auto;
    z-index: 35;
}

.category-nav-static .mega-menu-submenus {
    display: block;
    position: relative;
    min-height: 250px;
}

.category-nav-static .mega-menu-submenu {
    position: absolute;
    inset: 0;
}

.category-nav-static .mega-menu-categories {
    max-height: 320px;
    overflow: auto;
}

@media (max-width: 1024px) {
    .category-nav-static .mega-menu {
        position: static;
        left: auto;
        top: auto;
        width: 100%;
        transform: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 8px 0 10px;
        grid-template-columns: 1fr;
    }

    .category-nav-static .mega-menu-submenus {
        display: none;
        min-height: 0;
    }
}

.mobile-bottom-nav {
    display: none;
}

.floating-actions {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 101;
    display: grid;
    gap: 10px;
}

.floating-action-btn {
    width: 56px;
    height: 56px;
    border: 3px solid rgba(22, 163, 74, 0.45);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #15803d;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(17, 34, 68, 0.12);
    padding: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.floating-action-btn:is(a) {
    text-decoration: none;
}

.floating-action-btn.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

.floating-messenger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.floating-messenger-actions {
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.floating-messenger-item {
    transform: translateX(10px) scale(0.92);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Иконки внутри кружков мессенджера — один размер (кружки .floating-action-btn не меняются) */
.floating-messenger-item img,
#floatingMessengerToggleBtn img {
    width: 23px;
    height: 23px;
    display: block;
}

.floating-messenger .floating-messenger-item > span[aria-hidden="true"] {
    font-size: 23px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.floating-messenger.is-open .floating-messenger-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%);
}

.floating-messenger.is-open .floating-messenger-item {
    transform: translateX(0) scale(1);
    opacity: 1;
}

/* ПК: мессенджер и стрелка «вверх» — на ~25% меньше предыдущего десктоп-размера (≈71px); фоны без доп. прозрачности */
@media (min-width: 1025px) {
    .floating-actions {
        gap: 13px;
    }

    .floating-action-btn {
        width: 71px;
        height: 71px;
        font-size: 26px;
    }

    .floating-messenger-actions {
        gap: 11px;
        right: calc(100% + 11px);
    }

    .floating-messenger-item img,
    #floatingMessengerToggleBtn img {
        width: 27px;
        height: 27px;
    }

    .floating-messenger .floating-messenger-item > span[aria-hidden="true"] {
        font-size: 27px;
    }

    /* ПК: невидимый «мост» между кружками и кнопкой сообщения — мышь не «выпадает» из зоны при переходе */
    .floating-messenger.is-open {
        z-index: 2;
    }

    .floating-messenger.is-open::before {
        content: '';
        position: absolute;
        top: 50%;
        right: 71px;
        transform: translateY(-50%);
        width: 173px;
        height: 82px;
        pointer-events: auto;
        z-index: 0;
    }

    .floating-messenger.is-open .floating-messenger-actions {
        z-index: 1;
    }

    .floating-messenger.is-open #floatingMessengerToggleBtn {
        position: relative;
        z-index: 1;
    }
}

.theme-dark .floating-action-btn {
    color: #4ade80;
    background: rgba(23, 33, 50, 0.88);
    border: 3px solid rgba(34, 197, 94, 0.55);
    box-shadow: 0 8px 18px rgba(3, 8, 18, 0.45);
}

#scrollToTopBtn {
    --scroll-progress: 0deg;
    position: relative;
    width: 56px;
    height: 56px;
    border: 0;
    background: conic-gradient(#16a34a var(--scroll-progress), #dcfce7 0);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.24);
    color: #15803d;
}

#scrollToTopBtn::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #ffffff;
}

#scrollToTopBtn > span {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.theme-dark #scrollToTopBtn {
    background: conic-gradient(#22c55e var(--scroll-progress), #334155 0);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.35);
    color: #86efac;
}

.theme-dark #scrollToTopBtn::before {
    background: #172033;
}

@media (min-width: 1025px) {
    #scrollToTopBtn {
        width: 71px;
        height: 71px;
    }

    #scrollToTopBtn::before {
        inset: 7px;
    }

    #scrollToTopBtn > span {
        font-size: 31px;
    }
}

.mobile-search-sheet {
    display: none;
}

.mobile-scroll-search {
    display: none;
}

.mega-menu {
    display: none;
    grid-template-columns: 260px 1fr;
    gap: 14px;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 14px 0 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

.category-nav.is-open .mega-menu {
    display: grid;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-menu-categories {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcff;
    padding: 8px;
    display: grid;
    gap: 4px;
}

.mega-menu-list-title {
    padding: 8px 10px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mega-menu-category-item {
    position: relative;
    z-index: 0;
    border-radius: 9px;
    padding: 2px;
}

.mega-menu-category-item.is-active:has(.mega-menu-category-children),
.mega-menu-category-item.is-expanded:has(.mega-menu-category-children) {
    z-index: 3;
}

.mega-menu-category-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mega-menu-category {
    display: block;
    flex: 1 1 auto;
    text-align: left;
    padding: 8px 10px;
    font-size: var(--mega-menu-category-size);
    font-weight: var(--mega-menu-category-weight);
    line-height: 1.25;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mega-menu-category:hover,
.mega-menu-category-item.is-active > .mega-menu-category {
    background: #fff4ed;
    color: var(--primary);
}

.mega-menu-expand {
    border: 0;
    background: transparent;
    color: #64748b;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.mega-menu-expand:hover {
    background: #eef2ff;
    color: var(--primary);
}

.mega-menu-category-item.is-active .mega-menu-expand,
.mega-menu-category-item.is-expanded .mega-menu-expand {
    transform: rotate(90deg);
    color: var(--primary);
}

.mega-menu-category-children {
    display: none;
    gap: 6px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Отдельный контейнер справа от колонки категорий — позиция задаётся в JS (fixed), см. mega-menu-category-children--dock */
.mega-menu-category-children.mega-menu-category-children--dock {
    background: #e9ebef;
    border: 1px solid #d5d9e1;
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
    padding: 10px 12px;
}

/* Панель подкатегорий — спокойный серый фон */
.layout-home-catalog .category-nav-home .mega-menu-category-children.mega-menu-category-children--dock,
.layout-header-catalog .category-nav-external .mega-menu-category-children.mega-menu-category-children--dock {
    background: #e9ebef;
    border: 1px solid #d5d9e1;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

.filter-sidebar-catalog-shell .mega-menu-category-children.mega-menu-category-children--dock {
    background: #e9ebef;
    border: 1px solid #d5d9e1;
}

.mega-menu-category-item.is-active .mega-menu-category-children,
.mega-menu-category-item.is-expanded .mega-menu-category-children {
    display: grid;
}

.mega-menu-category-children a {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    border-radius: 9px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mega-menu-category-children a:hover {
    background: #fff4ed;
    color: var(--primary);
}

.mega-menu-submenus {
    position: relative;
    min-height: 250px;
}

.mega-menu-submenu {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.mega-menu-submenu.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-col {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcff;
    padding: 12px;
}

.mega-menu-col h4 {
    margin: 0 0 10px;
}

.mega-menu-col a {
    display: block;
    padding: 7px 0;
    color: #344054;
    font-size: 14px;
}

.mega-menu-col a:hover {
    color: var(--primary);
}

@media (min-width: 1025px) {
    .layout-header-catalog,
    .layout-home-catalog {
        --home-content-inset: max(var(--site-side-margin), calc((100vw - var(--site-content-width)) / 2));
        --home-catalog-left: max(8px, calc(var(--home-content-inset) - 10px));
        --home-catalog-width: 298px;
        --home-catalog-gap: 16px;
    }

    .layout-home-catalog .catalog-btn-top {
        display: none;
    }

    .layout-header-catalog .category-nav-external {
        border: 0;
        border-bottom: 0;
        min-height: 0;
        margin: 0;
        padding: 0;
    }

    .layout-home-catalog .category-nav-home {
        position: relative;
    }

    /* Левая колонка каталога закреплена под фиксированной полосой шапки — не уезжает при скролле */
    .layout-home-catalog .category-nav-home .home-catalog-left-column,
    .layout-header-catalog .category-nav-external .home-catalog-left-column {
        position: fixed;
        left: var(--home-catalog-left);
        top: var(--desktop-top-bar-height);
        width: var(--home-catalog-width);
        max-height: calc(100vh - var(--desktop-top-bar-height) - 16px);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 14px;
        z-index: 90;
        align-items: stretch;
        pointer-events: auto;
        overflow-x: visible;
        overflow-y: auto;
        overscroll-behavior: auto;
    }

    .layout-home-catalog .category-nav-home .home-catalog-left-column .mega-menu.container,
    .layout-header-catalog .category-nav-external .home-catalog-left-column .mega-menu.container {
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }

    .layout-home-catalog .category-nav-home .mega-menu,
    .layout-header-catalog .category-nav-external .mega-menu {
        display: block;
        position: static;
        left: auto;
        top: auto;
        width: 100%;
        padding: 0;
        background: #e9ebef;
        border: 1px solid #d5d9e1;
        border-radius: 12px;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        z-index: auto;
    }

    .layout-home-catalog .category-nav-home .mega-menu-submenus,
    .layout-header-catalog .category-nav-external .mega-menu-submenus {
        display: none !important;
    }

    .layout-home-catalog .category-nav-home .mega-menu-categories,
    .layout-header-catalog .category-nav-external .mega-menu-categories {
        border: 0;
        border-radius: 12px;
        background: transparent;
        padding: 8px;
        max-height: none;
        overflow: visible;
        flex: 1 1 auto;
        min-height: 0;
    }

    /* Герой «рекомендуем» под списком категорий */
    .layout-home-catalog .category-nav-home .home-catalog-featured-rail-panel {
        margin: 0;
        padding: 8px;
        display: inline-block;
        vertical-align: top;
        max-width: 100%;
        min-width: 0;
        align-self: center;
        box-sizing: border-box;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: var(--catalog-card-radius);
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
        overflow: hidden;
    }

    .layout-home-catalog .category-nav-home .home-catalog-featured-rail-panel .featured-rail-hero--sidebar {
        min-height: 0;
        height: auto;
        max-width: 100%;
        box-shadow: none;
    }

    .layout-home-catalog .category-nav-home .home-catalog-featured-rail-panel .featured-rail-hero--sidebar .featured-rail-hero-link,
    .layout-home-catalog .category-nav-home .home-catalog-featured-rail-panel .featured-rail-hero--sidebar .featured-rail-hero-media {
        min-height: 0;
        height: auto;
        max-height: none;
        max-width: 100%;
    }

    .layout-home-catalog .category-nav-home .home-catalog-featured-rail-panel .featured-rail-hero--sidebar .featured-rail-hero-link {
        display: block;
        height: auto;
    }

    .layout-home-catalog .category-nav-home .home-catalog-featured-rail-panel .featured-rail-hero--sidebar .featured-rail-hero-media {
        display: inline-block;
        vertical-align: top;
        max-width: 100%;
        background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
    }

    .layout-home-catalog .category-nav-home .home-catalog-featured-rail-panel .featured-rail-hero-arrows {
        right: 6px;
        bottom: 6px;
    }

    .layout-home-catalog .category-nav-home .home-catalog-featured-rail-panel .featured-rail-hero-arrows .home-showcase-arrow {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .layout-home-catalog .category-nav-home .home-catalog-featured-rail-panel .featured-rail-hero--sidebar .featured-rail-hero-media img {
        width: auto;
        height: auto;
        max-width: 100%;
        min-height: 0;
        max-height: min(88vh, 1000px);
        object-fit: contain;
        object-position: center;
        display: block;
    }

    /* Главная: полоса контента по центру экрана (симметричные отступы слева/справа) */
    .layout-home-catalog {
        --home-banner-ml: var(--home-content-inset);
        --home-banner-w: min(var(--site-content-width), calc(100vw - 2 * var(--home-content-inset)));
        --home-banner-w-dynamic: calc(
            var(--home-promo-right-edge-x, calc(var(--home-content-inset) + var(--home-banner-w))) -
                var(--home-banner-ml)
        );
        --home-content-w: calc(min(var(--home-banner-w), var(--home-banner-w-dynamic)) - 16px);
    }

    /* Широкий монитор: только симметричная колонка, без «схлопывания» по тумблеру темы */
    @media (min-width: 1680px) {
        .layout-home-catalog {
            --home-banner-w-dynamic: var(--home-banner-w);
            --home-content-w: calc(var(--home-banner-w) - 16px);
        }
    }

    .layout-home-catalog {
        /* Главный промо-баннер на десктопе — как на Ozon: высота 236px, скругление 24px */
        --home-promo-banner-height: 236px;
        --home-promo-banner-radius: var(--ozon-banner-radius-lg);
    }

    .layout-home-catalog .mobile-promo-wrap {
        min-width: 0;
        box-sizing: border-box;
        margin-top: 12px;
        margin-bottom: 12px;
        margin-left: var(--home-banner-ml);
        margin-right: auto;
        width: min(var(--home-banner-w-dynamic), var(--home-banner-w));
        max-width: none;
    }

    .layout-home-catalog .mobile-promo-slider {
        min-height: var(--home-promo-banner-height);
        height: var(--home-promo-banner-height);
        border-radius: var(--home-promo-banner-radius);
    }

    .layout-home-catalog .mobile-promo-slide img {
        min-height: var(--home-promo-banner-height);
        height: var(--home-promo-banner-height);
        object-fit: cover;
        object-position: center;
        transform: none;
    }

    .layout-home-catalog .mobile-promo-slider[data-promo-adaptive-height="1"] {
        min-height: 0;
        height: auto;
        border-radius: var(--home-promo-banner-radius);
    }

    .layout-home-catalog .mobile-promo-slider[data-promo-adaptive-height="1"] .mobile-promo-slide img {
        min-height: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transform: none;
    }

    .layout-home-catalog .promo-nav-btn {
        width: 40px;
        height: 40px;
    }

    .layout-home-catalog .mobile-promo-dots {
        bottom: 12px;
    }

    .layout-home-catalog main {
        min-width: 0;
        box-sizing: border-box;
        margin-left: var(--home-banner-ml);
        margin-right: auto;
        width: var(--home-content-w);
        max-width: none;
    }

    .layout-home-catalog main .container {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

    .layout-home-catalog .site-footer .container {
        width: var(--home-content-w);
        max-width: none;
        margin-left: var(--home-banner-ml);
        margin-right: auto;
        box-sizing: border-box;
    }

    .layout-home-catalog .site-footer {
        width: auto;
        margin-left: 0;
        margin-right: 0;
    }

    /* Шапка: та же полоса по ширине, что и промо-баннер */
    .layout-home-catalog .desktop-top-bar-fixed .top-bar.container {
        width: min(var(--home-banner-w-dynamic), var(--home-banner-w));
        max-width: none;
        margin-left: var(--home-banner-ml);
        margin-right: auto;
        box-sizing: border-box;
    }

}

.hero {
    margin-top: 16px;
}

.hero-banner {
    background: linear-gradient(120deg, #e9f1ff 0%, #f8fbff 58%, #eef5ff 100%);
    border: 1px solid #dfe8fb;
    border-radius: var(--ozon-banner-radius-lg);
    padding: 28px;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 16px;
    align-items: center;
    box-shadow: 0 14px 32px rgba(17, 34, 68, 0.09);
}

.hero-label {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-banner h1 {
    margin: 0 0 10px;
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.hero-banner p {
    margin: 0 0 18px;
    color: #344054;
    max-width: 55ch;
}

.hero-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 11px 20px;
    border-radius: 11px;
    font-weight: 700;
}

.hero-banner img {
    width: 100%;
    max-width: 420px;
    justify-self: end;
}

.quick-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.quick-item {
    background: linear-gradient(180deg, #ffffff, #f9fbff);
    border: 1px solid #e2e9f7;
    border-radius: var(--catalog-card-radius);
    padding: 15px 12px;
    text-align: center;
    font-size: var(--home-category-chip-size);
    font-weight: var(--home-category-chip-weight);
    color: var(--text);
    box-shadow: 0 8px 18px rgba(17, 34, 68, 0.06);
    transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-item:hover {
    border-color: #cedaf1;
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(17, 34, 68, 0.11);
}

/* Главная: сетка чипов (legacy) */
.quick-grid.quick-grid--home-categories {
    align-content: start;
}

/* Главная: по одному разделу каталога = горизонтальная полоса как «Рекомендуем» */
.home-category-showcase-strip {
    margin-top: 0;
}

.home-category-showcase-strip--after-rail {
    margin-top: 18px;
}

.home-category-strip-title {
    margin: 0;
    font-size: var(--catalog-section-title-size);
    letter-spacing: -0.02em;
    font-weight: var(--catalog-section-title-weight);
    line-height: 1.2;
}

.home-category-strip-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Нижняя ссылка + «Показать ещё» — мобилка и планшет ≤1024px (на широком экране полоса горизонтальная со стрелками) */
.home-category-strip-mobile-footer {
    display: none;
}

@media (max-width: 1024px) {
    /* Вертикальная сетка 2 колонки вместо горизонтальной карусели */
    .home-category-showcase-strip.recently-viewed-block .home-category-showcase-strip-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-flow: row !important;
        grid-auto-columns: unset !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        scroll-snap-type: none !important;
        -webkit-overflow-scrolling: auto !important;
        gap: var(--catalog-grid-gap) !important;
        padding-bottom: 0 !important;
    }

    .home-category-strip-bottom-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: center;
        text-align: center;
        font-weight: 700;
        font-size: 13px;
        color: #1d4ed8;
        text-decoration: none;
        padding: 6px 14px;
        border-radius: 999px;
        border: 1px solid #60a5fa;
        background: transparent;
        transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    .home-category-strip-bottom-link:hover {
        background: #dbeafe;
        border-color: #3b82f6;
        color: #1e40af;
    }

    .home-category-strip-bottom-link:active {
        background: #bfdbfe;
    }

    .home-category-strip-bottom-link:focus-visible {
        outline: 2px solid rgba(59, 130, 246, 0.35);
        outline-offset: 2px;
    }

    .home-category-strip-mobile-footer .home-category-strip-show-more {
        width: 100%;
        justify-content: center;
    }
}

/* Главная: лимит рядов в товарных блоках + «Показать ещё» / «Показать все» */
.home-section-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 2px;
}

.home-section-show-more-btn,
.home-section-show-all-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 22px;
    border-radius: 999px;
    border: 1px solid #60a5fa;
    background: transparent;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.home-section-show-more-btn:hover,
.home-section-show-all-link:hover {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.home-section-show-more-btn[hidden] {
    display: none !important;
}

.home-products-section--desktop-rows.is-home-limit-js .home-products-section-grid > .product-card.is-home-product-hidden,
.home-products-section--desktop-rows.is-home-limit-js .home-category-showcase-strip-grid > .product-card.is-home-product-hidden,
.product-cross-sell-section--rows.is-home-limit-js .home-products-section-grid > .product-card.is-home-product-hidden {
    display: none !important;
}

/* Страница товара: «С этим покупают» — телефон 2×4, планшет 3×4 */
@media (max-width: 768px) {
    .product-cross-sell-section--rows:not(.is-home-limit-js) .home-products-section-grid > .product-card:nth-child(n + 9) {
        display: none !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .product-cross-sell-section--rows:not(.is-home-limit-js) .home-products-section-grid > .product-card:nth-child(n + 13) {
        display: none !important;
    }
}

/* Страница товара: «С этим покупают» — десктоп 2 ряда */
@media (min-width: 1025px) and (max-width: 1919px) {
    .product-cross-sell-section--rows:not(.is-home-limit-js) .home-products-section-grid > .product-card:nth-child(n + 11) {
        display: none !important;
    }
}

@media (min-width: 1920px) and (max-width: 2399px) {
    .product-cross-sell-section--rows:not(.is-home-limit-js) .home-products-section-grid > .product-card:nth-child(n + 13) {
        display: none !important;
    }
}

@media (min-width: 2400px) {
    .product-cross-sell-section--rows:not(.is-home-limit-js) .home-products-section-grid > .product-card:nth-child(n + 15) {
        display: none !important;
    }
}

/* Телефон: 2×2 = 4 карточки (до инициализации JS) */
@media (max-width: 768px) {
    .home-products-section--desktop-rows:not(.is-home-limit-js):not(.product-cross-sell-section--rows) .home-products-section-grid > .product-card:nth-child(n + 5),
    .home-products-section--desktop-rows:not(.is-home-limit-js):not(.product-cross-sell-section--rows) .home-category-showcase-strip-grid > .product-card:nth-child(n + 5) {
        display: none !important;
    }
}

/* Планшет: 2×2 = 4 карточки */
@media (min-width: 769px) and (max-width: 1024px) {
    .home-category-showcase-strip.recently-viewed-block .home-category-showcase-strip-grid.home-products-section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .home-products-section--desktop-rows:not(.is-home-limit-js):not(.product-cross-sell-section--rows) .home-products-section-grid > .product-card:nth-child(n + 5),
    .home-products-section--desktop-rows:not(.is-home-limit-js):not(.product-cross-sell-section--rows) .home-category-showcase-strip-grid > .product-card:nth-child(n + 5) {
        display: none !important;
    }
}

/* Десктоп: 3 ряда */
@media (min-width: 1025px) and (max-width: 1919px) {
    .home-products-section--desktop-rows:not(.is-home-limit-js) .home-products-section-grid > .product-card:nth-child(n + 16),
    .home-products-section--desktop-rows:not(.is-home-limit-js) .home-category-showcase-strip-grid > .product-card:nth-child(n + 16) {
        display: none !important;
    }
}

@media (min-width: 1920px) and (max-width: 2399px) {
    .home-products-section--desktop-rows:not(.is-home-limit-js) .home-products-section-grid > .product-card:nth-child(n + 19),
    .home-products-section--desktop-rows:not(.is-home-limit-js) .home-category-showcase-strip-grid > .product-card:nth-child(n + 19) {
        display: none !important;
    }
}

@media (min-width: 2400px) {
    .home-products-section--desktop-rows:not(.is-home-limit-js) .home-products-section-grid > .product-card:nth-child(n + 22),
    .home-products-section--desktop-rows:not(.is-home-limit-js) .home-category-showcase-strip-grid > .product-card:nth-child(n + 22) {
        display: none !important;
    }
}

.theme-dark .home-section-show-more-btn,
.theme-dark .home-section-show-all-link {
    border-color: #3b82f6;
    color: #93c5fd;
}

.theme-dark .home-section-show-more-btn:hover,
.theme-dark .home-section-show-all-link:hover {
    background: rgba(30, 64, 175, 0.35);
    color: #dbeafe;
}

/* Кнопка сворачивания категорий: только десктоп; на планшете/телефоне скрыта — каталог в панели фильтров как раньше */
.filter-sidebar-catalog-toggle-wrap,
.home-catalog-toggle-wrap {
    display: none;
}

@media (min-width: 1025px) {
    .filter-sidebar-catalog-toggle-wrap {
        display: block;
        margin-bottom: 0;
    }

    .filter-sidebar.sidebar-catalog-collapsed .filter-sidebar-catalog-toggle-wrap {
        margin-bottom: 12px;
    }

    .filter-sidebar-catalog-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        text-align: left;
        font-weight: 700;
        padding: 10px 13px;
        border-radius: 10px;
    }

    .filter-sidebar.sidebar-catalog-collapsed .filter-sidebar-catalog-toggle-text-expanded {
        display: none;
    }

    .filter-sidebar:not(.sidebar-catalog-collapsed) .filter-sidebar-catalog-toggle-text-collapsed {
        display: none;
    }

    .filter-sidebar-catalog-toggle-chevron {
        flex-shrink: 0;
        font-size: 10px;
        line-height: 1;
        opacity: 0.75;
        transition: transform 0.2s ease;
    }

    .filter-sidebar:not(.sidebar-catalog-collapsed) .filter-sidebar-catalog-toggle-chevron {
        transform: rotate(180deg);
    }

    .filter-sidebar.sidebar-catalog-collapsed .filter-sidebar-catalog-shell {
        display: none;
    }

    /* Кнопка «Каталог» в шапке на всех страницах с деревом категорий */
    .layout-header-catalog .header-home-catalog-toggle {
        display: flex;
        align-items: stretch;
        flex-shrink: 1;
        min-width: 0;
        margin-left: 10px;
    }

    /* Логотип + «Каталог» — оранжевая кнопка как на макете (☰ + текст) */
    .layout-header-catalog .top-bar-brand-slot {
        gap: 10px;
        align-items: center;
    }

    .layout-header-catalog .top-bar-brand-slot .brand {
        padding: 4px 0;
    }

    .header-home-catalog-toggle .home-catalog-toggle {
        width: auto;
        max-width: none;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-align: left;
        font-weight: 700;
        font-size: 14px;
        margin: 0;
        min-height: 40px;
        height: 40px;
        padding: 0 16px;
        border: 0;
        border-radius: 10px;
        background: var(--primary);
        box-shadow: none;
        color: #fff;
        cursor: pointer;
        white-space: nowrap;
        transition: background 0.16s ease, filter 0.16s ease;
    }

    .header-home-catalog-toggle .home-catalog-toggle::before {
        content: "";
        display: block;
        width: 15px;
        height: 11px;
        flex-shrink: 0;
        background:
            linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
            linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
            linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
        color: #fff;
    }

    .header-home-catalog-toggle:not(.home-catalog-sidebar-collapsed) .home-catalog-toggle::before {
        display: none;
    }

    .header-home-catalog-toggle .home-catalog-toggle:hover {
        background: var(--primary-dark);
        box-shadow: none;
        filter: brightness(1.02);
    }

    .header-home-catalog-toggle .home-catalog-toggle:focus-visible {
        outline: 2px solid var(--primary-dark);
        outline-offset: 2px;
    }

    .header-home-catalog-toggle.home-catalog-sidebar-collapsed .home-catalog-toggle-text-expanded {
        display: none;
    }

    .header-home-catalog-toggle:not(.home-catalog-sidebar-collapsed) .home-catalog-toggle-text-collapsed {
        display: none;
    }

    .header-home-catalog-toggle.home-catalog-sidebar-collapsed .home-catalog-toggle-chevron {
        display: none;
    }

    .header-home-catalog-toggle .home-catalog-toggle-chevron {
        flex-shrink: 0;
        font-size: 10px;
        line-height: 1;
        opacity: 0.92;
        color: #fff;
        transition: transform 0.2s ease;
    }

    .header-home-catalog-toggle:not(.home-catalog-sidebar-collapsed) .home-catalog-toggle-chevron {
        transform: rotate(180deg);
    }

    .layout-header-catalog .category-nav-home.home-catalog-sidebar-collapsed .home-catalog-mega-shell,
    .layout-header-catalog .category-nav-external.home-catalog-sidebar-collapsed .home-catalog-mega-shell {
        display: none;
    }
}

.filter-sidebar-catalog-shell {
    margin-bottom: 12px;
}

.filter-sidebar-catalog-shell .category-nav-sidebar-mega {
    border-bottom: 0;
}

.filter-sidebar-catalog-shell .mega-menu.container {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu {
    display: block;
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    padding: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}

.filter-sidebar-catalog-shell .mega-menu-submenus {
    display: none !important;
}

.filter-sidebar-catalog-shell .mega-menu-categories {
    border: 0;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    max-height: none;
    overflow: visible;
}

.filter-sidebar .filter-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e7ecf7;
}

.filter-sidebar > .filter-form:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.home-showcase-section {
    margin: 18px auto 8px;
}

@media (min-width: 1025px) {
    .layout-home-catalog .home-showcase-section {
        min-width: 0;
        box-sizing: border-box;
        margin-left: var(--home-banner-ml);
        margin-right: auto;
        width: min(var(--home-banner-w-dynamic), var(--home-banner-w));
        max-width: none;
    }
}

.home-showcase-arrows {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 8px;
}

.home-showcase-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--carousel-rail-arrow-border);
    background: var(--carousel-rail-arrow-bg);
    color: var(--carousel-rail-arrow-fg);
    box-shadow: var(--carousel-rail-arrow-shadow);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.home-showcase-arrow:hover:not(:disabled) {
    background: var(--carousel-rail-arrow-bg-hover);
    color: var(--carousel-rail-arrow-fg-hover);
}

.home-showcase-arrow:disabled {
    opacity: 0.42;
    cursor: default;
}

.home-showcase-arrow:focus-visible {
    outline: 2px solid rgba(255, 103, 0, 0.55);
    outline-offset: 2px;
}

.home-showcase-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    cursor: grab;
    user-select: none;
}

.home-showcase-track::-webkit-scrollbar {
    display: none;
}

.home-showcase-track.is-dragging {
    cursor: grabbing;
}

.home-showcase-track.is-dragging .home-showcase-card {
    cursor: grabbing;
}

.home-showcase-card {
    flex: 0 0 calc((100% - 50px) / 6);
    min-width: 132px;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: grab;
    text-align: left;
    scroll-snap-align: start;
    color: var(--text);
    border-radius: var(--catalog-card-radius);
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.home-showcase-card img {
    width: 100%;
    aspect-ratio: var(--product-photo-aspect);
    height: auto;
    border-radius: 0;
    object-fit: contain;
    object-position: center;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
    cursor: inherit;
}

.home-showcase-title {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

.home-showcase-progress {
    position: relative;
    height: 4px;
    border-radius: 999px;
    background: rgba(34, 158, 217, 0.25);
    overflow: hidden;
    width: min(420px, 72%);
    margin: 0 auto;
}

.home-showcase-progress-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 28%;
    border-radius: inherit;
    background: #ff6700;
    transition: left 0.2s ease, width 0.2s ease;
}

.home-showcase-modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: none;
}

.home-showcase-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 48px;
    box-sizing: border-box;
}

.home-showcase-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(2, 6, 23, 0.56);
    backdrop-filter: blur(2px);
}

.home-showcase-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1720px, calc(100% - 32px));
    margin: 0;
    background: transparent;
    border-radius: 0;
    padding: 44px 12px 28px;
    box-shadow: none;
}

.home-showcase-modal-close {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 0;
    background: rgba(15, 23, 42, 0.5);
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.home-showcase-modal-content {
    display: grid;
    grid-template-columns: auto minmax(0, 0.95fr) minmax(0, 1.25fr) minmax(0, 0.95fr) auto;
    align-items: center;
    justify-items: stretch;
    justify-content: center;
    column-gap: 72px;
    row-gap: 16px;
    touch-action: pan-x pan-y;
}

.home-showcase-modal-arrow {
    position: relative;
    z-index: 5;
    align-self: center;
    justify-self: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
}

.home-showcase-modal-arrow.is-prev,
.home-showcase-modal-arrow.is-next {
    margin-inline: 0;
}

.home-showcase-modal-main {
    position: relative;
    z-index: 2;
    width: min(655px, 100%);
    max-width: 100%;
    margin-inline: auto;
    justify-self: center;
    align-self: center;
    aspect-ratio: var(--product-photo-aspect);
    max-height: min(85vh, 1020px);
    border-radius: var(--ozon-banner-radius-lg);
    overflow: hidden;
    box-shadow: 0 28px 44px rgba(2, 6, 23, 0.5);
}

.home-showcase-modal-main img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    -webkit-user-drag: none;
    user-select: none;
}

.home-showcase-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 270px;
    height: 46px;
    border-radius: 12px;
    background: #ffcc00;
    color: #111827;
    font-weight: 800;
    text-decoration: none;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

.home-showcase-buy-btn--side {
    min-width: min(200px, calc(100% - 24px));
    height: 38px;
    font-size: 13px;
    bottom: 14px;
    border-radius: 10px;
}

.home-showcase-side-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    align-self: center;
}

.home-showcase-side-frame {
    position: relative;
    width: calc(100% / 1.1);
    max-width: calc(100% / 1.1);
    margin-inline: auto;
    aspect-ratio: var(--product-photo-aspect);
    border-radius: var(--ozon-panel-radius);
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.38);
    opacity: 0.72;
    filter: saturate(0.88);
}

.home-showcase-side-preview {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    background: #0f172a;
    display: block;
}

.home-showcase-side-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    -webkit-user-drag: none;
    user-select: none;
}

body.home-showcase-modal-open {
    overflow: hidden;
}

/* Витрина модалка: ≤1024 — одно фото + стрелки снизу (планшет, альбом, узкий экран) */
@media (max-width: 1024px) {
    .home-showcase-modal.is-open {
        padding: min(16px, 3vw) min(12px, 2vw) min(20px, 4vw);
        align-items: center;
        justify-content: center;
    }

    .home-showcase-modal-dialog {
        width: 100%;
        max-width: 100%;
        padding: min(44px, 11vw) min(8px, 2vw) min(16px, 4vw);
        box-sizing: border-box;
    }

    .home-showcase-modal-content {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto auto;
        gap: min(18px, 3vw) min(14px, 3vw);
        align-items: center;
        justify-items: center;
        width: 100%;
        max-width: 100%;
        padding-inline: 0;
        box-sizing: border-box;
    }

    .home-showcase-side-wrap {
        display: none !important;
    }

    .home-showcase-modal-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        font-size: 26px;
        line-height: 1;
        margin: 0 !important;
        border-radius: 999px;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2);
    }

    .home-showcase-modal-main {
        grid-column: 1 / -1;
        grid-row: 1;
        width: min(calc((min(100dvh, 100vh) - 180px) * 0.66), 92vw);
        max-width: min(655px, 92vw);
        max-height: calc(min(100dvh, 100vh) - 180px);
        margin-inline: auto;
        align-self: center;
        justify-self: center;
    }

    .home-showcase-modal-arrow.is-prev {
        grid-column: 1;
        grid-row: 2;
        justify-self: end;
        margin-right: 8px !important;
    }

    .home-showcase-modal-arrow.is-next {
        grid-column: 3;
        grid-row: 2;
        justify-self: start;
        margin-left: 8px !important;
    }
}

/* Портретная мобилка: компактное фото + стрелки снизу (навигация как свайп) */
@media (max-width: 768px) and (orientation: portrait) {
    .home-showcase-modal.is-open {
        padding: 8px 10px 20px;
        align-items: center;
    }

    .home-showcase-modal-dialog {
        padding: 42px 6px 12px;
    }

    .home-showcase-modal-content {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto auto;
        gap: 16px 12px;
        align-items: center;
        justify-items: center;
        width: 100%;
        max-width: 100%;
    }

    .home-showcase-side-wrap {
        display: none !important;
    }

    .home-showcase-modal-arrow {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        font-size: 26px;
        line-height: 1;
        margin: 0 !important;
        border-radius: 999px;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2);
    }

    .home-showcase-modal-main {
        grid-column: 1 / -1;
        grid-row: 1;
        width: min(calc((min(100dvh, 100vh) - 210px) * 0.66), 78vw);
        max-width: min(380px, 78vw);
        max-height: calc(min(100dvh, 100vh) - 210px);
        margin-inline: auto;
    }

    .home-showcase-modal-arrow.is-prev {
        grid-column: 1;
        grid-row: 2;
        justify-self: end;
        margin-right: 6px !important;
    }

    .home-showcase-modal-arrow.is-next {
        grid-column: 3;
        grid-row: 2;
        justify-self: start;
        margin-left: 6px !important;
    }

    .home-showcase-buy-btn {
        min-width: min(220px, calc(100% - 28px));
        height: 40px;
        bottom: max(12px, env(safe-area-inset-bottom, 12px));
        font-size: 14px;
    }
}

.promo-discounts-section {
    margin: 22px auto 8px;
}

.promo-discounts-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--catalog-grid-gap);
}

@media (min-width: 769px) {
    .promo-discounts-track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .promo-discounts-track {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1440px) {
    .promo-discounts-track {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.promo-discount-card {
    position: relative;
    background: var(--surface);
    border: 1px solid #e2e9f7;
    border-radius: var(--catalog-card-radius);
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(17, 34, 68, 0.07);
}

.promo-discount-image {
    display: block;
    background: #f6f9ff;
}

.promo-discount-image img {
    width: 100%;
    aspect-ratio: var(--product-photo-aspect);
    object-fit: contain;
    object-position: center;
    display: block;
    background: #f0f4fc;
}

.promo-discount-body {
    padding: 10px;
}

.promo-discount-badge {
    display: inline-block;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 3px 8px;
    margin-bottom: 6px;
}

.promo-discount-old-price {
    margin: 0;
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 13px;
}

.promo-discount-new-price {
    margin: 2px 0 6px;
    color: var(--text);
    font-weight: 800;
    font-size: 18px;
}

.promo-discount-title {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.35;
    min-height: 38px;
}

.products-section {
    margin: 26px auto 38px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 0;
    font-size: var(--catalog-section-title-size);
    letter-spacing: -0.02em;
    font-weight: var(--catalog-section-title-weight);
}

/* Главная: заголовки секций тоньше */
body.layout-home-catalog .section-head h2 {
    font-weight: var(--catalog-section-title-weight);
}

/* Витрина: оранжевая полоса под текстом заголовка (не под стрелками карусели) */
.products-section:not(.cart-page):not(.checkout-section):not(.news-page):not(.cart-feed-section) .section-head:not(.checkout-head):not(.cart-page-head):not(.compare-page-head),
.home-category-showcase-strip .section-head.recommended-products-section-head,
.category-content .section-head {
    margin-bottom: var(--catalog-section-head-gap);
    padding-bottom: 0;
    border-bottom: none;
    gap: 10px 14px;
}

.products-section:not(.cart-page):not(.checkout-section):not(.news-page):not(.cart-feed-section) .section-head:not(.checkout-head):not(.cart-page-head):not(.compare-page-head) + .product-grid,
.products-section:not(.cart-page):not(.checkout-section):not(.news-page):not(.cart-feed-section) .section-head:not(.checkout-head):not(.cart-page-head):not(.compare-page-head) + .recommended-products-carousel,
.home-category-showcase-strip .section-head.recommended-products-section-head + .home-category-showcase-strip-grid,
.home-category-showcase-strip .section-head.recommended-products-section-head + .recommended-products-carousel {
    margin-top: 0;
}

.products-section:not(.cart-page):not(.checkout-section):not(.news-page):not(.cart-feed-section) .section-head:not(.checkout-head):not(.cart-page-head):not(.compare-page-head) h2,
.home-category-strip-title,
.related-products .home-category-strip-title,
.cart-feed-section .home-category-strip-title,
.category-content .section-head h2 {
    flex: 1 1 auto;
    display: block;
    position: relative;
    top: -5px;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0 0 6px;
    color: var(--text);
    line-height: 1.12;
    letter-spacing: -0.03em;
    border-bottom: var(--catalog-section-head-divider-width) solid var(--catalog-section-head-divider);
}

.home-category-strip-title a:hover {
    color: var(--primary);
}

.cart-page-empty {
    margin: 0;
    padding: 28px 20px;
    width: 100%;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: #64748b;
}

.cart-page-subtitle {
    margin: 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.cart-page-mobile {
    display: block;
}

.favorites-page .section-head {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.favorites-page .section-head > div {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.favorites-page .section-head h2 {
    width: 100%;
    text-align: center;
    font-size: clamp(34.56px, 4.32vw, 46.08px);
    font-weight: var(--catalog-section-title-weight);
    line-height: 1.15;
}

.favorites-page .section-head .checkout-page-subtitle {
    width: 100%;
    text-align: center;
}

.favorites-page .section-head .product-meta,
.favorites-page .favorites-page-count {
    margin: 0 auto;
    text-align: center;
}

.favorites-page-empty {
    margin: 0;
    padding: 28px 20px;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: #64748b;
}

.ghost-btn {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fff, #f8fbff);
    padding: 9px 13px;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

a.ghost-btn,
button.ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
}

.ghost-btn:hover {
    border-color: #cdd8ed;
    box-shadow: 0 8px 16px rgba(17, 34, 68, 0.08);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--catalog-grid-gap);
    grid-auto-rows: 1fr;
}

.product-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 769px) {
    .product-grid,
    .product-grid.compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    /* Витрина как у Ozon: 5 карточек в ряд на десктопе (шире карточка) */
    .product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .product-grid.compact {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .category-layout .product-grid,
    .category-layout #categoryProductGrid.product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .category-layout .product-grid.compact {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1440px) {
    .product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .product-grid.compact {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .category-layout .product-grid,
    .category-layout #categoryProductGrid.product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .category-layout .product-grid.compact {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1920px) {
    .product-grid,
    .product-grid.compact,
    .category-layout .product-grid,
    .category-layout #categoryProductGrid.product-grid,
    .category-layout .product-grid.compact,
    .recently-viewed-block .product-grid,
    .recently-viewed-block .home-category-showcase-strip-grid,
    .category-layout .recently-viewed-block .product-grid,
    .category-layout .recently-viewed-block .home-category-showcase-strip-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (min-width: 2400px) {
    .product-grid,
    .product-grid.compact,
    .category-layout .product-grid,
    .category-layout #categoryProductGrid.product-grid,
    .category-layout .product-grid.compact,
    .recently-viewed-block .product-grid,
    .recently-viewed-block .home-category-showcase-strip-grid,
    .category-layout .recently-viewed-block .product-grid,
    .category-layout .recently-viewed-block .home-category-showcase-strip-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

/* Ленты товаров (недавние, рекомендации, «с этим покупают» и т.д.) — единая сетка карточек */
.recently-viewed-block .product-grid,
.recently-viewed-block .home-category-showcase-strip-grid {
    grid-auto-rows: auto;
    align-items: stretch;
}

.recently-viewed-block .recommended-products-section-actions {
    display: none !important;
}

@media (min-width: 1025px) {
    .recently-viewed-block .product-grid,
    .recently-viewed-block .home-category-showcase-strip-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: var(--catalog-grid-gap);
    }

    .category-layout .recently-viewed-block .product-grid,
    .category-layout .recently-viewed-block .home-category-showcase-strip-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1440px) {
    .recently-viewed-block .product-grid,
    .recently-viewed-block .home-category-showcase-strip-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .category-layout .recently-viewed-block .product-grid,
    .category-layout .recently-viewed-block .home-category-showcase-strip-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* На мобилке и планшете — 2 карточки в ряд на главной */
@media (max-width: 1024px) {
    .recently-viewed-block .product-grid,
    .recently-viewed-block .home-category-showcase-strip-grid,
    .home-products-section--desktop-rows .home-products-section-grid,
    .home-category-showcase-strip .home-category-showcase-strip-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-flow: row !important;
        grid-auto-columns: auto !important;
        overflow-x: visible !important;
        scroll-snap-type: none !important;
    }

    .category-layout .recently-viewed-block .product-grid,
    .category-layout .recently-viewed-block .home-category-showcase-strip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--catalog-card-radius);
    overflow: hidden;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
    height: 100%;
}

.product-card:hover {
    transform: none;
    border-color: #dcdcdc;
    box-shadow: 0 4px 16px rgba(0, 26, 52, 0.1);
}

.news-grid {
    display: flex;
    gap: 8px;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

.news-slider-outer {
    margin-top: 4px;
}

/* Главная лента новостей: разрешаем вертикальный скролл страницы при жесте по блоку (pan-x блокирует pan-y) */
.news-slider-outer .news-grid[data-news-slider="1"] {
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
}

.news-slider-outer.is-disabled .news-slider-arrows,
.news-slider-outer.is-disabled .news-slider-progress {
    display: none !important;
}

.news-slider-arrows.is-hidden {
    display: none !important;
}

.news-slider-progress.is-hidden {
    display: none !important;
}

.news-slider-outer .home-showcase-progress {
    margin-top: 8px;
}

.news-section-left .section-head.news-section-head {
    flex-wrap: nowrap;
    gap: 10px 14px;
    align-items: center;
}

.news-section-left .section-head.news-section-head h2 {
    flex: 1;
    min-width: 0;
}

.news-section-left .section-head .news-slider-arrows.home-showcase-arrows {
    margin-bottom: 0;
    flex-shrink: 0;
}

.news-section-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.news-all-link {
    text-decoration: none;
    width: auto;
}

.news-title-link {
    color: inherit;
    text-decoration: none;
}

.news-title-link:hover {
    color: var(--brand);
}

.news-grid:not(.is-slider-disabled) {
    cursor: grab;
    user-select: none;
}

.news-grid:not(.is-slider-disabled).is-dragging {
    cursor: grabbing;
}

.news-grid:not(.is-slider-disabled) .news-card {
    cursor: grab;
}

.news-grid.is-dragging .news-card {
    cursor: grabbing;
}

/* Слайдер новостей: как витрина — ладонь и на фото (ссылка не подменяет курсор) */
.news-slider-outer .news-grid:not(.is-slider-disabled) a.news-card-image {
    cursor: grab;
}

.news-slider-outer .news-grid.is-dragging a.news-card-image {
    cursor: grabbing;
}

.news-slider-outer .news-grid:not(.is-slider-disabled) .news-card-body,
.news-slider-outer .news-grid:not(.is-slider-disabled) .news-card-body * {
    cursor: grab;
}

.news-slider-outer .news-grid.is-dragging .news-card-body,
.news-slider-outer .news-grid.is-dragging .news-card-body * {
    cursor: grabbing;
}

.news-card-image img {
    -webkit-user-drag: none;
    user-select: none;
}

.news-slider-outer .news-grid:not(.is-slider-disabled) .news-card-image img {
    pointer-events: none;
}

.news-grid::-webkit-scrollbar {
    height: 8px;
}

.news-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.news-grid::-webkit-scrollbar-track {
    background: transparent;
}

.news-section-left .news-grid {
    scrollbar-width: none;
}

.news-section-left .news-grid::-webkit-scrollbar {
    display: none;
}

.news-grid .news-card {
    flex: 0 0 270px;
    scroll-snap-align: start;
    height: 100%;
}

.news-grid.is-slider-disabled {
    overflow: visible;
    scroll-snap-type: none;
    flex-wrap: wrap;
}

.news-grid.news-grid-all {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
    gap: 8px;
    /* Базовый .news-grid задаёт touch-action: pan-x — на странице «все новости» это ломает вертикальный скролл */
    touch-action: auto;
    cursor: default;
    user-select: text;
    -webkit-user-select: text;
}

.news-grid.news-grid-all .news-card {
    flex: initial;
    cursor: default;
    user-select: text;
    -webkit-user-select: text;
}

.news-section-left .section-head,
.news-section-left .news-grid {
    max-width: none;
    margin-right: 0;
}

.news-section-left .news-grid .news-card {
    flex: 0 0 calc((100% - 24px) / 4);
}

.news-card {
    background: var(--surface);
    border: 1px solid #e7ebf3;
    border-radius: var(--catalog-card-radius);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.news-card:hover {
    transform: translateY(-2px);
    border-color: #d6deec;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.news-card-image {
    display: block;
    position: relative;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.news-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: flex-start;
    min-height: 102px;
}

.news-card-date {
    margin: 0 0 6px;
    color: #94a3b8;
    font-size: 12px;
}

.news-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.35em * 2);
}

.news-card-readmore {
    margin-top: auto;
    align-self: center;
}

.news-card-excerpt {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.news-grid .news-card .news-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-readmore {
    margin-top: auto;
    align-self: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    color: #1d4ed8;
    border: 1px solid #60a5fa;
    border-radius: 999px;
    padding: 6px 14px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.news-card-readmore:hover {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.news-card-single {
    max-width: 860px;
    margin: 0 auto;
}


.favorite-btn {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 4;
    width: auto;
    height: auto;
    border: 0;
    background: transparent;
    border-radius: 0;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 0;
    text-shadow: 0 2px 8px rgba(15, 23, 42, 0.45);
    transition: transform 0.18s ease, color 0.18s ease;
}

.favorite-btn:hover {
    transform: scale(1.08);
    color: #f8fafc;
}

.favorite-btn.is-active {
    color: #ef4444;
    text-shadow: 0 2px 8px rgba(127, 29, 29, 0.45);
}

.preorder-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    border-radius: 999px;
    background: #f97316;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 10px;
    box-shadow: 0 6px 14px rgba(249, 115, 22, 0.28);
}

.product-card-image-bottom-right-badges {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    max-width: 100%;
    pointer-events: none;
}

.product-card-image-bottom-badges {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-width: 100%;
    pointer-events: none;
}

.product-image-wrap.has-gallery.has-image-bottom-badge .product-card-image-bottom-badges {
    bottom: 0;
}

.product-card-image-badge,
.product-card-sale-badge,
.product-card-sale-percent-badge,
.product-card-in-stock-image-badge,
.product-card-out-of-stock-image-badge,
.product-card-preorder-image-badge,
.product-card-waiting-image-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px 10px 3px 8px;
    border-radius: 0 6px 6px 0;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card-new-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    width: 92px;
    height: 92px;
    overflow: hidden;
    pointer-events: none;
}

.product-card-new-badge {
    position: absolute;
    top: 26px;
    left: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 112px;
    padding: 3px 14px;
    border-radius: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    text-align: center;
    transform: translate(-50%, -50%) rotate(-45deg);
    transform-origin: center center;
    background: #2563eb;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.product-card-sale-badge {
    background: #a21caf;
    box-shadow: 0 2px 8px rgba(162, 28, 175, 0.32);
}

.product-card-sale-percent-badge {
    background: #fbcfe8;
    color: #000;
    box-shadow: 0 2px 8px rgba(251, 207, 232, 0.55);
}

.product-card-bestseller-image-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px 8px 3px 10px;
    border-radius: 6px 0 0 6px;
    color: #000;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #e2e8f0;
    box-shadow: 0 2px 8px rgba(226, 232, 240, 0.55);
}

.product-card-bestseller-image-badge--stacked-left {
    padding: 3px 10px 3px 8px;
    border-radius: 0 6px 6px 0;
}

.product-card-in-stock-image-badge {
    background: #15803d;
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.32);
}

.product-card-preorder-image-badge {
    background: #0d9488;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.32);
}

.product-card-waiting-image-badge {
    background: #0891b2;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.32);
}

.product-card-out-of-stock-image-badge {
    background: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.32);
}

@media (max-width: 768px) {
    .product-card-image-bottom-badges {
        gap: 0;
        transform: scale(0.75);
        transform-origin: bottom left;
    }

    .product-card-image-bottom-right-badges {
        transform: scale(0.75);
        transform-origin: bottom right;
    }

    .product-card-new-ribbon {
        transform: scale(0.75);
        transform-origin: top left;
    }

    .product-card .product-location-badges {
        transform: scale(0.75);
        transform-origin: bottom right;
    }
}

.product-image-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 4;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

.product-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    border: 1px solid transparent;
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-sans);
    letter-spacing: 0.01em;
    line-height: 1;
    padding: 4px 8px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
    white-space: nowrap;
    text-transform: none;
}

.product-status-badge.is-hot {
    background: #ff8b3d;
    border-color: #f97316;
}

.product-status-badge.is-preorder {
    background: #fb923c;
    border-color: #f97316;
}

.product-status-badge.is-waiting {
    background: #14b8a6;
    border-color: #0d9488;
}

.product-status-badge.is-out {
    background: #ef4444;
    border-color: #dc2626;
}

.promo-discount-image {
    position: relative;
    overflow: hidden;
}

.product-location-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.product-image-wrap .product-location-badge img,
.product-location-badge img {
    position: static;
    inset: auto;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    object-fit: cover;
    background: transparent;
    transform: none;
    display: block;
}

.zoom-image-wrap .product-location-badge img,
.zoom-image-wrap--mobile-slide .product-location-badge img {
    width: 57px;
    height: 57px;
}

.zoom-image-wrap .product-location-badges,
.zoom-image-wrap--mobile-slide .product-location-badges {
    bottom: 28px !important;
}

.product-location-badges {
    position: absolute;
    left: auto !important;
    right: 20px !important;
    inset-inline-start: auto !important;
    inset-inline-end: 20px !important;
    top: auto !important;
    bottom: 10px !important;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    pointer-events: none;
}

.product-image-wrap .product-location-badges {
    bottom: 16px !important;
}

.product-grid.compact .product-status-badge {
    font-size: 9px;
    padding: 3px 7px;
    border-radius: 7px;
}

.product-grid.compact .product-location-badge img {
    width: 36px;
    height: 36px;
}

.product-detail {
    background: var(--surface);
    border-radius: var(--ozon-panel-radius);
    box-shadow: var(--shadow);
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(240px, 420px) 1fr;
    gap: 20px;
}

.product-detail img {
    width: 100%;
    border-radius: var(--ozon-media-radius);
    background: #f8f9ff;
}

.product-detail-page {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: start;
}

.product-detail-hero {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.01fr) minmax(280px, 0.99fr);
    gap: 26px;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e6ebf3;
    border-radius: var(--ozon-panel-radius);
    box-shadow: 0 14px 34px rgba(17, 34, 68, 0.1);
    padding: 18px;
}

.product-detail-hero .product-gallery,
.product-detail-hero .product-main-info {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

@media (min-width: 1025px) {
    .product-detail-hero .product-gallery {
        border-right: 1px solid #e8edf5;
        padding-right: 22px;
    }

    .product-detail-hero .product-main-info {
        padding-left: 2px;
    }
}

.product-gallery,
.product-main-info,
.related-products {
    background: #fff;
    border: 1px solid #e6ebf3;
    border-radius: var(--ozon-panel-radius);
    box-shadow: 0 14px 34px rgba(17, 34, 68, 0.1);
    padding: 18px;
}

.product-gallery {
    max-width: none;
    width: 100%;
}

.product-gallery-desktop-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.product-gallery-mobile-scroll {
    display: none;
}

.product-gallery-mobile-slide {
    box-sizing: border-box;
}

.product-gallery-mobile-slide-inner {
    position: relative;
}

.product-gallery-mobile-fs-btn {
    top: 12px;
    right: 12px;
}

.zoom-image-wrap--mobile-slide {
    position: relative;
    border: 1px solid #e7edf8;
    border-radius: var(--ozon-media-radius);
    overflow: hidden;
    background: radial-gradient(circle at 30% 20%, #ffffff 0%, #fafafa 74%, #f3f3f3 100%);
}

.zoom-image-wrap--mobile-slide > img {
    width: 100%;
    display: block;
    aspect-ratio: var(--product-photo-aspect);
    object-fit: contain;
    object-position: center;
}

.product-main-media {
    position: relative;
    margin-bottom: 0;
}

.product-main-media-nav {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 7;
}

.product-gallery-nav-btn--overlay {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.5) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.24) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.product-gallery-nav-btn--overlay:hover {
    background: rgba(0, 0, 0, 0.55) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.62) !important;
}

.media-fullscreen-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
}

.product-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 9px 14px 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.24);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.product-fullscreen-btn:hover {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(255, 255, 255, 0.72);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3);
}

.product-fullscreen-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.22);
}

.product-fullscreen-btn__icon {
    flex-shrink: 0;
    display: block;
}

.product-fullscreen-btn__label {
    white-space: nowrap;
}

.theme-dark .product-fullscreen-btn {
    background: rgba(2, 6, 15, 0.62);
    border-color: rgba(148, 163, 184, 0.45);
    color: #f1f5f9;
}

.theme-dark .product-fullscreen-btn:hover {
    background: rgba(2, 6, 15, 0.78);
    border-color: rgba(226, 232, 240, 0.55);
}

.theme-dark .product-gallery-counter {
    color: #c9d6ea;
}

.theme-dark .product-gallery-nav-btn--overlay {
    background: rgba(2, 6, 15, 0.5) !important;
    border-color: rgba(148, 163, 184, 0.5) !important;
}

.theme-dark .product-gallery-nav-btn--overlay:hover {
    background: rgba(0, 0, 0, 0.58) !important;
    border-color: rgba(226, 232, 240, 0.6) !important;
}

.zoom-image-wrap {
    position: relative;
    border: 1px solid #e7edf8;
    border-radius: var(--ozon-media-radius);
    overflow: hidden;
    background: radial-gradient(circle at 30% 20%, #ffffff 0%, #fafafa 74%, #f3f3f3 100%);
}

.zoom-image-wrap .product-image-badges {
    z-index: 5;
}

.zoom-image-wrap > img {
    width: 100%;
    display: block;
    transition: transform 0.26s ease;
    cursor: zoom-in;
    aspect-ratio: var(--product-photo-aspect);
    object-fit: contain;
    object-position: center;
}

.product-gallery-desktop-row .zoom-image-wrap:hover > img {
    transform: scale(1.025);
}

.thumbnail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    padding-right: 2px;
}

.thumbnail-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 8px;
}

.thumbnail-list-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.thumbnail-list-scroll-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--carousel-rail-arrow-border);
    background: var(--carousel-rail-arrow-bg);
    color: var(--carousel-rail-arrow-fg);
    box-shadow: var(--carousel-rail-arrow-shadow);
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.thumbnail-list-scroll-btn:hover {
    background: var(--carousel-rail-arrow-bg-hover);
    color: var(--carousel-rail-arrow-fg-hover);
}

.thumbnail-list-scroll-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.thumbnail-btn {
    position: relative;
    border: 1px solid #e3e9f4;
    background: #f4f7fd;
    border-radius: var(--ozon-media-radius);
    padding: 2px;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.thumbnail-btn.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 105, 0, 0.16);
}

.thumbnail-btn:hover {
    transform: translateY(-1px);
    border-color: #b9c8e8;
}

.thumbnail-btn img {
    width: 100%;
    display: block;
    border-radius: var(--ozon-thumb-radius);
    aspect-ratio: var(--product-photo-aspect);
    object-fit: contain;
    object-position: center;
}

.thumbnail-btn--video .thumbnail-video-play {
    position: absolute;
    inset: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ozon-thumb-radius);
    background: rgba(15, 23, 42, 0.38);
    pointer-events: none;
}

.thumbnail-btn--video .thumbnail-video-play::after {
    content: '';
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff;
}

.product-gallery-main-video {
    display: none;
    width: 100%;
    aspect-ratio: var(--product-photo-aspect);
    object-fit: contain;
    object-position: center;
    background: #000;
    border-radius: var(--ozon-media-radius);
}

.zoom-image-wrap.is-video-active .product-gallery-main-video {
    display: block;
}

.zoom-image-wrap.is-video-active > img {
    display: none;
}

.product-gallery-mobile-slide-video {
    width: 100%;
    display: block;
    aspect-ratio: var(--product-photo-aspect);
    object-fit: contain;
    object-position: center;
    background: #000;
    border-radius: var(--ozon-media-radius);
}

.zoom-image-wrap--mobile-video {
    background: #000;
}

.product-gallery-nav {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

@media (min-width: 1025px) {
    .product-gallery-nav {
        width: 100%;
        margin-left: 0;
    }
}

.product-gallery-nav-thumbs-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-gallery-nav-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.product-gallery-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--carousel-rail-arrow-border);
    background: var(--carousel-rail-arrow-bg);
    color: var(--carousel-rail-arrow-fg);
    box-shadow: var(--carousel-rail-arrow-shadow);
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.product-gallery-nav-btn:not(.product-gallery-nav-btn--overlay):hover {
    background: var(--carousel-rail-arrow-bg-hover);
    color: var(--carousel-rail-arrow-fg-hover);
}

.product-gallery-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.product-gallery-counter {
    min-width: 72px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.product-gallery-mobile-dots {
    display: none;
}

@media (max-width: 1024px) {
    .product-gallery {
        overflow: hidden;
    }

    .product-gallery-desktop-row {
        display: none;
    }

    .thumbnail-list-scroll-btn {
        display: none;
    }

    .product-main-media-nav {
        display: none;
    }

    .product-gallery-nav {
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    .product-gallery-counter {
        display: none;
    }

    .product-gallery-mobile-dots {
        margin-top: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .product-gallery-mobile-dot {
        width: 6px;
        height: 6px;
        border: 0;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.22);
        transition: width 0.2s ease, background-color 0.2s ease;
        cursor: pointer;
    }

    .product-gallery-mobile-dot.is-active {
        width: 14px;
        background: #f97316;
    }

    .product-gallery-mobile-dot--video.is-active {
        background: #f97316;
    }

    .product-gallery-nav-thumbs-controls {
        display: none;
    }

    .product-gallery-mobile-scroll {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: auto;
        scroll-padding: 0;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        margin: 0;
        padding: 0;
        /* pan-x alone blocks vertical page scroll when the gesture starts on the gallery (mobile/tablet) */
        touch-action: pan-x pan-y;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .product-gallery-mobile-scroll::-webkit-scrollbar {
        display: none;
    }

    .product-gallery-mobile-slide {
        box-sizing: border-box;
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .product-gallery-mobile-slide-inner,
    .product-gallery-mobile-slide .zoom-image-wrap--mobile-slide {
        width: 100%;
        max-width: 100%;
    }

    .product-gallery-mobile-fs-btn.product-fullscreen-btn {
        padding: 8px 12px 8px 10px;
        font-size: 12px;
        gap: 6px;
    }

    .product-gallery-mobile-fs-btn .product-fullscreen-btn__icon {
        width: 16px;
        height: 16px;
    }

    .product-gallery-nav {
        margin-top: 8px;
        gap: 8px;
    }

    .product-gallery-nav-btn {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .product-gallery-counter {
        font-size: 13px;
    }
}

.product-main-info h1 {
    margin: 0 0 6px;
    font-size: 30px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.product-main-info .product-meta {
    margin: 0;
    color: #64748b;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.product-main-info .product-price-block {
    margin: 6px 0 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}

.product-main-info .product-price-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px 16px;
    min-height: 132px;
    padding-right: 182px;
}

.product-original-seal {
    position: absolute;
    right: 72px;
    top: -48px;
    flex-shrink: 0;
    display: block;
    width: 176px;
    height: 176px;
    margin: 0;
    object-fit: contain;
    object-position: center;
    transform: rotate(-6deg);
    user-select: none;
    pointer-events: none;
}

.product-main-info .product-price-block #productDetailPrice {
    margin: 0;
    color: #e60012;
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-align: left;
}

.product-main-info .product-action-line-total {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    flex-wrap: wrap;
    column-gap: 10px;
    row-gap: 4px;
    margin: 0;
    padding: 10px 0 0;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    font-family: var(--font-sans);
    line-height: 1.25;
}

.product-main-info .product-action-line-total .product-price-line-total__label {
    font-size: 22px;
    font-weight: 700;
    color: #475569;
}

.product-main-info .product-action-line-total .product-price-line-total__value {
    font-size: 28px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.product-action-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 14px 0 18px;
    background: linear-gradient(145deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid #dbe7fb;
    border-radius: var(--ozon-panel-radius);
    padding: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
}

.product-purchase-row {
    display: grid;
    /* 1fr alone can shrink the button column to ~0; minmax(min-content,1fr) keeps «В корзину» on one line */
    grid-template-columns: auto minmax(min-content, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.product-purchase-row--preorder,
.product-purchase-row--unavailable {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.product-purchase-row--unavailable > .buy-btn {
    width: 100%;
}

.product-page-icon-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.product-qty-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
}

/* Всплывающая подсказка как у нативного «Заполните это поле» (белый пузырь, хвост, иконка !) */
.product-qty-control-anchor {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.product-qty-max-popover {
    position: absolute;
    z-index: 30;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.14s ease, visibility 0.14s ease;
    min-width: 0;
    max-width: min(300px, 90vw);
}

.qty-max-popover--fixed.product-qty-max-popover {
    position: fixed;
    z-index: 400;
    left: 0;
    top: 0;
    bottom: auto;
    transform: translate(-50%, -100%);
    margin: 0;
}

.qty-max-popover--fixed .product-qty-max-popover__caret {
    z-index: 1;
}

.product-qty-max-popover[hidden] {
    display: none !important;
}

.product-qty-max-popover.is-visible {
    opacity: 1;
    visibility: visible;
}

.product-qty-max-popover__bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 8px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    box-shadow:
        0 1px 3px rgba(60, 64, 67, 0.22),
        0 4px 12px rgba(60, 64, 67, 0.14);
}

.product-qty-max-popover__icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    background: #f4511e;
    border-radius: 2px;
}

.product-qty-max-popover__text {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
    color: #3c4043;
    text-align: left;
}

.product-qty-max-popover__caret {
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    background: #fff;
    border-right: 1px solid #dadce0;
    border-bottom: 1px solid #dadce0;
    transform: rotate(45deg);
    box-shadow: 2px 2px 3px rgba(60, 64, 67, 0.12);
}

.product-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d6deed;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.product-qty-btn {
    width: 34px;
    height: 40px;
    border: 0;
    background: #f8fbff;
    color: #0f172a;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.product-qty-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.product-qty-input {
    width: 48px;
    height: 40px;
    border: 0;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    background: #fff;
    color: #0f172a;
    -moz-appearance: textfield;
    appearance: textfield;
}

.product-qty-input::-webkit-outer-spin-button,
.product-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-buy-now-btn {
    width: 100%;
}


.variation-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
    padding: 13px;
    border: 1px solid #e1e9f7;
    border-radius: var(--catalog-card-radius);
    background: linear-gradient(180deg, #fcfdff 0%, #f6f9ff 100%);
    font-family: var(--font-sans);
}

.variation-field {
    display: grid;
    gap: 6px;
    grid-template-rows: auto 44px;
}

.variation-editor label {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-sans);
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.variation-editor select {
    width: 100%;
    height: 44px;
    border: 1px solid #dbe4f2;
    border-radius: 10px;
    padding: 10px 11px;
    background: #fff;
    font-size: 14px;
    font-family: var(--font-sans);
}

.variation-field.is-required-highlight label {
    color: #0f172a;
}

.variation-editor select.is-required-highlight {
    border-color: #dbe4f2;
    box-shadow: none;
    animation: none;
}

@keyframes variationRequiredPulse {
    0% { transform: translateY(0); }
    50% { transform: translateY(-1px); }
    100% { transform: translateY(0); }
}

@keyframes variationEditorAttentionGlow {
    0%,
    100% {
        border-color: rgba(59, 130, 246, 0.55);
        box-shadow:
            0 0 0 3px rgba(59, 130, 246, 0.18),
            0 4px 22px rgba(37, 99, 235, 0.12);
    }
    50% {
        border-color: rgba(37, 99, 235, 0.75);
        box-shadow:
            0 0 0 4px rgba(59, 130, 246, 0.32),
            0 6px 28px rgba(37, 99, 235, 0.2);
    }
}

.variation-editor--needs-attention {
    border-color: #e1e9f7;
    animation: none;
    box-shadow: none;
}

.variation-editor--needs-attention .variation-field label {
    color: #0f172a;
}

.variation-editor--needs-attention select {
    border-color: #dbe4f2;
    box-shadow: none;
}

.variation-editor--needs-attention #variationStockState.variation-stock-state--prompt {
    color: #64748b;
    font-weight: 600;
}

.product-favorite-btn,
.product-compare-icon-btn {
    width: 48px;
    min-width: 48px;
    height: 42px;
    padding: 0;
    border-radius: 10px;
    border-color: #d6deed;
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
    color: rgba(100, 116, 139, 0.55);
    background: rgba(255, 255, 255, 0.9);
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-compare-icon-btn {
    font-size: 0;
}

.product-compare-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.product-compare-icon svg {
    display: block;
    width: 26px;
    height: 26px;
}

.product-favorite-btn.is-active {
    color: #ff6700;
    border-color: rgba(255, 103, 0, 0.45);
    background: #fff3e8;
    box-shadow: 0 0 0 3px rgba(255, 103, 0, 0.14);
}

.product-compare-icon-btn.is-active {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.45);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.product-favorite-btn:hover {
    color: #ff6700;
    border-color: rgba(255, 103, 0, 0.35);
    transform: translateY(-1px);
}

.product-compare-icon-btn:hover {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.product-section + .product-section {
    margin-top: 18px;
}

.product-section h2 {
    margin: 0 0 12px;
    font-size: 22px;
    letter-spacing: -0.01em;
    font-weight: 800;
}

.product-description-stack {
    display: grid;
    gap: 12px;
}

.product-full-description-wide {
    grid-column: 1 / -1;
    margin-top: 2px;
}

.product-description-card {
    border: 1px solid #e5ebf7;
    border-radius: var(--catalog-card-radius);
    padding: 14px 16px;
    background: #ffffff;
}

.product-description-card.is-short {
    background: linear-gradient(135deg, #f8fbff 0%, #f1f6ff 100%);
    border-color: #dbe8ff;
}

.product-description-card.is-short p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.product-description-card.is-short h2::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-right: 8px;
    transform: translateY(-1px);
}

.product-description-card h2 {
    margin-bottom: 8px;
}

.product-info-title {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    font-weight: 800;
}

.product-description-card p {
    margin: 0;
    color: #243247;
    font-size: 15px;
    line-height: 1.7;
}

.product-description-card.is-full p {
    color: #334155;
}

.full-description-text {
    margin: 0;
    color: #334155;
    font-size: 15px;
    line-height: 1.7;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.product-info-tab-panel-description {
    min-width: 0;
    overflow-x: hidden;
}

.full-description-text img,
.full-description-text picture img,
.full-description-text video,
.full-description-text iframe {
    display: block;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    margin: 12px auto;
    border-radius: 8px;
}

.full-description-text figure,
.full-description-text picture {
    display: block;
    max-width: 100%;
    margin: 12px 0;
}

.full-description-text figure img {
    margin-left: auto;
    margin-right: auto;
}

.full-description-text table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.product-info-tabs {
    position: relative;
}

.characteristics-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #edf2f9;
    border-radius: 12px;
    overflow: hidden;
}

.characteristics-table th,
.characteristics-table td {
    text-align: left;
    padding: 12px 12px;
    border-bottom: 1px solid #edf1f7;
    font-size: 14px;
}

.characteristics-table th {
    color: #64748b;
    font-weight: 600;
    width: 42%;
    background: #f8fafe;
}

.product-info-tab-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.product-info-tab-list {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e2e9f6;
    padding-bottom: 10px;
    margin-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.product-info-tab-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 11px;
    border: 1px solid #e5ebf7;
    font-size: 15px;
    font-weight: 700;
    color: #475569;
    background: #f8fbff;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    flex: 0 0 auto;
}

.product-info-tab-label:hover {
    color: #1d4ed8;
}

.product-info-tab-panel {
    display: none;
}

input[id^="tabDescription-"]:checked ~ .product-info-tab-list label[for^="tabDescription-"],
input[id^="tabCharacteristics-"]:checked ~ .product-info-tab-list label[for^="tabCharacteristics-"],
input[id^="tabReviews-"]:checked ~ .product-info-tab-list label[for^="tabReviews-"] {
    color: #0f172a;
    background: linear-gradient(140deg, #eef4ff 0%, #e5efff 100%);
    border-color: #cfe0ff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.12);
}

input[id^="tabDescription-"]:checked ~ .product-info-tab-panel-description,
input[id^="tabCharacteristics-"]:checked ~ .product-info-tab-panel-characteristics,
input[id^="tabReviews-"]:checked ~ .product-info-tab-panel-reviews {
    display: block;
}

.product-reviews-summary {
    border: 1px solid #e7edf8;
    border-radius: 12px;
    padding: 12px;
    background: #f8fbff;
}

.product-reviews-rating {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.product-reviews-count {
    margin: 6px 0 0;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}

.product-reviews-list {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.product-review-item {
    border: 1px solid #e7edf8;
    border-radius: 10px;
    padding: 9px 10px;
    background: #fff;
}

.product-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.product-review-author {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    min-width: 0;
}

.product-review-customer-id {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.product-review-rating {
    color: #f59e0b;
    font-weight: 700;
    font-size: 13px;
}

.product-review-form {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 12px;
    max-width: 560px;
}

.product-review-form-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.product-review-form-hint,
.product-review-note,
.product-review-flash {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.product-review-guest-text {
    margin: 14px 0 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #334155;
}

.product-review-login-link {
    color: #16a34a;
    font-weight: 700;
    text-decoration: none;
}

.product-review-login-link:hover,
.product-review-login-link:focus-visible {
    color: #15803d;
    text-decoration: underline;
}

.product-review-flash.is-success {
    color: #166534;
}

.product-review-flash.is-error {
    color: #b91c1c;
}

.product-review-field {
    display: grid;
    gap: 6px;
}

.product-review-field span {
    font-size: 0.9rem;
    font-weight: 500;
}

.product-review-field select,
.product-review-field textarea {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

.product-review-field textarea {
    resize: vertical;
    min-height: 110px;
}

.product-review-submit {
    width: fit-content;
}

.product-review-item p {
    margin: 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.5;
}

.product-info-disclaimer {
    margin: 22px 0 0;
    padding: 10px 12px;
    border-left: 3px solid #f59e0b;
    border-right: 3px solid #f59e0b;
    background: #fff8e8;
    color: #7c4a03;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.product-info-tab-panel-description .product-info-disclaimer {
    margin-top: 12px;
}

.product-info-tab-panel-characteristics .product-info-disclaimer {
    margin-top: 12px;
}

@media (max-width: 1024px) {
    .product-info-disclaimer {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .cross-sell-grid:not(.is-carousel-disabled) {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(210px, 78vw);
        grid-template-columns: none;
        gap: 10px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .cross-sell-grid:not(.is-carousel-disabled) > .product-card {
        scroll-snap-align: start;
        min-width: 0;
    }

    .cross-sell-grid:not(.is-carousel-disabled)::-webkit-scrollbar {
        height: 6px;
    }

    .cross-sell-grid:not(.is-carousel-disabled)::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 999px;
    }

    /* Страница товара: «с этим покупают» — 2 карточки в ряд на мобильных */
    .related-products.cross-sell-section .cross-sell-grid:not(.is-carousel-disabled) {
        grid-auto-columns: minmax(120px, calc((100% - 10px) / 2));
    }

    .cross-sell-controls {
        display: flex;
    }
}

.related-products {
    margin-top: 18px;
}

.cross-sell-grid {
    scroll-behavior: smooth;
}

/* Главная: «Рекомендуем для вас» — сетка как у полноширинного каталога Ozon */
.recommended-products-section .recommended-products-carousel.cross-sell-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    gap: var(--catalog-grid-gap);
    grid-auto-rows: 1fr;
    overflow-x: visible;
    overflow-y: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
    align-items: stretch;
}

@media (min-width: 769px) {
    .recommended-products-section .recommended-products-carousel.cross-sell-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .recommended-products-section .recommended-products-carousel.cross-sell-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1440px) {
    .recommended-products-section .recommended-products-carousel.cross-sell-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.recommended-products-section .recommended-products-carousel.cross-sell-grid > .product-card {
    min-width: 0;
}

.recommended-products-section .recommended-products-carousel.product-grid.compact {
    gap: var(--catalog-grid-gap);
}

/* Полосы разделов каталога — горизонтальная карусель */
.home-category-showcase-strip .recommended-products-carousel.cross-sell-grid:not(.is-carousel-disabled) {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(168px, min(232px, 28vw));
    grid-template-columns: none;
    gap: var(--catalog-grid-gap);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.home-category-showcase-strip .recommended-products-carousel.cross-sell-grid:not(.is-carousel-disabled) > .product-card {
    scroll-snap-align: start;
    min-width: 0;
}

.home-category-showcase-strip .recommended-products-carousel.cross-sell-grid:not(.is-carousel-disabled)::-webkit-scrollbar {
    height: 6px;
}

.home-category-showcase-strip .recommended-products-carousel.cross-sell-grid:not(.is-carousel-disabled)::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

/* Десктоп: те же 5 карточек в ряд, что и «Рекомендуем» — без узкой карусели */
@media (min-width: 1025px) {
    .home-category-showcase-strip .home-category-showcase-strip-grid.recommended-products-carousel.cross-sell-grid:not(.is-carousel-disabled) {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-auto-flow: row;
        grid-auto-columns: auto;
        overflow-x: visible;
        overflow-y: visible;
        overscroll-behavior-x: auto;
        scroll-snap-type: none;
        padding-bottom: 0;
        -webkit-overflow-scrolling: auto;
        gap: var(--catalog-grid-gap);
    }

    .home-category-showcase-strip .recommended-products-carousel.cross-sell-grid:not(.is-carousel-disabled) > .product-card {
        scroll-snap-align: unset;
    }

    .home-category-showcase-strip .recommended-products-section-head .recommended-products-section-actions {
        display: none;
    }
}

.recommended-products-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.recommended-products-section-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.recommended-products-carousel-arrows {
    margin-bottom: 0;
}

/* Сетка 2×N: стрелки карусели не используются */
.recommended-products-section .recommended-products-section-actions {
    display: none;
}

.cross-sell-controls {
    display: none;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 8px;
}

.cross-sell-nav-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--carousel-rail-arrow-border);
    background: var(--carousel-rail-arrow-bg);
    color: var(--carousel-rail-arrow-fg);
    box-shadow: var(--carousel-rail-arrow-shadow);
    cursor: pointer;
}

.cross-sell-nav-btn:hover:not(:disabled) {
    background: var(--carousel-rail-arrow-bg-hover);
    color: var(--carousel-rail-arrow-fg-hover);
}

.cross-sell-nav-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.fullscreen-gallery {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    /* Выше шапки: .desktop-top-bar-fixed (100), .site-header на мобилке (120), .floating-actions (101) */
    z-index: 130;
    display: none;
    align-items: center;
    justify-content: center;
}

.fullscreen-gallery.is-open {
    display: flex;
}

.fullscreen-gallery img,
.fullscreen-gallery-video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 10px;
}

.fullscreen-gallery-video {
    display: none;
    background: #000;
}

.fullscreen-gallery.is-video-active .fullscreen-gallery-video {
    display: block;
}

.fullscreen-gallery.is-video-active #fullscreenImage,
.fullscreen-gallery.is-video-active #cardFullscreenImage {
    display: none;
}

.card-fullscreen-gallery #cardFullscreenImage {
    display: block;
}

.gallery-control {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
}

.gallery-control.close-btn {
    top: 20px;
    right: 20px;
}

.gallery-control.prev-btn {
    left: 24px;
}

.gallery-control.next-btn {
    right: 24px;
}

.fullscreen-gallery-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    z-index: 2;
}

.fullscreen-gallery-dot {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.fullscreen-gallery-dot.is-active,
.fullscreen-gallery-dot--video.is-active {
    width: 16px;
    background: #f97316;
}

@media (max-width: 1024px) {
    #fullscreenGallery.fullscreen-gallery.is-open {
        touch-action: pan-y pinch-zoom;
    }

    #fullscreenGallery .gallery-control.prev-btn,
    #fullscreenGallery .gallery-control.next-btn {
        top: 50%;
        transform: translateY(-50%);
        width: 48px;
        height: 48px;
        font-size: 24px;
        z-index: 2;
    }

    #fullscreenGallery .gallery-control.prev-btn {
        left: 12px;
    }

    #fullscreenGallery .gallery-control.next-btn {
        right: 12px;
    }

    #fullscreenGallery .gallery-control.close-btn {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        z-index: 2;
    }

    #fullscreenGallery .fullscreen-gallery-dots {
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }
}

.product-card-media {
    flex-shrink: 0;
}

.product-image-wrap {
    position: relative;
    display: block;
    aspect-ratio: var(--product-photo-aspect);
    overflow: hidden;
    background: linear-gradient(180deg, #f7f9fe 0%, #f1f5fd 100%);
}

a.product-image-wrap:not(.has-gallery)::after {
    content: "";
    display: block;
    height: var(--product-card-gallery-controls-height);
}

.product-image-wrap > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 0;
    display: block;
    transition: transform 0.24s ease;
}

.product-card:hover .product-image-wrap:not(.has-gallery) > img {
    transform: scale(1.02);
}

.product-image-wrap.has-gallery {
    aspect-ratio: unset;
    display: flex;
    flex-direction: column;
    overflow: visible;
    background: transparent;
    touch-action: pan-y;
}

.product-card-gallery {
    position: static;
    display: flex;
    flex-direction: column;
    width: 100%;
    z-index: 1;
}

.product-card-gallery-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: var(--product-photo-aspect);
    overflow: hidden;
    background: linear-gradient(180deg, #f7f9fe 0%, #f1f5fd 100%);
}

.product-card-gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
}

.product-card-gallery-track::-webkit-scrollbar {
    display: none;
}

.product-card-gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
}

.product-card-gallery-slide img,
.product-card-gallery-slide-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.product-card-gallery-slide img {
    transition: transform 0.24s ease;
}

.product-card-gallery-slide-video {
    background: #0f172a;
}

.product-card:hover .product-card-gallery-slide img {
    transform: scale(1.02);
}

.product-card-gallery-slide--video .product-card-gallery-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.28);
    pointer-events: none;
}

.product-card-gallery-slide--video .product-card-gallery-video-play::after {
    content: '';
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 17px solid #fff;
}

.product-card-gallery-slide--video.is-playing .product-card-gallery-video-play {
    opacity: 0;
}

.product-card-gallery-dots {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1 1 auto;
    min-width: 0;
    pointer-events: none;
}

.product-card-gallery-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2px 8px 0;
    margin-top: -1px;
    box-sizing: border-box;
    background: var(--surface);
}

.product-card-gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.22);
    transition: width 0.2s ease, background-color 0.2s ease;
}

.product-card-gallery-dot.is-active {
    width: 14px;
    background: #f97316;
}

.product-card-gallery-dot--video.is-active {
    background: #f97316;
}

.product-card-gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.product-card-gallery-nav--prev {
    left: 6px;
}

.product-card-gallery-nav--next {
    right: 6px;
}

.product-card-gallery-viewport:hover .product-card-gallery-nav {
    opacity: 1;
    pointer-events: auto;
}

.product-card-gallery-nav:hover {
    transform: translateY(-50%) scale(1.04);
}

@media (max-width: 1024px) {
    .product-card-gallery-nav {
        display: none;
    }
}

.theme-dark .product-card-gallery-controls {
    background: var(--surface);
}

.theme-dark .product-card-gallery-nav {
    background: rgba(21, 34, 56, 0.92);
    color: #e2e8f0;
}

.product-card-meta-strip {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    padding: 8px 12px 0;
    flex-shrink: 0;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.product-card-meta-strip--promo-only {
    justify-content: flex-start;
}

.product-detail-meta-strip {
    width: 100%;
    box-sizing: border-box;
}

.product-detail-meta-strip .product-card-meta-strip {
    padding: 8px 0 0;
}

.product-page-section {
    margin-top: 18px;
}

.product-page-back {
    margin: 0 0 18px;
}

.product-page-back-link {
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 11px;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.product-page-back-link__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    font-size: 15px;
    line-height: 1;
    opacity: 0.9;
}

.product-page-brand-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 6px 0 14px;
}

.product-page-brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    max-width: 100%;
}

.product-page-brand-name-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.product-page-brand-caption {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: #64748b;
}

.product-page-brand-row .product-page-brand {
    margin: 0;
    flex: 0 1 auto;
}

.product-page-brand-row .product-page-brand-logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    min-width: 104px;
    max-width: 218px;
    height: 75px;
    padding: 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.product-page-brand-row .product-page-brand-logo {
    display: block;
    max-height: 62px;
    max-width: 203px;
    width: auto;
    height: auto;
    margin: 0;
    padding: 10px 16px;
    object-fit: contain;
    object-position: center;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.product-page-brand-row .product-page-brand-logo-box .product-page-brand-logo {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.theme-dark .product-page-brand-row .product-page-brand-logo-box,
.theme-dark .product-page-brand-row .product-page-brand-logo {
    border-color: #4b5f7d;
    background: #152238;
}

.theme-dark .product-page-brand-row .product-page-brand-logo-box .product-page-brand-logo {
    border: none;
    background: transparent;
}

.product-detail-meta-strip--by-brand {
    margin-top: 0;
    flex: 1 1 200px;
    min-width: 0;
}

.product-detail-meta-strip--by-brand .product-card-meta-strip {
    padding: 0;
}

.product-main-info .product-card-in-stock-badge,
.product-main-info .product-card-preorder-badge,
.product-main-info .product-card-out-stock-badge,
.product-main-info .product-card-tag-badge {
    font-size: 17px;
    gap: 8px;
}

.product-main-info .product-card-tag-badge-icon,
.product-main-info .product-card-in-stock-icon,
.product-main-info .product-card-preorder-icon,
.product-main-info .product-card-out-stock-icon {
    width: 20px;
    height: 20px;
}

.promo-discount-card .product-card-meta-strip {
    padding: 8px 10px 0;
    box-sizing: border-box;
}

.product-card-meta-strip-left {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
}

.product-card-meta-strip-right {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
}

.product-card-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.product-card-tag-badge-icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.product-card-tag-badge-icon svg {
    display: block;
}

.product-card-tag-badge--hot {
    color: #db2777;
}

.product-card-tag-badge--hot .product-card-tag-badge-icon {
    color: #db2777;
}

.product-card-tag-badge--waiting {
    color: #0284c7;
}

.product-card-tag-badge--waiting .product-card-tag-badge-icon {
    color: #0284c7;
}

.product-card-tag-badge--new {
    color: #c026d3;
}

.product-card-tag-badge--new .product-card-tag-badge-icon {
    color: #c026d3;
}

.theme-dark .product-card-tag-badge--hot,
.theme-dark .product-card-tag-badge--hot .product-card-tag-badge-icon {
    color: #f472b6;
}

.theme-dark .product-card-tag-badge--waiting,
.theme-dark .product-card-tag-badge--waiting .product-card-tag-badge-icon {
    color: #38bdf8;
}

.theme-dark .product-card-tag-badge--new,
.theme-dark .product-card-tag-badge--new .product-card-tag-badge-icon {
    color: #f0abfc;
}

.product-card-in-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #24b23e;
    line-height: 1.2;
}

.product-card-in-stock-icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #24b23e;
}

.product-card-in-stock-icon svg {
    display: block;
    color: inherit;
}

.theme-dark .product-card-in-stock-badge {
    color: #4ade80;
}

.theme-dark .product-card-in-stock-icon {
    color: inherit;
}

.product-card-preorder-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #9333ea;
    line-height: 1.2;
}

.product-card-preorder-icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #9333ea;
}

.product-card-preorder-icon svg {
    display: block;
    color: inherit;
}

.theme-dark .product-card-preorder-badge {
    color: #e879f9;
}

.theme-dark .product-card-preorder-icon {
    color: inherit;
}

.product-card-out-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
    line-height: 1.2;
}

.product-card-out-stock-icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #dc2626;
}

.product-card-out-stock-icon svg {
    display: block;
    color: inherit;
}

.theme-dark .product-card-out-stock-badge {
    color: #f87171;
}

.theme-dark .product-card-out-stock-icon {
    color: inherit;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 12px 12px;
    flex: 1 1 auto;
    align-items: center;
    text-align: center;
}

.product-card-info-head {
    width: 100%;
    flex-shrink: 0;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    flex-wrap: wrap;
}

.product-price {
    margin: 0;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.01em;
    color: #e60000;
    width: auto;
    text-align: left;
}

.product-info .product-price {
    font-size: 22px;
    font-weight: 900;
    color: #000;
}

.product-price-old {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
}

.product-card-version-slot {
    display: none;
    width: 100%;
    flex-shrink: 0;
}

.product-card-version-slot:has(.product-card-version-badge) {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin: 4px 0 2px;
}

.product-card.has-version-row .product-card-version-slot:not(:has(.product-card-version-badge)) {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin: 4px 0 2px;
}

.product-card-version-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    margin: 0;
}

.product-card-version-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.product-card-version-badge--global {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.product-card-version-badge--china {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.theme-dark .product-card-version-badge--global {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(147, 197, 253, 0.35);
}

.theme-dark .product-card-version-badge--china {
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.18);
    border-color: rgba(252, 165, 165, 0.35);
}

.product-main-info .product-card-version-badge {
    font-size: 13px;
    padding: 4px 10px;
}

.product-discount-percent {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
}

.product-saving {
    margin: 1px 0 0;
    font-size: 12px;
    color: #047857;
    font-weight: 600;
}

.product-discount-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 9px;
}

.product-rating-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #475569;
}

.product-rating-row--header {
    margin: 8px 0 12px;
    font-size: 18px;
    gap: 8px;
}

.product-rating-row--header .product-rating-stars {
    font-size: 22px;
}

.product-rating-row--header .product-rating-value {
    font-size: 20px;
    font-weight: 800;
}

.product-rating-row--header .product-rating-count {
    font-size: 18px;
    font-weight: 500;
}

.product-rating-count--empty {
    color: #94a3b8;
    font-size: 16px;
    font-weight: 500;
    cursor: default;
    text-decoration: none;
}

.product-rating-count {
    color: #64748b;
    text-decoration: none;
}

.product-rating-count:hover {
    color: #ff6700;
    text-decoration: underline;
}

.product-trust-notes {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

.product-trust-notes li {
    position: relative;
    padding-left: 18px;
}

.product-trust-notes li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6700;
}

.product-trust-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #16a34a;
    text-decoration: none;
}

.product-trust-version-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-top: 6px;
}

.product-trust-version-row .product-trust-link {
    margin-top: 0;
    flex: 0 0 auto;
}

.product-trust-version-row .product-card-version-badges {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

.product-trust-link:hover {
    color: #15803d;
    text-decoration: underline;
}

.variation-field--color {
    grid-template-rows: auto;
    gap: 8px;
}

.variation-field--color > label,
.variation-field--memory > label {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-sans);
    color: #0f172a;
    letter-spacing: 0.04em;
}

.variation-field--color .variation-select--swatch-backed,
.variation-field--color .mihome-custom-select {
    display: none !important;
}

.variation-editor--swatch-only #variationStockState.variation-stock-state--prompt {
    display: none;
}

.variation-field--color.is-required-highlight .variation-swatch-list {
    outline: none;
}

.variation-field--memory {
    grid-template-rows: auto auto auto;
    align-content: start;
}

.variation-field--memory > label {
    margin: 0 0 2px;
}

.variation-field--memory .mihome-custom-select,
.variation-field--memory > select[data-variation-select="memory"] {
    margin-top: 3px;
}

/* Только «Глобальная / Китайская версия» — на месте блока «Цвет» (выпадающий список) */
.variation-editor--version-as-color {
    grid-template-columns: 1fr;
}

.variation-editor--version-as-color .variation-field--color.variation-field--version-as-color {
    grid-column: 1 / -1;
    grid-row: auto;
    grid-template-rows: auto auto auto;
    align-content: start;
}

.variation-editor--version-as-color #variationStockState {
    grid-column: 1 / -1;
}

.variation-field--color.variation-field--version-as-color .variation-select--swatch-backed,
.variation-field--color.variation-field--version-as-color .mihome-custom-select,
.variation-field--color.variation-field--version-as-color > select[data-variation-select="version"] {
    display: block !important;
}

.variation-field--color.variation-field--version-as-color > select[data-variation-select="version"] {
    margin-top: 3px;
}

.variation-field--color.variation-field--version-as-color .variation-version-hint,
.variation-field--color.variation-field--version-as-color .variation-memory-hint {
    margin-top: 4px;
}

/* Версия — в правой колонке на месте «Память», если есть цвет */
.variation-editor--has-version {
    align-items: start;
}

.variation-editor--has-version .variation-field--color {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.variation-editor--has-version .variation-field--memory {
    grid-column: 2;
    grid-row: 1;
}

.variation-editor--has-version .variation-field--version {
    grid-column: 2;
    grid-row: 2;
    margin-top: 2px;
}

.variation-editor--has-version #variationStockState {
    grid-column: 1 / -1;
}

.variation-field--version {
    grid-template-rows: auto auto auto;
    align-content: start;
}

.variation-field--version > label {
    margin: 8px 0 2px;
}

.variation-field--version .mihome-custom-select,
.variation-field--version > select[data-variation-select="version"] {
    margin-top: 0;
}

.variation-swatch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
}

.variation-swatch {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 999px;
    border: 3px solid #dbe4f0;
    background: var(--swatch-color, #cbd5e1);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.variation-swatch:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.variation-swatch.is-active {
    border-color: #94a3b8;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.variation-swatch.is-unavailable {
    opacity: 0.72;
    cursor: not-allowed;
    position: relative;
}

.variation-swatch.is-unavailable::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 130%;
    height: 3px;
    background: #111827;
    border-radius: 2px;
    transform: translate(-50%, -50%) rotate(-42deg);
    pointer-events: none;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.95),
        0 0 0 2px rgba(17, 24, 39, 0.15);
}

.variation-swatch.is-unavailable.is-active {
    border-color: #cbd5e1;
    box-shadow: none;
}

.variation-editor .variation-swatch-selected,
.variation-editor .variation-field-hint {
    margin: 4px 0 0;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: #64748b;
}

/* Подписи под «Память» и «Версия» — одинаковый размер (как у памяти) */
.variation-editor .variation-field--memory .variation-memory-hint,
.variation-editor .variation-field--version .variation-version-hint {
    margin: 6px 0 0;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: #64748b;
}

.variation-editor .variation-swatch-selected:not(.is-placeholder),
.variation-editor .variation-field-hint:not(.is-placeholder),
.variation-editor .variation-field--memory .variation-memory-hint:not(.is-placeholder),
.variation-editor .variation-field--version .variation-version-hint:not(.is-placeholder) {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.variation-swatch-hint {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
}

.product-rating-stars {
    color: #f59e0b;
    font-size: 13px;
    line-height: 1;
}

.product-rating-value {
    font-weight: 700;
    color: #0f172a;
}

.product-rating-count {
    color: #64748b;
}

.product-availability {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
}

.product-availability.is-in-stock {
    color: #047857;
}

.product-availability.is-low-stock {
    color: #b45309;
}

.product-availability.is-preorder {
    color: #ea580c;
}

.product-availability.is-out {
    color: #b91c1c;
}

.product-title {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    min-height: 2.7em;
    width: 100%;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    background: #f6f8fc;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    max-width: max-content;
    padding: 3px 9px;
}

.product-desc {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
}

.buy-btn {
    width: 100%;
    border: 0;
    margin-top: auto;
    background: var(--primary);
    color: #fff;
    padding: 10px;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.product-info .buy-btn {
    max-width: none;
}

.product-main-info .product-purchase-row .buy-btn {
    white-space: nowrap;
}

.product-compare-btn {
    width: 100%;
    max-width: 220px;
}

.product-compare-btn.is-active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 91, 255, 0.24);
    filter: brightness(1.02);
}

.buy-btn:hover,
.hero-btn:hover,
.search-form button:hover {
    background: var(--primary-dark);
}

.buy-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.buy-btn.is-added-temp {
    background: #16a34a;
    border-color: #16a34a;
    box-shadow: 0 8px 16px rgba(22, 163, 74, 0.32);
    animation: buyBtnAddedPulse 0.35s ease 1;
}

@keyframes buyBtnAddedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.buy-btn.is-disabled-like {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    filter: none;
    transform: none;
}

.buy-btn.buy-btn--out-of-stock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #94a3b8;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
    filter: none;
    transform: none;
}

.buy-btn.buy-btn--out-of-stock:hover {
    background: #94a3b8;
    box-shadow: none;
    filter: none;
    transform: none;
}

.buy-btn.buy-btn--request {
    background: #0d9488;
}

.buy-btn.buy-btn--request:hover {
    background: #0f766e;
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.36);
}

.buy-btn.buy-btn--request:active {
    background: #115e59;
    box-shadow: 0 8px 16px rgba(17, 94, 89, 0.36);
}

.site-footer {
    background: #ffffff;
    color: #334155;
    border-top: 1px solid #dbe3ed;
    padding: 28px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.site-footer h4 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 17px;
    letter-spacing: -0.01em;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin-bottom: 8px;
    color: #475569;
}

.site-footer a {
    color: inherit;
    opacity: 1;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.site-footer a:hover {
    opacity: 1;
    color: #0f172a;
    text-decoration: underline;
    text-decoration-color: rgba(100, 116, 139, 0.55);
}

.category-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    align-items: start;
    overflow: visible;
}

/* Десктоп: больше ширины под сетку (5 колонок) — узкая колонка фильтров + плотнее padding */
@media (min-width: 1025px) {
    .category-layout {
        grid-template-columns: 256px minmax(0, 1fr);
        gap: 18px;
        align-items: start;
    }

    .category-content {
        padding: 14px 12px;
    }

    .category-layout .filter-sidebar {
        position: sticky;
        top: var(--category-filter-sticky-top);
        max-height: calc(100vh - var(--category-filter-sticky-top) - 16px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }
}

.filter-sidebar {
    background: linear-gradient(180deg, #ffffff, #fbfcff);
    border: 1px solid var(--border);
    border-radius: var(--ozon-panel-radius);
    box-shadow: 0 14px 30px rgba(17, 34, 68, 0.08);
    padding: 16px;
    align-self: start;
    z-index: 12;
}

.filter-form h3 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 800;
}

.filter-form > label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-top: 12px;
    margin-bottom: 6px;
    display: block;
}

.filter-form input[type="number"],
.filter-form select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    font-size: 14px;
}

.filter-form input[type="number"]:focus,
.filter-form select:focus {
    outline: none;
    border-color: #8fb0ff;
    box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.12);
}

.filter-group {
    border: 1px solid #e7ecf7;
    border-radius: 12px;
    padding: 12px;
    margin: 12px 0;
    background: #fff;
}

.filter-group legend {
    padding: 0 6px;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.check-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 7px 0;
    font-size: 14px;
    padding: 6px 6px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.check-line:hover {
    background: #f4f7ff;
}

.check-line input {
    width: auto;
    accent-color: var(--primary);
}

.category-content {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--ozon-panel-radius);
    box-shadow: var(--shadow);
    padding: 14px;
}

.filter-actions {
    display: grid;
    gap: 8px;
}

.category-subcategories {
    display: none;
}

.category-subcategory-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid #d7e1ef;
    border-radius: 999px;
    background: #f8fbff;
    color: #334155;
    font-size: 13px;
    text-decoration: none;
}

.category-subcategory-chip:hover {
    border-color: #bfdbfe;
    color: var(--primary);
}

.compare-table-wrap {
    overflow-x: auto;
    border: 1px solid #dbe4ee;
    border-radius: var(--catalog-card-radius);
    background: #fff;
    box-shadow: 0 10px 24px rgba(17, 34, 68, 0.08);
}

.compare-table {
    width: 100%;
    min-width: 760px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-family: var(--font-sans);
}

.compare-table th,
.compare-table td {
    border-bottom: 1px solid #e7edf5;
    padding: 12px 10px;
    text-align: center;
    vertical-align: middle;
    font-family: inherit;
}

.compare-table th {
    width: 190px;
    color: #475569;
    font-weight: 700;
    background: #f8fbff;
    position: sticky;
    left: 0;
    z-index: 2;
}

.compare-table td[data-compare-value] {
    text-align: center;
}

.compare-page,
.compare-page * {
    font-family: var(--font-sans);
}

.compare-product-cell a {
    display: grid;
    gap: 8px;
    justify-items: center;
    color: inherit;
    text-decoration: none;
    margin: 0 auto 8px;
    max-width: 100%;
    text-align: center;
}

.compare-product-cell img {
    width: min(132px, 100%);
    max-width: 100%;
    aspect-ratio: var(--product-photo-aspect);
    height: auto;
    object-fit: contain;
    object-position: center;
    background: #f8fafc;
    border-radius: 8px;
}

.compare-remove-btn {
    margin-top: 6px;
    width: 100%;
}

.compare-diff-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

.compare-clear-btn {
    margin-left: 0;
}

.compare-page-head {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid #dbe4ee;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(17, 34, 68, 0.06);
}

.compare-page-head-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    text-align: center;
}

.compare-page-head h2 {
    margin: 0;
    width: 100%;
    text-align: center;
    font-size: clamp(34.56px, 4.32vw, 46.08px);
    font-weight: var(--catalog-section-title-weight);
    line-height: 1.15;
}

.compare-page-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #d8e6ff;
    background: #eef4ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.compare-page-count-separator,
.compare-page-count-max {
    color: #64748b;
    font-weight: 700;
}

.compare-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-left: 0;
}

.compare-page-toolbar .ghost-btn {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.compare-page-toolbar .compare-diff-toggle.is-active {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #eff6ff, #dbeafe);
    box-shadow: 0 8px 16px rgba(17, 34, 68, 0.08);
}

.compare-page-toolbar .compare-diff-toggle:disabled,
.compare-page-toolbar .compare-clear-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.compare-page-empty {
    margin: 0;
    padding: 28px 20px;
    border: 1px dashed #c9d8ef;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%);
    color: #64748b;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

.compare-product-cell {
    min-width: 0;
    vertical-align: top;
}

.compare-product-cell .buy-btn {
    margin-top: 0;
}

.compare-recommended-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #dbe4ee;
}

.compare-recommended-section .section-head {
    margin-bottom: 14px;
}

.compare-recommended-section .section-head h2 {
    font-size: clamp(22px, 2.6vw, 28px);
}

@media (max-width: 1024px) {
    .compare-page-head {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        margin-bottom: 16px;
    }

    .compare-page-toolbar {
        margin-left: 0;
        justify-content: stretch;
    }

    .compare-page-toolbar .compare-diff-toggle,
    .compare-page-toolbar .compare-clear-btn {
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
    }

    .compare-table {
        min-width: 720px;
    }
}

@media (max-width: 768px) {
    .compare-page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .compare-page-toolbar .compare-diff-toggle,
    .compare-page-toolbar .compare-clear-btn {
        width: 100%;
        flex: none;
    }

    .compare-page-empty {
        padding: 22px 16px;
        font-size: 14px;
    }

    .compare-table th,
    .compare-table td {
        padding: 8px;
        font-size: 13px;
    }

    .compare-product-cell img {
        width: 84px;
    }
}

.compare-table tr.compare-diff-hidden {
    display: none !important;
}

.mobile-filter-overlay,
.mobile-filter-head,
.mobile-filter-open-btn {
    display: none;
}

#categoryResultsCount {
    background: #eef4ff;
    color: #1d4ed8;
    border: 1px solid #cdddff;
    border-radius: 999px;
    padding: 5px 12px;
    font-weight: 700;
    margin: 0;
}

.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #dbe7fb;
    border-radius: var(--catalog-card-radius);
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(17, 34, 68, 0.08);
}

.cart-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 16px;
    align-items: start;
    width: 100%;
}

.cart-main-col,
.cart-side-col {
    min-width: 0;
}

.cart-table th,
.cart-table td {
    padding: 12px;
    border-bottom: 1px solid #e6edf8;
    vertical-align: middle;
    text-align: left;
}

.cart-table th {
    background: linear-gradient(180deg, #f8f9fb 0%, #f1f4f9 100%);
    color: #475569;
    font-size: 13px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
}

.cart-table th:nth-child(3),
.cart-table td:nth-child(3) {
    text-align: center;
}

.cart-table td:nth-child(3) .cart-inline-form {
    justify-content: center;
}

.cart-table th:nth-child(5),
.cart-table td:nth-child(5) {
    text-align: center;
}

.cart-table td:first-child {
    vertical-align: top;
}

.cart-table td:first-child .product-meta {
    margin-top: 4px;
}


.cart-table tbody tr:hover {
    background: #f8fafc;
}

.cart-inline-form {
    display: flex;
    gap: 1px;
    align-items: center;
    flex-wrap: wrap;
}

.cart-qty-input-form {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.cart-inline-form input[type="number"] {
    width: 36px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.cart-inline-form input[type="number"]::-webkit-outer-spin-button,
.cart-inline-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-qty-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 8px;
    border: 0;
    font-size: 18px;
    line-height: 1;
}

.cart-remove-btn {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    padding-top: 6px;
    padding-bottom: 6px;
}

.cart-remove-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.cart-item-thumb {
    width: 48px;
    aspect-ratio: var(--product-photo-aspect);
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    background: #f8fafc;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}

.cart-item-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.cart-item-link:hover {
    color: var(--primary);
}

.cart-grand-total {
    font-size: 22px;
    font-weight: 800;
    margin-top: 14px;
    color: #0f172a;
}

.cart-delivery-box {
    margin-top: 0;
    max-width: 100%;
    padding: 14px;
    border: 1px solid #dbe4ee;
    border-radius: var(--catalog-card-radius);
    background: linear-gradient(180deg, #f8fafd 0%, #f2f6fb 100%);
    box-shadow: 0 8px 18px rgba(17, 34, 68, 0.06);
}

.cart-delivery-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: #334155;
}

.cart-delivery-box select {
    width: 100%;
    margin-bottom: 8px;
    border: 1px solid #d4dce8;
    border-radius: 10px;
    padding: 9px 10px;
    background: #fff;
}

.cart-delivery-box select.is-required-highlight {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    animation: variationRequiredPulse 0.45s ease 2;
}

.cart-delivery-selected,
.checkout-delivery-selected {
    margin: 6px 0 8px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.cart-delivery-box .cart-grand-total {
    margin-top: 6px;
    font-size: 18px;
}

.cart-delivery-totals {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #d6e0f0;
}

.cart-delivery-totals .cart-grand-total {
    color: #6b7280;
}

.cart-delivery-totals .cart-grand-total strong {
    color: #6b7280;
}

.cart-delivery-totals .cart-grand-total.is-payable strong {
    display: inline-block;
    color: #dc2626;
    font-size: 1.18em;
    font-weight: 900;
    animation: cartPayablePulse 1.45s ease-in-out infinite;
    transform-origin: center;
    will-change: transform, text-shadow;
}

.cart-checkout-wrap {
    margin: 4px 0 0;
}

.cart-checkout-wrap-side {
    margin-top: 24px;
}

.cart-checkout-wrap .buy-btn,
.cart-checkout-wrap-side .buy-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.cart-feed-section,
.cart-recommended-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #d9e2ef;
    background: linear-gradient(180deg, rgba(248, 250, 253, 0.75) 0%, rgba(248, 250, 253, 0) 100%);
    border-radius: 14px;
}

.cart-feed-section + .cart-feed-section {
    margin-top: 14px;
}

.form-alert-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #7f1d1d;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.form-alert-success {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.checkout-section {
    margin-top: 28px;
}

/* Нативный select на checkout не показывать — только кастомный список */
body.page-checkout .checkout-form select:not(.mihome-custom-select__native) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

body.page-checkout .checkout-form .mihome-custom-select {
    position: relative;
    display: block;
    width: 100%;
}

.checkout-head h2,
.checkout-page-head h2,
.cart-page-head h2 {
    margin-bottom: 4px;
    font-size: clamp(34.56px, 4.32vw, 46.08px);
    font-weight: var(--catalog-section-title-weight);
    line-height: 1.15;
}

.checkout-page-head,
.cart-page-head {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.checkout-page-head h2,
.cart-page-head h2,
.checkout-page-subtitle {
    text-align: center;
}

.checkout-page-head h2,
.cart-page-head h2 {
    width: 100%;
    text-transform: none;
}

.checkout-page-subtitle {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.checkout-page-head .ghost-btn {
    align-self: flex-start;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    align-items: start;
}

.checkout-card,
.checkout-summary-card {
    background: linear-gradient(180deg, #f8fafd 0%, #f2f6fb 100%);
    border: 1px solid #dbe4ee;
    border-radius: var(--catalog-card-radius);
    box-shadow: 0 8px 18px rgba(17, 34, 68, 0.06);
    padding: 18px;
}

.checkout-form label {
    font-family: var(--font-sans);
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    color: #334155;
    margin-top: 8px;
    margin-bottom: 6px;
    display: block;
    font-weight: 700;
}

/* Оформление заказа: левая форма — те же шрифты/жирность, что в блоке «Состав заказа» */
body.page-checkout .checkout-card .checkout-form label {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

body.page-checkout .checkout-card .checkout-form input,
body.page-checkout .checkout-card .checkout-form textarea,
body.page-checkout .checkout-card .checkout-form .mihome-custom-select__trigger {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

body.page-checkout .checkout-card .checkout-form input::placeholder,
body.page-checkout .checkout-card .checkout-form textarea::placeholder {
    font-weight: 500;
    color: #64748b;
}

body.page-checkout .checkout-card .checkout-form .mihome-custom-select__value.is-placeholder {
    font-weight: 500;
    color: #64748b;
}

body.page-checkout .checkout-card .checkout-delivery-selected {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

body.page-checkout .checkout-card .phone-input-prefix {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

body.page-checkout .checkout-card .checkout-points-meta {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #dc2626;
}

body.page-checkout .checkout-card .checkout-points-meta .account-points-balance-value {
    color: inherit;
    font-weight: inherit;
    font-size: inherit;
}

body.page-checkout .checkout-card .checkout-points-hint {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: #64748b;
}

body.page-checkout .checkout-card .checkout-optional-note {
    margin-left: 1px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.checkout-optional-note {
    margin-left: 6px;
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
}

.checkout-points-field {
    margin-top: 4px;
}

.checkout-points-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 4px;
}

.checkout-points-meta {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: #b91c1c;
    margin: 0;
    line-height: 1.45;
    flex: 1 1 auto;
    min-width: min(100%, 220px);
}

.checkout-points-hint {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
    margin: 8px 0 0;
}

.checkout-points-field input[type="number"] {
    width: 100%;
    max-width: 112px;
    padding-left: 10px;
    padding-right: 10px;
    text-align: center;
    flex: 0 0 auto;
}

.checkout-points-remind-overlay {
    z-index: 135;
}

.checkout-points-remind-modal.checkout-points-remind-modal {
    width: min(440px, 92vw);
    min-height: auto;
    max-height: none;
    overflow: visible;
    text-align: left;
    padding: 22px 20px 20px;
    border: 1px solid #dbe4ee;
}

.checkout-points-remind-title {
    font-family: var(--font-sans);
    margin: 0 40px 12px 0;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
}

.checkout-points-remind-body {
    font-family: var(--font-sans);
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.55;
    color: #334155;
}

.checkout-points-remind-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.checkout-points-remind-actions .buy-btn {
    width: auto;
    margin-top: 0;
}

.checkout-points-remind-fill-btn {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(5, 150, 105, 0.22);
}

.checkout-points-remind-fill-btn:hover {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
    box-shadow: 0 8px 18px rgba(5, 150, 105, 0.32);
    filter: brightness(1.03);
}

.buy-btn.checkout-points-remind-fill-btn:hover,
.buy-btn.checkout-points-remind-fill-btn:focus-visible {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
}

.required-asterisk {
    margin-left: 4px;
    color: #ef4444;
    font-weight: 800;
}

.required-asterisk.is-hidden {
    display: none;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form select:not(.mihome-custom-select__native) {
    width: 100%;
    border: 1px solid #d4dce8;
    border-radius: 10px;
    padding: 11px 12px;
    background: #fff;
    font-family: var(--font-sans);
    font-size: 14px;
}

.checkout-form .mihome-custom-select__native {
    width: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.checkout-form textarea {
    resize: none;
    min-height: 96px;
}

.checkout-form textarea[name="address"],
.checkout-form textarea[name="note"] {
    height: 96px;
}

.phone-input-wrap {
    position: relative;
}

.phone-input-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    font-weight: 700;
    font-size: 14px;
    pointer-events: none;
}

.phone-input-wrap input[name="phone"] {
    padding-left: 56px;
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap input {
    padding-right: 112px;
}

.password-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #ea580c;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.password-toggle-btn:hover {
    background: #fff7ed;
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.checkout-form input.is-required-highlight,
.checkout-form textarea.is-required-highlight,
.checkout-form select.is-required-highlight {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    animation: variationRequiredPulse 0.45s ease 2;
}

.mihome-custom-select {
    position: relative;
    width: 100%;
    font-family: var(--font-sans);
}

.mihome-custom-select__native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.mihome-custom-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid #d4dce8;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}

.mihome-custom-select__value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mihome-custom-select__value.is-placeholder {
    color: #64748b;
}

.mihome-custom-select__arrow {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.16s ease;
}

.mihome-custom-select.is-open .mihome-custom-select__arrow {
    transform: rotate(-135deg) translateY(2px);
}

.mihome-custom-select__trigger:focus,
.mihome-custom-select.is-open .mihome-custom-select__trigger {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.mihome-custom-select__trigger.is-required-highlight {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    animation: variationRequiredPulse 0.45s ease 2;
}

.mihome-custom-select__list {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    overflow-y: auto;
    border: 1px solid #d4dce8;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    font-family: var(--font-sans);
    font-size: 14px;
}

.mihome-custom-select__option {
    padding: 10px 12px;
    color: #0f172a;
    cursor: pointer;
    line-height: 1.35;
}

.mihome-custom-select__option:hover,
.mihome-custom-select__option.is-selected {
    background: #f1f5f9;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.checkout-field-stack {
    display: grid;
    gap: 2px;
    align-content: start;
}

@media (min-width: 1025px) {
    .checkout-field-name {
        grid-column: 1;
        grid-row: 1;
    }

    .checkout-field-phone {
        grid-column: 2;
        grid-row: 1;
    }

    .checkout-field-region {
        grid-column: 1;
        grid-row: 2;
    }

    .checkout-field-zone,
    .checkout-field-city {
        grid-column: 2;
        grid-row: 2;
    }
}

@media (max-width: 1024px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

.checkout-submit {
    margin-top: 16px;
    padding: 12px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
}

.checkout-summary-card h3 {
    margin: 0 0 12px;
}

.checkout-summary-list {
    display: grid;
    gap: 10px;
}

.checkout-summary-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    border: 1px solid #e9eef8;
    border-radius: 10px;
    padding: 10px;
    background: #fbfcff;
}

.checkout-item-main {
    min-width: 0;
}

.checkout-item-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
    padding: 2px 4px;
    transition: background-color .2s ease, color .2s ease;
}

.checkout-item-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
}

.checkout-item-link:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
}

.checkout-item-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 0;
    background: #f8fafc;
    flex: 0 0 44px;
}

.checkout-item-title {
    margin: 0;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.35;
}

.checkout-item-variation {
    display: inline-block;
    margin: 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff4ed;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    max-width: 100%;
}

.checkout-item-right {
    text-align: right;
    color: #334155;
    font-size: 13px;
}

.checkout-item-right p {
    margin: 0;
}

.checkout-item-right p + p {
    margin-top: 4px;
    font-weight: 700;
}

.checkout-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 16px;
    color: #6b7280;
}

.checkout-order-totals {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.checkout-order-totals-rows {
    margin: 0;
}

.checkout-order-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
}

.checkout-order-total-row:last-child {
    margin-bottom: 0;
}

.checkout-order-total-row dt,
.checkout-order-total-row dd {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
}

.checkout-order-total-row dt {
    color: #475569;
    font-weight: 500;
}

.checkout-order-total-row dd {
    color: #0f172a;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.checkout-order-total-row.is-points dd {
    color: #e11d48;
}

.checkout-order-total-row.is-hidden {
    display: none;
}

.checkout-order-total-row.is-payable {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.checkout-order-total-row.is-payable dt {
    color: #0f172a;
    font-weight: 700;
}

.checkout-order-total-row.is-payable dd {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.checkout-summary-card .checkout-order-totals {
    margin-top: 8px;
    padding-top: 12px;
}

.checkout-total-row strong {
    color: #6b7280;
}

.checkout-total-row.is-payable strong {
    display: inline-block;
    color: #dc2626;
    font-size: 1.18em;
    font-weight: 900;
    animation: cartPayablePulse 1.45s ease-in-out infinite;
    transform-origin: center;
    will-change: transform, text-shadow;
}

.mini-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 40, 0.52);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s;
    z-index: 60;
}

.mini-cart-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mini-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(340px, 82vw);
    height: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: -14px 0 36px rgba(17, 34, 68, 0.24);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 61;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1025px) {
    .mini-cart-overlay {
        display: none !important;
    }

    .mini-cart-drawer {
        top: 76px;
        right: max(14px, calc((100% - var(--site-max-width)) / 2));
        width: min(390px, min(92vw, 100% - 28px));
        height: auto;
        max-height: calc(100vh - 100px);
        border: 1px solid #dbe6f5;
        border-radius: 16px;
        box-shadow: 0 16px 32px rgba(17, 34, 68, 0.2);
        transform: translateY(10px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    }

    .mini-cart-drawer.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    #miniCartCloseBtn {
        display: none;
    }
}

.mini-cart-drawer.is-open {
    transform: translateX(0);
}

/* Мобильная/планшетная версия: корзина — отдельная страница /cart (как Ozon), не боковая панель */
@media (max-width: 1024px) {
    .mini-cart-overlay,
    .mini-cart-drawer {
        display: none !important;
    }
}

.mini-cart-head,
.mini-cart-foot {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.mini-cart-head {
    position: relative;
    padding-right: 62px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.mini-cart-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

#miniCartCloseBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    padding: 0;
    border-color: #d7e3f7;
    background: #fff;
}

.mini-cart-foot {
    margin-top: auto;
    border-top: 1px solid var(--border);
    border-bottom: 0;
    background: #ffffff;
}

.mini-cart-foot p {
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 17px;
    font-weight: 800;
}

.mini-cart-foot strong {
    color: #334155;
}

.mini-cart-delivery-label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.mini-cart-delivery-select {
    width: 100%;
    margin-bottom: 6px;
}

.mini-cart-delivery-hint {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
}

.mini-cart-delivery-box {
    margin: 0 0 10px;
    padding: 10px;
    border: 1px solid #dbe7fb;
    border-radius: 12px;
    background: #f8fbff;
}

#miniCartTotal {
    font-size: 26px;
    font-weight: 900;
    color: #dc2626;
    letter-spacing: -0.01em;
}

.mini-cart-actions {
    display: block;
}

.mini-cart-checkout-btn {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 40px;
    border-radius: 10px;
    font-weight: 700;
}

.mini-cart-items {
    padding: 14px 16px;
    overflow: auto;
    display: grid;
    gap: 12px;
}

.mini-cart-empty-card {
    width: 100%;
    min-width: 0;
    align-self: stretch;
}

.mini-cart-empty-message {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    display: block;
    text-align: center;
    padding: 14px 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #64748b;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid #dbe7fb;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Главная: промо-герой слева + горизонтальная лента товаров (сразу под категориями / чипами) */
.featured-rail-section {
    margin-top: 8px;
}

body.layout-home-catalog .featured-rail-section.featured-rail-under-catalog {
    margin: 12px auto 22px;
}

body.layout-home-catalog .quick-grid + .featured-rail-section.featured-rail-under-catalog {
    margin-top: 6px;
}

.featured-rail-track-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.featured-rail-track-head-arrows {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.featured-rail-track-head-arrows .home-showcase-arrow {
    flex-shrink: 0;
}

.featured-rail-track-section-head--images-only {
    justify-content: flex-end;
}

.featured-rail-track-section-head-spacer {
    display: none;
}

.featured-rail-slide-no-nav {
    pointer-events: none;
    cursor: default;
}

.featured-rail-hero--slides-only .featured-rail-hero-overlay,
.featured-rail-hero--slides-only .featured-rail-hero-text {
    display: none !important;
}

.featured-rail-track--images.featured-rail-track {
    gap: 12px;
}

.featured-rail-track--images .featured-rail-img-card {
    flex: 0 0 auto;
    display: block;
    border-radius: var(--catalog-card-radius);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
    text-decoration: none;
    color: inherit;
}

.featured-rail-track--images .featured-rail-img-card img {
    display: block;
    height: 158px;
    width: auto;
    max-width: min(280px, 42vw);
    object-fit: cover;
}

.featured-rail-img-card--static {
    cursor: default;
}

/* Главная: раньше сетка герой|контент; герой перенесён в колонку каталога — остаётся одна колонка контента */
.home-split-with-promo {
    display: grid;
    grid-template-columns: minmax(200px, 232px) minmax(0, 1fr);
    gap: 14px 16px;
    align-items: start;
    margin-top: 10px;
    margin-bottom: 22px;
}

.home-split-with-promo--rail-only {
    display: block;
    grid-template-columns: none;
    gap: 0;
}

.home-split-with-promo__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.home-split-with-promo__main > .container {
    width: 100%;
    max-width: none;
}

.home-split-with-promo__main > .quick-grid:first-child,
.home-split-with-promo__main > .home-category-showcase-strip:first-child,
.home-split-with-promo__main > .home-category-showcase-legacy:first-child {
    margin-top: 0;
}

.home-split-with-promo__main .featured-rail-track-section + .home-category-showcase-strip.home-category-showcase-strip--after-rail,
.home-split-with-promo__main .featured-rail-track-section + .quick-grid.quick-grid--under-featured-rail {
    margin-top: 18px;
}

.featured-rail-track-section .featured-rail-head {
    margin-bottom: 10px;
}

.home-split-with-promo__main .featured-rail-track-section.products-section {
    margin-top: 14px;
    margin-bottom: 10px;
}

/* В колонке справа от промо-героя — как у блока «Акции и скидки»: контейнер и левое выравнивание */
.home-split-with-promo__main .featured-rail-track-section.container .section-head.featured-rail-head {
    justify-content: flex-start;
}

.home-split-with-promo__main .featured-rail-track-section .section-head.featured-rail-head h2 {
    text-align: left;
}

.home-split-with-promo__main .featured-rail-track {
    justify-content: flex-start;
}

@media (max-width: 1024px) {
    .home-split-with-promo {
        grid-template-columns: 1fr;
    }

    .layout-home-catalog .category-nav-home .home-catalog-left-column {
        width: max-content;
        max-width: min(94vw, 100%);
        gap: 0;
    }

    .layout-home-catalog .category-nav-home .home-catalog-featured-rail-panel {
        margin: 0;
        padding: 8px;
        display: inline-block;
        vertical-align: top;
        max-width: 100%;
        box-sizing: border-box;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: var(--catalog-card-radius);
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
        overflow: hidden;
    }

    .layout-home-catalog .category-nav-home .home-catalog-featured-rail-panel .featured-rail-hero--sidebar .featured-rail-hero-media img {
        max-height: min(72vh, 720px);
    }
}

.featured-rail-head {
    align-items: center;
}

.featured-rail {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.featured-rail-hero {
    position: relative;
    border-radius: var(--ozon-panel-radius);
    overflow: hidden;
    min-height: 380px;
    background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
}

.featured-rail-hero-link {
    display: block;
    height: 100%;
    min-height: 380px;
    color: inherit;
    text-decoration: none;
}

.featured-rail-hero-media {
    position: relative;
    height: 100%;
    min-height: 380px;
}

.featured-rail-hero-media img {
    width: 100%;
    height: 100%;
    min-height: 380px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.featured-rail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 25%, rgba(8, 12, 22, 0.82) 100%);
    pointer-events: none;
}

.featured-rail-hero-text {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 56px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #f8fafc;
    text-align: left;
    pointer-events: none;
}

.featured-rail-hero-cat {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0.92;
    text-transform: uppercase;
}

.featured-rail-hero-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.featured-rail-hero-price {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #fff;
    margin-top: 4px;
}

.featured-rail-hero-arrows {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.featured-rail-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.featured-rail-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    flex: 1;
    align-items: stretch;
    /* pan-x alone blocks vertical page scroll when the gesture starts on the track (mobile/tablet) */
    touch-action: pan-x pan-y;
}

.featured-rail-track::-webkit-scrollbar {
    display: none;
}

.featured-rail-track .product-card {
    flex: 0 0 196px;
    width: 196px;
    max-width: 220px;
    scroll-snap-align: start;
    height: auto;
}

@media (max-width: 900px) {
    .featured-rail {
        grid-template-columns: 1fr;
    }

    .featured-rail-hero,
    .featured-rail-hero-link,
    .featured-rail-hero-media {
        min-height: 300px;
    }

    .featured-rail-hero-media img {
        min-height: 300px;
    }

    .featured-rail-track .product-card {
        flex: 0 0 min(52vw, 200px);
        width: min(52vw, 200px);
    }
}

.mini-cart-items::-webkit-scrollbar {
    width: 8px;
}

.mini-cart-items::-webkit-scrollbar-thumb {
    background: #d8e3f7;
    border-radius: 999px;
}

.mini-cart-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 11px;
    align-items: start;
    border: 1px solid #dbe7fb;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(17, 34, 68, 0.06);
}

.mini-cart-item img {
    width: 100%;
    aspect-ratio: var(--product-photo-aspect);
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    background: #f5f7ff;
}

.mini-cart-item-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.mini-cart-item-price {
    color: #dc2626;
    font-size: 16px;
    font-weight: 800;
}

.mini-cart-qty-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.mini-cart-qty-btn {
    min-width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 999px;
    border-color: #dbe4f2;
    background: #f5f8fd;
    color: #64748b;
    font-weight: 600;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.mini-cart-qty-btn:hover {
    background: #eef4ff;
    border-color: #cfdbee;
    color: #334155;
}

.mini-cart-remove-btn {
    margin-left: auto;
    border-radius: 8px;
    border-color: #f1c7c7;
    color: #b91c1c;
    background: #fff5f5;
    font-size: 12px;
    padding: 0 10px;
    min-height: 30px;
}

.mini-cart-qty {
    min-width: 18px;
    text-align: center;
    font-weight: 700;
}

.cart-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    background: #0f172a;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.28);
    opacity: 0;
    visibility: hidden;
    transition: all 0.22s ease;
    z-index: 70;
    font-size: 14px;
}

.cart-toast.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

@media (max-width: 1024px) {
    .cart-toast {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        right: auto;
        width: min(92vw, 420px);
        z-index: 110;
        text-align: center;
    }
}

.site-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.site-popup-overlay.is-open {
    display: flex;
}

.site-popup-modal {
    position: relative;
    width: min(560px, 100%);
    max-height: min(88vh, 760px);
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
}

.site-popup-modal img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px 18px 0 0;
}

.site-popup-body {
    padding: 16px 18px 18px;
}

.site-popup-body h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.site-popup-content {
    color: #0f172a;
    line-height: 1.6;
}

.site-popup-close {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.leave-request-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    z-index: 130;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.leave-request-overlay.is-open {
    display: flex;
}

.mihome-confirm-modal.leave-request-modal {
    width: min(400px, 92vw);
    min-height: 0;
    padding: 22px 20px 20px;
}

.mihome-confirm-title {
    margin: 0 36px 10px 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.mihome-confirm-message {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.5;
    color: #475569;
}

.mihome-confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mihome-confirm-actions .buy-btn,
.mihome-confirm-actions .ghost-btn {
    width: 100%;
    margin-top: 0;
    min-height: 44px;
    font-size: 15px;
    font-weight: 700;
}

.mihome-confirm-cancel-btn {
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #334155;
}

.theme-dark .mihome-confirm-title {
    color: #e5ecf7;
}

.theme-dark .mihome-confirm-message {
    color: #9fb2cd;
}

.theme-dark .mihome-confirm-modal.leave-request-modal {
    background: #111a2b;
}

.theme-dark .mihome-confirm-cancel-btn {
    background: #1a273c;
    border-color: #2d3f5d;
    color: #c8d5ea;
}

.leave-request-modal {
    width: min(520px, 94vw);
    min-height: min(52vh, 560px);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
    padding: 18px;
    position: relative;
}

.leave-request-close {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.leave-request-title {
    margin: 0 36px 12px 0;
    font-size: 24px;
    text-align: center;
}

.leave-request-description {
    margin: 0 0 10px;
    text-align: center;
    font-size: 14px;
    color: #475569;
}

.leave-request-product {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.leave-request-product img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.leave-request-product p {
    margin: 0;
    font-weight: 600;
}

.leave-request-form {
    display: grid;
    gap: 8px;
}

.leave-request-inline-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.leave-request-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: end;
}

.leave-request-intro[hidden],
.leave-request-member-contact[hidden],
.leave-request-contact-grid[hidden],
#leaveRequestGuestFields[hidden],
#leaveRequestGuestIntro[hidden],
#leaveRequestMemberIntro[hidden],
#leaveRequestMemberContact[hidden] {
    display: none !important;
}

.leave-request-field-name {
    grid-column: 1;
    grid-row: 1;
}

.leave-request-field-phone {
    grid-column: 2;
    grid-row: 1;
    min-width: 148px;
}

.leave-request-field-phone .phone-input-wrap,
.leave-request-field-phone .phone-input-wrap input[name="phone"] {
    width: 100%;
}

.leave-request-field-code {
    grid-column: 1 / -1;
    grid-row: 2;
}

.leave-request-contact-grid .leave-request-field-code.account-otp-field {
    margin-top: 0;
}

.leave-request-contact-grid .leave-request-field-code .account-otp-row {
    align-items: center;
}

.leave-request-contact-grid .leave-request-otp-send {
    align-self: auto;
    justify-self: auto;
    white-space: nowrap;
}

.leave-request-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.leave-request-form label {
    font-size: 13px;
    font-weight: 700;
}

.leave-request-form input,
.leave-request-form textarea {
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    font-size: 14px;
}

.leave-request-form textarea {
    resize: none;
    overflow-y: auto;
    overflow-wrap: anywhere;
}

.leave-request-submit-btn {
    margin-top: 6px;
}

.leave-request-feedback {
    margin: 4px 0 2px;
    font-size: 13px;
    font-weight: 600;
}

.leave-request-feedback.is-error {
    color: #b91c1c;
}

.leave-request-feedback.is-success {
    color: #166534;
}

.leave-request-intro--member {
    text-align: center;
    margin-bottom: 4px;
}

.leave-request-member-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ff8a3d);
    box-shadow: 0 8px 22px rgba(255, 103, 0, 0.28);
}

.leave-request-member-badge-icon {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.leave-request-title--member {
    font-size: 20px;
    line-height: 1.25;
    margin-bottom: 8px;
}

.leave-request-description--member {
    margin: 0 auto 6px;
    max-width: 34ch;
    font-size: 14px;
    line-height: 1.45;
    color: #64748b;
}

.leave-request-member-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #ffe4d4;
    background: #fff8f3;
}

.leave-request-member-contact-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
}

.leave-request-member-contact strong {
    font-size: 14px;
    line-height: 1.4;
    color: #1a1a1a;
    font-weight: 600;
}

.leave-request-form--member .leave-request-submit-btn {
    margin-top: 4px;
}

.leave-request-success-modal {
    width: min(540px, 94vw);
    min-height: auto;
    padding: 28px 22px 24px;
    text-align: center;
    border: 1px solid #dbe4ee;
}

.leave-request-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: 800;
    color: #166534;
    background: #dcfce7;
    border: 2px solid #86efac;
    box-shadow: 0 10px 22px rgba(22, 101, 52, 0.2);
}

.leave-request-success-text {
    margin: 0;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 600;
    color: #0f172a;
}

.terms-page-content {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--catalog-card-radius);
    padding: 16px;
    line-height: 1.6;
    color: #0f172a;
}

.terms-page-title {
    font-size: 28px;
    line-height: 1.25;
    font-weight: 700;
    width: 100%;
}

.terms-page-title p {
    margin: 0;
}

.terms-page-section .section-head {
    display: block;
}

.delivery-payment-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 240px;
    gap: 16px;
    align-items: start;
}

.delivery-payment-main {
    min-width: 0;
}

.delivery-payment-side-banner {
    min-height: 640px;
    border-radius: var(--catalog-card-radius);
    border: 1px solid #c7f0eb;
    background: linear-gradient(180deg, #d9fbf6 0%, #b4f3ea 100%);
    padding: 16px 14px;
    box-shadow: 0 14px 30px rgba(20, 184, 166, 0.16);
    text-align: center;
}

.delivery-payment-side-banner__media {
    width: 100%;
    border-radius: var(--ozon-media-radius);
    overflow: hidden;
    margin-bottom: 10px;
}

.delivery-payment-side-banner--left {
    border-color: #cde6ff;
    background: linear-gradient(180deg, #eaf4ff 0%, #d9ecff 100%);
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.14);
}

.delivery-payment-side-banner__media img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.delivery-payment-side-banner--image-only {
    display: flex;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

.delivery-payment-side-banner--image-only .delivery-payment-side-banner__media {
    flex: 1 1 auto;
    height: auto;
    margin-bottom: 0;
    border-radius: 0;
}

.delivery-payment-side-banner--image-only .delivery-payment-side-banner__media img {
    height: 100%;
    min-height: 100%;
}

.delivery-payment-side-banner__title {
    margin-top: 8px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
}

.delivery-payment-side-banner__text {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: #155e75;
}

.terms-page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.terms-page-content h2,
.terms-page-content h3 {
    margin-top: 1.1em;
}

.checkout-success-title {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.25;
    text-align: center;
    color: #0f172a;
}

.checkout-success-modal .leave-request-success-text {
    font-size: 17px;
}

@media (max-width: 640px) {
    .leave-request-inline-row,
    .leave-request-contact-grid {
        grid-template-columns: 1fr;
    }

    .leave-request-field-name,
    .leave-request-field-phone,
    .leave-request-field-code {
        grid-column: 1;
        grid-row: auto;
        min-width: 0;
    }
}

.theme-dark {
    /* Тёмная тема: стрелки лент — тёмные кнопки, светлый значок */
    --carousel-rail-arrow-bg: #162238;
    --carousel-rail-arrow-border: #2d3f5d;
    --carousel-rail-arrow-fg: #c9d6ea;
    --carousel-rail-arrow-bg-hover: #1b2b45;
    --carousel-rail-arrow-fg-hover: #e8eef9;
    --carousel-rail-arrow-shadow: 0 2px 12px rgba(2, 6, 15, 0.45);
}

.theme-dark body {
    background: #0b1220;
    color: #e5ecf7;
}

.theme-dark h1,
.theme-dark h2,
.theme-dark h3 {
    color: #f1f5f9;
}

.theme-dark .site-header,
.theme-dark .desktop-top-bar-fixed,
.theme-dark .site-footer,
.theme-dark .hero-banner,
.theme-dark .quick-item,
.theme-dark .products-section,
.theme-dark .product-card,
.theme-dark .news-card,
.theme-dark .product-description-card,
.theme-dark .mini-cart-drawer,
.theme-dark .mobile-search-sheet,
.theme-dark .site-popup-modal {
    background: #111a2b;
    color: #e5ecf7;
    border-color: #24324a;
}

.theme-dark .leave-request-overlay {
    background: rgba(2, 6, 15, 0.72);
}

.theme-dark .leave-request-modal {
    background: #111a2b;
    color: #e5ecf7;
    border: 1px solid #24324a;
    box-shadow: 0 24px 60px rgba(2, 6, 15, 0.55);
}

.theme-dark .leave-request-title {
    color: #e5ecf7;
}

.theme-dark .leave-request-description {
    color: #9fb0c8;
}

.theme-dark .leave-request-product p {
    color: #dbe5f3;
}

.theme-dark .leave-request-product img {
    border-color: #2d3f5d;
    background: #162238;
}

.theme-dark .leave-request-form label {
    color: #9fb2cd;
}

.theme-dark .leave-request-form input,
.theme-dark .leave-request-form textarea {
    background: #162238;
    border-color: #2d3f5d;
    color: #e5ecf7;
}

.theme-dark .leave-request-form input::placeholder,
.theme-dark .leave-request-form textarea::placeholder {
    color: #8fa3c0;
}

.theme-dark .leave-request-close {
    background: #162238;
    border: 1px solid #2d3f5d;
    color: #dbe5f3;
}

.theme-dark .leave-request-feedback.is-error {
    color: #fca5a5;
}

.theme-dark .leave-request-feedback.is-success {
    color: #86efac;
}

.theme-dark .leave-request-member-contact {
    border-color: #5c3d24;
    background: rgba(255, 103, 0, 0.1);
}

.theme-dark .leave-request-description--member {
    color: #94a3b8;
}

.theme-dark .leave-request-member-contact strong {
    color: #e2e8f0;
}

.theme-dark .leave-request-success-modal,
.theme-dark .checkout-success-modal {
    background: #111a2b;
    border-color: #24324a;
    box-shadow: 0 24px 60px rgba(2, 6, 15, 0.55);
}

.theme-dark .leave-request-success-icon {
    color: #86efac;
    background: rgba(22, 101, 52, 0.28);
    border-color: rgba(74, 222, 128, 0.45);
    box-shadow: 0 10px 22px rgba(6, 24, 12, 0.35);
}

.theme-dark .leave-request-success-text {
    color: #e5ecf7;
}

.theme-dark .checkout-points-remind-modal {
    background: #111a2b;
    border-color: #24324a;
    box-shadow: 0 24px 60px rgba(2, 6, 15, 0.55);
}

.theme-dark .checkout-points-remind-title {
    color: #e5ecf7;
}

.theme-dark .checkout-points-remind-body {
    color: #cdd9ea;
}

.theme-dark .checkout-points-remind-fill-btn {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
    color: #ecfdf5;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

.theme-dark .checkout-points-remind-fill-btn:hover {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.32);
}

.theme-dark .buy-btn.checkout-points-remind-fill-btn:hover,
.theme-dark .buy-btn.checkout-points-remind-fill-btn:focus-visible {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.theme-dark .site-popup-body h3 {
    color: #e5ecf7;
}

.theme-dark .site-popup-content {
    color: #cdd9ea;
}

.theme-dark .terms-page-content {
    background: #111a2b;
    border-color: #24324a;
    color: #e5ecf7;
}

.theme-dark .delivery-payment-side-banner {
    border-color: #115e59;
    background: linear-gradient(180deg, #0f2d34 0%, #0d3b42 100%);
}

.theme-dark .delivery-payment-side-banner--left {
    border-color: #27436b;
    background: linear-gradient(180deg, #12253f 0%, #183154 100%);
}

.theme-dark .delivery-payment-side-banner__title {
    color: #e5ecf7;
}

.theme-dark .delivery-payment-side-banner__text {
    color: #a7f3d0;
}

@media (max-width: 1024px) {
    .delivery-payment-layout {
        grid-template-columns: 1fr;
    }

    .delivery-payment-main {
        order: 1;
    }

    .delivery-payment-side-banner--left {
        order: 2;
    }

    .delivery-payment-side-banner {
        order: 3;
        min-height: 520px;
    }
}

.theme-dark .checkout-success-title {
    color: #e5ecf7;
}

.theme-dark .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 10px 22px rgba(3, 8, 18, 0.45);
}

.theme-dark .filter-sidebar-catalog-shell .mega-menu-categories {
    background: var(--surface);
}

.theme-dark .filter-sidebar .filter-form {
    border-top-color: #24324a;
}

.theme-dark .filter-sidebar {
    background: #111a2b;
    border-color: #24324a;
    box-shadow: 0 14px 30px rgba(3, 8, 18, 0.45);
}

.theme-dark .filter-form h3,
.theme-dark .filter-form .desktop-filter-title {
    color: #dce6f4;
}

.theme-dark .filter-form > label {
    color: #9fb2cd;
}

.theme-dark .filter-group {
    background: #162238;
    border-color: #2d3f5d;
}

.theme-dark .filter-group legend {
    color: #93a4be;
}

.theme-dark .filter-form input[type="number"],
.theme-dark .filter-form select {
    background: #162238;
    border-color: #2d3f5d;
    color: #e5ecf7;
}

.theme-dark .check-line {
    color: #c9d6ea;
}

.theme-dark .check-line:hover {
    background: #1b2a43;
}

.theme-dark .category-content {
    background: #111a2b;
    border-color: #24324a;
    box-shadow: 0 10px 22px rgba(3, 8, 18, 0.45);
}

.theme-dark .category-content .section-head h2 {
    color: #e8edf5;
}

.theme-dark .products-section:not(.cart-page):not(.checkout-section):not(.news-page):not(.cart-feed-section) .section-head:not(.checkout-head):not(.cart-page-head):not(.compare-page-head) h2,
.theme-dark .home-category-strip-title,
.theme-dark .category-content .section-head h2 {
    color: #e8edf5;
    border-bottom-color: #ff8533;
}

.theme-dark .category-content .section-head .product-meta {
    color: #9fb2cd;
}

.theme-dark #categoryResultsCount {
    background: #162238;
    color: #93c5fd;
    border-color: #2d3f5d;
}

.theme-dark .mobile-filter-open-btn {
    background: #162238;
    color: #93c5fd;
    border-color: #2d3f5d;
}

.theme-dark .mobile-filter-open-btn:hover {
    background: #1e2d47;
    border-color: #3a5175;
    color: #bfdbfe;
}

.theme-dark .category-subcategory-chip {
    background: #162238;
    border-color: #2d3f5d;
    color: #c9d6ea;
}

.theme-dark .category-subcategory-chip:hover {
    border-color: #3a5175;
    color: #8fb6ff;
}

.theme-dark .search-form {
    background: #0f1727;
    border-color: #2a3a56;
}

.theme-dark .header-actions-icon-svg--favorites,
.theme-dark .header-actions-icon-svg--points {
    color: #94a3b8;
}

.theme-dark .header-actions a.header-favorites-link:hover .header-actions-icon-svg--favorites,
.theme-dark .header-actions a.header-points-link:hover .header-actions-icon-svg--points {
    color: #cbd5e1;
}

.theme-dark .header-actions-icon-svg--cart {
    color: #94a3b8;
}

.theme-dark .header-actions a.header-cart-link:hover .header-actions-icon-svg--cart {
    color: #cbd5e1;
}

.theme-dark .header-actions-icon-svg--account {
    color: #94a3b8;
}

.theme-dark .header-actions a.header-account-link:hover .header-actions-icon-svg--account {
    color: #cbd5e1;
}

.theme-dark .header-actions-icon-svg--compare {
    color: #94a3b8;
}

.theme-dark .header-actions a.header-compare-link:hover .header-actions-icon-svg--compare {
    color: #cbd5e1;
}

.theme-dark .header-actions a,
.theme-dark .lang-switcher a {
    background: #162238;
    border-color: #2d3f5d;
    color: #dbe5f3;
}

.theme-dark .header-icon-badge-count {
    border-color: #162238;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.theme-dark .breadcrumbs ol {
    color: #9fb2cd;
}

.theme-dark .breadcrumbs li + li::before {
    color: #6f87a8;
}

.theme-dark .breadcrumbs a {
    color: #c8d7eb;
}

.theme-dark .breadcrumbs a:hover {
    color: #f8fafc;
}

.theme-dark .header-clock {
    color: #8fa3c0;
}

.theme-dark .mobile-info-bar {
    background: rgba(254, 215, 170, 0.12);
    color: #fdba74;
    border: 1px solid rgba(251, 146, 60, 0.25);
}

.theme-dark .header-clock-time {
    color: #dbe5f3;
}

.theme-dark .header-account-guest-hint {
    border-color: #2d3f5d;
    background: linear-gradient(180deg, #1c2740, #162238);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
    color: #c9d6ea;
}

.theme-dark .header-actions .header-account-guest-hint a.header-account-guest-hint__register {
    color: #fdba74;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.theme-dark .header-actions .header-account-guest-hint a.header-account-guest-hint__register:hover {
    background: rgba(251, 146, 60, 0.12);
}

.theme-dark .header-actions a:hover,
.theme-dark .lang-switcher a:hover {
    border-color: #3a5175;
    box-shadow: 0 8px 16px rgba(5, 10, 18, 0.35);
}

.theme-dark .header-actions a.header-points-link:not(.is-active):hover {
    border-color: #5b7299;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
    transform: translateY(-1px);
}

.theme-dark .header-points-link__tooltip {
    border-color: #2d3f5d;
    background: linear-gradient(180deg, #1c2740, #162238);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
    color: #c9d6ea;
}

.theme-dark .header-actions a.is-active {
    border-color: #fb923c;
    background: linear-gradient(180deg, rgba(251, 146, 60, 0.2), rgba(251, 146, 60, 0.07));
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.45), 0 4px 16px rgba(251, 146, 60, 0.12);
    color: #fef3e8;
}

.theme-dark .header-actions a.is-active .header-actions-icon-svg {
    color: #fdba74;
}

.theme-dark .header-actions a.is-active:hover {
    border-color: #fdba74;
    box-shadow: inset 0 0 0 1px rgba(253, 186, 116, 0.5), 0 6px 20px rgba(251, 146, 60, 0.14);
}

.theme-dark .header-actions a.header-account-link--with-label .header-account-link__label {
    color: #94a3b8;
}

.theme-dark .header-actions a.header-account-link--with-label:hover .header-account-link__label {
    color: #cbd5e1;
}

.theme-dark .header-actions a.header-account-link.is-active .header-account-link__label {
    color: #fdba74;
}

.theme-dark .header-actions a.header-account-link.is-active:hover .header-account-link__label {
    color: #cbd5e1;
}

/* Подсветка шапки при добавлении в корзину / избранное / сравнение — в тонах тёмной темы */
.theme-dark .header-actions a#headerCartLink.is-added-highlight,
.theme-dark .header-actions a#headerFavoritesLink.is-added-highlight,
.theme-dark .header-actions a#headerCompareLink.is-added-highlight {
    border-color: #3b82f6;
    color: #e8f0ff;
    background: linear-gradient(180deg, #1c3558 0%, #152238 100%);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.32), 0 10px 26px rgba(15, 23, 42, 0.55);
    animation: variationRequiredPulse 0.45s ease 2;
}

.theme-dark .ghost-btn {
    background: #162238;
    border-color: #2d3f5d;
    color: #dbe5f3;
}

.theme-dark .ghost-btn:hover {
    background: #1b2b45;
    border-color: #3a5175;
    color: #f8fafc;
}

.theme-dark .layout-header-catalog .header-home-catalog-toggle .home-catalog-toggle {
    border: 0;
    background: var(--primary);
    color: #fff;
    box-shadow: none;
}

.theme-dark .layout-header-catalog .header-home-catalog-toggle .home-catalog-toggle::before {
    color: #fff;
}

.theme-dark .layout-header-catalog .header-home-catalog-toggle .home-catalog-toggle:hover {
    background: var(--primary-dark);
    box-shadow: none;
}

.theme-dark .layout-home-catalog .category-nav-home .mega-menu,
.theme-dark .layout-header-catalog .category-nav-external .mega-menu {
    background: #363e4a;
    border-color: #4e5969;
    box-shadow: 0 10px 22px rgba(3, 8, 18, 0.45);
}

.theme-dark .layout-home-catalog .category-nav-home .mega-menu-categories,
.theme-dark .layout-header-catalog .category-nav-external .mega-menu-categories {
    background: transparent;
    border-color: transparent;
}

.theme-dark .layout-home-catalog .category-nav-home .mega-menu-category-children.mega-menu-category-children--dock,
.theme-dark .layout-header-catalog .category-nav-external .mega-menu-category-children.mega-menu-category-children--dock,
.theme-dark .filter-sidebar-catalog-shell .mega-menu-category-children.mega-menu-category-children--dock,
.theme-dark .mega-menu-category-children.mega-menu-category-children--dock {
    background: #363e4a;
    border-color: #4e5969;
    box-shadow: 0 14px 36px rgba(3, 8, 18, 0.5);
}

.theme-dark .product-meta {
    background: #1a2740;
    color: #9fb2cd;
}

.theme-dark .product-desc {
    color: #a8b7cd;
}

.theme-dark .product-rating-value {
    color: #e5ecf7;
}

.theme-dark .buy-btn:disabled {
    background: #5c6f8f;
    color: #dce5f3;
}

.theme-dark .buy-btn.is-added-temp {
    background: #15803d;
    border-color: #15803d;
}

.theme-dark .checkout-card,
.theme-dark .checkout-summary-card {
    background: #111a2b;
    border-color: #24324a;
    box-shadow: 0 14px 30px rgba(3, 8, 18, 0.45);
}

.theme-dark .checkout-order-total-row dt {
    color: #9fb2cd;
}

.theme-dark .checkout-order-total-row dd {
    color: #e5ecf7;
}

.theme-dark .checkout-order-total-row.is-payable {
    border-top-color: #2d3f5d;
}

.theme-dark .checkout-order-totals {
    border-top-color: #2d3f5d;
}

.theme-dark .checkout-summary-card h3,
.theme-dark .checkout-item-title,
.theme-dark .checkout-total-row {
    color: #e7edf7;
}

.theme-dark .checkout-item-variation {
    background: rgba(255, 103, 0, 0.16);
    color: #ffb07a;
}

.theme-dark .checkout-summary-item {
    background: #162238;
    border-color: #2d3f5d;
}

.theme-dark .checkout-item-thumb {
    background: #132036;
}

.theme-dark .checkout-item-link:hover {
    background: rgba(59, 130, 246, 0.2);
}

.theme-dark .checkout-item-right {
    color: #b8c7dc;
}

.theme-dark .checkout-total-row {
    border-top-color: #2d3f5d;
    color: #94a3b8;
}

.theme-dark .checkout-total-row strong {
    color: #94a3b8;
}

.theme-dark .checkout-total-row.is-payable strong {
    color: #fb7185;
}

.theme-dark .cart-delivery-box {
    background: #132036;
    border-color: #2a3a56;
}

.theme-dark .cart-table {
    background: #111a2b;
    border-color: #2a3a56;
    box-shadow: 0 14px 30px rgba(3, 8, 18, 0.45);
}

.theme-dark .cart-table th {
    background: linear-gradient(180deg, #152238 0%, #132034 100%);
    color: #9fb2cd;
    border-bottom-color: #2d3f5d;
}

.theme-dark .cart-table td {
    border-bottom-color: #22324d;
    color: #dbe5f3;
}

.theme-dark .cart-table tbody tr:hover {
    background: #162238;
}

@media (max-width: 1024px) {
    .cart-page-layout {
        grid-template-columns: 1fr;
    }
}

.theme-dark .cart-inline-form input[type="number"] {
    background: transparent;
    border-color: transparent;
    color: #e5ecf7;
}

.theme-dark .cart-qty-btn {
    border: 0;
    background: #1b2a43;
    color: #e5ecf7;
}

.theme-dark .cart-remove-btn {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.theme-dark .cart-remove-btn:hover {
    background: #991b1b;
    border-color: #991b1b;
}

.theme-dark .cart-item-thumb {
    background: #162238;
}

.theme-dark .cart-grand-total {
    color: #f1f5f9;
}

.theme-dark .cart-delivery-totals {
    border-top-color: #2f4467;
}

.theme-dark .cart-delivery-totals .cart-grand-total {
    color: #94a3b8;
}

.theme-dark .cart-delivery-totals .cart-grand-total strong {
    color: #94a3b8;
}

.theme-dark .cart-delivery-totals .cart-grand-total.is-payable strong {
    color: #fb7185;
}

@keyframes cartPayablePulse {
    0%,
    100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(220, 38, 38, 0);
    }
    50% {
        transform: scale(1.07);
        text-shadow: 0 0 10px rgba(220, 38, 38, 0.24);
    }
}

.theme-dark .cart-feed-section,
.theme-dark .cart-recommended-section {
    border-top-color: #2a3b59;
    background: linear-gradient(180deg, rgba(19, 32, 54, 0.72) 0%, rgba(19, 32, 54, 0) 100%);
}

.cart-page.products-section {
    padding-top: 6px;
}

.cart-page,
.favorites-page.cart-page,
.compare-page.cart-page,
.brand-page.cart-page,
.news-page.cart-page,
.account-section.cart-page {
    background: #f3f4f6;
}

.page-shop-list .cart-feed-section {
    margin-top: 22px;
}

.cart-m-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 0 2px;
}

.cart-m-select-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    user-select: none;
}

.cart-m-select-all input {
    width: 18px;
    height: 18px;
    accent-color: #16a34a;
}

.cart-m-clear-form {
    margin: 0;
}

.cart-m-clear-btn {
    box-shadow: none;
}

.cart-m-section-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.cart-m-list {
    display: grid;
    gap: 10px;
}

.cart-m-card {
    display: flex;
    gap: 10px;
    padding: 14px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
    align-items: flex-start;
}

.cart-m-card-check {
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
    cursor: pointer;
}

.cart-m-card-check input {
    width: 18px;
    height: 18px;
    accent-color: #16a34a;
    cursor: pointer;
}

.cart-m-card.is-unselected {
    opacity: 0.55;
}

.cart-m-checkout-btn.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.cart-m-card-media {
    display: block;
    width: 72px;
    flex-shrink: 0;
    aspect-ratio: var(--product-photo-aspect, 1);
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}

.cart-m-card-body,
.cart-m-card-inner {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-m-card-content {
    min-width: 0;
}

.cart-m-card-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 8px;
}

.cart-m-card-qty-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.cart-m-sale-badge {
    display: inline-block;
    margin: 4px 0 6px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #fce7f3;
    color: #db2777;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.cart-m-qty-hint {
    margin: 0;
    font-size: 11px;
    line-height: 1.3;
    color: #dc2626;
    text-align: right;
    white-space: nowrap;
}

.cart-m-qty-hint.is-hidden {
    display: none;
}

.cart-m-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-m-card-price {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.cart-m-card-price-old {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
}

.cart-m-stock-badge {
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 8px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.cart-m-card-title {
    display: block;
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #1e293b;
    text-decoration: none;
}

.cart-m-card-meta {
    margin: 0 0 2px;
    font-size: 12px;
    line-height: 1.35;
    color: #64748b;
}

.cart-m-card-article .cart-m-card-meta-label {
    color: #94a3b8;
    margin-right: 4px;
}

.cart-m-card-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    margin-top: auto;
    padding-top: 10px;
    position: relative;
    isolation: isolate;
}

.cart-m-card-actions-left {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.cart-m-card-actions-left > .cart-m-favorite-btn,
.cart-m-card-actions-left > .cart-m-remove-form,
.cart-m-card-actions-left > .cart-m-buy-btn {
    flex-shrink: 0;
    align-self: center;
}

.cart-m-icon-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.cart-m-favorite-btn {
    position: static;
    top: auto;
    right: auto;
    left: auto;
    width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    line-height: 1;
    padding: 0;
    text-shadow: none;
    transform: none;
    box-shadow: none;
}

.cart-m-favorite-btn:hover,
.cart-m-remove-btn:hover,
.cart-m-clear-btn:hover {
    transform: none;
    color: #475569;
    border-color: #cbd5e1;
    background: #f8fafc;
}

.cart-m-favorite-btn.is-active {
    color: #e11d48;
    border-color: #fecdd3;
    background: #fff1f2;
    text-shadow: none;
}

.cart-m-favorite-btn.is-active:hover {
    color: #e11d48;
}

.cart-m-remove-form {
    margin: 0;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 3;
}

.cart-m-remove-form .cart-m-icon-btn {
    width: 100%;
    height: 34px;
    position: relative;
}

.cart-m-action-icon {
    width: 17px;
    height: 17px;
    display: block;
    flex-shrink: 0;
}

.cart-m-icon-btn svg,
.cart-m-icon-btn svg * {
    pointer-events: none;
}

.cart-m-remove-btn,
.cart-m-clear-btn {
    color: #64748b;
}

.cart-m-remove-form .cart-m-icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.cart-m-qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex: 0 0 auto;
    flex-shrink: 0;
    min-width: 90px;
    position: relative;
    z-index: 1;
    height: 34px;
    padding: 0 2px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    box-sizing: border-box;
}

.cart-m-qty-btn {
    width: 29px;
    height: 29px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: #64748b;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.cart-m-qty-btn:hover {
    background: #f8fafc;
    color: #475569;
}

.cart-m-qty-btn:active {
    background: #f1f5f9;
}

.cart-m-qty-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    padding: 0 2px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    color: #334155;
    user-select: none;
}

.cart-m-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-left: 0;
    min-height: 34px;
    padding: 0 11px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.cart-m-checkout-block {
    margin-top: 14px;
}

.cart-m-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(255, 103, 0, 0.28);
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

a.cart-m-checkout-btn:hover,
a.cart-m-checkout-btn:focus-visible {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 10px 22px rgba(255, 103, 0, 0.34);
    transform: translateY(-1px);
}

.cart-m-checkout-hint {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
    text-align: center;
}

.cart-m-summary {
    margin-top: 14px;
    padding: 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
}

.cart-m-summary-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.cart-m-summary-head h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.cart-m-summary-head span {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
}

.cart-m-summary-rows {
    margin: 0;
}

.cart-m-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
}

.cart-m-summary-row dt,
.cart-m-summary-row dd {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.cart-m-summary-row dt {
    color: #475569;
    font-weight: 500;
}

.cart-m-summary-row dd {
    color: #0f172a;
    font-weight: 700;
    text-align: right;
}

.cart-m-summary-row.is-discount dd {
    color: #e11d48;
}

.cart-m-summary-row.is-hidden {
    display: none;
}

.cart-m-grand-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.cart-m-grand-total strong {
    font-size: 22px;
    font-weight: 800;
}

.cart-page-layout {
    gap: 14px;
}

.cart-delivery-box {
    padding: 12px;
}

.cart-checkout-wrap-side {
    margin-top: 14px;
}

.cart-feed-section,
.cart-recommended-section {
    margin-top: 12px;
}

.cart-feed-section + .cart-feed-section {
    margin-top: 10px;
}

.cart-page-head {
    display: flex;
    margin-bottom: 14px;
    gap: 4px;
}

@media (max-width: 1024px) {
    .cart-page.products-section,
    .page-shop-list .cart-feed-section.products-section:last-of-type {
        padding-bottom: calc(var(--mbn-height, 46.75px) + env(safe-area-inset-bottom, 0px) + 12px);
    }

    .cart-page .section-head.cart-page-head,
    .cart-page .section-head.cart-page-head > div,
    .cart-page .section-head.cart-page-head h2,
    .cart-page .cart-page-subtitle,
    .cart-page .cart-page-empty {
        text-align: center;
    }

    .cart-page .section-head.cart-page-head {
        align-items: center;
        justify-content: center;
    }

    .page-shop-list .cart-page.products-section:not(:last-of-type) {
        padding-bottom: 0;
    }

    .cart-m-card-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 8px 12px;
        align-items: start;
    }

    .cart-m-card-prices {
        grid-column: 1;
        grid-row: 1;
    }

    .cart-m-card-qty-col {
        grid-column: 2;
        grid-row: 1;
        align-items: flex-end;
    }

    .cart-m-card-content {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (min-width: 1025px) {
    .cart-page-mobile > .cart-page-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
        gap: 20px;
        align-items: start;
        width: 100%;
    }

    .cart-m-main {
        background: #fff;
        border-radius: 16px;
        padding: 18px 20px 6px;
        box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
    }

    .cart-m-list {
        gap: 0;
    }

    .cart-m-card {
        display: grid;
        grid-template-columns: 28px 100px minmax(0, 1fr) minmax(108px, auto) minmax(112px, auto);
        gap: 12px 20px;
        padding: 20px 0;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid #e2e8f0;
        align-items: start;
    }

    .cart-m-card:last-child {
        border-bottom: 0;
    }

    .cart-m-card-inner {
        display: contents;
    }

    .cart-m-card-check {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
        padding-top: 8px;
    }

    .cart-m-card-media {
        grid-column: 2;
        grid-row: 1;
        width: 100px;
    }

    .cart-m-card-content {
        grid-column: 3;
        grid-row: 1;
        min-width: 0;
    }

    .cart-m-card-prices {
        grid-column: 4;
        grid-row: 1;
        flex-direction: column;
        align-items: flex-end;
        align-self: center;
        text-align: right;
        gap: 4px;
    }

    .cart-m-card-qty-col {
        grid-column: 5;
        grid-row: 1;
        align-self: center;
        align-items: center;
    }

    .cart-m-card-price {
        font-size: 22px;
        font-weight: 800;
        color: #0f172a;
        white-space: nowrap;
    }

    .cart-m-card-price-old {
        display: block;
        font-size: 14px;
    }

    .cart-m-card-title {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
        margin-bottom: 4px;
    }

    .cart-m-qty-hint {
        text-align: center;
        max-width: 112px;
        white-space: normal;
    }

    .cart-m-card-actions {
        margin-top: 8px;
        padding-top: 0;
    }

    .cart-m-card-actions-left {
        gap: 6px;
    }

    .cart-m-sidebar {
        position: sticky;
        top: calc(var(--header-height, 72px) + 16px);
    }

    .cart-m-checkout-block {
        margin-top: 0;
        padding: 16px;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
    }

    .cart-m-summary {
        margin-top: 12px;
    }

    .cart-m-checkout-hint {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .cart-page-head {
        margin-bottom: 14px;
    }

    .cart-page-subtitle {
        font-size: 13px;
    }

    .cart-main-col {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
    }

    .cart-table {
        min-width: 640px;
    }

    .cart-table th,
    .cart-table td {
        padding: 10px 8px;
    }

    .cart-item-thumb {
        width: 42px;
        aspect-ratio: var(--product-photo-aspect);
        height: auto;
        margin-right: 8px;
    }

    .cart-inline-form {
        gap: 0;
    }

    .cart-inline-form input[type="number"] {
        width: 28px;
        font-size: 14px;
    }

    .cart-qty-btn {
        min-width: 26px;
        height: 26px;
        font-size: 16px;
    }

    .cart-remove-btn {
        font-size: 13px;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .cart-delivery-box .cart-grand-total {
        font-size: 16px;
    }

    .cart-checkout-wrap-side {
        margin-top: 10px;
    }

    .cart-feed-section,
    .cart-recommended-section {
        margin-top: 16px;
        padding-top: 12px;
    }

    .cart-feed-section + .cart-feed-section {
        margin-top: 12px;
    }
}

.theme-dark .cart-page-subtitle {
    color: #9fb2cd;
}

.theme-dark .cart-page-empty {
    color: #9fb2cd;
}

.theme-dark .cart-page {
    background: #0b1220;
}

.theme-dark .cart-m-section-title,
.theme-dark .cart-m-card-title,
.theme-dark .cart-m-card-price,
.theme-dark .cart-m-summary-head h3,
.theme-dark .cart-m-grand-total {
    color: #e5ecf7;
}

.theme-dark .cart-m-card,
.theme-dark .cart-m-summary,
.theme-dark .cart-m-main,
.theme-dark .cart-m-checkout-block,
.theme-dark .cart-m-clear-btn,
.theme-dark .cart-m-icon-btn,
.theme-dark .cart-m-buy-btn {
    background: #111a2b;
    border-color: #2d3f5d;
}

.theme-dark .cart-m-card {
    border-bottom-color: #2d3f5d;
}

.theme-dark .cart-m-card-meta,
.theme-dark .cart-m-summary-head span,
.theme-dark .cart-m-checkout-hint,
.theme-dark .cart-m-select-all {
    color: #9fb2cd;
}

.theme-dark .cart-m-sale-badge {
    background: #3b1f35;
    color: #f9a8d4;
}

.theme-dark .cart-m-qty-hint {
    color: #fb7185;
}

.theme-dark .cart-m-qty {
    background: #111a2b;
    border-color: #2d3f5d;
    box-shadow: none;
}

.theme-dark .cart-m-qty-value {
    color: #e5ecf7;
}

.theme-dark .cart-m-qty-btn {
    background: #111a2b;
    color: #94a3b8;
}

.theme-dark .cart-m-qty-btn:hover {
    background: #162238;
    color: #cbd5e1;
}

.theme-dark .cart-m-qty-btn:active {
    background: #1a273c;
}

.theme-dark .cart-m-remove-btn,
.theme-dark .cart-m-clear-btn,
.theme-dark .cart-m-favorite-btn {
    color: #94a3b8;
}

.theme-dark .cart-m-remove-btn:hover,
.theme-dark .cart-m-clear-btn:hover,
.theme-dark .cart-m-favorite-btn:hover {
    color: #cbd5e1;
    border-color: #3d5275;
    background: #162238;
}

.theme-dark .checkout-page-subtitle {
    color: #9fb2cd;
}

/* Корзина / «Рекомендуем для вас» и выбор доставки — без яркого белого в тёмной теме */
.theme-dark .recommended-products-section-head h2,
.theme-dark .cart-feed-section .section-head h2,
.theme-dark .cart-feed-section .home-category-strip-title,
.theme-dark .related-products .home-category-strip-title,
.theme-dark .cart-recommended-section .section-head h2,
.theme-dark .cart-page-head h2,
.theme-dark .checkout-page-head.cart-page-head h2 {
    color: #a8b8d0;
}

@media (max-width: 1024px) {
    .theme-dark .checkout-page-head h2,
    .theme-dark .checkout-summary-card h3 {
        color: #a8b8d0;
    }
}

@media (min-width: 1025px) {
    .theme-dark .checkout-page-head h2,
    .theme-dark .checkout-summary-card h3 {
        color: #a8b8d0;
    }
}

.theme-dark .cart-delivery-box label {
    color: #9fb2cd;
}

.theme-dark .cart-delivery-box select {
    background: #162238;
    border-color: #2d3f5d;
    color: #9fb2cd;
}

.theme-dark .cart-delivery-box select option {
    background: #162238;
    color: #9fb2cd;
}

.theme-dark .qty-max-popover--fixed .product-qty-max-popover__bubble {
    background: #1e293b;
    border-color: #334155;
}

.theme-dark .qty-max-popover--fixed .product-qty-max-popover__text {
    color: #e2e8f0;
}

.theme-dark .qty-max-popover--fixed .product-qty-max-popover__caret {
    background: #1e293b;
    border-color: #334155;
}

.theme-dark .cart-delivery-selected,
.theme-dark .checkout-delivery-selected {
    color: #b8c7dc;
}

.theme-dark .product-qty-max-popover__bubble {
    background: #1e293b;
    border-color: #334155;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.35),
        0 4px 14px rgba(0, 0, 0, 0.25);
}

.theme-dark .product-qty-max-popover__text {
    color: #e2e8f0;
}

.theme-dark .product-qty-max-popover__caret {
    background: #1e293b;
    border-color: #334155;
}

.theme-dark .cart-delivery-box select.is-required-highlight {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.24);
}

.theme-dark .checkout-form label {
    color: #9fb2cd;
}

.theme-dark body.page-checkout .checkout-card .checkout-form label {
    color: #e2e8f0;
}

.theme-dark body.page-checkout .checkout-card .checkout-form input,
.theme-dark body.page-checkout .checkout-card .checkout-form textarea,
.theme-dark body.page-checkout .checkout-card .checkout-form .mihome-custom-select__trigger {
    color: #e2e8f0;
}

.theme-dark body.page-checkout .checkout-card .checkout-delivery-selected,
.theme-dark body.page-checkout .checkout-card .phone-input-prefix {
    color: #e2e8f0;
}

.theme-dark .checkout-optional-note {
    color: #8fa3c0;
}

.theme-dark body.page-checkout .checkout-card .checkout-optional-note {
    color: #e2e8f0;
}

.theme-dark .checkout-points-meta {
    font-family: var(--font-sans);
    color: #f87171;
}

.theme-dark body.page-checkout .checkout-card .checkout-points-meta {
    color: #f87171;
}

.theme-dark .checkout-points-hint {
    font-family: var(--font-sans);
    color: #94a3b8;
}

.theme-dark .checkout-form input,
.theme-dark .checkout-form textarea,
.theme-dark .checkout-form select {
    background: #162238;
    border-color: #2d3f5d;
    color: #e6edf8;
}

.theme-dark .checkout-form select {
    color: #9fb2cd;
}

.theme-dark .checkout-form select option {
    background: #162238;
    color: #9fb2cd;
    font-family: var(--font-sans);
}

.theme-dark .phone-input-prefix {
    color: #9fb2cd;
}

.theme-dark .password-toggle-btn {
    color: #fdba74;
}

.theme-dark .password-toggle-btn:hover {
    background: rgba(251, 146, 60, 0.12);
}

.theme-dark .checkout-form input::placeholder,
.theme-dark .checkout-form textarea::placeholder {
    color: #8fa3c0;
}

.theme-dark .checkout-form input:focus,
.theme-dark .checkout-form textarea:focus,
.theme-dark .checkout-form select:focus {
    border-color: #4f7dff;
    box-shadow: 0 0 0 3px rgba(79, 125, 255, 0.2);
}

.theme-dark .checkout-form input.is-required-highlight,
.theme-dark .checkout-form textarea.is-required-highlight,
.theme-dark .checkout-form select.is-required-highlight {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.24);
}

.theme-dark .mihome-custom-select__trigger {
    background: #162238;
    border-color: #2d3f5d;
    color: #e6edf8;
}

.theme-dark .mihome-custom-select__value.is-placeholder {
    color: #8fa3c0;
}

.theme-dark .mihome-custom-select__arrow {
    border-color: #9fb2cd;
}

.theme-dark .mihome-custom-select__trigger:focus,
.theme-dark .mihome-custom-select.is-open .mihome-custom-select__trigger {
    border-color: #4f7dff;
    box-shadow: 0 0 0 3px rgba(79, 125, 255, 0.2);
}

.theme-dark .mihome-custom-select__trigger.is-required-highlight {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.24);
}

.theme-dark .mihome-custom-select__list {
    background: #162238;
    border-color: #2d3f5d;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.theme-dark .mihome-custom-select__option {
    color: #e6edf8;
}

.theme-dark .mihome-custom-select__option:hover,
.theme-dark .mihome-custom-select__option.is-selected {
    background: #1e2d47;
}

.theme-dark .mega-menu {
    background: #111a2b;
    border-top-color: #24324a;
}

.theme-dark .mega-menu-categories,
.theme-dark .mega-menu-col {
    background: #162238;
    border-color: #2d3f5d;
}

.theme-dark .mega-menu-category {
    color: #c9d6ea;
}

.theme-dark .mega-menu-category:hover,
.theme-dark .mega-menu-category-item.is-active > .mega-menu-category {
    background: #22324f;
    color: #8fb6ff;
}

.theme-dark .mega-menu-expand {
    color: #93a4be;
}

.theme-dark .mega-menu-expand:hover {
    background: #263754;
    color: #8fb6ff;
}

.theme-dark .mega-menu-list-title {
    color: #93a4be;
}

.theme-dark .mega-menu-category-children.mega-menu-category-children--dock {
    background: #363e4a;
    border-color: #4e5969;
    box-shadow: 0 14px 36px rgba(3, 8, 18, 0.5);
}

.theme-dark .mega-menu-category-children a {
    color: #c9d6ea;
    font-size: 14px;
    font-weight: 600;
}

.theme-dark .mega-menu-category-children a:hover {
    background: #22324f;
    color: #8fb6ff;
}

.theme-dark .mega-menu-col a {
    color: #c9d6ea;
}

.theme-dark .mega-menu-col a:hover {
    color: #8fb6ff;
}

.theme-dark .product-detail,
.theme-dark .product-detail-hero,
.theme-dark .product-gallery,
.theme-dark .product-main-info,
.theme-dark .related-products {
    background: #111a2b;
    border-color: #24324a;
    box-shadow: 0 14px 34px rgba(3, 8, 18, 0.45);
}

.theme-dark .product-detail-hero .product-gallery,
.theme-dark .product-detail-hero .product-main-info {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.theme-dark .product-detail-hero .product-gallery {
    border-right-color: #24324a;
}

.theme-dark .zoom-image-wrap {
    border-color: #2d3f5d;
    background: radial-gradient(circle at 30% 20%, #1b2740 0%, #17253b 74%, #132036 100%);
}

.theme-dark .zoom-image-wrap--mobile-slide {
    border-color: #2d3f5d;
    background: radial-gradient(circle at 30% 20%, #1b2740 0%, #17253b 74%, #132036 100%);
}

.theme-dark .thumbnail-btn {
    border-color: #2d3f5d;
    background: #162238;
}

.theme-dark .thumbnail-btn:hover {
    border-color: #3a5175;
}

.theme-dark .product-main-info .product-action-line-total {
    border-top-color: rgba(100, 116, 139, 0.45);
}

.theme-dark .product-main-info .product-action-line-total .product-price-line-total__label {
    color: #94a3b8;
}

.theme-dark .product-main-info .product-action-line-total .product-price-line-total__value {
    color: #e2e8f0;
}

.theme-dark .product-main-info h1 {
    color: #e8eef8;
}

.theme-dark .product-main-info .product-price-block #productDetailPrice,
.theme-dark .product-price {
    color: #ff2d2d;
}

.theme-dark .product-info .product-price {
    color: #f1f5f9;
}

.theme-dark .product-main-info .product-meta {
    color: #9fb2cd;
}

.theme-dark .product-trust-link {
    color: #4ade80;
}

.theme-dark .product-trust-link:hover {
    color: #86efac;
}

.theme-dark .product-action-row {
    background: linear-gradient(145deg, #162238 0%, #1a2941 100%);
    border-color: #2d3f5d;
    box-shadow: inset 0 1px 0 rgba(79, 125, 255, 0.12);
}

.theme-dark .product-qty-control {
    background: #162238;
    border-color: #2d3f5d;
}

.theme-dark .product-qty-btn {
    background: #1b2b45;
    color: #e6edf8;
}

.theme-dark .product-qty-btn:disabled {
    opacity: 0.4;
}

.theme-dark .product-qty-input {
    background: #162238;
    color: #e6edf8;
}


.theme-dark .product-favorite-btn {
    border-color: #2d3f5d;
    background: rgba(22, 34, 56, 0.92);
    color: rgba(203, 213, 225, 0.6);
}

.theme-dark .product-favorite-btn:hover {
    color: #ff8a3d;
    border-color: rgba(255, 138, 61, 0.45);
}

.theme-dark .product-favorite-btn.is-active {
    color: #ff8a3d;
    border-color: rgba(255, 138, 61, 0.5);
    background: rgba(255, 138, 61, 0.12);
    box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.2);
}

.theme-dark .product-compare-icon-btn {
    border-color: #2d3f5d;
    background: rgba(22, 34, 56, 0.92);
    color: rgba(203, 213, 225, 0.6);
}

.theme-dark .product-compare-icon-btn:hover {
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.45);
}

.theme-dark .product-compare-icon-btn.is-active {
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.55);
    background: rgba(37, 99, 235, 0.18);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}


.theme-dark .variation-editor {
    border-color: #2d3f5d;
    background: linear-gradient(180deg, #152237 0%, #17253b 100%);
}

.theme-dark .variation-editor label,
.theme-dark .variation-field--color > label,
.theme-dark .variation-field--memory > label {
    color: #e2e8f0;
}

.theme-dark .variation-field.is-required-highlight label {
    color: #e2e8f0;
}

.theme-dark .variation-editor select {
    border-color: #2d3f5d;
    background: #162238;
    color: #e6edf8;
}

.theme-dark .variation-editor select.is-required-highlight {
    border-color: #2d3f5d;
    box-shadow: none;
}

@keyframes variationEditorAttentionGlowDark {
    0%,
    100% {
        border-color: rgba(96, 165, 250, 0.42);
        box-shadow:
            0 0 0 3px rgba(59, 130, 246, 0.14),
            0 4px 22px rgba(0, 0, 0, 0.4);
    }
    50% {
        border-color: rgba(147, 197, 253, 0.62);
        box-shadow:
            0 0 0 4px rgba(96, 165, 250, 0.24),
            0 6px 28px rgba(37, 99, 235, 0.22);
    }
}

.theme-dark .variation-editor--needs-attention {
    animation: none;
    border-color: #2d3f5d;
    box-shadow: none;
}

.theme-dark .variation-editor--needs-attention .variation-field label {
    color: #e2e8f0;
}

.theme-dark .variation-editor--needs-attention select {
    border-color: #2d3f5d;
    box-shadow: none;
}

.theme-dark .variation-editor--needs-attention #variationStockState.variation-stock-state--prompt {
    color: #9fb2cd;
}

.variation-editor #variationStockState {
    grid-column: 1 / -1;
    font-family: var(--font-sans);
}

.variation-editor .variation-stock-state.variation-stock-state--in {
    color: #15803d;
}

.variation-editor .variation-stock-state.variation-stock-state--out {
    color: #b91c1c;
}

.variation-editor .variation-stock-state.variation-stock-state--prompt {
    color: #64748b;
}

.theme-dark .variation-editor .variation-stock-state.variation-stock-state--in {
    color: #4ade80;
}

.theme-dark .variation-editor .variation-stock-state.variation-stock-state--out {
    color: #f87171;
}

.theme-dark .variation-editor .variation-stock-state.variation-stock-state--prompt {
    color: #94a3b8;
}

.theme-dark .lang-switcher a.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.theme-dark .lang-separator {
    color: #8fa3c0;
}

.theme-dark .search-form input::placeholder {
    color: #90a2bc;
}

.theme-dark .search-form input {
    background: #0f1727;
    color: #cbd5e1;
}

.theme-dark .product-meta,
.theme-dark .product-rating-count,
.theme-dark .product-rating-count--empty,
.theme-dark .footer-grid p,
.theme-dark .footer-grid a {
    color: #cbd5e1;
}

.theme-dark .search-form button {
    color: #ffffff;
    background: var(--primary);
}

.theme-dark .search-form button:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.theme-dark .search-suggest-box,
.theme-dark .mini-cart-item,
.theme-dark .product-info-tab-label {
    background: #0f1727;
    border-color: #24324a;
    color: #dbe5f3;
}

.theme-dark .product-info-tab-list {
    border-bottom-color: #24324a;
}

.theme-dark .product-info-tab-label:hover {
    color: #b8c9df;
}

.theme-dark .mini-cart-overlay {
    background: rgba(2, 6, 15, 0.68);
}

.theme-dark .mini-cart-head {
    background: linear-gradient(180deg, #152238 0%, #132034 100%);
}

.theme-dark .mini-cart-head h3 {
    color: #a8b8d0;
}

.theme-dark .mobile-scroll-search {
    background: #111a2b;
    border-color: #263449;
    box-shadow: 0 2px 10px rgba(2, 6, 15, 0.45);
}

.theme-dark .mobile-scroll-search-trigger {
    border-color: #2d3f5d;
    background: #162238;
    color: #9fb2cd;
}

.theme-dark .mobile-scroll-search-icon {
    color: #9fb2cd;
}

.theme-dark .mobile-search-form {
    background: #162238;
    border-color: #2d3f5d;
}

.theme-dark .mobile-search-form input {
    color: #dbe5f3;
}

.theme-dark .mobile-search-form input::placeholder {
    color: #9fb2cd;
}

.theme-dark .mobile-search-form button {
    color: #ffffff;
    background: var(--primary);
}

.theme-dark .mobile-search-suggest {
    background: #0f1727;
    border-color: #2d3f5d;
}

.theme-dark .mobile-search-suggest-item {
    color: #a8b8d0;
    border-bottom-color: #2d3f5d;
}

.theme-dark .mini-cart-foot {
    background: #111a2b;
}

.theme-dark .mini-cart-empty-message {
    color: #94a3b8;
    background: linear-gradient(180deg, #152238 0%, #121c2e 100%);
    border-color: #2a3a56;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.theme-dark .featured-rail-hero {
    background: linear-gradient(165deg, #111a2b 0%, #0b1220 100%);
    box-shadow: 0 14px 36px rgba(2, 6, 15, 0.55);
}

.theme-dark .featured-rail-hero-overlay {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 25%, rgba(2, 6, 15, 0.88) 100%);
}

.theme-dark .featured-rail-track .product-card {
    border-color: #24324a;
    background: #111a2b;
}

.theme-dark #miniCartCloseBtn {
    background: #162238;
    border-color: #2d3f5d;
}

.theme-dark .mini-cart-foot strong {
    color: #9fb2cd;
}

.theme-dark .mini-cart-delivery-label {
    color: #9fb2cd;
}

.theme-dark .mini-cart-delivery-hint {
    color: #93c5fd;
}

.theme-dark .mini-cart-delivery-box {
    background: #132036;
    border-color: #2a3a56;
}

.theme-dark #miniCartTotal {
    color: #f87171;
}

.theme-dark .mini-cart-item-title {
    color: #e5ecf7;
}

.theme-dark .mini-cart-item-price {
    color: #f87171;
}

.theme-dark .mini-cart-qty-btn {
    background: #162238;
    border-color: #2d3f5d;
    color: #b8c7dd;
}

.theme-dark .mini-cart-qty-btn:hover {
    background: #1b2b45;
    border-color: #3a5175;
    color: #e5ecf7;
}

.theme-dark .mini-cart-remove-btn {
    background: rgba(127, 29, 29, 0.2);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

.theme-dark .full-description-text {
    color: #cdd9ea;
}

.theme-dark .full-description-text *,
.theme-dark .product-info-tab-panel-description .full-description-text * {
    color: #cdd9ea !important;
}

.theme-dark .full-description-text a {
    color: #8fb6ff !important;
}

.theme-dark .characteristics-table {
    border-color: #2d3f5d;
}

.theme-dark .characteristics-table th,
.theme-dark .characteristics-table td {
    border-bottom-color: #2d3f5d;
    color: #dce6f4;
}

.theme-dark .characteristics-table th {
    background: #162238;
    color: #a9bdd7;
}

.theme-dark .compare-page-head h2,
.theme-dark .compare-recommended-section .section-head h2,
.theme-dark .favorites-page .section-head h2 {
    color: #a8b8d0;
}

.theme-dark .compare-page-head {
    background: linear-gradient(180deg, #152238 0%, #121c2e 100%);
    border-color: #2a3a56;
    box-shadow: 0 14px 30px rgba(3, 8, 18, 0.45);
}

.theme-dark .compare-page-count {
    background: #162238;
    border-color: #2d3f5d;
    color: #c9d6ea;
}

.theme-dark .brand-page-hero {
    background: #111a2b;
    border-color: #2a3a56;
    box-shadow: 0 14px 30px rgba(3, 8, 18, 0.45);
}

.theme-dark .brand-page-hero-text h2 {
    color: #e8f0ff;
}

.theme-dark .brand-page-hero-subtitle {
    color: #9fb2cd;
}

.theme-dark .brand-page-hero-count {
    background: #162238;
    color: #c9d6ea;
}

.theme-dark .brand-page-hero-logo {
    background: linear-gradient(180deg, #1a2740 0%, #152238 100%);
    border-color: #2d3f5d;
}

.theme-dark .brand-page-hero-logo--fallback {
    background: linear-gradient(135deg, #3d2814 0%, #2a1d10 100%);
    border-color: #5c3d1e;
}

.theme-dark .brand-page-hero-logo-letter {
    color: #fb923c;
}

.theme-dark .brand-page-hero-back {
    background: #152238;
    border-color: #2d3f5d;
    color: #dce6f4;
}

.theme-dark .brand-page-hero-back:hover {
    border-color: #3b82f6;
    color: #e8f0ff;
    background: #1c3558;
}


.theme-dark .compare-page-count-separator,
.theme-dark .compare-page-count-max {
    color: #9fb2cd;
}

.theme-dark .compare-page-empty,
.theme-dark .brand-page-empty {
    background: linear-gradient(180deg, #152238 0%, #121c2e 100%);
    border-color: #2d3f5d;
    color: #9fb2cd;
}

.theme-dark .brand-page-sort-label {
    color: #9fb2cd;
}

.theme-dark .brand-page-sort-form .mihome-custom-select__trigger {
    background: #152238;
    border-color: #2d3f5d;
    color: #e6edf8;
}

.theme-dark .brand-page-sort-form .mihome-custom-select__value {
    color: #e6edf8;
}

.theme-dark .brand-page-sort-form .mihome-custom-select__trigger:focus,
.theme-dark .brand-page-sort-form .mihome-custom-select.is-open .mihome-custom-select__trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 103, 0, 0.22);
}

.theme-dark .brand-page-sort-form .mihome-custom-select__list {
    background: #162238;
    border-color: #2d3f5d;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.theme-dark .brand-page-sort-form .mihome-custom-select__option {
    color: #e6edf8;
}

.theme-dark .brand-page-sort-form .mihome-custom-select__option:hover,
.theme-dark .brand-page-sort-form .mihome-custom-select__option.is-selected {
    background: rgba(255, 103, 0, 0.14);
    color: #ffb366;
}

.theme-dark .favorites-page .section-head .product-meta {
    color: #9fb2cd;
}

.theme-dark .favorites-page-empty {
    color: #9fb2cd;
}

.theme-dark .compare-page-toolbar .compare-diff-toggle.is-active {
    border-color: #3b82f6;
    background: linear-gradient(180deg, #1c3558 0%, #152238 100%);
    color: #e8f0ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.32), 0 10px 26px rgba(15, 23, 42, 0.55);
}

.theme-dark .compare-table-wrap,
.theme-dark .brand-page-content {
    background: #111a2b;
    border-color: #2a3a56;
    box-shadow: 0 14px 30px rgba(3, 8, 18, 0.45);
}

.theme-dark .compare-table th,
.theme-dark .compare-table td {
    border-bottom-color: #2d3f5d;
    color: #dce6f4;
}

.theme-dark .compare-table th {
    background: #162238;
    color: #a9bdd7;
}

.theme-dark .compare-product-cell a {
    color: #e5ecf7;
}

.theme-dark .compare-product-cell a:hover {
    color: #8fb6ff;
}

.theme-dark .compare-product-cell img {
    background: #162238;
}

.theme-dark .compare-recommended-section {
    border-top-color: #2a3b59;
}

.theme-dark .compare-page-empty,
.theme-dark .compare-page > p {
    color: #9fb2cd;
}

.theme-dark .product-reviews-summary {
    border-color: #2d3f5d;
    background: #162238;
}

.theme-dark .product-info-tab-panel-reviews .product-reviews-rating {
    color: #dce6f4 !important;
}

.theme-dark .product-info-tab-panel-reviews .product-reviews-count {
    color: #dce6f4 !important;
}

.theme-dark .product-review-item {
    background: #162238;
    border-color: #2d3f5d;
}

.theme-dark .product-review-head strong {
    color: #eef4ff;
}

.theme-dark .product-review-customer-id {
    color: #94a3b8;
}

.theme-dark .product-review-rating {
    color: #fbbf24;
}

.theme-dark .product-review-item p {
    color: #cdd9ea;
}

.theme-dark .product-review-form {
    border-top-color: #2d3f5d;
}

.theme-dark .product-review-form-hint,
.theme-dark .product-review-note {
    color: #cdd9ea;
}

.theme-dark .product-review-guest-text {
    color: #cdd9ea;
}

.theme-dark .product-review-login-link {
    color: #4ade80;
}

.theme-dark .product-review-login-link:hover,
.theme-dark .product-review-login-link:focus-visible {
    color: #86efac;
}

.theme-dark .product-review-field select,
.theme-dark .product-review-field textarea {
    background: #162238;
    border-color: #2d3f5d;
    color: #eef4ff;
}

.theme-dark .product-info-tab-panel-reviews {
    color: #cdd9ea;
}

.theme-dark .product-image-wrap {
    background: linear-gradient(180deg, #18263d 0%, #122034 100%);
}

.theme-dark .product-image-wrap.has-gallery {
    background: transparent;
}

.theme-dark .product-card-gallery-viewport {
    background: linear-gradient(180deg, #18263d 0%, #122034 100%);
}

.theme-dark .product-card-gallery-dot {
    background: rgba(226, 232, 240, 0.35);
}

.theme-dark .product-card-gallery-dot.is-active {
    background: #f97316;
}

.theme-dark .product-card-gallery-dot--video.is-active {
    background: #f97316;
}

.theme-dark .product-gallery-mobile-dot {
    background: rgba(226, 232, 240, 0.35);
}

.theme-dark .product-gallery-mobile-dot.is-active {
    background: #f97316;
}

.theme-dark .product-gallery-mobile-dot--video.is-active {
    background: #f97316;
}

.theme-dark .product-card-gallery-nav {
    background: rgba(21, 34, 56, 0.92);
    color: #e8f0ff;
}

.theme-dark .product-info-disclaimer {
    background: #24344f !important;
    color: #bccbe0 !important;
    border-left-color: #f59e0b !important;
    border-right-color: #f59e0b !important;
    border-top: 1px solid rgba(245, 158, 11, 0.35);
    border-bottom: 1px solid rgba(245, 158, 11, 0.35);
}

.theme-dark .product-section h2,
.theme-dark .related-products h2 {
    color: #dce6f4;
}

/* Карточка товара (десктоп): заголовок и вкладки «Описание / Характеристики / Отзывы» — более тёмные тона */
@media (min-width: 1025px) {
    .theme-dark .product-main-info h1 {
        color: #a8b8d0;
    }

    .theme-dark .product-info-tab-label {
        background: #080d14;
        border-color: #1b2638;
        color: #7d92ae;
    }

    .theme-dark .product-info-tab-label:hover {
        color: #a3b5cc;
    }

    .theme-dark input[id^="tabDescription-"]:checked ~ .product-info-tab-list label[for^="tabDescription-"],
    .theme-dark input[id^="tabCharacteristics-"]:checked ~ .product-info-tab-list label[for^="tabCharacteristics-"],
    .theme-dark input[id^="tabReviews-"]:checked ~ .product-info-tab-list label[for^="tabReviews-"] {
        color: #dce6f4;
        background: linear-gradient(140deg, #141e30 0%, #10192a 100%);
        border-color: #2a3d5c;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    }
}

.theme-dark .buy-btn:disabled {
    background: #475a79;
    color: #e2e8f0;
}

.theme-dark .theme-toggle-btn {
    background: transparent;
}

.theme-dark .theme-toggle-track {
    background: #1b273b;
    border-color: #33455f;
}

.theme-dark .theme-toggle-thumb {
    background: #e2e8f0;
}

.theme-dark .theme-toggle-icon-sun {
    color: #93c5fd;
    opacity: 0.95;
}

.theme-dark .theme-toggle-icon-moon {
    color: #e2e8f0;
}

.theme-toggle-style-neumorph .theme-toggle-track {
    background: #e9eef8;
    border-color: #d7e0ee;
    box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.35), inset -3px -3px 6px rgba(255, 255, 255, 0.9);
}

.theme-toggle-style-neumorph .theme-toggle-thumb {
    background: linear-gradient(145deg, #ffffff, #dfe7f4);
    box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.35), -2px -2px 6px rgba(255, 255, 255, 0.9);
}

.theme-dark .theme-toggle-style-neumorph .theme-toggle-track {
    background: #1a2538;
    border-color: #2a3a56;
    box-shadow: inset 3px 3px 6px rgba(9, 14, 23, 0.7), inset -3px -3px 6px rgba(44, 61, 88, 0.5);
}

.theme-dark .theme-toggle-style-neumorph .theme-toggle-thumb {
    background: linear-gradient(145deg, #dde6f3, #aebcd2);
}

.theme-toggle-style-glass .theme-toggle-track {
    background: rgba(255, 255, 255, 0.45);
    border-color: rgba(148, 163, 184, 0.5);
    backdrop-filter: blur(6px);
}

.theme-toggle-style-glass .theme-toggle-thumb {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.38);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.2);
}

.theme-dark .theme-toggle-style-glass .theme-toggle-track {
    background: rgba(23, 33, 50, 0.6);
    border-color: rgba(71, 85, 105, 0.7);
}

.theme-dark .theme-toggle-style-glass .theme-toggle-thumb {
    background: rgba(226, 232, 240, 0.92);
    border-color: rgba(71, 85, 105, 0.6);
}

.theme-dark .mobile-bottom-nav {
    --mbn-accent: #cbd5e1;
    --mbn-accent-bg: rgba(148, 163, 184, 0.16);
    --mbn-accent-press: rgba(148, 163, 184, 0.24);
    background: #0f1727;
    border-color: #263449;
    border-bottom: 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.theme-dark .mobile-account-menu-panel {
    background: linear-gradient(180deg, #0f1727 0%, #121c2e 100%);
    border-color: #2d3f5d;
    box-shadow: 14px 0 40px rgba(0, 0, 0, 0.5);
}

.theme-dark .mobile-account-menu-panel__title {
    color: #e8edf7;
}

.theme-dark .mobile-account-menu-panel__head {
    border-bottom-color: #2d3f5d;
}

.theme-dark .mobile-account-menu-panel__count {
    background: #f97316;
    color: #fff;
}

.theme-dark .mobile-account-menu-panel__link {
    color: #dbe5f3;
    background: rgba(22, 34, 56, 0.72);
    border-color: #2d3f5d;
}

.theme-dark .mobile-account-menu-panel__link:hover {
    border-color: #166534;
    background: #14532d;
    color: #4ade80;
}

.theme-dark .mobile-account-menu-panel__guest-hint {
    color: #94a3b8;
}

.theme-dark .mobile-account-menu-panel__register {
    color: #fdba74;
    background: #162238;
    border-color: #2d3f5d;
}

.theme-dark .mobile-account-menu-panel__register:hover {
    color: #fed7aa;
    background: #1e2d47;
    border-color: #3a5175;
}

@keyframes cartCountBump {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

@media (min-width: 1025px) {
    .mobile-account-menu-overlay,
    .mobile-account-menu-panel {
        display: none !important;
    }

    .mobile-catalog-menu-head {
        display: none !important;
    }

    body.mobile-account-menu-open {
        overflow: unset;
    }
}

@media (max-width: 1024px) {
    :root {
        --catalog-grid-gap: 2px;
    }

    /* Витрина на планшете/телефоне: меньше «серых полей», плотнее сетка */
    .container {
        width: 100%;
        max-width: none;
        padding-left: max(6px, env(safe-area-inset-left, 0px));
        padding-right: max(6px, env(safe-area-inset-right, 0px));
        box-sizing: border-box;
    }

    .category-content {
        padding: 8px 6px;
        border-radius: 12px;
    }

    .products-section {
        margin-top: 18px;
        margin-bottom: 28px;
    }

    body {
        padding-top: 0;
        padding-bottom: calc(var(--mbn-height, 46.75px) + env(safe-area-inset-bottom, 0px) + 8px);
    }

    .site-header {
        position: static;
        z-index: 120;
        box-shadow: 0 2px 8px rgba(17, 34, 68, 0.06);
    }

    .mobile-scroll-search {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 125;
        padding: max(8px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) 8px max(10px, env(safe-area-inset-left, 0px));
        background: var(--surface);
        border: 1px solid #d3e0f8;
        border-top: 0;
        border-radius: 0 0 14px 14px;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
        overflow: hidden;
        transform: translate3d(0, -110%, 0);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.24s ease, opacity 0.24s ease;
    }

    body.mobile-scroll-search-visible .mobile-scroll-search {
        transform: translate3d(0, 0, 0);
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-scroll-search-trigger {
        width: 100%;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        min-height: 44px;
        padding: 0 14px;
        border: 2px solid #e2e8f0;
        border-radius: 14px;
        background: #f8fafc;
        color: #64748b;
        font-size: 15px;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
    }

    .mobile-scroll-search-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        color: #64748b;
    }

    .mobile-scroll-search-icon svg {
        width: 20px;
        height: 20px;
        display: block;
    }

    .mobile-scroll-search-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-header .search-form {
        display: none !important;
    }

    .header-topbar-end {
        display: contents;
    }

    .header-topbar-trailing {
        display: contents;
    }

    .top-bar {
        grid-template-columns: 1fr auto auto;
        grid-template-areas: "brand lang theme";
        align-items: center;
        gap: 10px;
        padding: 10px 0;
    }

    .header-actions {
        display: none;
    }

    .lang-switcher {
        grid-area: lang;
        justify-content: flex-end;
        justify-self: end;
    }

    .header-clock {
        display: none;
    }

    .top-bar-brand-slot {
        grid-area: brand;
        min-width: 0;
    }

    .brand {
        font-size: 22px;
    }

    .hero-banner h1 {
        font-size: 30px;
    }

    .section-head h2 {
        font-size: var(--catalog-section-title-size-md);
    }

    .product-main-info h1 {
        font-size: 34px;
    }

    .catalog-btn-top {
        display: none !important;
        visibility: hidden;
        pointer-events: none;
    }

    .theme-toggle-btn {
        grid-area: theme;
        justify-self: end;
    }

    .lang-switcher {
        gap: 6px;
    }

    .lang-switcher a {
        padding: 6px 8px;
        font-size: 12px;
    }

    .hero-banner {
        padding: 22px;
    }

    .section-head {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px;
    }

    .news-section-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .news-section-left .news-grid .news-card {
        flex: 0 0 calc((100% - 28px) / 3);
    }

    /* Главная: в ленте новостей видны две карточки, стрелки и автопрокрутка как на десктопе */
    .news-section-left .news-grid[data-news-slider="1"] .news-card {
        flex: 0 0 calc((100% - 14px) / 2);
    }

    .news-grid.news-grid-all {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-showcase-card {
        flex-basis: calc((100% - 40px) / 5);
        min-width: 112px;
    }

    .home-showcase-modal-main h3 {
        font-size: 34px;
    }

    .mobile-promo-wrap {
        margin: 12px 0 10px;
    }

    .mobile-promo-slider {
        min-height: 132px;
        border-radius: var(--ozon-banner-radius-md);
        background: #e8f1ff;
        width: calc(100% + 5px);
        margin-left: 3px;
        margin-right: 0;
    }

    .mobile-promo-slide {
        position: absolute;
        inset: 0;
        display: none;
        opacity: 0;
        transition: opacity 0.35s ease;
        pointer-events: none;
        visibility: hidden;
    }

    .mobile-promo-slide.is-active {
        display: block;
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .mobile-promo-slide img {
        width: 100%;
        height: 100%;
        min-height: 132px;
        object-fit: cover;
        transform: scale(1.02);
        display: block;
    }

    .promo-nav-btn {
        width: 32px;
        height: 32px;
    }

    .mobile-bottom-nav {
        --mbn-height: 46.75px;
        --mbn-icon: 30px;
        --mbn-font: 10.16px;
        --mbn-gap: 2.44px;
        --mbn-accent: #475569;
        --mbn-accent-bg: rgba(100, 116, 139, 0.14);
        --mbn-accent-press: rgba(100, 116, 139, 0.22);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: var(--mbn-height);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-sizing: content-box;
        background: #ffffff;
        border: 1px solid #d3e0f8;
        border-bottom: 0;
        border-radius: 14px 14px 0 0;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        z-index: 100;
        box-shadow: 0 -8px 24px rgba(17, 34, 68, 0.12);
        overflow: visible;
        opacity: 1;
    }

    .mobile-account-menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 40, 0.48);
        backdrop-filter: blur(3px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.22s ease, visibility 0.22s ease;
        z-index: 130;
    }

    body.mobile-account-menu-open .mobile-account-menu-overlay {
        opacity: 1;
        visibility: visible;
    }

    .mobile-account-menu-panel {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 86vw);
        max-height: 100dvh;
        background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
        box-shadow: 14px 0 40px rgba(17, 34, 68, 0.22);
        border-radius: 0 18px 18px 0;
        border: 1px solid #dbe6f5;
        border-left: 0;
        transform: translateX(-105%);
        transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
        z-index: 131;
        display: flex;
        flex-direction: column;
        padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px));
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.mobile-account-menu-open .mobile-account-menu-panel {
        transform: translateX(0);
    }

    .mobile-account-menu-panel[aria-hidden="true"] {
        pointer-events: none;
    }

    .mobile-account-menu-panel__head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 14px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e2ebf8;
    }

    .mobile-account-menu-panel__title {
        margin: 0;
        font-size: 17px;
        font-weight: 800;
        color: #0f2744;
        line-height: 1.25;
        flex: 1;
        min-width: 0;
    }

    .mobile-account-menu-panel__close {
        flex-shrink: 0;
        font-size: 22px;
        line-height: 1;
        padding: 2px 8px;
        margin: -4px -6px 0 0;
    }

    .mobile-account-menu-panel__nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex: 1;
    }

    .mobile-account-menu-panel__link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 600;
        color: #1e3a5f;
        text-decoration: none;
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid #e2ebf8;
        transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }

    .mobile-account-menu-panel__link-text {
        flex: 1;
        min-width: 0;
    }

    .mobile-account-menu-panel__count {
        flex-shrink: 0;
        min-width: 26px;
        height: 26px;
        padding: 0 8px;
        box-sizing: border-box;
        border-radius: 999px;
        background: var(--primary);
        color: #fff;
        font-size: 12px;
        font-weight: 800;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-account-menu-panel__count.is-empty {
        display: none;
    }

    .mobile-account-menu-panel__link:hover {
        border-color: #bbf7d0;
        background: #f0fdf4;
        color: #15803d;
    }

    .mobile-account-menu-panel__logout {
        margin-top: auto;
        padding-top: 16px;
    }

    .mobile-account-menu-panel__auth {
        margin-top: auto;
        padding-top: 16px;
        display: grid;
        gap: 10px;
    }

    .mobile-account-menu-panel__guest-hint {
        margin: 0;
        font-size: 13px;
        line-height: 1.45;
        color: #64748b;
    }

    .mobile-account-menu-panel__login {
        display: block;
        width: 100%;
        text-align: center;
        text-decoration: none;
        box-sizing: border-box;
        padding: 12px 14px;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 700;
    }

    .mobile-account-menu-panel__register {
        display: block;
        width: 100%;
        text-align: center;
        text-decoration: none;
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 700;
        color: var(--primary);
        background: #fff;
        border: 1px solid #e2ebf8;
        box-sizing: border-box;
        transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
    }

    .mobile-account-menu-panel__register:hover {
        border-color: #bbf7d0;
        color: #15803d;
        background: #f0fdf4;
    }

    body.mobile-account-menu-open {
        overflow: hidden;
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        border: 0;
        background: transparent;
        display: grid;
        justify-items: center;
        align-content: center;
        gap: var(--mbn-gap, 2.44px);
        color: #7d8cab;
        font-size: var(--mbn-font, 10.16px);
        font-weight: 600;
        position: relative;
        cursor: pointer;
        padding: 1px 1px 2px;
        border-radius: 14px;
        margin: 1px 0;
        transition: background-color 0.2s ease, color 0.2s ease;
        min-width: 0;
        overflow: visible;
        opacity: 1;
    }

    .mobile-bottom-nav .mobile-nav-label,
    .mobile-bottom-nav .mobile-nav-account-label {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        text-align: center;
        line-height: 1.2;
        max-width: 100%;
        padding: 0 4px;
        word-break: break-word;
        overflow-wrap: anywhere;
        font-size: inherit;
        font-weight: 600;
        color: inherit;
        opacity: 1;
    }

    .mobile-bottom-nav .mobile-nav-icon {
        width: var(--mbn-icon, 30px);
        height: var(--mbn-icon, 30px);
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        opacity: 1;
    }

    .mobile-nav-online-dot {
        position: absolute;
        top: 1px;
        right: 0;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #22c55e;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45), 0 0 6px rgba(34, 197, 94, 0.55);
        opacity: 1;
        pointer-events: none;
    }

    .theme-dark .mobile-nav-online-dot {
        border-color: rgba(15, 23, 39, 0.92);
        box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.5), 0 0 8px rgba(34, 197, 94, 0.65);
    }

    .mobile-bottom-nav .mobile-nav-svg,
    .mobile-bottom-nav .mobile-nav-svg--cart,
    .mobile-bottom-nav .mobile-nav-svg--account {
        width: var(--mbn-icon, 30px);
        height: var(--mbn-icon, 30px);
        display: block;
        flex-shrink: 0;
        color: inherit;
        opacity: 1;
    }

    .mobile-bottom-nav a.is-active .mobile-nav-svg,
    .mobile-bottom-nav a.is-active .mobile-nav-svg--cart,
    .mobile-bottom-nav a.is-active .mobile-nav-svg--account,
    .mobile-bottom-nav button.is-active .mobile-nav-svg,
    .mobile-bottom-nav button.is-active .mobile-nav-svg--account {
        color: currentColor;
        opacity: 1;
    }

    .mobile-nav-label-placeholder {
        visibility: hidden;
        pointer-events: none;
        font-size: inherit;
        line-height: 1;
        font-weight: 600;
        max-height: 1.2em;
        overflow: hidden;
        white-space: nowrap;
    }

    .mobile-bottom-nav a.is-active,
    .mobile-bottom-nav button.is-active {
        color: var(--mbn-accent, #475569);
        font-weight: 700;
        background: var(--mbn-accent-bg, rgba(100, 116, 139, 0.14));
    }

    .mobile-bottom-nav a.is-active .mobile-nav-label,
    .mobile-bottom-nav button.is-active .mobile-nav-label,
    .mobile-bottom-nav a.is-active .mobile-nav-account-label,
    .mobile-bottom-nav button.is-active .mobile-nav-account-label {
        font-weight: 700;
    }

    .mobile-bottom-nav a:active,
    .mobile-bottom-nav button:active {
        color: var(--mbn-accent, #475569);
        background: var(--mbn-accent-press, rgba(100, 116, 139, 0.22));
    }

    .mobile-bottom-nav .header-action-badge-wrap {
        flex-shrink: 0;
    }

    .mobile-search-sheet {
        position: fixed;
        inset: 0;
        background: #ffffff;
        z-index: 120;
        display: none;
        flex-direction: column;
        padding: 14px 12px 10px;
    }

    body.mobile-search-sheet-open .mobile-search-sheet {
        display: flex;
    }

    .mobile-search-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
    }

    .mobile-search-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        min-width: 0;
        border: 2px solid #e2e8f0;
        border-radius: 14px;
        overflow: hidden;
        background: #f8fafc;
    }

    .mobile-search-form input {
        border: 0;
        outline: none;
        background: transparent;
        padding: 12px;
        font-size: 15px;
        min-width: 0;
        width: 100%;
    }

    .mobile-search-form button {
        border: 0;
        padding: 0 14px;
        background: var(--primary);
        color: #fff;
        font-weight: 700;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: max-content;
    }

    .mobile-search-suggest {
        margin-top: 10px;
        border: 1px solid var(--border);
        border-radius: 12px;
        overflow: auto;
    }

    .mobile-search-suggest:empty {
        display: none;
    }

    .mobile-search-suggest-item {
        display: block;
        padding: 12px;
        border-bottom: 1px solid #e2e8f0;
        color: #1f2937;
        font-size: 14px;
    }

    .mobile-search-suggest-item:last-child {
        border-bottom: 0;
    }

    .hero-banner {
        grid-template-columns: 1fr;
    }

    .hero-banner img {
        justify-self: start;
    }

    .quick-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .promo-discounts-track {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 4px;
    }

    .promo-discount-card {
        min-width: 250px;
        flex: 0 0 250px;
        scroll-snap-align: start;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-detail-page {
        grid-template-columns: 1fr;
    }

    .product-detail-hero {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 14px;
    }

    .product-detail-hero .product-gallery {
        border-right: 0;
        padding-right: 0;
        border-bottom: 1px solid #e8edf5;
        padding-bottom: 14px;
    }

    .theme-dark .product-detail-hero .product-gallery {
        border-bottom-color: #24324a;
    }

    .product-detail-hero .product-main-info {
        padding-left: 0;
    }

    /* Страница товара: −/+ и избранное/сравнение в одну строку, «В корзину» — под ними */
    .product-purchase-row:not(.product-purchase-row--preorder):not(.product-purchase-row--unavailable) {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "qty icons"
            "buy buy";
        align-items: center;
        gap: 10px 8px;
    }

    .product-purchase-row:not(.product-purchase-row--preorder):not(.product-purchase-row--unavailable) .product-qty-stack {
        grid-area: qty;
    }

    .product-purchase-row:not(.product-purchase-row--preorder):not(.product-purchase-row--unavailable) .product-page-icon-actions {
        grid-area: icons;
        justify-self: end;
    }

    .product-purchase-row:not(.product-purchase-row--preorder):not(.product-purchase-row--unavailable) > .buy-btn {
        grid-area: buy;
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }

    /* Страница товара: отступы между названием, рейтингом, брендом, бейджами, артикулом и ценой (−60%) */
    .product-main-info h1 {
        margin-bottom: 2px;
    }

    .product-main-info .product-rating-row--header {
        margin: 3px 0 5px;
        gap: 5px;
    }

    /* Страница товара: фото бренда → текст → бейджи, плотно в ряд */
    .product-main-info .product-page-brand-row {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        margin: 2px 0 6px;
    }

    .product-main-info .product-page-brand-logo-link,
    .product-main-info .product-page-brand-text-link {
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        margin: 0;
        padding: 0;
    }

    .product-main-info .product-page-brand-logo,
    .product-main-info .product-page-brand-logo--static {
        display: block;
        max-height: 52px;
        max-width: 172px;
        padding: 8px 10px;
        margin: 0;
    }

    .product-main-info .product-page-brand-text,
    .product-main-info .product-page-brand-text--static {
        font-size: 19px;
        line-height: 1.25;
        margin: 0;
        padding: 0;
    }

    .product-main-info .product-page-brand-text-link,
    .product-main-info .product-page-brand-text--static {
        margin-left: 4px;
    }

    .product-main-info .product-detail-meta-strip--by-brand {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        margin: 0 0 0 8px;
        padding: 0;
    }

    .product-main-info .product-detail-meta-strip .product-card-meta-strip,
    .product-main-info .product-detail-meta-strip--by-brand .product-card-meta-strip {
        padding: 0;
        align-items: center;
    }

    .product-main-info .product-card-meta-strip-left,
    .product-main-info .product-card-meta-strip-right {
        align-items: center;
        gap: 6px;
    }

    .product-main-info .product-card-in-stock-badge,
    .product-main-info .product-card-preorder-badge,
    .product-main-info .product-card-out-stock-badge,
    .product-main-info .product-card-tag-badge {
        font-size: 16px;
        line-height: 1.25;
    }

    .product-main-info .product-card-tag-badge-icon,
    .product-main-info .product-card-in-stock-icon,
    .product-main-info .product-card-preorder-icon,
    .product-main-info .product-card-out-stock-icon {
        width: 18px;
        height: 18px;
    }

    .product-main-info .product-meta {
        margin-bottom: 2px;
    }

    .product-main-info .product-price-block {
        margin-top: 2px;
    }

    .product-main-info .product-trust-version-row {
        margin-top: 2px;
    }

    .product-main-info .product-trust-link {
        margin-top: 0;
    }

    .category-layout {
        grid-template-columns: 1fr;
    }

    .mega-menu {
        grid-template-columns: 1fr;
    }

    .mega-menu-submenus {
        min-height: 0;
    }

    .mega-menu-submenu {
        position: static;
        display: none;
        grid-template-columns: 1fr;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .mega-menu-submenu.is-active {
        display: grid;
    }

    .mobile-catalog-menu-head {
        display: none;
    }

    .category-nav .mobile-catalog-menu-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 14px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e2ebf8;
        flex-shrink: 0;
    }

    .category-nav .mobile-catalog-menu-head__title {
        margin: 0;
        font-size: 17px;
        font-weight: 800;
        color: #0f2744;
        line-height: 1.25;
        flex: 1;
        min-width: 0;
    }

    .category-nav .mobile-catalog-menu-head__close {
        flex-shrink: 0;
        font-size: 22px;
        line-height: 1;
        padding: 2px 8px;
        margin: -4px -6px 0 0;
    }

    .category-nav .home-catalog-mega-shell {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        border: 0;
        box-shadow: none;
    }

    /* Мобильный каталог: узкая панель по ширине текста, слева */
    .site-header:has(.category-nav.is-open) .catalog-mobile-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 118;
        background: rgba(15, 23, 42, 0.48);
        pointer-events: auto;
        touch-action: manipulation;
    }

    body:has(.category-nav.is-open) .mobile-bottom-nav {
        z-index: 125;
    }

    /* В выезжающем каталоге без промо-картинок — только текст, ширина по содержимому */
    .category-nav .home-catalog-featured-rail-panel {
        display: none !important;
    }

    .category-nav .home-catalog-left-column {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 86vw);
        max-width: min(300px, 86vw);
        height: auto;
        max-height: 100dvh;
        margin: 0;
        padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
        z-index: 119;
        background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-105%);
        transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: 14px 0 40px rgba(17, 34, 68, 0.22);
        display: flex;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        border: 1px solid #dbe6f5;
        border-left: 0;
        border-radius: 0 18px 18px 0;
        pointer-events: none;
    }

    .category-nav.is-open .home-catalog-left-column {
        transform: translateX(0);
        pointer-events: auto;
    }

    .category-nav.is-open .mega-menu {
        display: grid;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        border: 0;
        border-top: 0;
        border-radius: 0;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        flex: 1 1 auto;
        min-height: 0;
        background: transparent;
        box-shadow: none;
    }

    .category-nav .mega-menu.container {
        width: 100%;
        max-width: none;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .category-nav .mega-menu-categories,
    .category-nav .mega-menu-categories--mobile-compact {
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 4px;
        row-gap: 4px;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .category-nav .mega-menu-category-item {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        border: 0;
        box-shadow: none;
        margin: 0;
        padding: 0;
        line-height: 1.2;
    }

    .category-nav .mega-menu-list-title {
        display: none;
    }

    .category-nav .mega-menu-category-row {
        display: flex;
        align-items: center;
        gap: 2px;
        width: 100%;
        max-width: none;
        min-height: 0;
        margin: 0;
        padding: 5px 0;
        box-sizing: border-box;
    }

    .category-nav .mega-menu-expand {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
        font-size: 15.5px;
        border-radius: 10px;
        background: transparent;
        border: 0;
        color: #64748b;
        box-shadow: none;
        animation: none;
        transform-origin: center;
        transform: rotate(0deg);
        transition: transform 0.2s ease, color 0.15s ease;
    }

    .category-nav .mega-menu-expand:hover {
        background: transparent;
        color: #1e3a5f;
    }

    .category-nav .mega-menu-category-item.is-expanded .mega-menu-expand {
        background: transparent;
        color: #1e3a5f;
        box-shadow: none;
        transform: rotate(90deg);
    }

    .category-nav .mega-menu-categories > .mega-menu-category-item > .mega-menu-category-row > .mega-menu-category,
    .category-nav .home-catalog-left-column .mega-menu-category-row .mega-menu-category {
        flex: 1 1 auto;
        display: inline-flex;
        align-items: center;
        width: auto;
        min-width: 0;
        max-width: none;
        margin: 0;
        padding: 7px 14px;
        background: transparent;
        border: 0;
        border-radius: 10px;
        color: #0f172a;
        font-size: 16.5px;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: none;
        white-space: normal;
        overflow-wrap: break-word;
        hyphens: auto;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .category-nav .mega-menu-categories > .mega-menu-category-item > .mega-menu-category-row > .mega-menu-category:hover,
    .category-nav .mega-menu-category-item.is-active > .mega-menu-category-row .mega-menu-category,
    .category-nav .mega-menu-category-item.is-expanded > .mega-menu-category-row .mega-menu-category {
        background: #f0fdf4;
        color: #0f172a;
    }

    .category-nav .mega-menu-category-children.mega-menu-category-children--dock {
        padding: 8px 10px;
    }

    .category-nav .mega-menu-category-children {
        gap: 0;
        padding: 0 0 0 6px;
    }

    .category-nav .mega-menu-category-children a {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        align-self: stretch;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        gap: 7px;
        padding: 7px 14px;
        font-size: 16.5px;
        font-weight: 600;
        line-height: 1.25;
        text-decoration: none;
        background: transparent;
        border: 0;
        color: #1e3a5f;
        white-space: normal;
        overflow-wrap: break-word;
        border-radius: 12px;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .category-nav .mega-menu-category-children a::before {
        content: '';
        flex: 0 0 5px;
        width: 5px;
        height: 5px;
        border-radius: 999px;
        background: currentColor;
        opacity: 0.45;
    }

    .category-nav .mega-menu-category-children a:hover {
        background: #f0fdf4;
        color: #15803d;
    }

    /* Подкатегории только при раскрытии (иначе .is-active оставлял блок открытым при сворачивании) */
    .category-nav .mega-menu-category-item .mega-menu-category-children {
        display: none !important;
    }

    .category-nav .mega-menu-category-item.is-expanded .mega-menu-category-children {
        display: grid !important;
    }

    /* В выезжающем каталоге — только список категорий (без второй колонки) */
    .category-nav .mega-menu-submenus {
        display: none !important;
    }

    .category-nav.is-open .mega-menu {
        grid-template-columns: 1fr;
    }

    .layout-home-catalog .category-nav-home .mega-menu-categories,
    .layout-header-catalog .category-nav-external .mega-menu-categories {
        gap: 4px;
        row-gap: 4px;
        padding: 0;
    }

    .layout-home-catalog .category-nav-home .mega-menu-categories > .mega-menu-category-item > .mega-menu-category-row > .mega-menu-category,
    .layout-header-catalog .category-nav-external .mega-menu-categories > .mega-menu-category-item > .mega-menu-category-row > .mega-menu-category {
        padding: 7px 14px;
        font-size: 16.5px;
        line-height: 1.2;
    }

    .theme-dark .category-nav .home-catalog-left-column {
        background: linear-gradient(180deg, #0f1727 0%, #121c2e 100%);
        border-color: #2d3f5d;
        box-shadow: 14px 0 40px rgba(0, 0, 0, 0.5);
    }

    .theme-dark .category-nav .mobile-catalog-menu-head {
        border-bottom-color: #2d3f5d;
    }

    .theme-dark .category-nav .mobile-catalog-menu-head__title {
        color: #e8edf7;
    }

    .theme-dark .site-header:has(.category-nav.is-open) .catalog-mobile-scrim {
        background: rgba(2, 6, 14, 0.62);
    }

    .theme-dark .category-nav .mega-menu.container,
    .theme-dark .category-nav .mega-menu-categories,
    .theme-dark .category-nav.is-open .mega-menu,
    .theme-dark .category-nav .home-catalog-mega-shell {
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .theme-dark .category-nav .mega-menu-categories > .mega-menu-category-item > .mega-menu-category-row > .mega-menu-category,
    .theme-dark .category-nav .home-catalog-left-column .mega-menu-category-row .mega-menu-category {
        background: transparent;
        color: #dbe5f3;
    }

    .theme-dark .category-nav .mega-menu-categories > .mega-menu-category-item > .mega-menu-category-row > .mega-menu-category:hover,
    .theme-dark .category-nav .mega-menu-category-item.is-active > .mega-menu-category-row .mega-menu-category,
    .theme-dark .category-nav .mega-menu-category-item.is-expanded > .mega-menu-category-row .mega-menu-category {
        background: #22324f;
        color: #8fb6ff;
    }

    .theme-dark .category-nav .mega-menu-expand {
        color: #8fa3c0;
    }

    .theme-dark .category-nav .mega-menu-category-children a {
        background: transparent;
        color: #dbe5f3;
    }

    .theme-dark .category-nav .mega-menu-category-children a:hover {
        background: #22324f;
        color: #8fb6ff;
    }

    .theme-dark .category-nav .mega-menu-category-children a::before {
        background: #60a5fa;
        box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28);
    }

    .theme-dark .category-nav .mega-menu-expand {
        color: #fb923c;
    }

    .theme-dark .category-nav .mega-menu-expand:hover,
    .theme-dark .category-nav .mega-menu-category-item.is-expanded .mega-menu-expand {
        color: #fdba74;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Та же нижняя навигация, что при max-width:1024px — не скрываем на планшете */
    .floating-actions {
        bottom: calc(var(--mbn-height, 46.75px) + env(safe-area-inset-bottom, 0px) + 16px);
    }

    .product-original-seal {
        width: 149px;
        height: 149px;
    }

    .product-main-info .product-price-row {
        padding-right: 155px;
        min-height: 116px;
    }

    .recommended-products-section .recommended-products-carousel.cross-sell-grid {
        gap: var(--catalog-grid-gap);
    }

    /* Главная: категории (например "Для дома и офиса") как "Рекомендуем для вас" на планшете */
    .home-category-showcase-strip .home-category-showcase-strip-grid.recommended-products-carousel.cross-sell-grid:not(.is-carousel-disabled) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-flow: row !important;
        grid-auto-columns: auto !important;
    }

    /* Страница товара: «с этим покупают» — 2 карточки в ряд (планшет, карусель) */
    .related-products.cross-sell-section .cross-sell-grid:not(.is-carousel-disabled) {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(140px, calc((100% - 12px) / 2));
        grid-template-columns: none;
        gap: 12px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .related-products.cross-sell-section .cross-sell-grid:not(.is-carousel-disabled) > .product-card {
        scroll-snap-align: start;
        min-width: 0;
    }

    .related-products.cross-sell-section .cross-sell-grid.is-carousel-disabled {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-x: visible;
    }

    .related-products.cross-sell-section .cross-sell-controls {
        display: flex;
    }

    .news-grid.news-grid-all {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    /* Чипы категорий (legacy) на планшете */
    .quick-grid.quick-grid--home-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 0;
        padding-bottom: calc(var(--mbn-height, 46.75px) + env(safe-area-inset-bottom, 0px) + 8px);
    }

    .floating-actions {
        right: 14px;
        bottom: calc(var(--mbn-height, 46.75px) + env(safe-area-inset-bottom, 0px) + 16px);
    }

    .top-bar {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "brand lang theme"
            "search search search";
    }

    .hero-banner h1 {
        font-size: 25px;
        line-height: 1.2;
    }

    .hero-banner p {
        font-size: 14px;
    }

    .section-head h2 {
        font-size: var(--catalog-section-title-size-sm);
    }

    .category-content .section-head h2 {
        font-size: var(--catalog-category-title-size);
    }

    .mobile-promo-slider {
        width: calc(100% - 1px);
        margin-left: 1px;
        margin-right: 0;
    }

    .mobile-promo-slide img {
        transform: scale(1.01);
    }

    .lang-switcher .lang-separator {
        display: none;
    }

    .mobile-info-wrap {
        margin-bottom: 8px;
    }

    .mobile-info-bar {
        font-size: 12px;
        padding: 8px 10px;
    }

    .mobile-promo-wrap {
        margin: 10px 0 8px;
    }

    .mobile-promo-slider {
        min-height: 118px;
        border-radius: var(--ozon-banner-radius-sm);
        margin-top: 0;
        margin-bottom: 0;
    }

    .mobile-promo-slide img {
        min-height: 118px;
    }

    .promo-nav-btn {
        width: 30px;
        height: 30px;
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Главная — чипы категорий (legacy): 2 колонки, зона с прокруткой */
    .quick-grid.quick-grid--home-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        max-height: min(46vh, 320px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-right: 2px;
        margin-top: 14px;
    }

    .quick-grid.quick-grid--home-categories .quick-item {
        padding: 12px 10px;
        font-size: var(--home-category-chip-size);
        font-weight: var(--home-category-chip-weight);
        line-height: 1.3;
        min-height: 0;
    }

    .promo-discounts-section {
        margin-top: 16px;
    }

    .home-showcase-section {
        margin-top: 14px;
    }

    .home-showcase-card {
        flex-basis: calc((100% - 30px) / 4);
        min-width: 86px;
        border-radius: var(--catalog-card-radius);
    }

    .home-showcase-title {
        font-size: 11px;
    }

    .home-showcase-progress {
        width: min(340px, 70%);
    }

    .home-showcase-arrows {
        gap: 6px;
        margin-bottom: 6px;
    }

    .home-showcase-arrow {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }

    .promo-discounts-track {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--catalog-grid-gap);
        overflow: visible;
        scroll-snap-type: none;
        padding-bottom: 0;
    }

    .promo-discount-card {
        min-width: 0;
        flex-basis: auto;
    }

    .promo-discount-title {
        min-height: 34px;
    }

    .product-grid,
    .product-grid.compact {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--catalog-grid-gap);
    }

    .news-section-left .section-head,
    .news-section-left .news-grid {
        max-width: none;
    }

    .news-section-left .news-grid .news-card {
        flex: 0 0 calc((100% - 14px) / 2);
    }

    .news-section-actions {
        width: 100%;
    }

    .news-all-link {
        width: 100%;
        text-align: center;
    }

    .news-grid.news-grid-all .news-card {
        flex: initial;
    }

    .news-grid.news-grid-all {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-card {
        border-radius: var(--catalog-card-radius);
        box-shadow: 0 6px 16px rgba(17, 34, 68, 0.08);
    }

    .product-info {
        padding: 4px 8px 8px;
    }

    .product-price-row {
        flex-wrap: nowrap;
        gap: 4px;
        align-items: baseline;
    }

    .product-price,
    .product-price-old,
    .product-discount-percent {
        white-space: nowrap;
    }

    .product-price-old,
    .product-discount-percent {
        font-size: 12px;
    }

    .product-title {
        font-size: 14px;
        margin: 6px 0 4px;
        line-height: 1.3;
        min-height: 2.6em;
    }

    .product-meta {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .buy-btn {
        padding: 9px;
        border-radius: 10px;
        font-size: 14px;
    }

    .product-main-info h1 {
        font-size: 29px;
    }

    .product-main-info .product-price-block #productDetailPrice {
        font-size: 42px;
    }

    .product-original-seal {
        width: 127px;
        height: 127px;
    }

    .product-main-info .product-price-row {
        padding-right: 132px;
        min-height: 104px;
    }

    .product-section h2 {
        font-size: 20px;
    }

    .product-description-card {
        padding: 13px 14px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .product-action-row {
        grid-template-columns: 1fr;
    }

    .variation-editor {
        grid-template-columns: 1fr;
    }

    .variation-editor--has-version .variation-field--color,
    .variation-editor--has-version .variation-field--memory,
    .variation-editor--has-version .variation-field--version,
    .variation-editor--has-version #variationStockState,
    .variation-editor--version-as-color .variation-field--color,
    .variation-editor--version-as-color #variationStockState {
        grid-column: auto;
        grid-row: auto;
    }

    .variation-editor label {
        font-size: 14px;
        font-weight: 700;
        font-family: var(--font-sans);
        color: #0f172a;
        letter-spacing: 0.04em;
    }

    .product-qty-control {
        width: max-content;
    }

    .checkout-layout,
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-field-stack {
        gap: 0;
    }

    .category-layout {
        position: relative;
    }

    .category-subcategories {
        display: none;
    }

    .category-content .section-head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .category-content .section-head h2 {
        width: 100%;
        margin: 0;
        font-size: var(--catalog-category-title-size-compact);
    }

    .category-section-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
    }

    .mobile-filter-open-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        max-width: none;
        min-height: 0;
        margin: 0;
        padding: 5px 12px;
        box-sizing: border-box;
        border: 1px solid #cdddff;
        border-radius: 999px;
        background: #eef4ff;
        color: #1d4ed8;
        font-family: var(--font-sans);
        font-size: 12px;
        font-weight: 700;
        line-height: 1.35;
        letter-spacing: 0;
        white-space: nowrap;
        cursor: pointer;
        box-shadow: none;
        transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }

    .mobile-filter-open-btn:hover {
        border-color: #a8c8ff;
        background: #e0ebff;
        color: #1e40af;
        transform: none;
        box-shadow: none;
    }

    .mobile-filter-open-btn:active {
        background: #dbeafe;
        border-color: #93b4fd;
    }

    .category-section-toolbar #categoryResultsCount {
        width: auto;
        max-width: none;
        margin: 0 0 0 auto;
        text-align: right;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .category-section-toolbar .mobile-filter-open-btn {
        flex-shrink: 0;
    }

    .mobile-filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 40, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: 0.22s ease;
        z-index: 40;
        display: block;
    }

    .mobile-filter-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }

    .mobile-filter-head h3 {
        margin: 0;
    }

    .desktop-filter-title {
        display: none;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(360px, 86vw);
        height: 100vh;
        max-height: none;
        z-index: 41;
        border-radius: 0 16px 16px 0;
        transform: translateX(-104%);
        transition: transform 0.25s ease;
        overflow: auto;
        padding-top: 14px;
    }

    body.mobile-filters-open .filter-sidebar {
        transform: translateX(0);
    }

    .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega.is-open .mega-menu {
        display: block;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        flex: none;
        min-height: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
    }

    .filter-sidebar .filter-sidebar-catalog-shell .mega-menu-submenus {
        display: none !important;
    }

    /* Фильтр-каталог на остальных страницах: поведение как в мобильном хедер-каталоге */
    .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-categories {
        width: max-content;
        max-width: min(94vw, 100%);
        box-sizing: border-box;
        justify-items: start;
        gap: 1px;
        padding: 4px;
        background: #ffffff;
    }

    .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category-item {
        display: inline-block;
        width: max-content;
        max-width: min(94vw, 100%);
        box-sizing: border-box;
        justify-self: start;
    }

    .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category-row {
        display: inline-flex;
        gap: 4px;
        width: auto;
        max-width: 100%;
    }

    .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        width: auto;
        max-width: 100%;
        padding: 5px 8px;
        background: #ffffff;
        border-radius: 9px;
        color: #111827;
        font-weight: 700;
        white-space: normal;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category-children a {
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        align-self: start;
        width: auto;
        max-width: 100%;
        padding: 5px 8px;
        font-size: 14px;
        font-weight: 500;
        background: #ffffff;
        color: #374151;
        white-space: normal;
        overflow-wrap: break-word;
        border-radius: 9px;
    }

    .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category-children a::before {
        content: '';
        width: 6px;
        height: 6px;
        flex: 0 0 6px;
        border-radius: 999px;
        background: #3b82f6;
        margin-right: 9px;
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    }

    .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category-item .mega-menu-category-children {
        display: none !important;
    }

    .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category-item.is-expanded .mega-menu-category-children {
        display: grid !important;
    }

    body.mobile-filters-open .mobile-filter-overlay {
        opacity: 1;
        visibility: visible;
    }

    .theme-dark .filter-sidebar {
        background: #111a2b;
        border-color: #24324a;
        box-shadow: 8px 0 36px rgba(0, 0, 0, 0.45);
    }

    .theme-dark .mobile-filter-open-btn {
        background: #162238;
        color: #93c5fd;
        border-color: #2d3f5d;
    }

    .theme-dark .mobile-filter-open-btn:hover {
        background: #1e2d47;
        border-color: #3a5175;
        color: #bfdbfe;
    }

    .theme-dark .mobile-filter-overlay {
        background: rgba(2, 6, 14, 0.62);
    }

    .theme-dark .mobile-filter-head h3,
    .theme-dark .filter-form h3 {
        color: #dce6f4;
    }

    .theme-dark .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-categories,
    .theme-dark .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category,
    .theme-dark .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category-children a {
        background: #162238;
    }

    .theme-dark .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category {
        color: #dce6f4;
    }

    .theme-dark .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category-children a {
        color: #c9d6ea;
    }

    .theme-dark .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category-children a:hover {
        background: #22324f;
        color: #8fb6ff;
    }

    .theme-dark .filter-sidebar .filter-sidebar-catalog-shell .category-nav-sidebar-mega .mega-menu-category-children a::before {
        background: #60a5fa;
        box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28);
    }

    .theme-dark .filter-group {
        background: #162238;
        border-color: #2d3f5d;
    }

    .theme-dark .filter-group legend {
        color: #93a4be;
    }

    .theme-dark .filter-form > label {
        color: #9fb2cd;
    }

    .theme-dark .filter-form input[type="number"],
    .theme-dark .filter-form select {
        background: #162238;
        border-color: #2d3f5d;
        color: #e5ecf7;
    }

    .theme-dark .check-line:hover {
        background: #1b2a43;
    }

    .theme-dark #categoryResultsCount {
        background: #162238;
        color: #93c5fd;
        border-color: #2d3f5d;
    }

    .theme-dark .category-content {
        background: #111a2b;
        border-color: #24324a;
        box-shadow: 0 10px 22px rgba(3, 8, 18, 0.45);
    }

    .theme-dark .category-subcategory-chip {
        background: #162238;
        border-color: #2d3f5d;
        color: #c9d6ea;
    }

    .theme-dark .category-subcategory-chip:hover {
        border-color: #3a5175;
        color: #8fb6ff;
    }

    .floating-action-btn {
        width: 56px;
        height: 56px;
        font-size: 18px;
    }

    /* «Рекомендуем для вас»: как категория на мобилке — 2 колонки (перебиваем .cross-sell-grid-карусель) */
    .recommended-products-section .recommended-products-carousel.cross-sell-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-flow: row !important;
        grid-auto-rows: 1fr !important;
        grid-auto-columns: auto !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        scroll-snap-type: none !important;
        -webkit-overflow-scrolling: auto !important;
        gap: var(--catalog-grid-gap) !important;
        padding-bottom: 0 !important;
        align-items: stretch !important;
    }
}

@media (max-width: 480px) {
    body {
        padding-bottom: calc(var(--mbn-height, 46.75px) + env(safe-area-inset-bottom, 0px) + 8px);
    }

    .floating-actions {
        bottom: calc(var(--mbn-height, 46.75px) + env(safe-area-inset-bottom, 0px) + 16px);
    }

    .container {
        width: 100%;
        max-width: none;
        padding-left: max(6px, env(safe-area-inset-left, 0px));
        padding-right: max(6px, env(safe-area-inset-right, 0px));
        box-sizing: border-box;
    }

    .product-grid,
    .product-grid.compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-section-left .section-head,
    .news-section-left .news-grid {
        max-width: none;
    }

    .news-section-left .news-grid .news-card {
        flex: 0 0 100%;
    }

    .news-section-left .news-grid[data-news-slider="1"] .news-card {
        flex: 0 0 calc((100% - 14px) / 2);
    }

    .news-grid.news-grid-all .news-card {
        flex: initial;
    }

    .news-grid.news-grid-all {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .variation-editor {
        grid-template-columns: 1fr;
    }

    .hero-banner {
        padding: 18px 14px;
        gap: 10px;
    }

    .hero-banner h1 {
        font-size: 22px;
    }

    .hero-banner p {
        font-size: 13px;
    }

    .section-head h2 {
        font-size: var(--catalog-section-title-size-xs);
    }

    .category-content .section-head h2 {
        font-size: var(--catalog-category-title-size-compact);
    }

    .product-main-info h1 {
        font-size: 25px;
    }

    .product-main-info .product-price-block #productDetailPrice {
        font-size: 38px;
    }

    .product-original-seal {
        width: 108px;
        height: 108px;
    }

    .product-main-info .product-price-row {
        padding-right: 116px;
        min-height: 94px;
    }

    .product-detail-hero {
        padding: 12px;
        border-radius: var(--catalog-card-radius);
    }

    .product-gallery,
    .product-main-info,
    .related-products {
        padding: 12px;
        border-radius: var(--catalog-card-radius);
    }

    .product-detail-hero .product-gallery,
    .product-detail-hero .product-main-info {
        padding: 0;
        border-radius: 0;
    }

    .zoom-image-wrap > img {
        aspect-ratio: var(--product-photo-aspect);
        object-fit: contain;
        object-position: center;
    }

    .product-info-tab-label {
        font-size: 13px;
        padding: 8px 10px;
    }

    .product-info-tab-list {
        gap: 6px;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    .product-info-tab-panel {
        font-size: 14px;
        line-height: 1.6;
    }

    .full-description-text,
    .product-description-card p {
        overflow-wrap: break-word;
        word-break: normal;
    }

    .full-description-text p {
        margin: 0 0 10px;
    }

    .full-description-text p:last-child {
        margin-bottom: 0;
    }

    .product-section h2 {
        font-size: 18px;
    }

    .product-description-card p {
        font-size: 16px;
        line-height: 1.75;
    }

    .product-info-tab-panel-description .full-description-text,
    .product-info-tab-panel-description .full-description-text p,
    .product-info-tab-panel-description .full-description-text li {
        font-size: 16px;
        line-height: 1.75;
    }

}


@media (max-width: 896px) and (orientation: landscape) {
    :root {
        --catalog-grid-gap: 1px;
    }

    .category-content {
        padding: 6px 4px;
    }

    .container {
        padding-left: max(4px, env(safe-area-inset-left, 0px));
        padding-right: max(4px, env(safe-area-inset-right, 0px));
    }
}

@media (max-width: 390px) {
    .product-grid,
    .product-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--catalog-grid-gap);
    }

    .product-info-tab-label {
        font-size: 12px;
        padding: 7px 8px;
    }

    .product-title {
        min-height: 2.7em;
        font-size: 15px;
        line-height: 1.35;
    }

    .product-info .product-price {
        font-size: 18px;
    }

    .buy-btn {
        font-size: 13px;
        padding: 10px;
    }
}

/* Бренды: витрина и карточка товара */
.brands-index-section .brands-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.brand-tile {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.brand-tile:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 22px rgba(17, 34, 68, 0.1);
}

.brand-tile-inner {
    display: flex;
        flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.brand-tile-logo {
    max-width: 100%;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-tile-fallback {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-tile-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.brands-carousel-section {
    margin-top: 4px;
}

.brands-carousel-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.brands-carousel-section-actions {
    margin-left: auto;
}

.brands-carousel-viewport {
    width: 100%;
    overflow: hidden;
}

.brands-carousel-track {
    --bc-visible: 6;
    --bc-gap: 16px;
    display: flex;
    flex-wrap: nowrap;
    gap: var(--bc-gap);
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0 10px;
    box-sizing: border-box;
}

.brands-carousel-track::-webkit-scrollbar {
    display: none;
}

.brands-carousel-tile[data-brands-carousel-clone] {
    pointer-events: none;
}

.brands-carousel-tile {
    --bc-tile-h: 156px;
    --bc-logo-box-h: 80px;
    flex: 0 0 calc((100% - var(--bc-gap) * (var(--bc-visible) - 1)) / var(--bc-visible));
    width: calc((100% - var(--bc-gap) * (var(--bc-visible) - 1)) / var(--bc-visible));
    min-width: 0;
    max-width: none;
    height: var(--bc-tile-h);
    min-height: var(--bc-tile-h);
    max-height: var(--bc-tile-h);
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: stretch;
    padding: 10px;
}

.brands-carousel-tile .brand-tile-inner {
    flex: 1;
    width: 100%;
    min-height: 0;
    gap: 8px;
    justify-content: space-between;
}

.brands-carousel-tile .brand-tile-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--bc-logo-box-h);
    min-height: var(--bc-logo-box-h);
    max-height: var(--bc-logo-box-h);
    flex-shrink: 0;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.9);
    overflow: hidden;
}

.brands-carousel-tile .brand-tile-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.brands-carousel-tile .brand-tile-fallback {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 4px;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.brands-carousel-tile .brand-tile-name {
    flex: 1 1 auto;
    min-height: 2.6em;
    max-height: 2.6em;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
}

.theme-dark .brands-carousel-tile .brand-tile-logo-box {
    background: rgba(17, 26, 43, 0.65);
}

@media (max-width: 1100px) {
    .brands-carousel-track {
        --bc-visible: 5;
    }
}

@media (max-width: 900px) {
    .brands-carousel-track {
        --bc-visible: 4;
    }
}

@media (max-width: 768px) {
    .brands-carousel-track {
        --bc-visible: 3;
        --bc-gap: 12px;
    }

    .brands-carousel-tile {
        --bc-tile-h: 142px;
        --bc-logo-box-h: 72px;
        padding: 8px;
    }

    .brands-carousel-tile .brand-tile-name {
        font-size: 13px;
        min-height: 2.4em;
        max-height: 2.4em;
    }
}

.brand-page,
.brand-page * {
    font-family: var(--font-sans);
}

.brand-page-hero {
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
    border: 1px solid #e2e8f0;
    border-radius: var(--ozon-panel-radius, 16px);
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    overflow: visible;
}

.brand-page-hero:has(.mihome-custom-select.is-open) {
    z-index: 30;
}

.brand-page-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 18px;
}

.brand-page-hero-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    flex: 1 1 auto;
}

.brand-page-hero-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e8eef5;
}

.brand-page-hero-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-page-hero-logo--fallback {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fed7aa;
}

.brand-page-hero-logo-letter {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    color: #ea580c;
    text-transform: uppercase;
}

.brand-page-hero-text {
    min-width: 0;
}

.brand-page-hero-text h2 {
    margin: 0 0 6px;
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    text-align: left;
}

.brand-page-hero-subtitle {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: #64748b;
}

.brand-page-hero-count {
    margin: 0;
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 8px;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: #475569;
    letter-spacing: 0.01em;
}

.brand-page-hero-actions {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    overflow: visible;
}

.brand-page-sort-field {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.brand-page-sort-label {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--muted);
    letter-spacing: 0.01em;
}

.brand-page-sort-form .mihome-custom-select {
    width: 100%;
    min-width: 168px;
    max-width: 240px;
    font-family: var(--font-sans);
}

.brand-page-sort-form .mihome-custom-select__trigger {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--ozon-thumb-radius, 8px);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: none;
}

.brand-page-sort-form .mihome-custom-select__value {
    font-weight: 600;
    color: #0f172a;
}

.brand-page-sort-form .mihome-custom-select__arrow {
    border-color: var(--muted);
}

.brand-page-sort-form .mihome-custom-select__trigger:focus,
.brand-page-sort-form .mihome-custom-select.is-open .mihome-custom-select__trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 103, 0, 0.16);
}

.brand-page-sort-form .mihome-custom-select__list {
    left: 0;
    right: auto;
    width: max-content;
    min-width: 100%;
    max-width: min(300px, calc(100vw - 32px));
    z-index: 80;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--catalog-card-radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
}

.brand-page-sort-form .mihome-custom-select__option {
    border-radius: 8px;
    padding: 9px 10px;
    font-weight: 600;
    color: var(--text);
}

.brand-page-sort-form .mihome-custom-select__option:hover {
    background: #fff7ed;
    color: var(--primary-dark);
}

.brand-page-sort-form .mihome-custom-select__option.is-selected {
    background: #fff7ed;
    color: var(--primary);
}

.brand-page-hero-back {
    display: inline-flex;
    align-items: center;
    gap: 0;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.brand-page-hero-back:hover {
    border-color: #fed7aa;
    color: var(--primary);
    background: #fff7ed;
}

.brand-page-hero-back-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.brand-page-sort-form {
    display: block;
    width: 100%;
    margin: 0;
}

.brand-page-content {
    padding: 16px;
    overflow: visible;
    border: 1px solid #e2e8f0;
    border-radius: var(--ozon-panel-radius, 16px);
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.brand-page-content .product-grid {
    margin: 0;
}

.brand-page-empty {
    margin: 0;
    padding: 28px 20px;
    border: 1px dashed #c9d8ef;
    border-radius: var(--ozon-panel-radius, 16px);
    background: linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%);
    color: #64748b;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

.brand-page-hero--compact .brand-page-hero-top {
    padding-bottom: 20px;
}

@media (max-width: 768px) {
    .brand-page-hero-top {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .brand-page-hero-brand {
        gap: 14px;
    }

    .brand-page-hero-logo {
        width: 72px;
        height: 72px;
        padding: 10px;
    }

    .brand-page-hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        gap: 8px;
    }

    .brand-page-sort-field {
        align-items: stretch;
        width: 100%;
    }

    .brand-page-sort-form .mihome-custom-select {
        max-width: none;
    }

    .brand-page-hero-back {
        flex: 0 0 auto;
    }

    .brand-page-content {
        padding: 12px;
    }
}

.product-page-brand {
    margin: 6px 0 14px;
}

.product-page-brand-link,
.product-page-brand-logo-link,
.product-page-brand-text-link,
.product-page-brand-static {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    max-width: 100%;
}

.product-page-brand-logo-link {
    gap: 0;
    flex-shrink: 0;
}

.product-page-brand-text-link {
    gap: 0;
    min-width: 0;
}

.product-page-brand-link:hover .product-page-brand-text,
.product-page-brand-text-link:hover .product-page-brand-text {
    color: var(--primary);
}

.product-page-brand-text {
    font-weight: 700;
    font-size: 21px;
    line-height: 1.25;
}

.theme-dark .product-page-brand-caption {
    color: #94a3b8;
}

.theme-dark .brand-tile {
    background: #111a2b;
    border-color: #24324a;
}

/* Keep news card spacing equal to product card spacing */
.news-grid,
.news-grid.news-grid-all {
    gap: var(--catalog-grid-gap) !important;
}

@media (max-width: 768px) {
    .product-info .product-price-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: baseline !important;
        gap: 3px !important;
        white-space: nowrap !important;
        overflow: hidden;
    }

    .product-info .product-price {
        white-space: nowrap !important;
        font-size: 19px !important;
        font-weight: 900 !important;
        letter-spacing: -0.015em;
    }

    .product-info .product-price-old,
    .product-info .product-discount-percent {
        white-space: nowrap !important;
        font-size: 11px !important;
        line-height: 1.1;
    }
}

.account-section {
    margin-top: 28px;
    font-family: var(--font-sans);
}

.account-section :where(
    h1, h2, h3, h4, h5, h6,
    p, span, a, li, dt, dd, label, legend, small, strong, em,
    input, select, textarea, button, option, optgroup,
    th, td, caption, ol, ul
) {
    font-family: var(--font-sans);
}

.account-page-head {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.account-page-head h2,
.account-page-head .checkout-page-subtitle {
    text-align: center;
}

.account-auth-card {
    max-width: 520px;
    margin: 0 auto;
}

body.page-account .account-auth-card .checkout-form input::placeholder,
body.page-account .account-auth-card .checkout-form textarea::placeholder,
.customer-auth-modal .checkout-form input::placeholder,
.customer-auth-modal .checkout-form textarea::placeholder {
    font-weight: 500;
    color: #64748b;
}

body.page-account .account-auth-card .phone-input-prefix,
.customer-auth-modal .phone-input-prefix {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.account-profile-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.account-profile-card {
    max-width: none;
    margin: 0;
}

.account-profile-section-title,
.account-profile-subtitle {
    margin: 0 0 14px;
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.account-profile-subtitle {
    font-size: 16px;
}

.account-profile-hint {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.account-preferred-delivery-form {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
}

.account-preferred-delivery-form .account-submit {
    margin-top: 10px;
}

.account-profile-notifications {
    margin: 8px 0 0;
    padding: 8px 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.account-profile-notifications legend {
    display: block;
    float: none;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: #334155;
    line-height: 1.35;
}

.account-profile-field-hint {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

.account-profile-receipt-block {
    margin-bottom: 12px;
}

.account-profile-notifications label[for="profileStatusNotifyEmail"] {
    display: block;
    margin-top: 10px;
}

.account-profile-notifications #profileStatusNotifyEmail {
    margin-top: 6px;
}

.account-profile-notifications .account-checkbox > span,
.account-address-form .account-checkbox > span {
    position: relative;
    top: 0;
    left: 2px;
}

.account-address-form .account-submit {
    margin-top: 20px;
}

.account-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    cursor: pointer;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.account-checkbox:first-of-type {
    margin-top: 0;
}

.account-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin: 0;
    border: 2px solid #cbd5e1;
    border-radius: 7px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    cursor: pointer;
    transition:
        border-color 0.16s ease,
        background 0.16s ease,
        box-shadow 0.16s ease;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.account-checkbox input[type="checkbox"]:hover {
    border-color: #94a3b8;
    background: linear-gradient(180deg, #fff, #f1f5f9);
}

.account-checkbox input[type="checkbox"]:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 103, 0, 0.22);
}

.account-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(255, 103, 0, 0.28);
}

.account-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    box-sizing: border-box;
}

.account-address-list {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.account-address-card {
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: var(--catalog-card-radius);
    background: #fff;
}

.account-address-card.is-default {
    border-color: #fdba74;
    background: #fff7ed;
}

.account-address-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.account-address-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ffedd5;
    color: #c2410c;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.account-address-card-text,
.account-address-card-city {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.45;
}

.account-address-card-city {
    margin-top: 6px;
    font-weight: 600;
}

.account-address-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.account-address-card-actions .ghost-btn,
.account-address-card-actions button.ghost-btn {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: #ea580c;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.account-address-card-actions .ghost-btn:hover,
.account-address-card-actions button.ghost-btn:hover {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: #c2410c;
}

.account-inline-form {
    margin: 0;
}

.account-address-delete-btn {
    color: #b91c1c;
}

.account-address-delete-btn:hover {
    color: #991b1b;
}

.account-address-cancel {
    display: inline-flex;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .account-profile-layout {
        grid-template-columns: 1fr;
    }
}

.account-auth-form .account-submit,
.account-profile-form .account-submit {
    margin-top: 12px;
}

.account-password-form .account-submit {
    margin-top: 20px;
}

.account-auth-switch {
    margin: 14px 0 0;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.account-auth-switch a {
    color: #ea580c;
    font-weight: 700;
    text-decoration: none;
}

.account-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
}

.account-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #dbe4ee;
    background: #fff;
    color: #334155;
    font-weight: 700;
    text-decoration: none;
}

.account-nav a.is-active {
    border-color: #fdba74;
    background: #fff7ed;
    color: #c2410c;
}

.account-logout-form {
    margin-left: auto;
}

.account-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #fecaca;
    background: #fff;
    color: #b91c1c;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.account-logout-btn:hover {
    border-color: #f87171;
    background: #fef2f2;
    box-shadow: 0 8px 16px rgba(185, 28, 28, 0.08);
}

.account-empty {
    text-align: center;
    color: #64748b;
    font-size: 15px;
}

.account-points-card {
    width: 100%;
}

/* Шире обычной карточки кабинета (520px), в пределах контейнера */
.account-auth-card.account-points-card {
    max-width: min(960px, 100%);
}

.account-points-head {
    text-align: center;
    margin: 0 auto 22px;
    padding: 8px 12px 4px;
}

.account-points-card .account-points-balance-line {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
}

.account-points-balance-value {
    color: #dc2626;
    font-weight: 800;
    font-size: 1.08em;
}

.account-points-hint {
    margin: 0;
    color: #64748b;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 600;
}

.theme-dark .account-points-card .account-points-balance-line {
    color: #e2e8f0;
}

.theme-dark .account-points-balance-value {
    color: #f87171;
}

.theme-dark .account-points-hint {
    color: #94a3b8;
}

@media (max-width: 640px) {
    .account-points-card .account-points-balance-line {
        font-size: 24px;
    }

    .account-points-hint {
        font-size: 15px;
    }
}

.account-points-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.account-points-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 14px;
}

.account-points-table th,
.account-points-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.account-points-table th {
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
}

.account-points-table tbody tr:last-child td {
    border-bottom: none;
}

.account-orders-list {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.account-orders-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    width: 100%;
    max-width: 760px;
    margin: 0 auto 16px;
    padding-top: 4px;
}

.account-orders-pagination-meta {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.account-orders-per-page-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.account-orders-per-page-label {
    font-size: 14px;
    color: #475569;
    white-space: nowrap;
}

.account-orders-per-page-form select {
    min-height: 38px;
    padding: 6px 32px 6px 12px;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font: inherit;
}

.account-orders-pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.account-orders-page-indicator {
    font-size: 14px;
    color: #475569;
    white-space: nowrap;
}

.account-orders-page-btn.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.account-order-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid #dbe4ee;
    border-radius: var(--catalog-card-radius);
    background: linear-gradient(180deg, #f8fafd 0%, #f2f6fb 100%);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 18px rgba(17, 34, 68, 0.06);
}

.account-order-card-main,
.account-order-card-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-order-card-side {
    align-items: flex-end;
    text-align: right;
}

.account-order-status {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

.account-order-detail {
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.account-order-back {
    margin: 0 0 16px;
}

.account-order-back-btn {
    min-height: 40px;
    padding: 9px 16px;
}

.account-order-back-icon {
    display: inline-flex;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
}

.account-order-meta {
    margin: 12px 0 18px;
    color: #334155;
}

.account-order-meta p {
    margin: 0 0 6px;
}

.account-order-totals {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.account-order-detail .cart-grand-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 6px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: #475569;
}

.account-order-detail .cart-grand-total strong {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.account-order-detail .account-order-totals .cart-grand-total:last-child {
    margin-bottom: 0;
}

.account-order-detail > .cart-grand-total.is-payable {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    font-weight: 700;
    color: #0f172a;
}

.account-order-detail > .cart-grand-total.is-payable strong {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.theme-dark .account-nav a {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.theme-dark .account-nav a.is-active {
    background: #431407;
    border-color: #9a3412;
    color: #fdba74;
}

.theme-dark .account-preferred-delivery-form {
    border-bottom-color: #2d3f5d;
}

.theme-dark .account-profile-notifications {
    border-color: #2d3f5d;
    background: rgba(15, 23, 42, 0.35);
}

.theme-dark .account-profile-notifications legend {
    color: #9fb2cd;
}

.theme-dark .account-profile-field-hint {
    color: #94a3b8;
}

.theme-dark .account-address-card-actions .ghost-btn,
.theme-dark .account-address-card-actions button.ghost-btn {
    color: #fb923c;
}

.theme-dark .account-address-card-actions .ghost-btn:hover,
.theme-dark .account-address-card-actions button.ghost-btn:hover {
    color: #fdba74;
}

.theme-dark .account-address-delete-btn {
    color: #f87171;
}

.theme-dark .account-address-delete-btn:hover {
    color: #fca5a5;
}

.theme-dark .account-checkbox {
    color: #cbd5e1;
}

.theme-dark .account-checkbox input[type="checkbox"] {
    border-color: #475569;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.theme-dark .account-checkbox input[type="checkbox"]:hover {
    border-color: #64748b;
    background: linear-gradient(180deg, #243146, #131c2e);
}

.theme-dark .account-checkbox input[type="checkbox"]:focus-visible {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.25);
}

.theme-dark .account-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
    border-color: #c2410c;
    box-shadow: 0 2px 10px rgba(251, 146, 60, 0.35);
}

.theme-dark .account-logout-btn {
    background: #1e293b;
    border-color: #7f1d1d;
    color: #fca5a5;
}

.theme-dark .account-logout-btn:hover {
    background: #431407;
    border-color: #b91c1c;
}

.theme-dark .account-order-card {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

.theme-dark .account-orders-pagination-meta,
.theme-dark .account-orders-page-indicator {
    color: #94a3b8;
}

.theme-dark .account-orders-per-page-label {
    color: #cbd5e1;
}

.theme-dark .account-orders-per-page-form select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.theme-dark .account-order-totals {
    border-top-color: #2d3f5d;
}

.theme-dark .account-order-detail .cart-grand-total {
    color: #94a3b8;
}

.theme-dark .account-order-detail .cart-grand-total strong {
    color: #e2e8f0;
}

.theme-dark .account-order-detail > .cart-grand-total.is-payable {
    border-top-color: #2d3f5d;
    color: #e2e8f0;
}

.theme-dark .account-order-detail > .cart-grand-total.is-payable strong {
    color: #f8fafc;
}

.theme-dark .account-empty,
.theme-dark .account-auth-switch,
.theme-dark .account-order-status {
    color: #94a3b8;
}

.theme-dark .account-points-table th {
    background: #1e293b;
    color: #cbd5e1;
}

.theme-dark .account-points-table th,
.theme-dark .account-points-table td {
    border-color: #334155;
}

@media (max-width: 720px) {
    .account-order-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-order-card-side {
        align-items: flex-start;
        text-align: left;
    }

    .account-orders-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .account-orders-pagination-controls {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .account-logout-form {
        margin-left: 0;
        width: 100%;
    }

    .account-logout-btn {
        width: 100%;
    }
}

.account-otp-field {
    margin-top: 8px;
}

.account-otp-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.account-otp-row input {
    min-width: 0;
}

.account-otp-send-btn {
    border-color: #5eead4;
    background: linear-gradient(180deg, #f0fdfa 0%, #ccfbf1 100%);
    color: #0f766e;
    font-weight: 700;
    white-space: nowrap;
}

.account-otp-send-btn:hover:not(:disabled) {
    border-color: #2dd4bf;
    background: linear-gradient(180deg, #ccfbf1 0%, #99f6e4 100%);
    box-shadow: 0 6px 14px rgba(15, 118, 110, 0.18);
    color: #115e59;
}

.account-otp-send-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

.account-otp-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #64748b;
}

.account-otp-hint.is-success {
    color: #047857;
}

.account-otp-hint.is-error {
    color: #b91c1c;
}

.account-otp-phone-note {
    margin: 0 0 12px;
    color: #334155;
}

.theme-dark .account-otp-phone-note {
    color: #e2e8f0;
}

.theme-dark .account-otp-hint {
    color: #94a3b8;
}

.theme-dark .account-otp-hint.is-success {
    color: #6ee7b7;
}

.theme-dark .account-otp-hint.is-error {
    color: #fca5a5;
}

.theme-dark .account-otp-send-btn {
    border-color: #0f766e;
    background: linear-gradient(180deg, #134e4a 0%, #115e59 100%);
    color: #ccfbf1;
}

.theme-dark .account-otp-send-btn:hover:not(:disabled) {
    border-color: #14b8a6;
    background: linear-gradient(180deg, #115e59 0%, #0f766e 100%);
    box-shadow: 0 6px 14px rgba(20, 184, 166, 0.22);
    color: #f0fdfa;
}

@media (max-width: 720px) {
    .account-otp-row {
        grid-template-columns: 1fr;
    }
}

.account-order-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
}

.account-order-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    list-style: none;
    margin: 16px 0;
    padding: 0;
}

.account-order-step {
    position: relative;
    padding: 12px 10px;
    border-radius: 12px;
    border: 1px solid #dbe4ee;
    background: #fff;
    text-align: center;
}

.account-order-step.is-done {
    border-color: #86efac;
    background: #f0fdf4;
}

.account-order-step.is-current {
    border-color: #fdba74;
    background: #fff7ed;
    box-shadow: 0 8px 18px rgba(234, 88, 12, 0.12);
}

.account-order-step.is-upcoming {
    color: #94a3b8;
}

.account-order-step-label {
    font-size: 13px;
    font-weight: 700;
}

.account-order-terminal-note {
    margin: 12px 0 0;
    color: #64748b;
}

.account-order-delivery-eta {
    margin: 12px 0 0;
    color: #475569;
    font-size: 14px;
}

.account-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
    align-items: center;
}

.account-order-action-form {
    margin: 0;
}

.account-order-cancel-btn {
    color: #b91c1c;
}

.theme-dark .account-order-step {
    background: #1e293b;
    border-color: #334155;
}

.theme-dark .account-order-step.is-done {
    background: #14532d;
    border-color: #22c55e;
}

.theme-dark .account-order-step.is-current {
    background: #431407;
    border-color: #fb923c;
}

.theme-dark .account-order-delivery-eta {
    color: #94a3b8;
}

.theme-dark .account-order-status-pill {
    background: #431407;
    border-color: #fb923c;
    color: #fdba74;
}

.customer-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 12050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.52);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.customer-auth-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.customer-auth-modal {
    position: relative;
    width: min(100%, 460px);
    max-height: min(92vh, 860px);
    overflow: auto;
    padding: 22px 22px 20px;
    border-radius: 18px;
    border: 1px solid #dbe4ee;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.customer-auth-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.customer-auth-brand {
    color: #ea580c;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.customer-auth-title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.customer-auth-tabs {
    display: flex;
    gap: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
}

.customer-auth-tab {
    margin: 0;
    padding: 0 0 10px;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.customer-auth-tab.is-active {
    color: #0f172a;
    box-shadow: inset 0 -2px 0 #0f172a;
}

.customer-auth-form .customer-auth-submit {
    width: 100%;
    margin-top: 8px;
}

.customer-auth-switch {
    margin: 8px 0 0;
}

.customer-auth-forgot-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.customer-auth-forgot-label {
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    cursor: default;
}

.customer-auth-link-btn {
    border: 0;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    cursor: default;
    padding: 0;
    text-decoration: none;
}

.customer-auth-link-btn.is-active {
    color: #22c55e;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.customer-auth-link-btn.is-active:hover {
    color: #16a34a;
}

.customer-auth-status {
    margin: 10px 0 0;
    font-size: 13px;
    color: #64748b;
}

.customer-auth-status.is-error {
    color: #b91c1c;
}

.customer-auth-status.is-success {
    color: #15803d;
}

.theme-dark .customer-auth-modal {
    background: #0f172a;
    border-color: #334155;
}

.theme-dark .customer-auth-title,
.theme-dark .customer-auth-tab.is-active {
    color: #e2e8f0;
}

.theme-dark .customer-auth-tab {
    color: #94a3b8;
}

.theme-dark .customer-auth-forgot-label {
    color: #e2e8f0;
}

.theme-dark .customer-auth-link-btn.is-active {
    color: #86efac;
}

.theme-dark .customer-auth-link-btn.is-active:hover {
    color: #bbf7d0;
}

.theme-dark .customer-auth-close {
    background: #1e293b;
    color: #cbd5e1;
}

/* Мобильный каталог: плотный список категорий (перекрывает grid/inline зазоры) */
@media (max-width: 1024px) {
    .category-nav .mega-menu-categories--mobile-compact {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        padding: 0 !important;
    }

    .category-nav .mega-menu-categories--mobile-compact > .mega-menu-category-item {
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    .category-nav .mega-menu-categories--mobile-compact > .mega-menu-category-item > .mega-menu-category-row {
        margin: 0 !important;
        padding: 5px 0 !important;
        min-height: 0 !important;
    }

    .category-nav .mega-menu-categories--mobile-compact > .mega-menu-category-item > .mega-menu-category-row > .mega-menu-category {
        padding: 7px 14px !important;
        font-size: 16.5px !important;
        line-height: 1.2 !important;
    }

    .category-nav .mega-menu-categories--mobile-compact > .mega-menu-category-item > .mega-menu-category-row > .mega-menu-expand {
        width: 28px !important;
        height: 28px !important;
        font-size: 15.5px !important;
    }
}
