/* Mobile Optimizations for Menu Page */

/* Desktop - Price styling */
.special-menu-number span small {
    font-size: 12px;
    font-weight: 400;
    color: #888;
    margin-right: 3px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Better Focus States for Accessibility */
.sticky-tabs-wrapper .nav-link:focus,
.branch-tab:focus {
    outline: 2px solid #c5a47e;
    outline-offset: 2px;
}

/* Desktop - Sticky tabs */
@media only screen and (min-width: 769px) {
    .sticky-tabs-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 130px !important;
        z-index: 100 !important;
        background: #fff !important;
        padding-top: 20px;
        padding-bottom: 15px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
        width: 100%;
    }

    .sticky-tabs-wrapper .special-menu-tabs {
        margin-bottom: 0;
    }

    .sticky-tabs-wrapper .nav-tabs {
        margin-bottom: 0;
    }
}

/* Category Tabs - Mobile Friendly */
@media only screen and (max-width: 768px) {
    .special-menu-area {
        padding: 50px 0 !important;
    }

    .section-title {
        margin-bottom: 30px;
    }

    .section-title h2 {
        font-size: 24px !important;
        line-height: 1.3;
    }

    .section-title .top-title {
        font-size: 14px;
    }

    /* Category Tabs Wrapper - Mobile */
    .sticky-tabs-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 80px !important;
        z-index: 100 !important;
        background: #fff !important;
        padding-top: 15px;
        padding-bottom: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        width: 100%;
    }

    /* Category Tabs - Horizontal Scrollable */
    .sticky-tabs-wrapper .special-menu-tabs {
        margin-bottom: 0;
    }

    .sticky-tabs-wrapper .nav-tabs {
        border: none;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        margin-bottom: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        padding-bottom: 5px;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Hide scrollbar for Chrome, Safari and Opera */
    .sticky-tabs-wrapper .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .sticky-tabs-wrapper .nav-tabs .nav-item {
        margin: 0;
        flex-shrink: 0;
    }

    .sticky-tabs-wrapper .nav-tabs .nav-link {
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 20px;
        border: 2px solid #e9ecef;
        background: #f8f9fa;
        color: #6c757d;
        margin: 0;
        white-space: nowrap;
        transition: all 0.3s ease;
    }

    .sticky-tabs-wrapper .nav-tabs .nav-link.active {
        background: linear-gradient(135deg, #c5a47e 0%, #a8875f 100%);
        border-color: #c5a47e;
        color: #fff;
        box-shadow: 0 3px 10px rgba(197,164,126,0.3);
    }

    /* Scroll hint indicators (fade at edges) */
    .sticky-tabs-wrapper {
        position: relative;
    }

    /* Right fade indicator */
    .sticky-tabs-wrapper::after {
        content: '';
        position: absolute;
        top: 15px;
        right: 0;
        width: 30px;
        height: 54px;
        background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
        pointer-events: none;
        z-index: 2;
    }

    /* Left fade indicator */
    .sticky-tabs-wrapper::before {
        content: '';
        position: absolute;
        top: 15px;
        left: 0;
        width: 30px;
        height: 54px;
        background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
        pointer-events: none;
        z-index: 2;
    }

    /* Tab Content spacing */
    .special-menu-tabs .tab-content {
        padding-top: 20px;
    }

    /* Menu Item Cards */
    .special-card {
        margin-bottom: 20px;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        background: #fff;
    }

    .special-card .row {
        margin: 0;
        flex-wrap: nowrap;
        align-items: center;
    }

    /* Image Column - Better sizing */
    .special-card .col-4 {
        padding-right: 10px;
        padding-left: 0;
    }

    .special-menu-img {
        border-radius: 8px;
        overflow: hidden;
    }

    .special-menu-img img {
        width: 100%;
        height: 80px;
        object-fit: cover;
        border-radius: 8px;
    }

    /* Text Content - Better readability */
    .special-card .col-6 {
        padding-right: 5px;
        padding-left: 10px;
    }

    .special-menu-text h3 {
        font-size: 16px !important;
        line-height: 1.4;
        margin-bottom: 5px;
        font-weight: 600;
    }

    .special-menu-text p {
        font-size: 12px;
        line-height: 1.5;
        margin-bottom: 0;
        color: #6c757d;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Price Column - Fix width issue */
    .special-card .col-2 {
        padding-left: 5px;
        padding-right: 0;
        flex: 0 0 16.666667%;
        width: 16.666667%;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .special-menu-number {
        text-align: right;
    }

    .special-menu-number span {
        font-size: 16px !important;
        font-weight: 700;
        color: #c5a47e;
        white-space: nowrap;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
    }

    .special-menu-number span small {
        font-size: 11px;
        font-weight: 400;
        color: #6c757d;
    }

    /* Empty State */
    .text-center p {
        font-size: 14px;
        padding: 30px 20px;
    }
}

/* Small Mobile Devices */
@media only screen and (max-width: 480px) {
    .special-menu-area {
        padding: 30px 0 !important;
    }

    .section-title h2 {
        font-size: 20px !important;
    }

    /* Smaller category tabs - keep horizontal scroll & sticky */
    .sticky-tabs-wrapper {
        padding-top: 12px;
        padding-bottom: 8px;
    }

    .sticky-tabs-wrapper .nav-tabs {
        gap: 6px;
    }

    .sticky-tabs-wrapper .nav-tabs .nav-link {
        padding: 8px 16px;
        font-size: 13px;
    }

    .sticky-tabs-wrapper::after,
    .sticky-tabs-wrapper::before {
        top: 12px;
        height: 46px;
    }

    .special-menu-tabs .tab-content {
        padding-top: 15px;
    }

    /* Menu Cards - More compact */
    .special-card {
        padding: 12px;
        margin-bottom: 15px;
    }

    .special-menu-img img {
        height: 70px;
    }

    .special-menu-text h3 {
        font-size: 15px !important;
    }

    .special-menu-text p {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }

    .special-menu-number span {
        font-size: 15px !important;
    }

    .special-menu-number span small {
        font-size: 10px;
    }
}

/* Single Column Layout for Very Small Screens */
@media only screen and (max-width: 360px) {
    .special-card .row {
        display: flex;
        flex-direction: column;
    }

    .special-card .col-4,
    .special-card .col-6,
    .special-card .col-2 {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: 10px;
    }

    .special-menu-img {
        text-align: center;
    }

    .special-menu-img img {
        width: 100%;
        max-width: 200px;
        height: 150px;
        margin: 0 auto;
    }

    .special-menu-text {
        text-align: center;
    }

    .special-menu-text h3 {
        font-size: 16px !important;
    }

    .special-menu-text p {
        -webkit-line-clamp: 3;
    }

    .special-menu-number {
        text-align: center;
    }

    .special-menu-number span {
        font-size: 18px !important;
        display: inline-flex;
        flex-direction: row;
        gap: 4px;
        align-items: center;
        padding: 8px 16px;
        background: #f8f9fa;
        border-radius: 20px;
    }

    .special-menu-number span small {
        font-size: 12px;
    }
}

/* Full Width Menu Items on Mobile */
@media only screen and (max-width: 768px) {
    .special-menu-area .col-lg-6.col-md-6 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
}

/* Fix Page Banner on Mobile */
@media only screen and (max-width: 768px) {
    .pag-banner-area {
        padding: 80px 0 60px;
    }

    .page-banner-content h1 {
        font-size: 28px;
    }

    .page-banner-content ul li {
        font-size: 14px;
    }
}

/* Better Touch Targets */
@media only screen and (max-width: 768px) {
    .special-card a {
        display: flex;
        min-height: 44px;
        align-items: center;
    }

    .special-menu-tabs .nav-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
