﻿html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    /* overflow-x: clip скрывает горизонтальную прокрутку, но не блокирует sticky */
    overflow-x: clip;
    position: static;
    background: #F5F5DC;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    min-height: 100%;
}

html {
    --scrollbar-size: 10px;
    --scrollbar-thumb: rgba(155, 125, 42, 0.42);
    --scrollbar-thumb-hover: rgba(184, 145, 34, 0.72);
    --scrollbar-thumb-active: rgba(0, 87, 183, 0.78);
    scrollbar-width: thin;
    scrollbar-color: rgba(155, 125, 42, 0.42) transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

*:hover {
    scrollbar-color: rgba(155, 125, 42, 0.42) transparent;
}

*::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: transparent;
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

*:hover::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-thumb:active {
    background: var(--scrollbar-thumb-active);
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

/* ОБЩИЕ СТИЛИ - КОПИЯ SLOVYNIN */
html, body {
    margin: 0;
    padding: 0;
    background: #F5F5DC;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
    color: #333;
}

* {
    box-sizing: border-box;
}

.message-box {
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.message-box.fade-out {
    opacity: 0;
    transform: translateY(-8px);
}

/* ШАПКА - КОПИЯ SLOVYNIN */
.schapka {
    position: sticky;
    top: 0;
    z-index: 10050 !important; /* гарантия наверху */
    width: 100%;
    background: #FFF8DC;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.search-results-overlay {
    position: static !important;
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-height: none !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
    margin-top: 8px !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    overflow: visible !important;
    display: none;
}

.search-results-overlay .overlay-top {
    margin-bottom: 10px;
}

.search-results-overlay #search-results-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    gap: 12px !important;
    padding: 10px 0 8px 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 150px !important;
}

.search-results-overlay #search-results-grid .product-card {
    flex: 0 0 160px !important;
    max-width: 160px !important;
    min-width: 160px !important;
    height: auto !important;
    min-height: 140px !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    border-radius: 8px !important;
    overflow: visible !important;
    background: white !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.search-results-overlay #search-results-grid .product-img {
    width: 100% !important;
    height: 110px !important;
    object-fit: contain !important;
    padding: 8px !important;
    background: #f9f9f9 !important;
    display: block !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.search-result-img {
    width: 100% !important;
    height: 110px !important;
    object-fit: contain !important;
    padding: 8px !important;
    background: #f9f9f9 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.force-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 140px !important;
    flex: 0 0 160px !important;
    max-width: 160px !important;
    min-width: 160px !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    border-radius: 8px !important;
    overflow: visible !important;
    background: white !important;
    padding: 0 !important;
    flex-direction: column !important;
}

.search-results-overlay #search-results-grid .product-info {
    padding: 8px !important;
    text-align: center !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.search-results-overlay #search-results-grid h3 {
    font-size: 13px !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.3 !important;
}

.search-results-overlay #search-results-grid .product-description {
    font-size: 11px !important;
    color: #666 !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.2 !important;
}

.search-results-overlay #search-results-grid .price {
    font-size: 12px !important;
    font-weight: bold !important;
    color: #0057b7 !important;
    margin: 4px 0 !important;
}


.search-results-backdrop {
    display: none !important;
}

.inschapka {
    display: grid;
    grid-template-columns: auto minmax(320px, 450px) auto;
    align-items: center;
    padding: 10px 20px;
    gap: 20px;
    box-sizing: border-box; /* <--- ДОБАВИТЬ ВОТ ЭТО */
}

.header-lang-switcher {
    justify-self: end;
    gap: 8px;
    flex-wrap: wrap;
}

.logofoto {
    width: 170px;
    height: auto;
    display: block;
}

/* ПОИСК */
.search-bar {
    display: flex;
    width: 100%;
    max-width: 450px;
    border: 2px solid #FFD700;
    border-radius: 25px;
    overflow: hidden;
    background: white;
    margin: 0;
    justify-self: center;
}

    .search-bar input {
        border: none;
        padding: 10px 15px;
        width: 100%;
        outline: none;
        font-size: 16px;
    }

    .search-bar button {
        background: #FFD700;
        border: none;
        padding: 0 20px;
        cursor: pointer;
        font-size: 18px;
    }

    .search-clear-btn {
        background: #fff3b0 !important;
        color: #333 !important;
        border: none !important;
        padding: 0 15px !important;
        cursor: pointer !important;
        font-size: 16px !important;
    }

    .search-clear-btn:hover {
        background: #ffe680 !important;
    }

    #globalProductClearBtn {
        background: #fff3b0;
        color: #333;
        font-size: 16px;
        padding: 0 14px;
        border-left: 1px solid rgba(0, 0, 0, 0.1);
    }

/* ЯЗЫКИ */
.lang-switcher {
    display: flex;
    gap: 8px;
}

.lang-item {
    cursor: pointer;
    color: #888;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #e7dcc3;
    background: #fffaf0;
    border-radius: 999px;
    padding: 8px 12px;
    line-height: 1;
}

.header-lang-switcher .lang-item {
    font-size: 12px;
    color: #8a6d1f;
}

    .lang-item.active {
        color: #0057b7;
        border-color: rgba(0, 87, 183, 0.22);
        background: rgba(0, 87, 183, 0.08);
    }

