/* style.css - ОПТИМИЗИРОВАННАЯ ВЕРСИЯ */

/* ===== ОБНУЛЕНИЕ И БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    background-image: url('/images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Единый скроллбар в стилистике сайта */
html, body, * {
    scrollbar-width: thin;
    scrollbar-color: #52d0e8 #0c0c0c;
}
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
*::-webkit-scrollbar-track {
    background: #0c0c0c;
    border-radius: 8px;
    border: 1px solid #1c1c1c;
}
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #52d0e8, #2f8fa3);
    border-radius: 8px;
    border: 1px solid #173a42;
}
*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6be0f6, #3aa7bd);
}

/* ===== ЛЕВОЕ МЕНЮ ===== */
.left-menu {
    width: 200px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.menu-logo {
    text-align: right;
    padding: 10px 15px 10px 0;
    width: 100%;
}

.logo-img {
    max-width: 85%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    display: inline-block;
    margin-left: auto;
    margin-right: 10px;
    margin-top: 5px;
    transform: scale(1.3);
}

/* Только ПК (вертикальное меню): чуть больше воздуха между логотипом и пунктами */
@media (min-width: 769px) {
    .menu-nav {
        margin-top: 5px;
    }
}

.menu-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 15px;
}

.menu-link {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    margin-left: 20px;
    transition: all 0.3s;
    font-size: 16px;
    opacity: 0.8;
    text-align: center;
    min-width: 120px;
    background: transparent;
    border: 1px solid #52d0e8;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.2);
}

.menu-link.active {
    background: #52d0e8;
    color: #000;
    opacity: 1;
    border-color: #52d0e8;
}

.menu-burger {
    display: none;
}

.menu-current-page,
.cart-btn-mobile,
.left-menu .cart-btn-mobile {
    display: none !important;
}

/* Оверлей меню (только на мобилке, на ПК скрыт) */
.menu-dropdown-overlay {
    display: none;
}

.menu-footer {
    display: none; /* телефон и год убраны из меню, перенесены в футер */
}

.menu-phone {
    color: #52d0e8;
    font-size: 14px;
    text-align: right;
    width: 100%;
}

.menu-copyright {
    color: #666;
    font-size: 12px;
    text-align: left;
    width: 100%;
}

.menu-spacer {
    height: 20px;
    width: 100%;
}

/* Специальные кнопки меню */
.menu-phone-btn {
    background: rgba(82, 208, 232, 0.1);
    border: 1px solid #52d0e8;
    margin-top: 5px;
}

.menu-phone-btn:hover {
    background: #52d0e8;
    color: #000;
}

.menu-tg-btn {
    background: rgba(0, 136, 204, 0.1);
    border: 1px solid #0088cc;
    margin-top: 5px;
}

.menu-tg-btn:hover {
    background: #0088cc;
    color: #fff;
}

.menu-max-btn {
    border: 1px solid #0077FF;
    background: transparent;
    color: #fff;
    margin-bottom: 5px;
}

.menu-max-btn:hover {
    background: #0077FF;
    color: #fff;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
    margin-left: 200px;
    width: calc(100% - 250px);
    padding: 20px 30px;
    min-width: 0;
    overflow-x: hidden;
}

/* ===== ВЕРХНЯЯ ПАНЕЛЬ ===== */
.top-bar {
    position: relative;
}

.banner-container {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.banner-img {
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
    margin-right: auto;
}

/* ===== КОНТЕЙНЕР ЛОГИНА ===== */
.login-container {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 10;
}

/* Кнопки авторизации */
.login-btn, .user-status, .update-btn, .logout-btn, .update-btn-orange, .admin-ext-btn {
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-height: 35px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.admin-ext-btn {
    background: rgba(82, 208, 232, 0.2);
    color: #52d0e8;
    border: 1px solid #52d0e8;
    text-decoration: none;
}

.admin-ext-btn:hover {
    background: #52d0e8;
    color: #000;
    transform: scale(1.05);
}

.screensaver-combo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 0 6px 0 12px;
    border-radius: 999px;
    border: 1px solid #52d0e8;
    background: rgba(82, 208, 232, 0.2);
    color: #52d0e8;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
    vertical-align: middle;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.screensaver-combo-wrap:hover {
    background: #52d0e8;
    color: #000;
}

.screensaver-combo-wrap:hover .screensaver-combo__open {
    color: #000;
}

.screensaver-combo-wrap:hover .screensaver-auto-slider {
    border-color: rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.35);
}

.screensaver-combo-wrap:hover .screensaver-auto-slider::after {
    background: #333;
}

.screensaver-combo-wrap:hover .screensaver-combo__toggle input:checked + .screensaver-auto-slider {
    background: rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.45);
}

.screensaver-combo-wrap:hover .screensaver-combo__toggle input:checked + .screensaver-auto-slider::after {
    background: #111;
}

.screensaver-combo__open {
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    cursor: pointer;
    padding: 8px 4px 8px 0;
    margin: 0;
    line-height: 1.2;
}

.screensaver-combo__toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 8px 6px 2px;
    margin: 0;
}

.screensaver-combo__toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.screensaver-auto-slider {
    width: 38px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid #2f4a50;
    background: #1a272b;
    position: relative;
    transition: background .2s ease, border-color .2s ease;
}

.screensaver-auto-slider::after {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #8aa6ad;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform .2s ease, background .2s ease;
}

.screensaver-combo-wrap .screensaver-combo__toggle input:checked + .screensaver-auto-slider {
    background: rgba(82, 208, 232, 0.28);
    border-color: #52d0e8;
}

.screensaver-combo-wrap .screensaver-combo__toggle input:checked + .screensaver-auto-slider::after {
    transform: translateX(16px);
    background: #52d0e8;
}

.login-btn {
    background: transparent;
    color: #52d0e8;
    border: 1px solid #52d0e8;
}

.login-btn:hover {
    background: #52d0e8;
    color: #000;
    transform: scale(1.05);
}

.user-status {
    background: rgba(82, 208, 232, 0.9);
    color: #000;
    cursor: default;
}

.update-btn, .update-btn-orange {
    background: #ffaa00;
    color: #000;
}

.update-btn:hover, .update-btn-orange:hover {
    background: #ffbb22;
    transform: scale(1.05);
}

.logout-btn {
    background: rgba(255, 68, 68, 0.9);
    color: #fff;
}

.logout-btn:hover {
    background: #ff4444;
    transform: scale(1.05);
}

