﻿/* ========================================================= BASE ========================================================= */
#menu-container {
    width: 100%;
    overflow-x: hidden;
    background: linear-gradient( 135deg, #ecddc5 0%, #eee0c8 50%, #eee6dd 100% );
    color: #302820;
}

.menu-section {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 70px;
}

/* ========================================================= MENU TITLE ========================================================= */

.restaurant-title {
    text-align: center;
    padding: 25px 15px 20px;
}

.restaurant-title h1 {
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 34px;
    letter-spacing: 1px;
    margin: 0;
    color: #9a5b28;
}

.restaurant-title .line {
    width: 280px;
    max-width: 80%;
    height: 1px;
    background: #a8753b;
    margin: 10px auto 0;
}

/* ========================================================= CATEGORY BUTTONS ========================================================= */

.menu-categories {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    border-top: 1px solid #c9b58d;
    border-bottom: 1px solid #c9b58d;
    background: linear-gradient( to bottom, #faf6eb, #eee4cf );
    box-shadow: 0 2px 6px rgba(80, 50, 20, 0.15);
}

.menu-category {
    position: relative;
    width: 100%;
    min-width: 0;
    padding: 12px 10px;
    border: 0;
    border-right: 1px solid #d5c7aa;
    background: transparent;
    color: #242424;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.25;
    cursor: pointer;
    transition: background .3s ease, color .3s ease;
}

    .menu-category:last-child {
        border-right: 0;
    }

    .menu-category:hover {
        background: rgba(150, 80, 30, .08);
        color: #8f4e24;
    }

    /* ACTIVE CATEGORY */

    .menu-category.active {
        color: #fff;
        background: linear-gradient( to bottom, #a54d2a, #783017 );
        box-shadow: inset 0 -2px 0 rgba(255,255,255,.15);
    }

        .menu-category.active::after {
            content: "";
            position: absolute;
            left: 50%;
            bottom: -6px;
            width: 11px;
            height: 11px;
            background: #783017;
            transform: translateX(-50%) rotate(45deg);
            z-index: 5;
            animation: tabDiamond .35s ease;
        }

@keyframes tabDiamond {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px) rotate(45deg);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) rotate(45deg);
    }
}

/* ========================================================= CATEGORY CONTENT ========================================================= */

.menu-category-content {
    display: none;
    width: 100%;
    padding-top: 5px;
}

    .menu-category-content.active {
        display: block;
        animation: categoryAppear .45s cubic-bezier(.22, 1, .36, 1);
    }

@keyframes categoryAppear {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================= CATEGORY HEADING ========================================================= */

.category-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 25px 20px 30px;
    min-height: 70px;
    overflow: hidden;
}

.heading-line {
    flex: 1;
    height: 1px;
    background: #a16a2d;
}

.heading-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 280px;
    text-align: center;
}

.leaf {
    color: #62884e;
    font-size: 29px;
    line-height: 1;
    animation: leafFloat 2.5s ease-in-out infinite;
}

    .leaf.right {
        animation: leafFloatRight 2.5s ease-in-out infinite;
    }

@keyframes leafFloat {
    0%, 100% {
        transform: translateY(0) rotate(-8deg);
    }

    50% {
        transform: translateY(-3px) rotate(4deg);
    }
}

@keyframes leafFloatRight {
    0%, 100% {
        transform: scaleX(-1) translateY(0) rotate(-8deg);
    }

    50% {
        transform: scaleX(-1) translateY(-3px) rotate(4deg);
    }
}

.image-header .middle-text {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.no-gaps div img {
    width: 100% !important;
}

.category-title-box {
    text-align: center;
}

.category-title {
    margin: 0;
    color: #2e302d;
    font-size: 27px;
    font-weight: bold;
    line-height: 1.1;
}

.category-subtitle {
    margin: 6px 0 0;
    color: #9a5a27;
    font-size: 18px;
    line-height: 1.2;
}

/* ========================================================= PRODUCTS ========================================================= */

.menu-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    padding: 0 30px;
}

/* ========================================================= GROUP TITLE ========================================================= */

.menu-group {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    margin-bottom: 2px;
}

.menu-group::before,
.menu-group::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #9a5a13;
    max-width: 60px;
}

.menu-group-title {
    margin: 0;
    padding: 0 6px;
    background: transparent !important;
    color: #7f4b25;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    font-weight: bold;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
}

/* Group colors */

