        :root, [data-theme="light"] {
            --bg-body: #f8f9fa;
            --bg-nav: #fff;
            --bg-card: #fff;
            --bg-input: #fff;
            --text: #212529;
            --text-muted: #6c757d;
            --border: #e8e8e8;
            --shadow: rgba(0,0,0,0.08);
            --shadow-hover: rgba(0,0,0,0.12);
            --premium-block-bg: #e9ecef;
        }
        [data-theme="dark"] {
            --bg-body: #1a1a2e;
            --bg-nav: #16213e;
            --bg-card: #1e2a4a;
            --bg-input: #16213e;
            --text: #e8e8e8;
            --text-muted: #a0aec0;
            --border: #2d3a5a;
            --shadow: rgba(0,0,0,0.3);
            --shadow-hover: rgba(0,0,0,0.4);
            --premium-block-bg: #1a1a2e;
        }
        body {
            font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            background: var(--bg-body);
            color: var(--text);
            transition: background 0.3s, color 0.3s;
            overflow-x: hidden;
        }
        main {
            flex: 1;
        }
        .navbar {
            box-shadow: 0 2px 10px var(--shadow);
            background: var(--bg-nav) !important;
            transition: background 0.3s;
        }
        .navbar .navbar-brand, .navbar .nav-link, .navbar .form-control, .navbar .btn {
            color: var(--text) !important;
        }
        [data-theme="dark"] .navbar .form-control { background: var(--bg-input); border-color: var(--border); color: var(--text); }
        [data-theme="dark"] .navbar .form-control::placeholder { color: var(--text-muted); }
        .navbar-logo { height: 40px; width: auto; object-fit: contain; }
        .logo-dark { display: none; }
        [data-theme="dark"] .logo-light { display: none; }
        [data-theme="dark"] .logo-dark { display: block; }
        .navbar .nav-link:hover { color: #0d6efd !important; }
        .navbar-telegram-wrap {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
            color: var(--text) !important;
            margin-left: 0.75rem;
        }
        .navbar-telegram-wrap:hover { color: #0d6efd !important; }
        .navbar-telegram-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: linear-gradient(135deg, #0088cc, #229ED9);
            color: white !important;
            flex-shrink: 0;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .navbar-telegram-wrap:hover .navbar-telegram-icon {
            transform: scale(1.05);
            box-shadow: 0 2px 12px rgba(0,136,204,0.4);
        }
        .navbar-telegram-icon i { font-size: 1.2rem; }
        .catalog-categories-toggle { border: none; background: transparent; padding: 0.5rem 0.25rem; margin-left: 6px; cursor: pointer; }
        .catalog-categories-toggle::after { margin-left: 0; }
        /* Подсказки при поиске (автодополнение) */
        .search-suggestions-wrap { display: inline-flex; }
        .search-suggestions-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin-top: 2px;
            max-height: 320px;
            overflow-y: auto;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            box-shadow: 0 8px 24px var(--shadow);
            z-index: 1050;
        }
        .search-suggestion-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            color: var(--text);
            text-decoration: none;
            border-bottom: 1px solid var(--border);
            transition: background 0.15s;
        }
        .search-suggestion-item:last-child { border-bottom: none; }
        .search-suggestion-item:hover {
            background: var(--premium-block-bg);
        }
        .search-suggestion-item .suggestion-name { flex: 1; }
        .search-suggestion-item .suggestion-price { font-size: 0.9em; margin-left: 8px; }
        .product-card {
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
            transition: all 0.3s ease;
            height: 100%;
            background: var(--bg-card);
            overflow: visible;
            color: var(--text);
        }
        .product-card:hover {
            box-shadow: 0 8px 25px var(--shadow-hover);
            transform: translateY(-8px);
            border-color: #0d6efd;
        }
        @media (hover: none) {
            .product-card:hover { transform: none; }
            .product-card:hover .product-card-img-wrap img { transform: none !important; }
        }
        /* Единая высота изображений в карточках — контейнер фиксирует размер */
        .product-card-img-wrap {
            position: relative;
            width: 100%;
            aspect-ratio: 1;
            min-height: 200px;
            overflow: hidden;
            border-radius: 8px;
            margin-bottom: 1rem;
            background: var(--bg-input);
        }
        .product-card-img-wrap img {
            width: 100% !important;
            height: 100% !important;
            max-width: 100% !important;
            object-fit: cover;
            display: block;
            transform-origin: center center;
            transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            will-change: transform;
        }
        /* Зум при наведении — несколько селекторов для надёжности */
        .product-card:hover .product-card-img-wrap img,
        .product-card-link:hover .product-card-img-wrap img,
        .product-card-img-wrap:hover img {
            transform: scale(1.2) !important;
        }
        /* Плашка «Хит» — поверх изображения */
        .product-badge-hit {
            z-index: 10;
            pointer-events: none;
        }
        /* Кнопка избранного на карточках */
        .favorite-btn {
            z-index: 15;
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            width: 36px;
            height: 36px;
            border: none;
            border-radius: 50%;
            background: rgba(255,255,255,0.9);
            color: #6c757d;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: color 0.2s, background 0.2s, transform 0.2s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .favorite-btn:hover {
            color: #dc3545;
            background: rgba(255,255,255,0.98);
            transform: scale(1.1);
        }
        .favorite-btn .fas { display: none; }
        .favorite-btn .far { display: inline-block; }
        .favorite-btn.active .far { display: none; }
        .favorite-btn.active .fas { display: inline-block !important; color: #dc3545; }
        [data-theme="dark"] .favorite-btn { background: rgba(30,42,74,0.95); color: var(--text-muted); }
        [data-theme="dark"] .favorite-btn:hover { color: #dc3545; background: var(--bg-card); }
        .favorite-btn-inline { position: static; box-shadow: none; }
        .compare-btn:not(.compare-btn-inline) {
            z-index: 14;
            width: 36px;
            height: 36px;
            border: none;
            border-radius: 50%;
            background: rgba(255,255,255,0.9);
            color: #6c757d;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: color 0.2s, background 0.2s, transform 0.2s;
        }
        .compare-btn:not(.compare-btn-inline):hover { color: #0d6efd; background: rgba(255,255,255,0.98); transform: scale(1.1); }
        .compare-btn:not(.compare-btn-inline).active { color: #0d6efd; }
        [data-theme="dark"] .compare-btn:not(.compare-btn-inline) { background: rgba(30,42,74,0.95); color: var(--text-muted); }
        [data-theme="dark"] .compare-btn:not(.compare-btn-inline):hover { color: #6ea8fe; background: var(--bg-card); }
        .product-price {
            font-size: 1.4rem;
            font-weight: 700;
            color: #0d6efd;
        }
        .old-price {
            text-decoration: line-through;
            color: #999;
            font-size: 0.95rem;
        }
        .promo-carousel-wrapper {
            position: relative;
        }
        .promo-carousel {
            border-radius: 16px;
            overflow: hidden;
            background: linear-gradient(90deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
        }
        .promo-carousel .carousel-item {
            background: linear-gradient(90deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
        }
        .promo-carousel.carousel-fade .carousel-item {
            opacity: 0;
            transition: opacity 0.8s ease-in-out;
        }
        .promo-carousel.carousel-fade .carousel-item.active {
            opacity: 1;
        }
        .promo-carousel-indicators {
            bottom: 8px;
            left: 50%;
            transform: translateX(-50%);
            margin: 0;
            z-index: 5;
        }
        .promo-carousel-indicators button {
            width: 24px;
            height: 6px;
            border-radius: 3px;
            background-color: rgba(255,255,255,0.4);
            border: none;
            margin: 0 4px;
            transition: background 0.3s;
        }
        .promo-carousel-indicators button.active {
            background-color: white;
        }
        .promo-carousel .carousel-control-prev,
        .promo-carousel .carousel-control-next {
            display: none;
        }
        .promo-carousel-nav {
            position: absolute;
            bottom: 16px;
            right: 50px;
            left: auto;
            display: flex;
            gap: 10px;
            z-index: 10;
        }
        .promo-nav-btn {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 2px solid rgba(255,255,255,0.8);
            background: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            color: white;
        }
        .promo-nav-btn:hover {
            background: rgba(255,255,255,0.2);
            border-color: white;
        }
        .promo-nav-btn .carousel-control-prev-icon,
        .promo-nav-btn .carousel-control-next-icon {
            background-size: 1.2rem;
            filter: brightness(0) invert(1);
        }
        .promo-slide-inner {
            display: flex;
            align-items: stretch;
            min-height: 420px;
            background: linear-gradient(90deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
            position: relative;
        }
        .promo-slide-badge {
            position: absolute;
            top: 20px;
            left: 24px;
            z-index: 3;
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 700;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        }
        .promo-badge-telegram { background: linear-gradient(135deg, #0088cc, #229ED9); color: white; }
        .promo-badge-promo { background: linear-gradient(135deg, #dc3545, #c82333); color: white; }
        .promo-badge-bonus { background: linear-gradient(135deg, #ffc107, #e0a800); color: #1a1a2e; }
        .promo-badge-hit { background: linear-gradient(135deg, #28a745, #1e7e34); color: white; }
        .promo-badge-new { background: linear-gradient(135deg, #6f42c1, #5a32a3); color: white; }
        /* Изображение: десктоп — левая половина, сдвиг 50% вправо; мобильная — 2/3 сверху */
        .promo-slide-bg {
            position: absolute;
            left: 0;
            top: 0;
            width: 50%;
            height: 100%;
            z-index: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .promo-slide-bg picture,
        .promo-slide-bg img,
        .promo-slide-img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: center;
            display: block;
        }
        .promo-slide-bg-link {
            position: absolute;
            left: 0;
            top: 0;
            width: 50%;
            height: 100%;
            z-index: 1;
        }
        .promo-slide-bg-placeholder {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 200px;
            width: 50%;
            height: 100%;
            background: linear-gradient(135deg, #0d6efd 0%, #084298 100%);
            color: white;
            font-size: 1.5rem;
        }
        .promo-slide-caption-wrap {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            align-items: flex-end;
            padding: 40px 50px 90px 20px;
            text-align: right;
            position: relative;
            z-index: 2;
        }
        .promo-slide-caption-wrap h2 {
            font-size: 1.75rem;
            font-weight: 700;
            color: white;
            text-shadow: 0 2px 8px rgba(0,0,0,0.3);
            margin-bottom: 12px;
        }
        .promo-slide-caption-wrap .promo-price {
            font-size: 1.5rem;
            font-weight: 700;
            color: #ffc107;
            margin-bottom: 20px;
        }
        .promo-slide-caption-wrap .promo-old-price {
            text-decoration: line-through;
            opacity: 0.8;
            font-size: 0.95em;
            margin-left: 0.5rem;
            color: rgba(255,255,255,0.7);
        }
        .promo-slide-btn {
            margin-top: 1rem;
            padding: 12px 28px;
            background: #fff !important;
            color: #1a1a2e !important;
            font-weight: 700;
            font-size: 1rem;
            border: 2px solid rgba(255,255,255,0.95);
            border-radius: 10px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.35);
            transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s;
            align-self: flex-end;
            backface-visibility: hidden;
        }
        .promo-slide-btn:hover {
            background: #fff !important;
            color: #1a1a2e !important;
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 8px 24px rgba(0,0,0,0.45);
        }
        .promo-slide-telegram-only .promo-slide-bg-placeholder {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #0088cc 0%, #229ED9 100%);
        }
        .promo-slide-telegram-only .promo-slide-caption-wrap {
            flex: 1 1 100%;
            max-width: 100%;
            align-items: center;
            text-align: center;
        }
        .promo-slide-telegram-only .promo-slide-bg-link {
            position: absolute;
            inset: 0;
            z-index: 1;
        }
        .promo-carousel a {
            text-decoration: none;
            color: inherit;
        }
        [data-theme="dark"] .promo-carousel-indicators button { background-color: rgba(255,255,255,0.5); }
        [data-theme="dark"] .promo-carousel-indicators button.active { background-color: white; }
        [data-theme="dark"] .promo-slide-btn { background: #fff !important; color: #1a1a2e !important; }
        /* Кнопка «В каталог» под баннером (мобильная), поддержка тем */
        .catalog-entry-btn { font-weight: 600; border-radius: 10px; }
        [data-theme="dark"] .catalog-entry-btn {
            background: var(--bg-card) !important; color: var(--text) !important; border: 2px solid var(--border) !important;
        }
        [data-theme="dark"] .catalog-entry-btn:hover {
            background: var(--bg-input) !important; color: var(--text) !important; border-color: var(--text-muted) !important;
        }
        /* Десктоп: описание и кнопка над навигацией, картинка со сдвигом 50% вправо */
        @media (min-width: 769px) {
            .promo-slide-inner {
                flex-direction: row;
                min-height: 420px;
            }
            .promo-slide-bg {
                width: 50%;
                height: 100%;
                background-position: 50% center;
            }
            .promo-slide-bg-link { width: 50%; height: 100%; }
            .promo-slide-bg-placeholder { width: 50%; height: 100%; }
            .promo-carousel-nav { bottom: 16px; right: 50px; left: auto; }
            .promo-slide-caption-wrap { padding: 40px 50px 90px 20px; }
        }
        @media (max-width: 768px) {
            .promo-carousel .carousel-item { min-height: 380px; }
            .promo-slide-inner {
                flex-direction: column;
                min-height: 380px;
                height: 380px;
            }
            .promo-slide-badge { top: 12px; left: 16px; padding: 5px 10px; font-size: 0.7rem; }
            .promo-slide-bg {
                left: 0;
                top: 0;
                width: 66.67%;
                height: 66.67%;
                background-size: contain;
                background-position: left top;
            }
            .promo-slide-bg-link {
                left: 0;
                top: 0;
                width: 66.67%;
                height: 66.67%;
            }
            .promo-slide-bg-placeholder {
                width: 66.67%;
                height: 66.67%;
                min-height: 0;
            }
            .promo-slide-caption-wrap {
                align-items: flex-end;
                text-align: right;
                padding: 20px 24px 90px 16px;
                justify-content: flex-end;
            }
            .promo-slide-caption-wrap h2 { font-size: 1.25rem; }
            .promo-slide-btn { padding: 10px 20px; font-size: 0.9rem; position: absolute; bottom: 44px; right: 16px; margin-top: 0; }
            .promo-carousel-nav { bottom: 44px; left: 16px; right: auto; transform: none; gap: 8px; }
            .promo-carousel-indicators { bottom: 8px; left: 50%; transform: translateX(-50%); right: auto; }
            .promo-slide-inner { position: relative; }
            .promo-carousel-indicators button { width: 18px; height: 5px; }
            .promo-nav-btn { width: 38px; height: 38px; }
        }
        /* Мобильная адаптация: карточки товаров компактнее */
        @media (max-width: 576px) {
            .product-card { padding: 12px; margin-bottom: 12px; }
            .product-card-img-wrap { min-height: 0; aspect-ratio: 1; margin-bottom: 0.75rem; }
            .product-card-img-wrap img { max-width: 100%; object-fit: cover; }
            .product-card .product-title { min-height: 2.4em; font-size: 0.95rem; -webkit-line-clamp: 2; }
            .product-card .product-price { font-size: 1.1rem; margin-bottom: 0.5rem; }
            .product-card .d-grid { gap: 0.5rem !important; }
            .product-card .btn-sm { padding: 0.35rem 0.5rem; font-size: 0.8rem; }
            main.container { padding-left: 0.75rem; padding-right: 0.75rem; }
            .navbar #headerSearchForm input[type="search"] { width: 140px !important; max-width: 100%; }
            /* Кнопки сравнения и избранного — компактнее на мобильных */
            .favorite-btn:not(.favorite-btn-inline) { width: 28px; height: 28px; top: 4px; right: 4px; font-size: 0.75rem; }
            .compare-btn:not(.compare-btn-inline) { width: 28px; height: 28px; font-size: 0.75rem; }
            .compare-btn:not(.compare-btn-inline).position-absolute { top: 4px; right: 36px; margin: 0 !important; }
        }
        .review-card {
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 15px;
            background: var(--bg-card);
            box-shadow: 0 2px 8px var(--shadow);
            color: var(--text);
        }
        [data-theme="dark"] .card { background: var(--bg-card); border-color: var(--border); color: var(--text); }
        [data-theme="dark"] .card-header:not([class*="bg-"]) { background: var(--bg-input); border-color: var(--border); color: var(--text); }
        [data-theme="dark"] .dropdown-menu { background: var(--bg-card); border-color: var(--border); }
        [data-theme="dark"] .dropdown-item { color: var(--text); }
        [data-theme="dark"] .dropdown-item:hover { background: var(--bg-input); color: var(--text); }
        [data-theme="dark"] .dropdown-divider { border-color: var(--border); }
        [data-theme="dark"] .offcanvas { background: var(--bg-card); color: var(--text); }
        [data-theme="dark"] .offcanvas-header { border-color: var(--border); }
        [data-theme="dark"] .form-control, [data-theme="dark"] .form-select { background: var(--bg-input); border-color: var(--border); color: var(--text); }
        [data-theme="dark"] .table { color: var(--text); }
        [data-theme="dark"] .table td, [data-theme="dark"] .table th { border-color: var(--border); }
        [data-theme="dark"] .text-muted { color: var(--text-muted) !important; }
        [data-theme="dark"] .navbar-toggler { border-color: var(--border); }
        [data-theme="dark"] .navbar-toggler-icon { filter: invert(1); opacity: 0.8; }
        [data-theme="dark"] .btn-close { filter: invert(1); }
        [data-theme="dark"] hr { border-color: var(--border); opacity: 0.5; }
        [data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 { color: var(--text); }
        [data-theme="dark"] .product-card-link { color: var(--text); }
        [data-theme="dark"] .product-card-link:hover .product-title { color: #6ea8fe !important; }
        [data-theme="dark"] main a:not(.btn):not(.navbar-telegram-wrap):not(.product-card-link) { color: #6ea8fe; }
        [data-theme="dark"] main a:not(.btn):not(.navbar-telegram-wrap):not(.product-card-link):hover { color: #8bb4ff; }
        [data-theme="dark"] .bg-white { background: var(--bg-card) !important; }
        [data-theme="dark"] .alert { background: var(--bg-card); border-color: var(--border); color: var(--text); }
        [data-theme="dark"] .table-light,
        [data-theme="dark"] .admin-panel .table thead,
        [data-theme="dark"] .admin-panel thead.table-light,
        [data-theme="dark"] .admin-panel .table thead th { background: #16213e !important; color: #e8e8e8 !important; border-color: var(--border); }
        [data-theme="dark"] .table-hover tbody tr:hover,
        [data-theme="dark"] .admin-panel .table tbody tr:hover { background: rgba(110, 168, 254, 0.12) !important; }
        [data-theme="dark"] .admin-panel .table tbody tr:hover td,
        [data-theme="dark"] .admin-panel .table tbody tr:hover th { color: #e8e8e8 !important; }
        /* Стрелки каруселей — светлые в тёмной теме */
        [data-theme="dark"] .psc-prev, [data-theme="dark"] .psc-next {
            border-color: rgba(255,255,255,0.5);
        }
        [data-theme="dark"] .psc-prev .carousel-control-prev-icon,
        [data-theme="dark"] .psc-next .carousel-control-next-icon {
            filter: brightness(0) invert(1); opacity: 0.9;
        }
        [data-theme="dark"] .psc-prev:hover, [data-theme="dark"] .psc-next:hover {
            border-color: rgba(255,255,255,0.9);
        }
        [data-theme="dark"] .psc-prev:hover .carousel-control-prev-icon,
        [data-theme="dark"] .psc-next:hover .carousel-control-next-icon {
            filter: brightness(0) invert(1); opacity: 1;
        }
        [data-theme="dark"] .psc-prev:disabled, [data-theme="dark"] .psc-next:disabled {
            border-color: rgba(255,255,255,0.2);
        }
        [data-theme="dark"] .nav-tabs { border-color: var(--border); }
        [data-theme="dark"] .nav-tabs .nav-link { color: var(--text-muted); border-color: transparent; }
        [data-theme="dark"] .nav-tabs .nav-link:hover { color: var(--text); border-color: var(--border); }
        [data-theme="dark"] .nav-tabs .nav-link.active { background: var(--bg-card); color: var(--text); border-color: var(--border) var(--border) transparent; }
        [data-theme="dark"] .list-group-item { background: var(--bg-card); border-color: var(--border); color: var(--text); }
        [data-theme="dark"] .admin-breadcrumb a { color: #6ea8fe; }
        [data-theme="dark"] .admin-panel .btn-outline-secondary { border-color: var(--border); color: var(--text); }
        [data-theme="dark"] .admin-panel .btn-outline-secondary:hover { background: var(--bg-input); color: var(--text); }
        [data-theme="dark"] .admin-panel .bg-light { background: var(--bg-input) !important; color: var(--text); }
        [data-theme="dark"] .product-specs-header { background: var(--bg-input) !important; color: var(--text) !important; border-color: var(--border); }
        [data-theme="dark"] .table-specs .spec-key { color: var(--text-muted) !important; border-color: var(--border); }
        [data-theme="dark"] .table-specs .spec-value { color: var(--text) !important; border-color: var(--border); }
        [data-theme="dark"] .product-intro { color: var(--text) !important; }
        [data-theme="dark"] .product-card-link.text-dark { color: var(--text) !important; }
        [data-theme="dark"] .product-card .product-title { color: var(--text) !important; }
        [data-theme="dark"] .product-card .product-price { color: var(--text) !important; }
        [data-theme="dark"] .product-card .old-price { color: var(--text-muted) !important; }
        [data-theme="dark"] .admin-panel code { background: var(--bg-input); color: var(--text); border-color: var(--border); }
        [data-theme="dark"] .cart-widget-qty-block { background: var(--bg-input); border-color: var(--border); }
        [data-theme="dark"] .cart-widget-qty-block .cart-widget-minus,
        [data-theme="dark"] .cart-widget-qty-block .cart-widget-plus { background: var(--bg-input); color: var(--text); }
        [data-theme="dark"] .cart-widget-qty-block .cart-widget-minus:hover,
        [data-theme="dark"] .cart-widget-qty-block .cart-widget-plus:hover { background: var(--bg-card); }
        [data-theme="dark"] .cart-widget-qty-block .cart-widget-qty { background: var(--bg-input); color: var(--text); }
        [data-theme="dark"] .cart-sidebar-item-actions .qty-control { border-color: var(--border); }
        [data-theme="dark"] .cart-sidebar-item-actions .qty-btn { background: var(--bg-input); color: var(--text); }
        [data-theme="dark"] .cart-sidebar-item-actions .qty-btn:hover { background: var(--bg-card); }
        [data-theme="dark"] .cart-sidebar-item-actions .qty-val { background: var(--bg-input); color: var(--text); }
        [data-theme="dark"] .pagination .page-link { background: var(--bg-card); border-color: var(--border); color: var(--text); }
        [data-theme="dark"] .pagination .page-link:hover { background: var(--bg-input); border-color: var(--border); color: var(--text); }
        [data-theme="dark"] .pagination .page-item.active .page-link { background: #6ea8fe; border-color: #6ea8fe; color: #fff; }
        [data-theme="dark"] .pagination .page-item.disabled .page-link { background: var(--bg-input); border-color: var(--border); color: var(--text-muted); }
        .rating {
            color: #ffc107;
        }
        footer, .footer {
            padding: 48px 0 24px;
            margin-top: 50px;
            border-top: 1px solid var(--border);
            background: var(--bg-nav);
            color: var(--text);
            transition: background 0.3s, color 0.3s, border-color 0.3s;
        }
        .footer h5 {
            color: var(--text);
            font-weight: 600;
            margin-bottom: 1rem;
        }
        .footer p, .footer li {
            color: var(--text-muted);
        }
        .footer a {
            color: var(--text);
            text-decoration: none;
            opacity: 0.9;
        }
        .footer a:hover {
            color: #0d6efd;
            text-decoration: underline;
            opacity: 1;
        }
        [data-theme="dark"] .footer a:hover { color: #6ea8fe; }
        .footer-logo {
            height: 48px;
            width: auto;
            object-fit: contain;
        }
        .footer .logo-light { display: block; }
        .footer .logo-dark { display: none; }
        [data-theme="dark"] .footer .logo-light { display: none; }
        [data-theme="dark"] .footer .logo-dark { display: block; }
        .admin-panel { max-width: 1200px; margin: 0 auto; padding: 1rem 0; }
        .admin-breadcrumb a { color: #0d6efd; text-decoration: none; }
        .admin-breadcrumb a:hover { text-decoration: underline; }
        .cart-counter {
            position: absolute;
            top: -5px;
            right: -10px;
            background: linear-gradient(135deg, #dc3545, #c82333);
            color: white;
            border-radius: 50%;
            padding: 2px 6px;
            font-size: 12px;
            font-weight: 600;
        }
        /* Общий стиль для иконок в шапке: тема, сравнение, избранное, корзина */
        .nav-icon-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            min-width: 40px;
            color: var(--text-muted) !important;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: transparent;
            transition: color 0.2s, border-color 0.2s, background 0.2s;
            text-decoration: none;
            cursor: pointer;
        }
        .nav-icon-btn:hover {
            color: var(--text) !important;
            border-color: var(--text-muted);
            background: var(--bg-input);
        }
        .nav-icon-link {
            position: relative;
        }
        .nav-icon-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            font-size: 10px;
            padding: 2px 5px;
            border-radius: 10px;
        }
        .theme-toggle .fa-sun { display: none; }
        .theme-toggle .fa-moon { display: inline-block; }
        [data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }
        [data-theme="dark"] .theme-toggle .fa-moon { display: none; }
        /* Кнопка удаления в корзине: серая контурная корзина, при наведении — крестик */
        .cart-remove-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            padding: 0;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            background: transparent;
            color: #6c757d;
            cursor: pointer;
            transition: color 0.2s, border-color 0.2s, background 0.2s;
        }
        .cart-remove-btn .cart-remove-icon-hover { display: none; }
        .cart-remove-btn:hover {
            color: #dc3545;
            border-color: #dc3545;
            background: rgba(220, 53, 69, 0.08);
        }
        .cart-remove-btn:hover .cart-remove-icon-default { display: none; }
        .cart-remove-btn:hover .cart-remove-icon-hover { display: inline-block !important; }
        .btn-primary, .btn-success {
            border-radius: 8px;
            font-weight: 600;
            transition: all 0.3s;
        }
        .btn-primary:hover, .btn-success:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
        }
        .trust-badge {
            font-size: 0.9rem;
            color: #28a745;
        }
        /* Виджет «В корзину» — два равных блока с промежутком */
        .add-to-cart-widget { width: 100%; min-width: 0; }
        .add-to-cart-widget .cart-widget-inactive .cart-widget-add,
        .add-to-cart-widget .cart-widget-active { width: 100%; }
        .cart-widget-active {
            display: flex !important;
            align-items: stretch;
            gap: 8px;
            width: 100%;
            min-height: 38px;
            min-width: 0;
        }
        .cart-widget-qty-block {
            flex: 0 0 auto;
            display: flex;
            align-items: center;
            background: #f8f9fa;
            border-radius: 8px;
            border: 1px solid rgba(0,0,0,0.15);
            overflow: hidden;
            min-width: 0;
        }
        .cart-widget-qty-block .cart-widget-minus,
        .cart-widget-qty-block .cart-widget-plus {
            width: 32px;
            min-width: 32px;
            height: 38px;
            padding: 0;
            border: none;
            background: #f8f9fa;
            color: #495057;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
            flex-shrink: 0;
        }
        .cart-widget-qty-block .cart-widget-minus:hover,
        .cart-widget-qty-block .cart-widget-plus:hover {
            background: #e9ecef;
        }
        .cart-widget-qty-block .cart-widget-qty {
            width: 36px;
            min-width: 36px;
            max-width: 48px;
            border: none;
            background: #f8f9fa;
            text-align: center !important;
            font-weight: 600;
            font-size: 0.9rem;
            -moz-appearance: textfield;
            flex-shrink: 0;
        }
        .cart-widget-qty-block .cart-widget-qty::-webkit-outer-spin-button,
        .cart-widget-qty-block .cart-widget-qty::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .cart-widget-qty-block .cart-widget-qty:focus {
            box-shadow: none;
            outline: none;
        }
        .cart-widget-active .btn-cart-link {
            flex: 1;
            min-width: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.5rem 0.75rem;
            border-radius: 8px;
            text-decoration: none;
            color: #fff;
            background: #198754;
            font-weight: 500;
            transition: background 0.2s;
            border: 1px solid rgba(0,0,0,0.15);
        }
        .cart-widget-active .btn-cart-link:hover {
            background: #157347;
            color: #fff;
        }
        .add-to-cart-widget-lg .cart-widget-qty-block .cart-widget-minus,
        .add-to-cart-widget-lg .cart-widget-qty-block .cart-widget-plus { width: 36px; min-width: 36px; font-size: 1.1rem; }
        .add-to-cart-widget-lg .cart-widget-qty-block .cart-widget-qty { width: 40px; min-width: 40px; font-size: 1rem; }
        .add-to-cart-widget-lg .cart-widget-active .btn-cart-link { padding: 0.6rem 1rem; font-size: 1.05rem; }
        /* Корзина: блок количества в строке товара */
        .cart-item-row .cart-widget-qty-block { flex: 0 0 auto; }
        .cart-item-row .card-body { overflow: visible; }
        
        /* Модалка подтверждения возраста */
        .age-modal-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.85);
            z-index: 9998;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .age-modal {
            background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
            border-radius: 20px;
            padding: 40px;
            max-width: 480px;
            text-align: center;
            box-shadow: 0 25px 80px rgba(0,0,0,0.5);
            border: 1px solid rgba(255,255,255,0.1);
        }
        .age-modal-icon {
            font-size: 4rem;
            color: #ff6b6b;
            margin-bottom: 20px;
        }
        .age-modal h2 {
            color: white;
            font-weight: 700;
            margin-bottom: 15px;
            font-size: 1.5rem;
        }
        .age-modal p {
            color: rgba(255,255,255,0.85);
            margin-bottom: 25px;
            line-height: 1.6;
        }
        .age-modal .btn-group-age {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }
        .age-modal .btn-confirm {
            background: linear-gradient(135deg, #28a745, #20c997);
            border: none;
            padding: 14px 35px;
            font-weight: 600;
            border-radius: 10px;
            color: white;
            transition: all 0.3s;
        }
        .age-modal .btn-confirm:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
            color: white;
        }
        .age-modal .btn-decline {
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.3);
            padding: 14px 35px;
            font-weight: 600;
            border-radius: 10px;
            color: rgba(255,255,255,0.9);
            transition: all 0.3s;
        }
        .age-modal .btn-decline:hover {
            background: rgba(220, 53, 69, 0.3);
            border-color: #dc3545;
            color: white;
        }
        
        /* Плашка cookies */
        .cookie-banner {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            color: white;
            padding: 20px 30px;
            z-index: 9997;
            box-shadow: 0 -5px 30px rgba(0,0,0,0.2);
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 15px;
        }
        .cookie-banner p {
            margin: 0;
            flex: 1;
            min-width: 200px;
            font-size: 0.95rem;
            color: rgba(255,255,255,0.9);
        }
        .cookie-banner .btn-accept {
            background: rgba(255,255,255,0.2);
            border: 1px solid rgba(255,255,255,0.4);
            color: white;
            padding: 10px 25px;
            border-radius: 8px;
            font-weight: 600;
            transition: all 0.3s;
        }
        .cookie-banner .btn-accept:hover {
            background: rgba(255,255,255,0.3);
            color: white;
        }
        
        /* Юридический текст в подвале */
        .footer-legal {
            font-size: 0.8rem;
            color: var(--text-muted);
            line-height: 1.6;
            margin-top: 25px;
            padding-top: 20px;
            border-top: 1px solid var(--border);
        }
        .footer-legal .minzdrav {
            color: #dc3545;
            font-weight: 600;
        }
        
        /* Карточка товара: характеристики и галерея */
        .product-specs-header { background: #f8f9fa; color: #212529; }
        .table-specs .spec-key {
            width: 40%;
            font-weight: 600;
            color: #495057;
            padding: 12px 20px;
            border-bottom: 1px solid #eee;
        }
        .table-specs .spec-value {
            padding: 12px 20px;
            border-bottom: 1px solid #eee;
            color: inherit;
        }
        .table-specs tr:last-child td {
            border-bottom: none;
        }
        .product-intro {
            line-height: 1.7;
            color: #444;
        }
        .product-intro b {
            color: #0d6efd;
        }
        .product-gallery-main {
            position: relative;
            width: 100%;
            aspect-ratio: 1;
            max-height: 450px;
            overflow: hidden;
            border-radius: 12px;
            background: var(--bg-input);
        }
        .product-gallery-main img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            transition: opacity 0.2s, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            transform-origin: center center;
        }
        .product-gallery-main:hover img {
            transform: scale(1.1);
        }
        .product-gallery-thumbs .product-thumb {
            width: 70px;
            height: 70px;
            cursor: pointer;
            border: 2px solid transparent;
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.2s;
        }
        .product-gallery-thumbs .product-thumb:hover,
        .product-gallery-thumbs .product-thumb.active {
            border-color: #0d6efd;
            box-shadow: 0 0 0 1px #0d6efd;
        }
        .product-gallery-thumbs .product-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        /* UX: плавные переходы, фокус */
        a, button { transition: opacity 0.2s, transform 0.2s; }
        a:active, button:active { transform: scale(0.98); }
        .form-control:focus, .form-select:focus { box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25); }
        .product-card .product-title { min-height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .product-card-link { display: block; cursor: pointer; }
        .product-card-link:hover .product-title { color: #0d6efd !important; }
        /* Плавающая кнопка Telegram — правый нижний угол */
        .telegram-float-btn {
            position: fixed;
            bottom: 24px;
            right: 24px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, #0088cc 0%, #229ED9 100%);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            box-shadow: 0 4px 20px rgba(0,136,204,0.5);
            z-index: 9995;
            transition: transform 0.2s, box-shadow 0.2s;
            text-decoration: none;
            border: 3px solid rgba(255,255,255,0.9);
        }
        .telegram-float-btn:hover {
            color: white;
            transform: scale(1.1);
            box-shadow: 0 6px 28px rgba(0,136,204,0.6);
        }
        /* Плавающая кнопка корзины — над Telegram, когда есть товары */
        .cart-float-btn {
            position: fixed;
            bottom: 96px;
            right: 24px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, #198754, #20c997);
            color: white;
            display: none;
            align-items: center;
            justify-content: center;
            font-size: 26px;
            box-shadow: 0 4px 20px rgba(25,135,84,0.5);
            z-index: 9996;
            transition: transform 0.2s, box-shadow 0.2s;
            text-decoration: none;
            border: 3px solid rgba(255,255,255,0.9);
        }
        .cart-float-btn:hover { color: white; transform: scale(1.08); }
        .back-to-top-btn {
            position: fixed;
            bottom: 24px;
            left: 24px;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: var(--bg-card);
            border: 2px solid var(--border);
            color: var(--text);
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 999;
            box-shadow: 0 4px 12px var(--shadow);
            transition: opacity 0.3s, transform 0.2s;
        }
        .back-to-top-btn.visible { display: flex; }
        .back-to-top-btn:hover {
            background: var(--bg-input);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px var(--shadow-hover);
        }
        .cart-float-btn .cart-float-count {
            position: absolute;
            top: -4px;
            right: -4px;
            background: #dc3545;
            color: white;
            border-radius: 50%;
            min-width: 22px;
            height: 22px;
            font-size: 12px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        /* Боковая корзина */
        .cart-sidebar .offcanvas-header {
            border-bottom: 1px solid var(--border);
            padding: 1rem 1.25rem;
        }
        .cart-sidebar .offcanvas-body {
            padding: 0;
            overflow-y: auto;
            position: relative;
            min-height: 280px;
        }
        .cart-sidebar-item {
            display: flex;
            gap: 12px;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border);
            align-items: center;
        }
        .cart-sidebar-item-img {
            flex: 0 0 60px;
            width: 60px;
            height: 60px;
            border-radius: 8px;
            overflow: hidden;
            background: #f0f0f0;
        }
        .cart-sidebar-item-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .cart-sidebar-item-info {
            flex: 1;
            min-width: 0;
        }
        .cart-sidebar-item-info .cart-sidebar-item-name {
            font-weight: 600;
            color: var(--text);
            text-decoration: none;
            display: block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .cart-sidebar-item-info .cart-sidebar-item-name:hover { color: #0d6efd; }
        .cart-sidebar-item-qty { font-size: 0.9rem; color: var(--text-muted); }
        .cart-sidebar-item-price { font-weight: 700; color: #0d6efd; white-space: nowrap; }
        .cart-sidebar-footer {
            padding: 1rem 1.25rem;
            border-top: 2px solid var(--border);
            background: var(--bg-body);
        }
        .cart-sidebar-total {
            font-size: 1.2rem;
            font-weight: 700;
            margin-bottom: 1rem;
        }
        .cart-sidebar-empty {
            padding: 2rem 1.25rem;
            text-align: center;
            color: #6c757d;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
        }
        .cart-sidebar-empty .cart-empty-icon {
            font-size: 4rem;
            color: #dee2e6;
            margin-bottom: 1rem;
            opacity: 0.6;
        }
        .cart-sidebar-item-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 4px;
        }
        .cart-sidebar-item-actions .qty-control {
            display: inline-flex;
            align-items: center;
            border: 1px solid #dee2e6;
            border-radius: 6px;
            overflow: hidden;
        }
        .cart-sidebar-item-actions .qty-btn {
            width: 28px;
            height: 28px;
            padding: 0;
            border: none;
            background: #f8f9fa;
            cursor: pointer;
            font-size: 1rem;
        }
        .cart-sidebar-item-actions .qty-btn:hover { background: #e9ecef; }
        .cart-sidebar-item-actions .qty-val {
            width: 36px;
            text-align: center;
            border: none;
            font-weight: 600;
        }
        .cart-sidebar-item-remove {
            color: #dc3545;
            cursor: pointer;
            padding: 4px;
        }
        .cart-sidebar-item-remove:hover { color: #bb2d3b; }
        .cart-sidebar-clear {
            margin: 0.5rem 1.25rem 1rem;
        }
