﻿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;
}

/* ОБЩИЕ СТИЛИ */
html, body {
    margin: 0;
    padding: 0;
    background: #F5F5DC;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
    color: #333;
}

/* ШАПКА */
.schapka {
    position: sticky;
    top: 0;
    z-index: 10000;
    width: 100%;
    background: #FFF8DC;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.inschapka {
    display: grid;
    grid-template-columns: auto minmax(320px, 450px) auto;
    align-items: center;
    padding: 10px 20px;
    gap: 20px;
}

.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;
    }

/* ЯЗЫКИ */
.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);
    }

/* ГЛАВНЫЙ КОНТЕЙНЕР */
.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;
    }

.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;
    box-sizing: border-box;
    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;
}

.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;
}

/* РЕКЛАМА В ПАНЕЛИ */
.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;
}

/* КОНТЕНТ */


/* ФУТЕР */
.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;
    }

/* СТИЛИ СТРАНИЦЫ СЕРВИСА */
.content-area {
    flex: 1;
    max-width: 1200px;
}

/* Сетка карточек */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Карточка сервиса */
.service-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    border-top: 5px solid #FFD700;
    display: flex;
    flex-direction: column;
}

    .service-card:hover {
        transform: translateY(-5px);
    }

.service-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.service-card h3 {
    color: #0057b7;
    margin-bottom: 15px;
    margin-top: 0;
}

/* Списки внутри карточек */
.service-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    flex-grow: 1;
}

    .service-list li {
        padding-left: 25px;
        position: relative;
        margin-bottom: 10px;
        font-size: 14px;
        color: #555;
    }

        .service-list li::before {
            content: "✓";
            position: absolute;
            left: 0;
            color: #28a745;
            font-weight: bold;
        }

/* Универсальная кнопка */
.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;
}

/* Поля формы при фокусе */
.feedback-form input:focus,
.feedback-form textarea:focus,
.feedback-form select:focus {
    border-color: #FFD700 !important;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* ФОН МОДАЛЬНОГО ОКНА */
.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;
    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; /* Чтобы padding не увеличивал ширину */
    }

    /* ВОТ ЭТО ИСПРАВЛЕНИЕ: Убираем уголок и запрещаем растягивание */
    .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);
        }
.mobile-menu-btn {
    display: none; /* Скрыта на ПК */
}

.mobile-menu-logo {
    display: none;
}
@media (max-width: 768px) {
    /* 1. ГЛОБАЛЬНЫЕ МОБИЛЬНЫЕ ИСПРАВЛЕНИЯ */
    html, body {
        overflow-x: clip; /* Меняем на clip, как и в основной части */
        position: static;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* 2. ШАПКА (Исправляем смещение влево) */
    .inschapka {
        display: flex;
        flex-wrap: wrap;
        padding: 8px 15px;
        row-gap: 8px;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        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%; /* Занимает всю строку */
        margin: 0 !important; /* Расстояние до поиска задает row-gap у шапки */
        height: 36px;
        width: 100%;
        box-sizing: border-box;
        max-width: none;
    }

    /* 3. ВЫЕЗЖАЮЩАЯ ПАНЕЛЬ */
    .leftpanel {
        display: block !important;
        position: fixed;
        top: 0;
        left: -85%;
        width: 80%;
        height: 100vh;
        background: #F5F5DC;
        z-index: 10001;
        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: 10000;
        backdrop-filter: blur(2px);
    }

    /* 4. МЕНЮ И КОНТЕНТ */
    .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);
        }

    .main-container {
        display: block;
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    /* 5. ЦЕНТРИРОВАНИЕ ФУТЕРА */
    .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;
    }
}