/* ГЛАВНЫЙ КОНТЕЙНЕР - КОПИЯ SLOVYNIN */
.main-container {
    display: flex;
    align-items: flex-start;
    padding: 30px 20px;
    gap: 30px;
}

/* БОКОВАЯ ПАНЕЛЬ */
.leftpanel {
    position: sticky;
    top: 110px;
    width: 250px;
    z-index: 900;
    flex-shrink: 0;
    background: transparent; /* Убираем общий фон, чтобы блоки разделились */
}

.panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    padding: 10px 0;
    margin-bottom: 20px; /* Отступ между меню и рекламой */
}

.menu-item, .category-nav a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #444;
    font-size: 17px;
    transition: 0.2s;
}

    .menu-item:hover, .category-nav a:hover {
        background-color: #f8f8f0;
        color: #0057b7;
        padding-left: 25px;
    }

    .menu-item.active {
        background-color: #0057b7;
        color: white !important;
        font-weight: bold;
    }

    .category-nav a.active {
        background-color: #0057b7;
        color: white !important;
        font-weight: bold;
    }

.separator {
    border: 0;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

.category-title {
    font-size: 12px;
    font-weight: bold;
    color: #bbb;
    text-transform: uppercase;
    margin-left: 20px;
    letter-spacing: 1px;
}

/* РЕКЛАМА В ПАНЕЛИ (СТИЛЬ ИЗ PRODUCTS, КАК ТЕБЕ НРАВИТСЯ) */
.side-ad {
    padding: 15px;
    background: white; /* Делаем белый фон как у меню */
    border: 2px dashed #FFD700; /* Золотистая пунктирная рамка для акцента */
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: 0.3s;
}

    .side-ad:hover {
        transform: scale(1.02); /* Легкий эффект при наведении */
    }

.ad-label {
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.side-ad img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.side-ad span {
    font-size: 13px;
    color: #0057b7;
    font-weight: bold;
    display: block;
    line-height: 1.4;
}

/* КОНТЕНТ */
.content-area {
    flex: 1;
    max-width: 1200px;
}


.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
    position: relative;
}

.product-card.hidden {
    display: none !important;
}

.product-section.hidden,
.special-group.hidden {
    display: none !important;
}

.search-status {
    font-size: 14px;
    color: #0057b7;
}

.search-suggestions {
    font-size: 14px;
    border: 1px solid #ddd;
    border-top: none;
    background: #fff;
    max-height: 240px;
    overflow-y: auto;
}

.search-suggestion-item {
    padding: 11px 12px;
    cursor: pointer;
    transition: background .2s;
}

.search-suggestion-item:hover {
    background: #f5f5f5;
}

/* Дублирующий блок старого стиля для .search-results-overlay, неактивен после модернизации */
#search-results-section.search-results-overlay,
#search-results-section {
    position: static !important;
    width: 100% !important;
    max-height: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    z-index: auto !important;
    padding: 0 !important;
    overflow: visible !important;
    display: none !important;
    margin-top: 30px !important;
    margin-bottom: 30px !important;
}

#search-results-section.search-results-overlay.open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


.search-results-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10048 !important;
    display: none;
}

.search-results-overlay.open {
    display: block;
}

body.modal-open {
    overflow: hidden;
}


.search-results-overlay .overlay-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.search-results-overlay .overlay-close-btn {
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-weight: bold;
}

.search-results-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998; /* ниже шапки и модального окна */
    display: none;
}

.search-results-backdrop.open {
    display: block;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }

.product-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 10px;
    display: block;
    visibility: visible;
    opacity: 1;
}

.product-image-wrapper {
    position: relative;
    z-index: 1;
    min-height: 200px;
    width: 100%;
    background: #f9f9f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 13px;
    font-weight: 600;
    background: #f2f2f2;
    z-index: 2;
}

.product-info {
    padding: 15px;
    text-align: center;
}

.price-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 10px 0;
}

.price {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: #0057b7;
    margin: 0;
}