.theme-toggle-btn {
    background: rgba(82, 208, 232, 0.15);
    color: #52d0e8;
    border: 1px solid #52d0e8;
    border-radius: 20px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    min-height: 35px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.theme-toggle-btn:hover {
    background: rgba(82, 208, 232, 0.35);
    transform: scale(1.05);
}

.hidden {
    display: none !important;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumbs {
    margin-bottom: 0;
    color: #999;
    font-size: 14px;
}

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

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* ===== СЧЕТЧИК ТОВАРОВ ===== */
.items-counter {
    text-align: right;
    margin-bottom: 20px;
}

.items-count {
    font-size: 0.8rem;
    color: #777;
}

/* ===== ФИЛЬТРЫ ===== */
.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(17, 17, 17, 0.5);
    border-radius: 10px;
}

.filter-group {
    flex: 1;
}

.filter-group label {
    display: block;
    color: #ccc;
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-select {
    width: 100%;
    padding: 10px;
    background: #222;
    border: 1px solid #333;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

/* ===== ПОИСК ===== */
.search-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid #333;
    border-radius: 30px;
    color: white;
    font-size: 16px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #52d0e8;
    box-shadow: 0 0 10px rgba(82, 208, 232, 0.3);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #111;
    border: 1px solid #333;
    border-radius: 10px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #222;
    transition: all 0.3s;
}

.search-result-item:hover {
    background: #1a1a1a;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-name {
    color: white;
    font-size: 14px;
}

.search-result-category {
    color: #52d0e8;
    font-size: 12px;
    margin-left: 5px;
}

/* ===== СЕТКА КАТАЛОГА ===== */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* ===== КАРТОЧКИ ТОВАРОВ ===== */
.product-card {
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding: 15px;
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    border: 1px solid #333;
    transition: all 0.3s;
    cursor: pointer;
    margin-top: 5px;
}

.product-card:hover {
    transform: translateY(-3px);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #52d0e8;
    z-index: 1000;
    position: relative;
}

/* Левая часть карточки */
.product-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
    flex-shrink: 0;
    height: 100%;
}

.product-preview {
    width: 150px;
    height: 200px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #1a1a1a;
    margin-bottom: 10px;
    z-index: 10;
    pointer-events: auto;
}

.preview-images {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

/* Слайд карусели: подложка (cover + blur) + основное фото (contain) */
.preview-slide {
    position: relative;
    flex-shrink: 0;
    width: 150px;
    height: 200px;
    overflow: hidden;
    background: #141414;
}

.preview-single {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #141414;
}

.preview-slide-back {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.1);
    filter: blur(14px);
    -webkit-filter: blur(14px);
    opacity: 0.88;
    pointer-events: none;
    z-index: 0;
}

.preview-slide-front {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Светлый студийный фон: без blur; оттенок полей задаётся из края фото в script.js (здесь запасной #fff) */
.preview-slide.photo-plain-fill,
.preview-single.photo-plain-fill {
    background: #fff;
}

.preview-slide.photo-plain-fill .preview-slide-back,
.preview-single.photo-plain-fill .preview-slide-back {
    opacity: 0;
    visibility: hidden;
    filter: none;
    -webkit-filter: none;
    transform: none;
}

/* Стрелки превью */
.preview-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: transparent;
    border: 0px solid #52d0e8;
    border-radius: 50%;
    color: #000000;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: all 0.2s;
    box-shadow: none;
    z-index: 9999;
    pointer-events: auto;
    cursor: pointer;
}

.preview-arrow.prev {
    left: 2px;
}

.preview-arrow.next {
    right: 2px;
}

.preview-arrow:hover {
    opacity: 1;
    background: #52d0e8;
    color: black;
    transform: translateY(-50%) scale(1.1);
}

/* Точки превью */
.preview-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 9999;
}

.preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #333;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 9999;
    pointer-events: auto;
}

.preview-dot:hover {
    background: #52d0e8;
    transform: scale(1.2);
}

.preview-dot.active {
    background: #52d0e8;
    border-color: white;
}

/* Кнопка открыть */
.product-left .open-btn {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid #52d0e8;
    color: #52d0e8;
    margin-top: auto;
}

.product-left .open-btn:hover {
    background: #52d0e8;
    color: #000;
}

.product-left a.open-btn {
    text-decoration: none;
    box-sizing: border-box;
}

.product-info-text > h3 {
    font-size: 1rem;
    margin: 5px 0;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.product-info-text > h3 a,
.product-title-container h3 a {
    color: inherit;
    text-decoration: none;
}

.product-info-text > h3 a:hover,
.product-title-container h3 a:hover {
    color: #52d0e8;
}

/* Правая часть карточки */
.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

.product-info-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-bottom: 8px;
    align-self: flex-start;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-category:hover {
    background: #52d0e8;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(82, 208, 232, 0.3);
}

.product-category:active {
    transform: translateY(0);
}

/* Заголовок товара */
.product-title-container {
    position: relative;
    width: 100%;
    z-index: 1;
}

.product-title-container h3 {
    font-size: 1rem;
    margin: 5px 0;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    cursor: pointer;
    transition: color 0.2s ease;
}

.product-title-container h3:hover {
    color: #52d0e8;
}

.product-title-container:hover {
    z-index: 10000;
}

/* Всплывашка с полным названием */
.product-title-tooltip {
    position: absolute;
    left: 0;
    bottom: 100%;
    background: #111;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    white-space: normal;
    word-wrap: break-word;
    min-width: 280px;
    max-width: 350px;
    border: 2px solid #52d0e8;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
    margin-bottom: 10px;
    line-height: 1.4;
    text-align: left;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.product-title-container:hover .product-title-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Правый край в сетке каталога: тултип раскрываем влево, чтобы не упирался в экран */
.catalog-grid .product-card:nth-child(3n) .product-title-tooltip {
    left: auto;
    right: 0;
}

@media (min-width: 769px) {
    .carousel-track .product-card:last-child .product-title-tooltip {
        left: auto;
        right: -30px;
        max-width: min(350px, calc(100vw - 20px));
    }
}

.sku {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 8px;
}

.price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #52d0e8;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.old-price {
    font-size: 0.8rem;
    color: #666;
    text-decoration: line-through;
}

.stock {
    font-size: 0.8rem;
    color: #52d0e8;
    margin: 8px 0;
}

.stock.critical {
    color: #ff6666;
}

/* Группа кнопок */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: auto;
    padding-top: 10px;
    flex-shrink: 0;
}

.add-to-cart-btn {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid #f0f0f0;
    color: #f0f0f0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.add-to-cart-btn:hover {
    background: #ffffff;
    color: #000;
}

.order-btn {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid #4CAF50;
    color: #4CAF50;
}