.group-green {
    background: #37A541;
}

.group-red {
    background: #FF1D25;
}

.group-blue {
    background: #0470B4;
}

/* ========================================================= MENU ITEM ========================================================= */

.menu-item {
    min-width: 0;
    animation: itemAppear .5s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes itemAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================= PRODUCT CARD ========================================================= */

.product-card {
    width: 100%;
    height: 100%;
    padding: 20px 24px 24px;
    position: relative;
    overflow: visible;
    container-type: inline-size;
    background: radial-gradient( circle at center, rgba(255, 255, 255, 0.9), rgba(247, 239, 220, 0.96) 70%, rgba(238, 223, 195, 0.98) );
    box-shadow: 0 8px 22px rgba(80, 45, 15, 0.12);
    transition: transform .3s ease, box-shadow .3s ease;
    border-radius: 12px;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(80, 45, 15, 0.18);
    z-index: 100;
}

/* PAPER TEXTURE */

.product-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.06;
    background-image: repeating-radial-gradient( circle at 20% 30%, rgba(90, 60, 20, 0.25) 0, rgba(90, 60, 20, 0.25) 1px, transparent 1px, transparent 4px );
}

/* CARD CONTENT */

.product-card-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* TOP DIVIDER */

.product-card .main-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 18px;
}

.product-card .main-divider::before,
.product-card .main-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #9a5a13;
}

/* DIVIDER SYMBOL */

.product-card .divider-symbol {
    color: #9a5a13;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(20px, 2.5cqw, 30px);
    line-height: 1;
    transform: scaleX(1.6);
    padding: 0 6px;
}

/* PRODUCT HEADER */

.product-card .food-header {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 5px;
    padding: 2px;
    border-bottom: 1px solid #9b5b20;
}

/* COMPACT VEGETARIAN ICON */