.price-old {
    font-size: 18px;
    color: #b00020;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}

.price-sale {
    color: #178a3f;
}

.price-out-of-stock {
    font-size: 18px;
    color: #8b0000;
}

.order-btn {
    padding: 12px;
    background: #FFD700;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: 0.2s;
}

.order-btn:hover {
    background: #e6c200;
}

.order-btn:disabled,
.order-btn.is-unavailable {
    background: #d8d8d8;
    color: #666;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.order-btn:disabled:hover,
.order-btn.is-unavailable:hover {
    background: #d8d8d8;
}

.product-card .order-btn {
    width: 100%;
    display: block;
}

.product-status {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 30 !important;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: white;
}

.new {
    background: #0057b7;
}

.available {
    background: #28a745;
}

.preorder {
    background: #ffc107;
    color: #333;
}

.out-of-stock {
    background: #8b0000;
}

/* ФУТЕР */
.main-footer {
    background: #333;
    color: #fff;
    padding: 40px 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

    .footer-column h4 {
        color: #FFD700;
        margin-bottom: 20px;
        text-transform: uppercase;
    }

    .footer-column p, .footer-column a {
        color: #ccc;
        text-decoration: none;
        display: block;
        margin-bottom: 10px;
        font-size: 14px;
    }

.footer-logo {
    width: 150px;
    filter: brightness(0) invert(1);
    margin-bottom: 15px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    margin-top: 40px;
    padding-top: 20px;
    color: #777;
    font-size: 12px;
}

/* КОНТАКТЫ В ФУТЕРЕ */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-contact-icon {
    width: 24px;
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    margin-top: 1px;
}

.contact-text {
    font-style: normal;
    color: #ccc;
    line-height: 1.5;
}

    .contact-text a {
        color: #FFD700 !important;
    }


/* --- СЕТКА КАТЕГОРИЙ 2 НА 2 --- */
.category-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Строго две колонки */
    gap: 20px;
    margin: 20px 0 40px 0;
}

.category-card {
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-bottom: 5px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    }

.card-emoji {
    font-size: 45px; /* Сделал чуть крупнее для 2х2 */
    margin-bottom: 10px;
}

.card-name {
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Цвета полосок */
.card-drinks {
    border-bottom-color: #00aaff;
}

.card-snacks {
    border-bottom-color: #ffaa00;
}

.card-sweets {
    border-bottom-color: #ff44aa;
}

.card-other {
    border-bottom-color: #888888;
}

/* Легкий фон при наведении для каждого типа */
.card-drinks:hover {
    background-color: #f0faff;
}

.card-snacks:hover {
    background-color: #fffaf0;
}

.card-sweets:hover {
    background-color: #fff0fa;
}

.card-other:hover {
    background-color: #f5f5f5;
}

.category-section {
    padding: 24px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0,0,0,0.05);
    border: 2px solid transparent;
}

.category-drinks {
    border-color: rgba(0, 170, 255, 0.30);
    background: linear-gradient(180deg, #f6fcff 0%, #ffffff 100%);
}

.category-snacks {
    border-color: rgba(255, 170, 0, 0.30);
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}

.category-sweets {
    border-color: rgba(255, 68, 170, 0.30);
    background: linear-gradient(180deg, #fff4fa 0%, #ffffff 100%);
}

.category-other {
    border-color: rgba(136, 136, 136, 0.30);
    background: linear-gradient(180deg, #f7f7f7 0%, #ffffff 100%);
}

.category-nav .category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease;
}

.category-count {
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.18);
    color: #7a6100;
    font-size: 13px;
    font-weight: 700;
}

.category-nav .category-link-drinks:hover,
.category-nav .category-link-drinks.active {
    background-color: #f0faff;
    color: #008fd6 !important;
    border-left-color: #00aaff;
}

.category-nav .category-link-snacks:hover,
.category-nav .category-link-snacks.active {
    background-color: #fffaf0;
    color: #d98b00 !important;
    border-left-color: #ffaa00;
}

.category-nav .category-link-sweets:hover,
.category-nav .category-link-sweets.active {
    background-color: #fff0fa;
    color: #e03b98 !important;
    border-left-color: #ff44aa;
}

.category-nav .category-link-other:hover,
.category-nav .category-link-other.active {
    background-color: #f3f3f3;
    color: #666666 !important;
    border-left-color: #888888;
}

/* СПЕЦИАЛЬНЫЕ ГРУППЫ (ХИТЫ, АКЦИИ, СКОРО) */
.special-group {
    background: white;
    padding: 35px 25px 25px 25px;
    border-radius: 20px;
    margin-bottom: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    border: 2px solid #ddd;
}

/* Убираем светлый ореол от карточек внутри спец-блоков */
.special-group .product-card,
.special-group .product-card:hover {
    box-shadow: none !important;
    transform: none !important;
    border-radius: 8px !important;
}

/* Цветные границы для карточек в зависимости от типа группы */
.special-group.hits-bg .product-card {
    border: 2px solid #FF4444 !important;
}

.special-group.sales-bg .product-card {
    border: 2px solid #FFaa00 !important;
}

.special-group.upcoming-bg .product-card {
    border: 2px solid #0057b7 !important;
}

/* Ярлыки над блоками */
.special-badge {
    position: absolute;
    top: -15px;
    left: 20px;
    background: #FFD700;
    color: #333;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    text-transform: uppercase;
}

/* Кнопка "См больше" центрированная внизу блока */
.group-footer {
    text-align: center;
    margin-top: 25px;
    border-top: none;
    padding-top: 20px;
}

.see-more-btn {
    background: #f0f7ff;
    color: #0057b7;
    border: 2px solid #0057b7;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

    .see-more-btn:hover {
        background: #0057b7;
        color: white;
    }

/* Разделитель между спец-блоками и обычным каталогом */
.section-divider {
    border: 0;
    height: 2px;
    background: #e0e0d0;
    margin: 60px 0;
}

/* Индивидуальные стили рамок (опционально) */
.hits-bg {
    border-left: 8px solid #FF4444 !important;
}
/* Красный акцент для хитов */
.sales-bg {
    border-left: 8px solid #FFaa00 !important;
}
/* Оранжевый для акций */
.upcoming-bg {
    border-left: 8px solid #0057b7 !important;
}
/* Голубой для новинок */

/* СПЕЦИАЛЬНЫЕ ГРУППЫ (ХИТЫ, АКЦИИ, СКОРО) */
.special-group {
    background: white;
    padding: 35px 25px 25px 25px;
    border-radius: 20px;
    margin-bottom: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    border: 2px solid #ddd;
}

/* Дублируем правило ниже из-за повторяющихся блоков стилей в файле */
.special-group .product-card,
.special-group .product-card:hover {
    box-shadow: none !important;
    transform: none !important;
    border-radius: 8px !important;
}

/* Цветные границы для карточек в зависимости от типа группы */
.special-group.hits-bg .product-card {
    border: 2px solid #FF4444 !important;
}

.special-group.sales-bg .product-card {
    border: 2px solid #FFaa00 !important;
}

.special-group.upcoming-bg .product-card {
    border: 2px solid #0057b7 !important;
}

/* Ярлыки над блоками */
.special-badge {
    position: absolute;
    top: -15px;
    left: 20px;
    background: #FFD700;
    color: #333;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    text-transform: uppercase;
}

/* Кнопка "См больше" центрированная внизу блока */
.group-footer {
    text-align: center;
    margin-top: 25px;
    border-top: none;
    padding-top: 20px;
}

.see-more-btn {
    background: #f0f7ff;
    color: #0057b7;
    border: 2px solid #0057b7;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

    .see-more-btn:hover {
        background: #0057b7;
        color: white;
    }

/* Разделитель между спец-блоками и обычным каталогом */
.section-divider {
    border: 0;
    height: 2px;
    background: #e0e0d0;
    margin: 60px 0;
}

/* Индивидуальные стили рамок (опционально) */
.hits-bg {
    border-left: 8px solid #FF4444 !important;
}
/* Красный акцент для хитов */
.sales-bg {
    border-left: 8px solid #FFaa00 !important;
}
/* Оранжевый для акций */
.upcoming-bg {
    border-left: 8px solid #0057b7 !important;
}
/* Голубой для новинок */

/* Состояние сетки по умолчанию (скрываем лишнее) */
.product-grid.limited-view {
    max-height: 450px; /* Высота примерно одного ряда товаров */
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    position: relative;
}

/* Краткий текст описания продукта для карточек */
.product-description {
    font-size: 0.9rem;
    color: #555 !important;
    margin-top: 8px;
    line-height: 1.3;
    max-height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.admin-notes {
    font-size: 0.75rem;
    color: #777;
    margin-top: 4px;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    padding: 6px;
    border-radius: 4px;
}

/* Когда класс удален (после нажатия кнопки) */
.product-grid.expanded {
    max-height: 5000px; /* Достаточно много, чтобы влезло всё */
}

/* Скрываем кнопку, если товаров мало (меньше 5) */
.hidden-btn {
    display: none !important;
}

/* Прячем товары после первого ряда (примерно 450px высоты) */
.product-grid.limited-view {
    max-height: 480px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.6s ease-in-out;
}

/* Без белого затухания снизу в спец-блоках */
.product-grid.limited-view::after {
    content: '' !important;
    display: none !important;
    background: none !important;
    height: 0 !important;
}

/* Когда блок раскрыт */
.product-grid.expanded {
    max-height: 2000px; /* Раскрываем полностью */
}

/* Скрываем кнопку совсем, если товаров мало */
.hidden-btn {
    display: none !important;
}

section.category-section {
    scroll-margin-top: 118px;
}

/* Плавная прокрутка (если вдруг слетела) */
html {
    scroll-behavior: smooth;
}

.mobile-menu-btn {
    display: none; /* Скрыта на ПК */
}

.mobile-menu-logo {
    display: none;
}

@media (max-width: 768px) {

    html, body {
        overflow-x: clip; /* Меняем на clip, как и в основной части */
        position: static;
    }

    /* Шапка под мобилку */
    .inschapka {
        display: flex;
        flex-wrap: wrap;
        padding: 8px 15px;
        row-gap: 8px;
        justify-content: space-between;
        align-items: center;
        width: 100% !important;
        padding: 8px 15px !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    /* Кнопка-бургер */
    .mobile-menu-btn {
        display: flex;
        background: #0057b7;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        order: 1;
    }

    .hamburger-icon {
        width: 20px;
        height: 14px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

        .hamburger-icon span {
            display: block;
            width: 100%;
            height: 2px;
            background: white;
            border-radius: 2px;
            transition: 0.3s;
        }

    /* Анимация бургера в крестик */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .logo-link {
        order: 3;
        margin: 0;
    }

    .logofoto {
        width: 100px;
    }

    .header-lang-switcher {
        display: flex;
        align-items: center;
        order: 2;
        justify-self: auto;
    }

    .search-wrapper {
        order: 4;
    }

    .search-bar {
        order: 4;
        flex: 1 1 100%; /* Вместо 0 0 100% — даем гибкость */
        width: 100%; /* Занимает всю ширину */
        margin: 0 !important; /* Расстояние до поиска задает row-gap у шапки */
        height: 36px;
        box-sizing: border-box; /* Чтобы рамка не расширяла поиск */
        max-width: none;
    }

    /* ВЫЕЗЖАЮЩАЯ ПАНЕЛЬ */
    .leftpanel {
        display: block !important;
        position: fixed;
        top: 0;
        left: -85%; /* Спрятана за экраном */
        width: 80%;
        height: 100vh;
        background: #F5F5DC;
        z-index: 10060;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 5px 0 15px rgba(0,0,0,0.2);
        padding: 0;
        overflow-y: auto;
    }

        .leftpanel.active {
            left: 0;
        }
    /* Выезд шторки */

    .mobile-menu-logo {
        display: block;
        text-align: center;
        padding: 25px 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        background: #FFF8DC;
    }

        .mobile-menu-logo img {
            width: 130px;
        }

    /* Затемнение фона */
    .menu-overlay.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 10055;
        backdrop-filter: blur(2px);
    }

    /* Категории и ссылки в меню */
    .panel {
        box-shadow: none;
        background: transparent;
        padding: 10px 0;
    }

    .category-nav {
        display: flex !important;
        flex-direction: column;
        padding: 0;
    }

        .menu-item, .category-nav a {
            font-size: 17px;
            padding: 15px 25px;
            border-bottom: 1px solid rgba(0,0,0,0.03);
        }

    /* Реклама в шторке */
    .side-ad {
        width: 75%;
        margin: 30px auto 50px;
        padding: 10px;
        background: white;
    }

        .side-ad img {
            max-height: 110px;
            object-fit: contain;
        }

    /* Сетка товаров на мобилке */
    .main-container {
        display: block;
        padding: 15px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    /* ЦЕНТРИРОВАНИЕ ФУТЕРА */
    .footer-content {
        flex-direction: column; /* Элементы в колонку */
        align-items: center; /* Центрируем колонки */
        text-align: center; /* Центрируем текст внутри */
        gap: 35px; /* Расстояние между блоками */
    }

    .footer-column {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; /* Центрируем содержимое каждой колонки */
    }

    /* Иконки и контакты тоже в центр */
    .contact-item {
        justify-content: center; /* Центрируем иконку + текст */
        text-align: center;
        width: 100%;
    }

    .contact-text {
        text-align: center;
    }

    /* Убираем лишние отступы у заголовков на мобилке */
    .footer-column h4 {
        margin-bottom: 15px;
    }
    /* 1. СЕТКА: как на главной */
    .product-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* Ровно 2 колонки */
        gap: 12px !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .special-group,
    .category-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .special-group {
        padding-top: 26px !important;
        padding-bottom: 14px !important;
    }

    .category-section {
        padding-top: 18px !important;
        padding-bottom: 14px !important;
    }

    .special-group .section-header,
    .category-section .section-header,
    .special-group .product-grid,
    .category-section .product-grid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .category-section .product-card {
        padding: 0 !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    }

    .category-section .product-img {
        height: 140px !important;
        padding: 10px !important;
        margin-bottom: 0 !important;
    }

    .category-section .product-info {
        display: block !important;
        width: auto !important;
        padding: 15px !important;
    }

    .category-section .price-block {
        margin: 10px 0 !important;
    }

    .category-section .price {
        margin: 0 !important;
        font-size: 22px !important;
    }

    .category-section .product-card .order-btn {
        padding: 12px !important;
        font-size: 14px !important;
    }

        /* ЭТО ВАЖНО: Если карточка обернута в лишний <div>, растягиваем его */
        .product-grid > div {
            width: 100% !important;
            display: block !important;
        }

    /* 2. САМА КАРТОЧКА: Копируем поведение главной */
    .product-card {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 100% !important; /* Занимает всю ширину ячейки */
        min-width: 0 !important; /* Убираем сужение */
        height: 100% !important;
        background: white !important;
        border-radius: 12px !important;
        padding: 12px !important;
        box-sizing: border-box !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
        text-align: center !important;
    }

    /* 3. КАРТИНКА */
    .product-img {
        width: 100% !important;
        height: 110px !important;
        object-fit: contain !important;
        margin-bottom: 10px !important;
        flex-shrink: 0 !important;
    }

    /* 4. ИНФОРМАЦИЯ */
    .product-info {
        display: flex !important;
        flex-direction: column !important;
        flex-grow: 1 !important;
        width: 100% !important;
    }

        .product-info h3 {
            font-size: 13px !important;
            line-height: 1.2 !important;
            margin: 5px 0 !important;
            white-space: normal !important; /* РАЗРЕШАЕМ перенос строк */
            word-wrap: break-word !important;
        }

    /* 5. ЦЕНА */
    .price {
        font-size: 16px !important;
        font-weight: bold !important;
        color: #0057b7 !important;
        margin: auto 0 10px !important; /* Выталкивает цену к кнопке */
    }

    .price-old {
        color: #b00020 !important;
    }

    .price-sale {
        color: #178a3f !important;
    }

    /* 6. КНОПКА */
    .order-btn {
        width: 100% !important;
        padding: 10px 5px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
        white-space: nowrap !important; /* Текст в одну строку */
    }

    .product-grid.horizontal-scroll {
        display: flex !important; /* Переключаем с Grid на Flex */
        flex-direction: row !important; /* Выстраиваем в ряд */
        overflow-x: auto !important; /* Включаем горизонтальный скролл */
        scroll-snap-type: x mandatory; /* Эффект "магнита" при скролле */
        gap: 15px !important;
        padding: 10px 20px !important; /* Отступы, чтобы карточка не жалась к краям */
        /* Скрываем стандартную полосу прокрутки для красоты */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .special-group .product-grid.horizontal-scroll.limited-view,
    .special-group .product-grid.horizontal-scroll.expanded,
    #hits-grid.horizontal-scroll,
    #sales-grid.horizontal-scroll,
    #upcoming-grid.horizontal-scroll {
        max-height: none !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        flex-wrap: nowrap !important;
    }

        .product-grid.horizontal-scroll::-webkit-scrollbar {
            display: none; /* Chrome/Safari */
        }

        /* Настройка карточки внутри скролла */
        .product-grid.horizontal-scroll .product-card {
            flex: 0 0 75% !important; /* Ширина карточки 75% от экрана */
            min-width: 75% !important;
            scroll-snap-align: center; /* Центрирование при остановке */
            /* Возвращаем внутренний порядок элементов */
            display: flex !important;
            flex-direction: column !important;
            justify-content: space-between !important;
        }

    /* Если на странице ТОВАРЫ (products.html) скролл НЕ НУЖЕН */
    /* то там просто НЕ ПИШИ класс horizontal-scroll, и останется обычная сетка 1fr 1fr */

    /* ... твои прошлые стили для скролла ... */

    /* СКРЫВАЕМ НЕНУЖНЫЕ КНОПКИ */
    .mobile-hide {
        display: none !important;
    }

    /* Дополнительно: можно скрыть именно те кнопки, которые были под сетками */
    .group-footer {
        display: none !important;
    }

    /* Если хочешь, чтобы заголовки секций (Акции, Хиты) стали чуть ближе к товарам */
    .special-badge {
        margin-bottom: 5px !important;
    }

    /* Увеличим отступ снизу у всей секции, чтобы блоки не слипались */
    .special-group {
        margin-bottom: 30px !important;
        padding-bottom: 10px !important;
    }


    /* ... твои старые стили для скролла ... */

    /* Убедимся, что скролл не создает артефактов */
    .product-grid.horizontal-scroll {
        display: flex !important;
        /* ... остальные настройки скролла ... */
        position: relative !important; /* Создаем контекст наложения */
        z-index: 1 !important;
        overflow: hidden !important; /* УБРАНО overflow-x: auto - это КЛЮЧЕВОЙ МОМЕНТ */
        /* Объяснение: overflow-x: auto может конфликтовать с overflow: hidden для псевдоэлементов */
        overflow-x: auto !important; /* Восстанавливаем скролл, но после hidden, чтобы закрепить */
    }

        /* РЕМОНТ КАРТОЧКИ (чтобы убрать белую полосу) */
        .product-grid.horizontal-scroll .product-card {
            flex: 0 0 75% !important;
            /* ... остальные настройки карточки ... */

            position: relative !important; /* Критично для очистки */
            overflow: hidden !important; /* ГАРАНТИРУЕТ, что ничего не вылезет за пределы карточки */
            box-sizing: border-box !important;
            z-index: 2 !important;
        }

            /* ОЧИСТКА ПСЕВДОЭЛЕМЕНТОВ (на всякий случай) */
            /* Убираем все ::before и ::after у карточки и её содержимого */
            .product-grid.horizontal-scroll .product-card::before,
            .product-grid.horizontal-scroll .product-card::after,
            .product-grid.horizontal-scroll .product-card *::before,
            .product-grid.horizontal-scroll .product-card *::after {
                content: none !important;
                display: none !important;
                background: none !important;
                width: 0 !important;
                height: 0 !important;
            }

    /* УБИРАЕМ ЛИШНИЕ DIV-ОБЕРТКИ У КНОПКИ (если они есть) */
    /* Заставляем кнопку игнорировать позиционирование её родителей */
    .order-btn {
        width: 100% !important;
        position: relative !important; /* Поднимаем саму кнопку выше всех */
        z-index: 10 !important; /* Большой z-index, чтобы быть поверх любых оверлеев */
        display: block !important;
    }   


}

/* 1. ПОДГОТОВКА КАРТОЧКИ */
.section-drinks .product-card {
    position: relative !important; /* Чтобы плашка прилипла к карточке */
    padding-left: 25px !important; /* Отступ слева, чтобы текст не налезал на плашку */
    overflow: hidden !important; /* Чтобы края плашки не вылезали за радиус карточки */
    border-radius: 15px !important; /* Общий радиус карточки */
    background: white !important;
}

    /* 2. СОЗДАНИЕ ПЛАШКИ (::before) */
    .section-drinks .product-card::before {
        content: "" !important;
        position: absolute !important;
        left: 0 !important; /* Прижимаем к левому краю */
        top: 0 !important; /* Растягиваем от верха... */
        bottom: 0 !important; /* ...до низа */
        width: 12px !important; /* Ширина плашки */

        background-color: #0089e0 !important; /* Тот самый синий цвет */
        /* ЗАКРУГЛЕНИЕ ПРАВОЙ СТОРОНЫ ПЛАШКИ */
        /* Делаем её округлой только с одной стороны, как на фото */
        border-top-right-radius: 10px !important;
        border-bottom-right-radius: 10px !important;
    }

/* 3. КОРРЕКЦИЯ ДЛЯ МОБИЛОК (если нужно) */
@media (max-width: 768px) {
    .section-drinks .product-card {
        padding-left: 18px !important; /* Чуть меньше отступ на узких экранах */
    }

        .section-drinks .product-card::before {
            width: 10px !important; /* Чуть тоньше плашка */
        }
}

/* ОБЩИЙ СТИЛЬ ПЛАШКИ ДЛЯ ВСЕХ КАРТОЧЕК */
.product-card {
    position: relative !important;
    padding-left: 22px !important; /* Отодвигаем контент (картинку и текст) вправо */
    overflow: hidden !important;
    /* Твои старые стили (background, border-radius) не меняются! */
}

    /* Сама полоска */
    .product-card::before {
        content: "" !important;
        position: absolute !important;
        left: 0 !important;
        top: 15% !important; /* Сделаем её чуть короче по высоте для стиля */
        bottom: 15% !important;
        width: 8px !important; /* Ширина плашки */
        /* Закругляем только правую сторону, как на фото */
        border-top-right-radius: 6px !important;
        border-bottom-right-radius: 6px !important;
        z-index: 5 !important;
    }

/* ЦВЕТА ДЛЯ КАЖДОЙ КАТЕГОРИИ */

/* Синий для Напитков (если у секции класс category-drinks) */
.category-drinks .product-card::before {
    background-color: #0089e0 !important;
}

/* Оранжевый для Закусок (если у секции класс category-snacks) */
.category-snacks .product-card::before {
    background-color: #ff8c00 !important;
}

/* Розовый для Сладостей (если у секции класс category-sweets) */
.category-sweets .product-card::before {
    background-color: #e91e63 !important;
}

/* Зеленый для Прочего */
.category-other .product-card::before {
    background-color: #4caf50 !important;
}

/* 1. НАПИТКИ (Синий) */
.category-drinks h2 {
    color: #0089e0 !important;
}

.category-drinks .product-card::before {
    background-color: #0089e0 !important;
}

/* 2. ЗАКУСКИ (Оранжевый) */
.category-snacks h2 {
    color: #ff8c00 !important;
}

.category-snacks .product-card::before {
    background-color: #ff8c00 !important;
}

/* 3. СЛАДОСТИ (Розовый) */
.category-sweets h2 {
    color: #e91e63 !important;
}

.category-sweets .product-card::before {
    background-color: #e91e63 !important;
}

/* 4. ПРОЧЕЕ (Зеленый) */
.category-other h2 {
    color: #4caf50 !important;
}

.category-other .product-card::before {
    background-color: #4caf50 !important;
}

/* 5. ХИТЫ / АКЦИИ (Желтый/Золотой) */
.category-hits h2, .category-sales h2 {
    color: #ffcc00 !important;
}

.category-hits .product-card::before, .category-sales .product-card::before {
    background-color: #ffcc00 !important;
}


/* ОБЩИЙ СТИЛЬ ДЛЯ ПЛАШКИ В ЗАГОЛОВКЕ */
.section-header::after {
    /* Твои старые настройки остаются (позиция, ширина) */
    position: absolute !important;
    left: 10px !important; /* Отступ слева */
    top: 5px !important; /* Отступ сверху */
    bottom: 5px !important; /* Отступ снизу */
    width: 6px !important; /* Толщина плашки */
    content: '' !important;
    /* Добавим закругление (как на скриншоте, оно аккуратное) */
    border-radius: 4px !important;
}

/* ОБЩИЙ СТИЛЬ ЗАГОЛОВКА */
.section-header {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    padding-left: 20px !important; /* Место для линии */
    border-left: none !important; /* УДАЛЯЕМ старую синюю линию, если она была через border */
    margin: 30px 0 15px !important;
}

    /* СОЗДАЕМ КРАСИВУЮ ЛИНИЮ ЧЕРЕЗ ::BEFORE */
    .section-header::before {
        content: "" !important;
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important; /* Центровка по высоте */
        width: 6px !important; /* Толщина линии */
        height: 32px !important; /* Фиксированная высота (чтобы не была длинной) */
        border-radius: 4px !important;
        background-color: #0057b7; /* Цвет по умолчанию (синий) */
    }

/* --- ЦВЕТА ДЛЯ КАЖДОЙ КАТЕГОРИИ (Заголовок + Текст) --- */

/* Напитки */
.category-drinks h2 {
    color: #00aaff !important;
}

.category-drinks .section-header::before {
    background-color: #00aaff !important;
}

/* Сладости */
.category-sweets h2 {
    color: #ff44aa !important;
}

.category-sweets .section-header::before {
    background-color: #ff44aa !important;
}

/* Закуски */
.category-snacks h2 {
    color: #ffaa00 !important;
}

.category-snacks .section-header::before {
    background-color: #ffaa00 !important;
}

/* Прочее */
.category-other h2 {
    color: #888888 !important;
}

.category-other .section-header::before {
    background-color: #888888 !important;
}

/* Корзина предзаказа */
.floating-preorder-btn {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 10040;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 32px);
    border: none;
    border-radius: 999px;
    background: #ffd700;
    color: #1f1f1f;
    font-weight: 700;
    font-size: 18px;
    padding: 12px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
}

.floating-preorder-btn[hidden] {
    display: none !important;
}

.floating-preorder-btn:hover {
    background: #e6c200;
}

.scroll-top-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: linear-gradient(135deg, #0057b7, #1e88e5);
    box-shadow: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 10030;
}

.scroll-top-btn:hover {
    transform: translateY(-2px);
}

.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Финальные цвета обычных категорий: секции и боковые акценты карточек */
.category-section {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.category-drinks {
    background: transparent !important;
    border-color: transparent !important;
}

.category-snacks {
    background: transparent !important;
    border-color: transparent !important;
}

.category-sweets {
    background: transparent !important;
    border-color: transparent !important;
}

.category-other {
    background: transparent !important;
    border-color: transparent !important;
}

.category-section .product-card {
    background: #ffffff !important;
}

.category-section .product-grid {
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.category-drinks .product-grid {
    background: transparent !important;
    border-color: transparent !important;
}

.category-snacks .product-grid {
    background: transparent !important;
    border-color: transparent !important;
}

.category-sweets .product-grid {
    background: transparent !important;
    border-color: transparent !important;
}

.category-other .product-grid {
    background: transparent !important;
    border-color: transparent !important;
}

.category-drinks .product-card::before {
    background-color: #00aaff !important;
}

.category-snacks .product-card::before {
    background-color: #ffaa00 !important;
}

.category-sweets .product-card::before {
    background-color: #ff44aa !important;
}

.category-other .product-card::before {
    background-color: #888888 !important;
}

.hits-bg,
.sales-bg,
.upcoming-bg {
    border-left-width: 10px !important;
}

.hits-bg {
    border-left-color: #ff2f2f !important;
    box-shadow: 0 10px 24px rgba(255, 68, 68, 0.14) !important;
}

.sales-bg {
    border-left-color: #ffb000 !important;
    box-shadow: 0 10px 24px rgba(255, 170, 0, 0.14) !important;
}

.upcoming-bg {
    border-left-color: #008cff !important;
    box-shadow: 0 10px 24px rgba(0, 87, 183, 0.14) !important;
}

.preorder-count-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: #cc0000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

/* ФОН МОДАЛЬНОГО ОКНА */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    backdrop-filter: blur(3px);
}

/* САМО ОКНО */
.modal-window {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    box-sizing: content-box;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* КНОПКА ЗАКРЫТЬ */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

/* ФОРМА ВНУТРИ */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}

.modal-form textarea {
    resize: none;
    min-height: 80px;
}

.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
    border-color: #FFD700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.modal-window .order-btn,
.modal-form .order-btn {
    width: auto !important;
    display: inline-block !important;
    align-self: flex-start;
    padding: 12px !important;
}

@media (max-width: 768px) {
    .floating-preorder-btn {
        bottom: 12px;
        font-size: 16px;
        width: auto !important;
        max-width: calc(100vw - 24px);
        padding: 10px 18px;
    }

    .scroll-top-btn {
        right: 16px;
        bottom: 16px;
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
}

#preorderCartButton {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: 18px !important;
    transform: translateX(-50%) !important;
    width: fit-content !important;
    max-width: calc(100vw - 32px) !important;
    min-width: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    white-space: nowrap !important;
}

@media (max-width: 768px) {
    #preorderCartButton {
        bottom: 12px !important;
        max-width: calc(100vw - 24px) !important;
    }
}

/* Приводим карточки каталога к стилю главной страницы. */
.category-section .product-card,
.special-group .product-card {
    background: white !important;
    border: none !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    transition: 0.3s !important;
    position: relative !important;
    padding-left: 0 !important;
}

.category-section .product-card:hover,
.special-group .product-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
}

.category-section .product-card::before,
.special-group .product-card::before {
    content: none !important;
}

.category-section .product-image-wrapper,
.special-group .product-image-wrapper {
    position: static !important;
    z-index: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    background: transparent !important;
    overflow: visible !important;
    display: block !important;
}

.category-section .product-img,
.special-group .product-img {
    position: static !important;
    z-index: auto !important;
    width: 100% !important;
    height: 200px !important;
    object-fit: contain !important;
    padding: 10px !important;
    display: block !important;
}

.category-section .product-info,
.special-group .product-info {
    padding: 15px !important;
    text-align: center !important;
}

.category-section .price-block,
.special-group .price-block {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 10px 0 !important;
}

.category-section .price,
.special-group .price {
    display: block !important;
    font-size: 22px !important;
    font-weight: bold !important;
    color: #0057b7 !important;
    margin: 0 !important;
}

.category-section .price-old,
.special-group .price-old {
    font-size: 18px !important;
    color: #b00020 !important;
    text-decoration: line-through !important;
    text-decoration-thickness: 2px !important;
}

.category-section .price-sale,
.special-group .price-sale {
    color: #178a3f !important;
}

.category-section .product-card .order-btn,
.special-group .product-card .order-btn {
    width: 100% !important;
    display: block !important;
    padding: 12px !important;
    background: #FFD700 !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    color: #333 !important;
}