.order-btn:hover {
    background: #4CAF50;
    color: #000;
}

/* ===== КНОПКА СМОТРЕТЬ ВСЕ ===== */
.view-all-container {
    text-align: center;
    margin: 40px 0;
}

.view-all-btn {
    display: inline-block;
    padding: 10px 30px;
    background: transparent;
    border: 2px solid #52d0e8;
    color: #52d0e8;
    text-decoration: none;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s;
    min-width: 120px;
}

.view-all-btn:hover {
    background: #52d0e8;
    color: #000;
}

.home-info-and-ozon {
    display: flex;
    flex-direction: column;
}

.ozon-preview-section {
    display: flex;
    flex-direction: column;
    margin: 10px 0 20px;
}

.ozon-preview-cta {
    margin: 22px 0 18px;
}

.ozon-preview-carousel .carousel-track .product-card {
    flex: 0 0 calc((100% - 40px) / 3);
    min-width: 320px;
}

.actual-promos-section {
    margin: 12px 0 26px;
}

.actual-promos-title {
    margin: 0 0 14px;
    color: #52d0e8;
    font-size: 1.35rem;
    text-align: center;
    font-weight: 700;
}

.actual-promos-carousel .carousel-track {
    align-items: stretch;
    justify-content: center;
    gap: 100px;
}

.actual-promos-carousel .carousel-arrow {
    display: none;
}

.actual-promo-card {
    flex: 0 0 250px;
    min-width: 250px;
    background: rgba(17, 17, 17, 0.85);
    border: 1px solid #333;
    border-radius: 14px;
    padding: 4px;
    box-sizing: border-box;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.actual-promo-card:hover {
    border-color: #52d0e8;
    box-shadow: 0 0 0 1px rgba(82, 208, 232, 0.45), 0 0 16px rgba(82, 208, 232, 0.35);
    transform: translateY(-2px) scale(1.4);
    animation: promoGlowPulse 1.8s ease-in-out infinite;
}

.actual-promo-card.promo-zoomed-card {
    border-color: #52d0e8;
    box-shadow: 0 0 0 1px rgba(82, 208, 232, 0.45), 0 0 16px rgba(82, 208, 232, 0.35);
    animation: promoGlowPulse 1.8s ease-in-out infinite;
}

@keyframes promoGlowPulse {
    0% {
        box-shadow: 0 0 0 1px rgba(82, 208, 232, 0.35), 0 0 12px rgba(82, 208, 232, 0.28);
    }
    50% {
        box-shadow: 0 0 0 1px rgba(82, 208, 232, 0.6), 0 0 24px rgba(82, 208, 232, 0.5);
    }
    100% {
        box-shadow: 0 0 0 1px rgba(82, 208, 232, 0.35), 0 0 12px rgba(82, 208, 232, 0.28);
    }
}

.actual-promo-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    background: #0a0a0a;
    border-radius: 10px;
    display: block;
}

.ozon-market-card .product-category {
    color: #52d0e8;
    cursor: default;
}

.ozon-market-card .button-group {
    display: flex;
    flex-direction: row !important;
    gap: 8px;
    flex-wrap: nowrap !important;
    align-items: stretch;
    margin-top: 12px;
}

.ozon-market-card .market-link-btn {
    flex: 1 1 100%;
    min-width: 0;
    min-height: 34px;
    padding: 6px 10px;
    border: 2px solid #4CAF50;
    color: #4CAF50;
    background: transparent;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all .25s ease;
}

.ozon-market-card .market-link-btn:hover {
    background: #4CAF50;
    color: #000;
}

.ozon-market-card .site-link-btn {
    border-color: #52d0e8;
    color: #52d0e8;
}

.ozon-market-card .site-link-btn:hover {
    background: #52d0e8;
    color: #000;
}

.ozon-market-card .ozon-price-main {
    color: #4CAF50;
    font-size: 1.25rem;
    line-height: 1.15;
    margin-top: 2px;
    margin-bottom: 6px;
}

.ozon-market-card .site-price-main {
    color: #52d0e8;
    font-size: 1.25rem;
    line-height: 1.15;
    margin-top: 2px;
    margin-bottom: 8px;
}

.ozon-market-card .product-category:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #52d0e8;
    transform: none;
    box-shadow: none;
}

.ozon-market-card .product-left .site-open-btn {
    border-color: #52d0e8;
    color: #52d0e8;
    font-size: 12px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 6px;
}

.ozon-market-card .product-left .site-open-btn:hover {
    background: #52d0e8;
    color: #000;
}

.ozon-market-card .button-group .market-link-btn {
    font-size: 15px;
    line-height: 1.1;
    min-height: 40px;
    height: 40px;
}

/* ===== КАРУСЕЛЬ ===== */
.carousel-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
    /* стрелки выступают наружу — обрезка у .main-content / html */
    overflow-x: visible;
    overflow-y: visible;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