.product-card .vegetarian {
    position: relative;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.product-card .leaf-shape {
    position: absolute;
    display: block;
    border-radius: 100% 0 100% 0;
    transform: rotate(-45deg);
}

.product-card .leaf-one {
    width: 18px;
    height: 22px;
    left: 0;
    top: 1px;
    background: #4d8f31;
}

.product-card .leaf-two {
    width: 16px;
    height: 20px;
    right: 0;
    top: 5px;
    background: #2f722b;
}

.product-card .leaf-stem {
    position: absolute;
    width: 1px;
    height: 22px;
    left: 13px;
    top: 2px;
    background: #eee7d5;
    transform: rotate(30deg);
    z-index: 2;
}

/* PRODUCT NAME */

.product-card .food-name {
    min-width: 0;
    margin: 0;
    text-align: center;
    font-family: "Cinzel", serif;
    /* Dynamic size based on the product card width. Min: 14px, Max: 24px */
    font-size: clamp(16px, 7cqw, 22px);
    font-weight: 700;
    line-height: 1.2;
    color: #292929;
    letter-spacing: 0.2px;
    overflow-wrap: anywhere;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

/* PRODUCT PRICE */

.product-card .price {
    font-size: clamp(18px, 5cqw, 23px);
    font-weight: 700;
    color: #8f1b1b;
    white-space: nowrap;
    line-height: 1;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

/* PRODUCT DESCRIPTION */

.product-card .description {
    margin: 2px 0 8px;
    text-align: center;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(13px, 4cqw, 17px);
    font-style: italic;
    font-weight: 400;
    line-height: 1.5;
    color: #292929;
}

/* IMAGE HOLDER */

.product-card .image-holder {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    margin-top: auto;
    background: linear-gradient( 135deg, #b9aa95, #ded3bf);
    border-radius: 8px;
}

.product-card .image-holder img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* ========================================================= SCROLL TO TOP ========================================================= */

#scroll-to-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    cursor: pointer;
    z-index: 1000;
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
}

    #scroll-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    #scroll-to-top:hover {
        transform: translateY(-3px);
    }

    #scroll-to-top img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

/* ========================================================= TABLET (≤900px) — 2-3 COLUMNS ========================================================= */

@media (max-width: 900px) {
    .menu-categories {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .menu-category {
        border-bottom: 1px solid #d5c7aa;
    }

        .menu-category:nth-child(3n) {
            border-right: 0;
        }

        .menu-category:nth-last-child(-n+3) {
            border-bottom: 0;
        }

    .menu-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 25px;
        padding: 0 25px;
    }

    .product-card {
        padding: 20px 18px 25px;
    }

    .product-card .food-header {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        column-gap: 8px;
    }

    .product-card .food-name {
        font-size: clamp(20px, 3vw, 32px);
    }

    .product-card .price {
        font-size: clamp(20px, 2.8vw, 30px);
    }

    .product-card .description {
        font-size: 17px;
    }

    .product-card .image-holder {
        height: 260px;
    }
}

/* ========================================================= MOBILE (≤600px) — 1-2 COLUMNS ========================================================= */

@media (max-width: 600px) {
    .restaurant-title {
        padding: 20px 12px 16px;
    }

        .restaurant-title h1 {
            font-size: 28px;
        }

    .menu-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-category {
        min-height: 48px;
        padding: 10px 8px;
        font-size: 13px;
    }

    .menu-category:nth-child(3n) {
        border-right: 1px solid #d5c7aa;
    }

    .menu-category:nth-child(2n) {
        border-right: 0;
    }

    .menu-category:nth-last-child(-n+3) {
        border-bottom: 1px solid #d5c7aa;
    }

    .menu-category:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    .category-heading {
        margin: 22px 10px 25px;
        gap: 6px;
    }

    .heading-center {
        min-width: auto;
    }

    .heading-line {
        max-width: 80px;
    }

    .category-title {
        font-size: 23px;
    }

    .category-subtitle {
        font-size: 16px;
    }

    .leaf {
        font-size: 22px;
    }

    .menu-content {
        grid-template-columns: 1fr;
        gap: 17px;
        padding: 0 18px;
    }

    .menu-item-name {
        font-size: 16px;
    }

    .menu-item-price {
        font-size: 15px;
    }

    .menu-item-description {
        font-size: 13px;
    }

    .product-card {
        padding: 20px 15px 22px;
    }

    .product-card .food-header {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        column-gap: 6px;
    }

    .product-card .vegetarian {
        transform: scale(.75);
        transform-origin: left center;
    }

    .product-card .food-name {
        font-size: 22px;
        letter-spacing: 0;
    }

    .product-card .price {
        font-size: 22px;
    }

    .product-card .description {
        min-height: auto;
        font-size: 17px;
    }

    .product-card .image-holder {
        height: 280px;
    }

    #scroll-to-top {
        right: 15px;
        bottom: 15px;
        width: 40px;
        height: 40px;
    }
}

/* ========================================================= SMALL MOBILE (≤480px) ========================================================= */

@media (max-width: 480px) {
    .restaurant-title h1 {
        font-size: 25px;
    }

    .restaurant-title .line {
        width: 220px;
    }

    .menu-category {
        min-height: 46px;
        padding: 9px 6px;
        font-size: 12px;
    }

    .heading-line {
        max-width: 120px;
    }

    .category-title {
        font-size: 20px;
    }

    .category-subtitle {
        font-size: 15px;
    }

    .menu-content {
        padding: 0 15px;
    }

    .menu-item-name {
        font-size: 15px;
    }

    .menu-item-price {
        font-size: 14px;
    }
}

/* ========================================================= EXTRA SMALL MOBILE (≤400px) ========================================================= */

@media (max-width: 400px) {
    .menu-content {
        padding: 0 12px;
    }

    .product-card {
        padding: 18px 12px 20px;
    }

        .product-card .food-header {
            grid-template-columns: 35px minmax(0, 1fr) auto;
            column-gap: 4px;
        }

        .product-card .vegetarian {
            width: 24px;
            height: 24px;
            transform: scale(.6);
        }

        .product-card .leaf-one {
            width: 16px;
            height: 20px;
        }

        .product-card .leaf-two {
            width: 14px;
            height: 18px;
        }

        .product-card .leaf-stem {
            height: 20px;
            left: 12px;
        }

        .product-card .food-name {
            font-size: 18px;
        }

        .product-card .price {
            font-size: 19px;
        }

        .product-card .description {
            font-size: 15px;
        }

        .product-card .image-holder {
            height: 220px;
        }
}

/* ========================================================= VERY SMALL MOBILE (≤360px) ========================================================= */

@media (max-width: 360px) {
    .menu-category {
        font-size: 11px;
    }

    .category-title {
        font-size: 18px;
    }

    .category-subtitle {
        font-size: 14px;
    }

    .leaf {
        font-size: 19px;
    }

    .heading-line {
        max-width: 25px;
    }
}
