/* ===========================================================
   МЕНЮ "ЛЕСЕНКОЙ" (Финальная версия с мобильным скроллом)
   =========================================================== */

.menu-grid-wrapper {
    background-color: #f8f4f0;
    padding: 40px 0 80px;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #2c2824;
}

.menu-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 40px;
}

/* ==========================================================
   ЛЕВАЯ НАВИГАЦИЯ
   ========================================================== */

.menu-grid-nav {
    flex: 0 0 180px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
}

.menu-grid-nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: transparent;
    color: #999;
    text-align: right;
}

.menu-grid-nav-item:hover {
    color: #2c2824;
    background: rgba(53, 85, 127, 0.08);
}

.menu-grid-nav-item.active {
    background-color: #35557f;
    color: #b5a642;
    box-shadow: 0 4px 12px rgba(53, 85, 127, 0.25);
    font-weight: bold;
    letter-spacing: 0.05em;
}

.menu-grid-nav-item .nav-text {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'Georgia', serif;
    transition: color 0.3s;
}

/* ==========================================================
   ПРАВАЯ ЧАСТЬ (Контент)
   ========================================================== */

.menu-grid-content {
    flex-grow: 1;
    height: 70vh; 
    overflow-y: auto;
    padding-right: 10px;
    scroll-behavior: smooth;
}

/* Кастомизация скроллбара (Десктоп) */
.menu-grid-content::-webkit-scrollbar {
    width: 4px;
}
.menu-grid-content::-webkit-scrollbar-track {
    background: transparent;
}
.menu-grid-content::-webkit-scrollbar-thumb {
    background: #35557f;
    border-radius: 4px;
}

.menu-grid-category {
    display: none;
    animation: fadeSlideIn 0.5s ease forwards;
}
.menu-grid-category.active {
    display: block;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-cat-title {
    text-align: center;
    font-size: 32px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 50px;
    color: #2c2824;
}

.menu-items-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 60px 20px;
}

.menu-item-card {
    width: calc(50% - 20px);
    max-width: 480px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.menu-item-card:nth-child(odd) {
    margin-top: 120px;
}
.menu-item-card:nth-child(even) {
    margin-top: 0;
}

@media (max-width: 850px) {
    /* .menu-item-card {
        width: 100%;
        max-width: 100%;
    } */
    .menu-item-card:nth-child(odd),
    .menu-item-card:nth-child(even) {
        margin-top: 0;
    }
    .menu-cat-title {
        font-size: 24px !important;
    }
    .menu-item-title h3 {
        font-size: 14px !important;
    }
    .menu-tag-badge {
        font-size: 10px !important;
        padding: 5px 10px;
        top: 5px;
        left: 0px;
    }
    .item-price {
        font-size: 16px !important;
    }
}

.menu-item-inner {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    padding: 0;
    position: relative;
}

.menu-item-title {
    text-align: center;
    margin-bottom: 12px;
    min-height: 3.5em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.menu-item-title h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    color: #2c2824;
    line-height: 1.3;
}

.menu-item-title .item-weight {
    font-size: 13px;
    color: #777;
    font-weight: 400;
}

.menu-item-image-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.menu-item-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

/* --- МЕТКА НА ФОТО --- */
.menu-tag-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    background-color: #35557f;
    color: #b5a642;
    font-family: 'Georgia', serif;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(53, 85, 127, 0.3);
    display: inline-block;
}
.menu-tag-badge + .menu-tag-badge {
    top: 60px;
}

.menu-item-body {
    padding: 15px 5px 0 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-desc {
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.4;
    margin: 0;
}

.menu-item-bottom {
    display: flex;
    justify-content: flex-end; 
    margin-top: 5px;
}

.item-price {
    font-size: 20px;
    font-weight: 500;
    color: #b5a642;
}

/* ==========================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (ЛИПКАЯ ТОЛЬКО ВНУТРИ МЕНЮ)
   ========================================================== */

@media (max-width: 1024px) {
    .menu-grid-container {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }
    
    /* Навигация "прилипает" к верху при прокрутке ТОЛЬКО внутри .menu-grid-wrapper */
    .menu-grid-nav {
        position: sticky !important;
        top: 55px !important; /* Отступ под фиксированным хедером */
        flex: none !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        background-color: #f8f4f0 !important;
        padding: 12px 20px !important;
        margin: 0 !important;
        overflow-x: auto !important;
        width: 100% !important;
        z-index: 100 !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important;
    }
    .menu-grid-nav::-webkit-scrollbar {
        height: 3px;
    }
    .menu-grid-nav::-webkit-scrollbar-thumb {
        background: #35557f;
        border-radius: 4px;
    }
    
    .menu-grid-nav-item {
        flex-shrink: 0 !important;
        padding: 8px 18px !important;
    }
    .menu-grid-nav-item .nav-text {
        font-size: 12px !important;
    }

    /* Контент */
    .menu-grid-content {
        height: auto !important; /* Убираем ограничение высоты */
        overflow-y: visible !important; /* Убираем внутренний скролл */
        padding: 20px !important;
        width: 100% !important;
    }
}