.carousel-track .product-card {
    flex: 0 0 calc((100% - 40px) / 3);
    min-width: 320px;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(82, 208, 232, 0.9);
    border: none;
    border-radius: 50%;
    color: black;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ⅔ ширины кнопки (40px) снаружи от края блока карусели */
.carousel-arrow.prev {
    left: calc(-40px * 2 / 3);
}

.carousel-arrow.next {
    right: calc(-40px * 2 / 3);
}

.carousel-arrow:hover {
    background: #52d0e8;
    transform: translateY(-50%) scale(1.1);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: #52d0e8;
    transform: scale(1.2);
}

/* ===== СТРАНИЦА ТОВАРА ===== */
.product-detail-container {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-gallery {
    position: relative;
}

.main-image-container {
    position: relative;
    aspect-ratio: 3/4;
    width: 100%;
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    isolation: isolate;
}

.main-image-back {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.08);
    filter: blur(22px);
    -webkit-filter: blur(22px);
    opacity: 0.88;
    pointer-events: none;
    z-index: 0;
}

.main-image,
.main-image-front {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.main-image-container.photo-plain-fill {
    background: #fff; /* перекрывается inline rgb с края снимка */
}

.main-image-container.photo-plain-fill .main-image-back {
    opacity: 0;
    visibility: hidden;
    filter: none;
    -webkit-filter: none;
    transform: none;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #52d0e8;
}

.product-info-detailed {
    color: white;
}

.product-info-detailed h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #fff;
}

.product-meta {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.product-meta p {
    margin: 10px 0;
    color: #ccc;
}

.product-meta strong {
    color: #52d0e8;
    margin-right: 10px;
}

.product-description {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    line-height: 1.8;
}

.product-description h3 {
    color: #52d0e8;
    margin-bottom: 10px;
}

.price-section {
    margin: 30px 0;
    padding: 20px;
    background: rgba(82, 208, 232, 0.1);
    border-radius: 10px;
    text-align: center;
}

.current-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #52d0e8;
}

.old-price-detailed {
    font-size: 1.2rem;
    color: #666;
    text-decoration: line-through;
    margin-left: 15px;
}

.stock-info {
    font-size: 1.1rem;
    margin: 15px 0;
}

.stock-info.critical {
    color: #ff6666;
}

.order-large-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.order-large-btn:hover {
    background: #ffffff;
    color: #000000;
    transform: scale(1.02);
}

.back-button-container {
    text-align: center;
    margin: 30px 0;
}

.back-button {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid #52d0e8;
    color: #52d0e8;
    text-decoration: none;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s;
    cursor: pointer;
}

.back-button:hover {
    background: #52d0e8;
    color: #000;
}

/* ===== СТРАНИЦА УСЛУГ ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.service-card {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    border: 1px solid #333;
    transition: all 0.3s;
}

.service-card:hover {
    transform: translateY(-3px);
    border-color: #52d0e8;
}

.service-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.service-card h3 {
    color: white;
    margin-bottom: 10px;
}

.service-card p {
    color: #999;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.service-price {
    color: #52d0e8;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.service-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid #52d0e8;
    color: #52d0e8;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.service-btn:hover {
    background: #52d0e8;
    color: black;
}

.section-title {
    color: white;
    margin: 40px 0 20px;
    font-size: 24px;
}

.price-table {
    background: rgba(17, 17, 17, 0.8);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
}

.price-row:last-child {
    border-bottom: none;
}

.price-name {
    color: #ccc;
}

.price-value {
    color: #52d0e8;
    font-weight: bold;
}

/* ===== СТРАНИЦА КОНТАКТОВ ===== */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 40px;
}

.contact-info {
    background: rgba(17, 17, 17, 0.8);
    border-radius: 10px;
    padding: 30px;
    border: 1px solid #333;
}

