
/* START restaurant categories nav */
.active-category {
    background-color: var(--mb-colour) !important;
    color: #ffffff !important;
}
.food-menu-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin: 0 auto;
    background-color: #f7f7f7;
    padding: 5px 0;
}

@media (max-width: 991.98px) {
    .food-menu-wrapper {
        padding-top: 7px !important;
        padding-bottom: 0px !important;
    }
    .food-menu-wrapper-shadow {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    }
}

.food-menu-cat-box {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    white-space: nowrap;
}

/* Hide Scrollbar on desktop only (categories wrap, no scroll needed) */
@media (min-width: 992px) {
    .food-menu-cat-box {
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }

    .food-menu-cat-box::-webkit-scrollbar {
        display: none; /* WebKit-based browsers */
    }
}

/* Show styled scrollbar on tablet */
@media (min-width: 768px) and (max-width: 991.98px) {
    .food-menu-cat-box {
        scrollbar-width: thin;
        scrollbar-color: var(--mb-colour) #f1f1f1;
    }

    .food-menu-cat-box::-webkit-scrollbar {
        height: 6px;
    }

    .food-menu-cat-box::-webkit-scrollbar-thumb {
        background-color: var(--mb-colour);
        border-radius: 4px;
    }

    .food-menu-cat-box::-webkit-scrollbar-track {
        background-color: #f1f1f1;
    }
}

/* Show and Style Scrollbar on Mobile Devices */
@media (max-width: 767px) {
    /* For Firefox */
    .food-menu-cat-box {
        scrollbar-width: thin; /* Makes the scrollbar thinner in Firefox */
        scrollbar-color: var(--mb-colour) #f1f1f1; /* Thumb color: var(--mb-colour), Track color: #f1f1f1 */
        position: relative; /* Enables positioning for additional effects */
    }

    /* For WebKit-based browsers (Chrome, Safari, Edge) */
    .food-menu-cat-box::-webkit-scrollbar {
        height: 6px; /* Horizontal scrollbar thickness (height) */
    }

    .food-menu-cat-box::-webkit-scrollbar-thumb {
        background-color: var(--mb-colour); /* Thumb color */
        border-radius: 4px; /* Rounded corners for the thumb */
    }

    .food-menu-cat-box::-webkit-scrollbar-track {
        background-color: #f1f1f1; /* Track background color */
    }
}


    .food-menu-cat {
        margin-right: 5px;
        overflow: visible;
        border-radius: 12px;
        display: inline-block;
        font-family: var(--title-font-family);
        font-weight: 600;
        font-size: 16px;
        line-height: 22px;
        font-style: normal;
        letter-spacing: 0em;
        padding: 10px 15px;
        position: relative;
        text-align: center;
        background-color: white;
        z-index: 0;
        -webkit-transition: all 0.4s ease;
        -moz-transition: all 0.4s ease;
        -ms-transition: all 0.4s ease;
        -o-transition: all 0.4s ease;
        transition: all 0.4s ease;
        white-space: nowrap; /* Ensure the text doesn't wrap */
    }

    a.food-menu-cat:hover{
        color:initial;
    }


    .hidden {
        display: none !important;
    }

    /* Scrollbar for mobile touch-scroll */
@media (max-width: 991.98px) {
    .food-menu-cat-box {
        padding-bottom: 5px;
        scrollbar-width: thin; /* Firefox */
        -ms-overflow-style: auto; /* IE and Edge */
    }

        .food-menu-cat-box::-webkit-scrollbar {
            display: block; /* Chrome, Safari, Opera */
            height: 8px; /* Adjust height for horizontal scrollbar */
        }

        .food-menu-cat-box::-webkit-scrollbar-thumb {
            background-color: #888; /* Scrollbar color */
            border-radius: 10px; /* Rounded corners for the scrollbar */
        }

        .food-menu-cat-box::-webkit-scrollbar-track {
            background-color: #f1f1f1; /* Track color */
        }
}
    /* END restaurant categories nav */


/* START restaurant category list items */
.food-item-container {
    display: flex;
}

.food-item-image-container {
    margin-right: 10px;
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 12px;
    flex-shrink: 0;
}

    .food-item-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.food-item-name {
    text-decoration: none !important;
}

    .food-item-name span {
        background-color: #EB6753;
        border: 1px solid #EB6753;
        border-radius: 8px;
        color: #ffffff;
        padding: 0 5px;
        font-size: 12px;
    }

.add-food-to-basket-btn {
    background-color: #F7F7F7 !important;
    border-radius: 50% !important;
    line-height: 14px !important;
    padding: 10px !important;
}


@media (max-width: 600px) {
    .food-item-image-container {
        width: 80px;
        height: 80px;
    }
}
/* END restaurant category list items */

/* START Menu Items Grid Layout */
.food-digital-menu-section > div {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, 135px);
    gap: 10px;
}

/* Ensure articles don't break the grid */
.food-digital-menu-section article.listing-style1 {
    width: 135px;
    display: flex !important;
    flex-direction: column;
    cursor: pointer;
    float: none !important;
    clear: none !important;
}

.food-digital-menu-section .list-thumb {
    position: relative;
    flex-shrink: 0;
}

.food-digital-menu-section .list-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-shadow: 0px -3px 4px rgba(24, 26, 32, 0.07);
}

.digital-menu-discount-tag {
    line-height: initial;
    background-color: #EB6753;
    border-radius: 6px;
    top: 10px;
    color: #ffffff;
    font-family: var(--title-font-family);
    font-weight: 600;
    font-size: 14px;
    left: 5px;
    padding: 3px 10px;
    position: absolute;
}

.digital-menu-info-tag {
    line-height: initial;
    background-color: var(--mb-colour);
    border-radius: 16px;
    top: 10px;
    color: #ffffff;
    font-family: var(--title-font-family);
    font-weight: 600;
    font-size: 14px;
    right: 5px;
    padding: 3px 12px;
    position: absolute;
}

.digital-menu-price-container {
    line-height: initial;
    background-color: #ffffff;
    border-radius: 6px;
    bottom: 10px;
    color: var(--headings-color);
    font-family: var(--title-font-family);
    font-weight: 600;
    font-size: 14px;
    left: 5px;
    padding: 3px 10px;
    position: absolute;
}

.food-digital-menu-section .food-item-container {
    flex: 1 1 auto;
}

/* Ensure modals don't interfere with grid layout */
.food-digital-menu-section .advance-feature-modal {
    display: contents;
}

/* Mobile - full width */
@media (max-width: 767px) {
    .food-digital-menu-section article.listing-style1 {
        width: 100%;
        height: 100%;
    }

    .food-digital-menu-section > div {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
}

/* END Menu Items Grid Layout */

/* Desktop price (below name) and description: hidden by default (mobile) */
.digital-menu-price-below {
    display: none;
}

.digital-menu-item-description {
    display: none;
}

/* ============================================
   DESKTOP (>=992px) — Categories wrap, no slider
   ============================================ */
@media (min-width: 992px) {
    /* Allow position:sticky by removing overflow:hidden from layout ancestor */
    .wrapper.ovh {
        overflow: visible !important;
    }

    /* Sticky categories — CSS sticky respects container width */
    .food-menu-wrapper {
        background-color:#ffffff !important;
        padding:10px 0px;
        position: sticky !important;
        top: 0 !important;
        width: auto !important;
        height: auto !important;
        z-index: 1000 !important;
        box-shadow: rgba(0, 0, 0, 0.09) 0px 4px 6px -2px, rgba(0, 0, 0, 0.04) 0px 2px 4px -2px;
        margin-bottom: 40px !important;
    }

    .food-menu-cat-box {
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 4px;
    }

    .food-menu-cat {
        font-size: 14px;
        background-color: #f7f7f7;
        color: var(--headings-color);
        padding: 5px 10px;
        margin:0px;
    }

    .active-category {
        background-color: var(--mb-colour) !important;
        color: #ffffff !important;
    }
}

/* ============================================
   DESKTOP (>=992px) — Modern card layout
   4 per row, image → name → description → price
   ============================================ */
@media (min-width: 992px) {
    /* 4 items per row, fill available space */
    .food-digital-menu-section > div {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px;
    }

    .food-digital-menu-section article.listing-style1 {
        width: 100%;
        border-radius: 12px;
        overflow: hidden;
        background-color: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .food-digital-menu-section article.listing-style1:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    }

    /* Image fills card width, landscape aspect ratio, rounded top corners */
    .food-digital-menu-section .list-thumb img {
        border-radius: 12px 12px 0 0;
        aspect-ratio: 1.5 / 1 !important;
    }

    /* Hide the overlay price on desktop */
    .food-digital-menu-section .list-thumb .digital-menu-price-container {
        display: none;
    }

    /* Show the price below name+description on desktop */
    .food-digital-menu-section .digital-menu-price-below {
        display: block;
        font-family: var(--title-font-family);
        font-weight: 600;
        font-size: 16px;
        color: var(--headings-color);
        margin-top: 6px;
    }

    /* Strikethrough full price inline */
    .food-digital-menu-section .digital-menu-price-below .d-flex {
        display: inline-flex !important;
        margin-left: 6px;
    }

    /* Show description on desktop, clamped to 2 lines */
    .food-digital-menu-section .digital-menu-item-description {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 13px;
        line-height: 1.4;
        color: #6c757d;
        margin-top: 4px;
    }

    /* Content area — no inner shadow, card has outer shadow */
    .food-digital-menu-section .list-content {
        box-shadow: none;
        padding: 8px 12px 12px;
    }

    /* Bigger, bolder item name */
    .food-digital-menu-section .food-item-name {
        font-size: 15px;
        line-height: 1.3;
    }
}

/* ============================================
   TABLET (768px - 991px) — 3 per row, slightly bigger
   ============================================ */
@media (min-width: 768px) and (max-width: 991.98px) {
    .food-digital-menu-section > div {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px;
    }

    .food-digital-menu-section article.listing-style1 {
        width: 100%;
    }
}