.contact-info h2 {
    color: white;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.contact-icon {
    font-size: 24px;
    min-width: 40px;
    text-align: center;
}

.contact-detail {
    flex: 1;
}

.contact-detail strong {
    display: block;
    color: #ccc;
    font-size: 14px;
    margin-bottom: 3px;
}

.contact-detail a,
.contact-detail span {
    color: white;
    text-decoration: none;
    font-size: 10px;
    line-height: 1.4;
}

.contact-detail a:hover {
    color: #52d0e8;
}

.contact-qr {
    background: rgba(17, 17, 17, 0.8);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid #333;
}

.contact-qr h3 {
    color: white;
    margin-bottom: 15px;
}

.qr-code {
    width: 200px;
    height: 200px;
    background: white;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.contact-qr p {
    color: #999;
    font-size: 14px;
}

.map-container {
    margin-bottom: 40px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333;
}

.feedback-form {
    background: rgba(17, 17, 17, 0.8);
    border-radius: 10px;
    padding: 30px;
    border: 1px solid #333;
}

.feedback-form h2 {
    color: white;
    margin-bottom: 20px;
}

.form-row {
    margin-bottom: 15px;
}

.form-input {
    width: 100%;
    padding: 12px;
    background: #222;
    border: 1px solid #333;
    color: white;
    border-radius: 5px;
    font-size: 16px;
}

.form-input:focus {
    outline: none;
    border-color: #52d0e8;
}

.form-btn {
    width: 100%;
    padding: 12px;
    background: #52d0e8;
    border: none;
    color: black;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

/* ===== КОРЗИНА ===== */
.cart-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cart-title {
    color: #52d0e8;
    font-size: 2rem;
}

.cart-clear-btn {
    background: transparent;
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.cart-clear-btn:hover {
    background: #ff4444;
    color: #fff;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(17, 17, 17, 0.8);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #333;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image--glyph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(82, 208, 232, 0.1);
    border: 1px solid rgba(82, 208, 232, 0.28);
}

.cart-item-glyph {
    font-size: 2.75rem;
    line-height: 1;
    user-select: none;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #52d0e8;
    font-weight: bold;
}

.cart-item-remove {
    background: transparent;
    border: 1px solid #ff4444;
    color: #ff4444;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove:hover {
    background: #ff4444;
    color: #fff;
}

.cart-summary {
    background: rgba(17, 17, 17, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.cart-summary .cart-total {
    margin-bottom: 0;
}

.cart-summary-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.cart-summary-actions .cart-order-btn {
    padding: 10px 18px;
    font-size: 0.95rem;
}

.cart-total {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.cart-total span {
    color: #52d0e8;
    font-weight: bold;
}

.cart-order-btn {
    background: #52d0e8;
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.cart-order-btn:hover {
    background: #7ee8fa;
    transform: scale(1.05);
}

.cart-btn {
    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
    min-height: 35px;
    box-sizing: border-box;
    justify-content: center;
    line-height: 1;
}

.cart-btn:hover {
    background: #ffffff;
    color: #000;
}

.cart-count {
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: #111;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid #333;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.close-modal:hover {
    color: #fff;
}

.modal h2 {
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #ccc;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #52d0e8;
}

.modal-btn {
    width: 100%;
    padding: 12px;
    background: #52d0e8;
    border: none;
    color: #000;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.modal-hint {
    text-align: center;
    color: #666;
    margin-top: 15px;
    font-size: 13px;
}

/* Модалки админ-корзины: прокрутка, закрытие по фону, компактные «Добавить» */
.modal.modal--scroll-host {
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 12px 28px;
}

.modal.modal--scroll-host .modal-content.admin-cart-modal {
    margin: auto 0;
}

.modal-content.admin-cart-modal {
    max-width: min(720px, 96vw);
    width: min(720px, 96vw);
    max-height: min(88vh, 760px);
    display: flex;
    flex-direction: column;
    padding: 20px 20px 16px;
    overflow: hidden;
}

.admin-cart-modal .admin-modal-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
}

.admin-cart-modal .admin-modal-footer {
    flex: 0 0 auto;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.admin-cart-modal .admin-modal-footer .cart-order-btn {
    width: auto;
    min-width: 120px;
}

.admin-cart-modal .admin-picker-list {
    border: none;
    border-radius: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-picker-group {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.22);
}

.admin-picker-group-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    color: #e8f4f8;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    user-select: none;
    background: rgba(82, 208, 232, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-picker-group-summary::-webkit-details-marker {
    display: none;
}

.admin-picker-group-summary::after {
    content: "▸";
    flex: 0 0 auto;
    color: #52d0e8;
    font-size: 12px;
    transition: transform 0.15s ease;
}

.admin-picker-group[open] > .admin-picker-group-summary::after {
    transform: rotate(90deg);
}

.admin-picker-group-title {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-picker-group-meta {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: #52d0e8;
    background: rgba(82, 208, 232, 0.12);
    padding: 2px 10px;
    border-radius: 999px;
}

.admin-picker-group-body .admin-picker-row:first-child,
.admin-picker-group-body .admin-service-row:first-child {
    border-top: none;
}

.admin-service-row--ingroup {
    align-items: center;
}

.admin-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-picker-row:last-child {
    border-bottom: none;
}

.admin-picker-row .admin-picker-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex: 0 0 auto;
}

.admin-picker-row .admin-picker-thumb img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    display: block;
}

.admin-picker-row .admin-picker-text {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-picker-row .admin-picker-name {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.admin-picker-row .admin-picker-price {
    color: #9aa3ae;
    font-size: 13px;
    margin-top: 3px;
}

.admin-picker-add-btn {
    flex: 0 0 auto;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    background: #52d0e8;
    color: #000;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.2;
}

.admin-picker-add-btn:hover {
    background: #7ee8fa;
}

.admin-service-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-service-row:last-child {
    border-bottom: none;
}

.admin-service-main {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-service-cat {
    color: #9aa3ae;
    font-size: 11px;
    margin-bottom: 3px;
}

.admin-service-title {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.admin-service-meta {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.admin-service-price {
    color: #52d0e8;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.admin-cart-modal .modal-btn--inline {
    width: auto;
    display: inline-block;
    padding: 10px 18px;
    font-size: 14px;
}

.screensaver-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 10, 18, 0.85);
    backdrop-filter: blur(4px);
    z-index: 3200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screensaver-modal-content {
    width: min(88vw, 1640px);
    height: min(88vh, 1040px);
    min-height: 430px;
    border-radius: 20px;
    border: 1px solid rgba(82, 208, 232, 0.5);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    background: radial-gradient(circle at 15% 20%, rgba(82, 208, 232, 0.22) 0%, rgba(8, 16, 28, 0.98) 45%), #050b14;
    padding: 10px 18px 18px;
    position: relative;
    overflow: hidden;
}

.screensaver-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.screensaver-nav-btn {
    justify-self: start;
    border: 1px solid rgba(82, 208, 232, 0.55);
    background: rgba(14, 39, 58, 0.65);
    color: #d8f4ff;
    border-radius: 11px;
    padding: 5px 12px;
    min-height: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.screensaver-nav-btn.center {
    justify-self: center;
}

.screensaver-close-btn {
    justify-self: end;
    border: none;
    border-radius: 999px;
    width: 30px;
    height: 30px;
    font-size: 16px;
    color: #d8f4ff;
    background: rgba(82, 208, 232, 0.2);
    cursor: pointer;
}

.screensaver-stage {
    width: 100%;
    height: calc(100% - 52px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 14px;
}

.screensaver-item {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: row;
    background: linear-gradient(140deg, rgba(14, 24, 37, 0.7), rgba(6, 12, 20, 0.92));
    border: 2px solid rgba(82, 208, 232, 0.72);
    border-radius: 14px;
    padding: 10px;
    gap: 10px;
    box-shadow: 0 0 0 1px rgba(82, 208, 232, 0.3), 0 0 48px rgba(82, 208, 232, 0.66);
}

.screensaver-item.ss-slot-empty {
    opacity: 0;
    pointer-events: none;
}

.screensaver-item-media {
    height: 100%;
    aspect-ratio: 3/4;
    width: auto;
    flex: 0 0 auto;
    max-width: 46%;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(13, 26, 40, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border: 1px solid rgba(108, 224, 255, 0.8);
    box-shadow: 0 0 0 1px rgba(82, 208, 232, 0.25), 0 0 22px rgba(82, 208, 232, 0.55), inset 0 0 24px rgba(82, 208, 232, 0.14);
}

.screensaver-item-media .preview-single {
    width: 100%;
    height: 100%;
}

.screensaver-item-media.ss-media-fade .preview-single { animation: ssMediaFade 900ms ease both; }
.screensaver-item-media.ss-media-zoom .preview-single { animation: ssMediaZoom 900ms ease both; }
.screensaver-item-media.ss-media-flip .preview-single { animation: ssMediaFlip 1000ms ease both; }
.screensaver-item-media.ss-media-out { opacity: 0.15; transition: opacity 260ms ease; }

.screensaver-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    order: -1;
}

.screensaver-item-category {
    color: #7dc8dc;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    margin-top: 8px;
}

.screensaver-item-name {
    color: #fff;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    margin-top: 6px;
    word-break: break-word;
}

.screensaver-item-price {
    margin-top: 8px;
    color: #5fe2fe;
    font-size: 18px;
    font-weight: 700;
}

.screensaver-item-price.site {
    margin-top: auto;
}

.screensaver-item-price.ozon {
    margin-top: 4px;
    color: #45d66d;
    font-size: 16px;
}

.screensaver-item:nth-child(2n) {
    background: linear-gradient(150deg, rgba(10, 22, 35, 0.72), rgba(20, 33, 49, 0.9));
}

.screensaver-item:nth-child(3n) {
    background: linear-gradient(150deg, rgba(11, 19, 29, 0.78), rgba(30, 16, 48, 0.86));
}

.screensaver-item .screensaver-item-info,
.screensaver-item .screensaver-item-media {
    opacity: 1;
    transform: scale(1);
    transform-origin: center center;
    transition: opacity 620ms ease, transform 620ms ease;
}

.screensaver-item.ss-content-prep .screensaver-item-info,
.screensaver-item.ss-content-prep .screensaver-item-media {
    opacity: 0;
    transform: scale(0.84);
}

.screensaver-item.ss-content-prep.ss-content-show .screensaver-item-info,
.screensaver-item.ss-content-prep.ss-content-show .screensaver-item-media {
    opacity: 1;
    transform: translateY(0);
}

.ss-item-expand { animation: ssExpandIn 1820ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes ssFadeIn {
    from { opacity: 0.2; }
    to { opacity: 1; }
}

@keyframes ssSlideIn {
    from { opacity: 0; transform: translateX(70px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes ssZoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes ssFlipIn {
    from { opacity: 0; transform: rotateY(-70deg) scale(0.92); }
    to { opacity: 1; transform: rotateY(0deg) scale(1); }
}

@keyframes ssExpandIn {
    from {
        opacity: 0;
        transform: scale(0.18);
        transform-origin: center center;
    }
    to {
        opacity: 1;
        transform: scale(1);
        transform-origin: center center;
    }
}

@keyframes ssMediaFade {
    from { opacity: 0.35; }
    to { opacity: 1; }
}

@keyframes ssMediaZoom {
    from { opacity: 0.35; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes ssMediaFlip {
    from { opacity: 0.35; transform: rotateY(-28deg) scale(0.96); }
    to { opacity: 1; transform: rotateY(0deg) scale(1); }
}

@media (max-width: 900px) {
    .screensaver-modal-content {
        width: 97vw;
        height: 86vh;
        min-height: 0;
        padding: 8px 10px 10px;
    }
    .screensaver-stage {
        height: calc(100% - 56px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .screensaver-toolbar {
        grid-template-columns: 1fr 1fr auto;
        gap: 6px;
        margin-bottom: 6px;
    }
    .screensaver-nav-btn {
        font-size: 12px;
        padding: 4px 8px;
        min-height: 26px;
    }
    .screensaver-item {
        min-height: 130px;
        padding: 8px;
        gap: 8px;
    }
    .screensaver-item-media {
        width: 44%;
        min-width: 44%;
        height: auto;
        max-height: 100%;
    }
    .screensaver-item-name {
        font-size: 13px;
    }
    .screensaver-item-price {
        font-size: 15px;
    }
    .screensaver-item-price.ozon {
        font-size: 13px;
    }
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    z-index: 3000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-size: 14px;
    font-weight: 500;
}

/* ===== КНОПКА НАВЕРХ ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: #444;
}

/* ===== ЗАГРУЗЧИК И СООБЩЕНИЯ ===== */
.loader {
    text-align: center;
    padding: 3rem;
    color: #52d0e8;
    font-size: 1.2rem;
}

.error, .no-products {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: #999;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination-btn {
    padding: 8px;
    min-width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid #333;
    color: white;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover {
    border-color: #52d0e8;
    color: #52d0e8;
}

.pagination-btn.active {
    background: #52d0e8;
    border-color: #52d0e8;
    color: #000;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #444;
    color: #666;
}

.pagination-btn:disabled:hover {
    border-color: #444;
    color: #666;
}

/* Кнопки Назад/Вперёд — компактный текст на мобильных */
.pagination-nav {
    font-size: 0.95rem;
    min-width: auto;
    padding: 8px 12px;
}

/* ===== АДАПТАЦИЯ ДЛЯ ПЛАНШЕТОВ (до 1024px) ===== */
@media (max-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .carousel-track .product-card {
        flex: 0 0 calc((100% - 20px) / 2);
    }
    .ozon-preview-carousel .carousel-track .product-card {
        flex: 0 0 calc((100% - 20px) / 2);
    }
    .actual-promo-card {
        flex: 0 0 calc((100% - 34px) / 2);
        min-width: auto;
    }
    .catalog-grid .product-card:nth-child(3n) .product-title-tooltip {
        left: 0;
        right: auto;
    }
    .catalog-grid .product-card:nth-child(2n) .product-title-tooltip {
        left: auto;
        right: 0;
    }
}

/* ===== АДАПТАЦИЯ ДЛЯ ТЕЛЕФОНОВ (до 768px) ===== */
@media (max-width: 768px) {
    body.menu-overlay-open {
        overflow: hidden;
    }
    body {
        flex-direction: column;
    }
    
    /* Пагинация — компактная: Назад, 3 страницы, Вперёд */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin: 24px 0;
        padding: 0 10px;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0;
        font-size: 14px;
        align-items: center;
        justify-content: center;
    }
    
    .pagination-nav {
        font-size: 13px;
        padding: 0 12px;
        min-width: 0;
        align-items: center;
        justify-content: center;
    }
    
    /* Левое меню: сдвиг вниз на 5px только на мобилке, остальные блоки не трогаем */
    .left-menu {
        position: relative;
        width: 100%;
        height: 80px;           /* высота под логотип + отступ */
        flex-direction: row;
        padding: 0 0 0 0;
        align-items: center;
        margin-top: 5px;
    }
    
    .menu-logo {
        padding: 6px 10px 6px 10px;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
        width: auto;
        height: 100%;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-top: 10px;       /* опускаем лого на 10px */
    }
    
    .logo-img {
        max-height: 60px;
        max-width: 187px;
        width: auto;
        height: auto;
        object-fit: contain;
        margin: 5px 0 0 0;
        transform: none;
    }
    
    /* Навигация */
    .menu-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0 5px;
        overflow-x: visible;
        overflow-y: visible;
        white-space: nowrap;
        scrollbar-width: none;
        align-items: center;
        gap: 10px;
        height: 80px;
        margin-left: -10px;
    }  
    .menu-nav::-webkit-scrollbar {
        display: none;
    }
    
    /* На мобилке в верхней строке только: текущая страница (не кликабельно), корзина, бургер; все пункты меню — в оверлее */
    .menu-nav > a.menu-link {
        display: none !important;
    }
    .menu-nav .menu-spacer {
        display: none !important;
    }
    /* Текущая страница и корзина — одинаковый размер кнопки для единого дизайна */
    .menu-current-page,
    .menu-nav .cart-btn-mobile {
        height: 34px;
        min-height: 34px;
        max-height: 34px;
        min-width: 80px;
        padding: 6px 10px;
        font-size: 14px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        border: 1px solid #52d0e8;
        border-radius: 6px;
        box-sizing: border-box;
        flex-shrink: 0;
    }
    .menu-current-page {
        font-family: inherit;
        font-weight: 600;
        color: #52d0e8;
        background: transparent;
        cursor: pointer;
        white-space: nowrap;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        text-decoration: none;
    }
    .menu-current-page:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    .menu-nav .cart-btn-mobile {
        margin: 0 2px;
        color: #fff;
        text-decoration: none;
        background: transparent;
        white-space: nowrap;
    }
    .menu-nav .cart-btn-mobile:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* В блоке логина корзину на мобилке скрываем (она во втором слоте меню) */
    .login-container .cart-btn {
        display: none !important;
    }

    /* Оверлей: панель вниз поверх страницы */
    .menu-dropdown-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1002;
        pointer-events: none;
    }
    .menu-dropdown-overlay.is-open {
        display: block;
        pointer-events: auto;
    }
    .menu-dropdown-backdrop {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        cursor: pointer;
    }
    .menu-dropdown-panel {
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.96);
        backdrop-filter: blur(8px);
        overflow-y: auto;
        padding: 15px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
        z-index: 1;
    }
    .menu-dropdown-panel .menu-dropdown-link {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
        color: #fff;
        text-decoration: none;
        background: rgba(82, 208, 232, 0.1);
        border: 1px solid #52d0e8;
        border-radius: 8px;
        min-height: 48px;
        box-sizing: border-box;
    }
    .menu-dropdown-panel .menu-dropdown-link:hover {
        background: rgba(82, 208, 232, 0.25);
    }

    /* Кнопка-гамбургер (три полоски) */
    .menu-burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 44px;
        height: 34px;
        padding: 0;
        margin: 0;
        background: rgba(82, 208, 232, 0.2);
        border: 1px solid #52d0e8;
        border-radius: 8px;
        cursor: pointer;
        flex-shrink: 0;
    }
    .menu-burger span {
        display: block;
        width: 22px;
        height: 2px;
        background: #52d0e8;
        border-radius: 1px;
    }
    .menu-burger:hover {
        background: rgba(82, 208, 232, 0.35);
    }
    
    .menu-link,
    .menu-phone-btn,
    .menu-max-btn,
    .menu-tg-btn {
        padding: 6px 10px;
        font-size: 14px;
        white-space: nowrap;
        text-align: left;
        min-width: auto;
        line-height: 1.2;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }
    
    .menu-footer {
        display: none;
    }
    
    .menu-spacer {
        height: 10px;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }
    
    /* Каталог: не даём карточкам вылезать за экран */
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        min-width: 0;
        overflow-x: hidden;
    }
    .catalog-grid .product-card {
        min-width: 0;
        overflow: hidden;
    }
    
    /* Верхняя панель */
    .banner-container {
        justify-content: center;
    }
    
    .banner-img {
        left: 0;
        width: 100%;
    }
    
    /* Контейнер логина */
    .login-container {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        margin: 0 auto 20px;
        padding: 20px;
        background: rgba(17, 17, 17, 0.9);
        border-radius: 15px;
        border: 1px solid #333;
        width: calc(100% - 30px);
        max-width: 500px;
        position: relative;
        top: auto;
        right: auto;
    }

    .login-container .theme-toggle-btn {
        order: 100;
        flex-basis: 100%;
        margin-top: 4px;
    }
    
    .login-btn, 
    .user-status, 
    .update-btn, 
    .logout-btn, 
    .update-btn-orange,
    .admin-ext-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 80px;
        min-height: 35px;
        text-align: center;
    }
    
    /* Карусель */
    .carousel-track .product-card {
        flex: 0 0 100%;
        min-width: auto;
    }
    .ozon-preview-carousel .carousel-track .product-card {
        flex: 0 0 100%;
        min-width: auto;
    }
    .actual-promo-card {
        flex: 0 0 50%;
        width: 50%;
        min-width: 50%;
        margin: 0 auto;
        overflow: visible;
    }
    .actual-promos-carousel .carousel-track {
        gap: 0;
    }

    .home-info-and-ozon .ozon-preview-section {
        order: 1;
    }
    .home-info-and-ozon .info-blocks {
        order: 3;
    }
    .home-info-and-ozon .ozon-preview-cta {
        order: 2;
        margin-top: 8px;
        margin-bottom: 12px;
    }
    .home-info-and-ozon .ozon-preview-carousel {
        order: 1;
    }
    .home-info-and-ozon .actual-promos-section {
        order: 2;
    }
    .actual-promos-title {
        font-size: 1.1rem;
    }
    .actual-promos-carousel .carousel-arrow {
        display: flex;
    }
    .actual-promo-card img {
        width: 100%;
        margin: 0;
        cursor: pointer;
        transition: transform 0.25s ease;
        transform-origin: center center;
    }
    .actual-promo-card img.promo-zoomed {
        position: relative;
        z-index: 6;
        transform: scale(1.35);
    }
    .actual-promo-card:hover {
        transform: none;
        animation: none;
    }
    
    .carousel-arrow.prev {
        left: 5px;
    }
    
    .carousel-arrow.next {
        right: 5px;
    }
    
    /* Карточки товаров: правая часть не уезжает за экран */
    .product-card {
        padding: 12px;
        min-width: 0;
    }
    
    .product-info {
        min-width: 0;
        overflow: hidden;
    }
    
    .product-info-text {
        min-width: 0;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    .product-title-container h3 {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Только мобилка: всплывающее название строго по центру и поверх всего */
    .product-title-tooltip {
        position: fixed;
        left: 50%;
        top: 12vh;
        bottom: auto;
        transform: translateX(-50%);
        width: min(88vw, 340px);
        min-width: 0;
        max-width: 88vw;
        max-height: 55vh;
        overflow-y: auto;
        margin: 0;
        z-index: 2147483647;
        text-align: center;
    }
    
    .price {
        flex-wrap: wrap;
        overflow-wrap: break-word;
    }
    
    .product-left {
        width: 100px;
        min-width: 100px;
    }
    
    .product-preview {
        width: 100px;
        height: 133px;
        margin-bottom: 8px;
    }
    
    .preview-slide {
        width: 100px;
        height: 133px;
    }
    
    .preview-arrow {
        width: 15px;
        height: 15px;
        font-size: 12px;
        opacity: 1;
    }
    
    .preview-dot {
        width: 10px;
        height: 10px;
    }
    
    .product-left .open-btn,
    .order-btn,
    .add-to-cart-btn {
        height: 36px;
        font-size: 13px;
    }

    .ozon-market-card .product-left .site-open-btn {
        height: auto;
        min-height: 44px;
        white-space: normal;
        line-height: 1.05;
        padding: 6px 4px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
    }
    .ozon-market-card .product-left .site-open-btn .site-open-l1,
    .ozon-market-card .product-left .site-open-btn .site-open-l2 {
        display: block;
    }
    
    .sku {
        min-height: 16px;
        font-size: 0.7rem;
    }
    
    .price {
        font-size: 1.1rem;
    }
    
    /* Фильтры */
    .filters {
        flex-direction: column;
    }
    
    .search-input {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    /* Сетки */
    .contacts-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .price-row {
        flex-direction: column;
        gap: 5px;
        text-align: left;
    }
    
    /* Страница товара */
    .product-detail {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .main-image-container {
        height: 300px;
    }
    
    .thumbnail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-info-detailed h1 {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 2rem;
    }
    
    /* Корзина */
    .cart-item {
        flex-wrap: wrap;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-glyph {
        font-size: 2.1rem;
    }
    
    .cart-item-name {
        font-size: 1rem;
    }
    
    /* Кнопка наверх */
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    /* Инфо-блоки на главной */
    .info-blocks {
        grid-template-columns: 1fr;
    }
}
/* ===== ЗАПРЕТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА НА МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden;
        max-width: 100%;
        position: relative;
    }
    
    .main-content {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    .left-menu {
        overflow-x: auto;  /* оставляем скролл только для меню, если нужно */
        -webkit-overflow-scrolling: touch;
    }
    
    /* Запрещаем выделение текста при свайпах */
    .product-card, 
    .product-preview,
    .preview-arrow,
    .preview-dot {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}


@media (max-width: 768px) {
    /* Левое меню - отключаем скролл */
    .left-menu {
        overflow-x: auto;    /* только горизонтальный скролл если нужно */
        overflow-y: hidden;  /* запрещаем вертикальный скролл */
        height: 50px;        /* фиксированная высота */
        min-height: 50px;
        max-height: 50px;
        touch-action: pan-x; /* разрешаем только горизонтальные касания */
    }
    
    /* Оверлей: панель под 50px баром */
    .menu-dropdown-panel {
        top: 50px;
    }
    
    /* Навигация в меню */
    .menu-nav {
        overflow-x: auto;     /* горизонтальный скролл для кнопок */
        overflow-y: hidden;   /* запрещаем вертикальный скролл */
        flex-wrap: nowrap;    /* запрещаем перенос кнопок */
        height: 34px;         /* фиксированная высота */
        min-height: 34px;
        max-height: 34px;
        -webkit-overflow-scrolling: touch; /* плавный скролл для iOS */
        scrollbar-width: none; /* скрываем полосу прокрутки в Firefox */
    }
    
    /* Скрываем полосу прокрутки в Chrome/Safari */
    .menu-nav::-webkit-scrollbar {
        display: none;
    }
    
    /* Контейнер меню */
    .menu-nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0 5px;
        margin: 0;
    }
    
    /* Кнопки меню */
    .menu-link,
    .menu-phone-btn,
    .menu-max-btn,
    .menu-tg-btn {
        flex: 0 0 auto;      /* запрещаем растягивание */
        height: 34px;        /* фиксированная высота */
        min-height: 34px;
        max-height: 34px;
        margin: 0 2px;       /* маленькие отступы между кнопками */
        white-space: nowrap; /* текст в одну строку */
    }
}

/* ===== ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ (до 480px) ===== */
@media (max-width: 480px) {
    .product-card {
        gap: 10px;
        padding: 10px;
    }
    
    .product-left {
        width: 90px;
    }
    
    .product-preview {
        width: 90px;
        height: 120px;
    }
    
    .preview-slide {
        width: 90px;
        height: 120px;
    }
    
    .product-left .open-btn,
    .order-btn,
    .add-to-cart-btn {
        height: 32px;
        font-size: 12px;
    }
    
    .price {
        font-size: 1rem;
    }
    
    .sku {
        min-height: 14px;
        font-size: 0.65rem;
    }
    
    .menu-link {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .login-container {
        padding: 15px;
    }
    
    .login-btn, 
    .user-status, 
    .update-btn, 
    .logout-btn, 
    .update-btn-orange,
    .admin-ext-btn {
        padding: 8px 15px;
        font-size: 13px;
        min-width: 70px;
        min-height: 35px;
    }
}

/* ===== COOKIE-БАННЕР ===== */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid #333;
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 3000;
    font-size: 14px;
}

.cookie-banner__text {
    color: #ccc;
    max-width: 600px;
}

.cookie-banner__text a {
    color: #52d0e8;
    text-decoration: none;
}

.cookie-banner__text a:hover {
    text-decoration: underline;
}

.cookie-banner__btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    background: #52d0e8;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== ОБЩИЙ ФУТЕР САЙТА ===== */
.site-footer {
    margin-top: 40px;
    padding-top: 15px;
    padding-bottom: 15px;
    border-top: 1px solid #222;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 60px;
    font-size: 12px;
    color: #888;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.site-footer-left {
    max-width: 55%;
    min-width: 0;
}
.site-footer-left .site-footer-legal {
    overflow-wrap: break-word;
    word-break: break-word;
}

.site-footer-brand {
    color: #ccc;
    margin-bottom: 4px;
}

.site-footer-legal {
    line-height: 1.4;
}

.site-footer-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    justify-content: flex-start;
    min-width: 0;
}

/* Блок «телефон + политика»: на ПК политика под номером */
.footer-phone-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.footer-phone {
    font-weight: 600;
    font-size: 14px;
    color: #52d0e8;
}

.footer-privacy {
    font-size: 12px;
    color: #52d0e8;
}

.site-footer .footer-icon {
    font-size: 18px;
    line-height: 1;
    opacity: 1;
}

.site-footer .footer-icon img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.site-footer a {
    color: #52d0e8;
    text-decoration: none;
    font-size: 12px;
}

.site-footer a:hover {
    text-decoration: none;
}

.site-footer .footer-icon:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .site-footer-left {
        max-width: 100%;
    }
    
    .site-footer-right {
        justify-content: flex-start;
        gap: 10px 14px;
    }
    
    .footer-phone {
        font-size: 13px;
    }
}

/* ===== СТРАНИЦА ГАЛЕРЕИ ===== */
.gallery-page-title {
    color: #52d0e8;
    font-size: 2rem;
    margin-bottom: 8px;
}

.gallery-page-desc {
    color: #999;
    margin-bottom: 28px;
}

.gallery-album-title {
    color: #9adcec;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 28px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2e4952;
}

.gallery-album-title:first-of-type {
    margin-top: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333;
    transition: border-color 0.3s, transform 0.3s;
    cursor: pointer;
}

.gallery-item:hover {
    border-color: #52d0e8;
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .gallery-item img {
        height: 160px;
    }
}

/* ===== LIGHTBOX (просмотр фото отдельно) ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.hidden {
    display: none;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-caption {
    color: #ccc;
    margin-top: 12px;
    font-size: 14px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: rgba(82, 208, 232, 0.2);
    border: 1px solid #52d0e8;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: #52d0e8;
    color: #000;
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Жёсткий mobile override для всплывающего названия товара */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    .product-card {
        position: relative !important;
    }

    .product-card .product-title-container .product-title-tooltip {
        position: absolute !important;
        left: 50% !important;
        top: 8px !important;
        bottom: auto !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 16px) !important;
        min-width: 0 !important;
        max-width: calc(100% - 16px) !important;
        max-height: 50vh !important;
        overflow-y: auto !important;
        margin: 0 !important;
        z-index: 2147483647 !important;
        text-align: center !important;
    }
}