/* ============================================
   KENES FOOD FRONTEND - MAIN STYLES
   Inspired by Habit Burger Website
   ============================================ */

/* ===== ROOT VARIABLES ===== */
:root {
    --primary: #62411e;
    --primary-rgb: 98, 65, 30;
    --primary-light: #8b6337;
    --primary-dark: #442d15;
    --primary-darker: #2d1e0e;
    --primary-color: #62411e;
    --secondary-color: #d4a574;
    --accent-color: #c9a882;
    --dark-color: #1a1a1a;
    --light-color: #faf9f7;
    --light-bg: #f5f3f0;
    --text-color: #2c2c2c;
    --text-light: #666666;
    --text-on-primary: #ffffff;
    --text-on-light: #2c2c2c;
    --border-color: rgba(98, 65, 30, 0.15);
    --border-light: rgba(98, 65, 30, 0.08);
    --white: #ffffff;
    --font-primary: 'Poppins', sans-serif;
    --font-extra-bold: 800;
    --font-medium: 500;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 2px 10px rgba(98, 65, 30, 0.08);
    --shadow-lg: 0 8px 30px rgba(98, 65, 30, 0.12);
    --shadow-xl: 0 12px 40px rgba(98, 65, 30, 0.15);
    --gradient-primary: linear-gradient(135deg, #62411e 0%, #442d15 100%);
    --gradient-light: linear-gradient(135deg, #8b6337 0%, #62411e 100%);
    --gradient-bg-soft: linear-gradient(
        180deg,
        #faf9f7 0%,
        #f5f3f0 50%,
        #f0ede8 100%
    );
    --gradient-bg-section: linear-gradient(
        180deg,
        rgba(98, 65, 30, 0.02) 0%,
        rgba(98, 65, 30, 0.05) 100%
    );
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: var(--font-primary);
    font-weight: var(--font-medium);
}

body {
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    background: var(--gradient-bg-soft);
    min-height: 100vh;
}

/* Ensure all text elements use Poppins */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
button,
input,
textarea,
select,
label,
li,
td,
th,
div {
    font-family: var(--font-primary);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

/* ===== HEADER STYLES ===== */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(98, 65, 30, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: var(--font-primary);
    border-bottom: 1px solid var(--border-light);
}

.site-header * {
    font-family: var(--font-primary);
}

/* Ensure all header text uses ExtraBold */
.site-header a,
.site-header button,
.site-header .menu-item > a,
.site-header .menu-item > button,
.site-header .dropdwn_dwnar,
.site-header .brand-name,
.site-header .cta,
.site-header .cta_ani,
.site-header .ani_txt,
.site-header .nav_cta,
.site-header .habit_oo,
.site-header .header_order_now {
    font-weight: var(--font-extra-bold);
}

.screen-reader-shortcut {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.screen-reader-shortcut:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 10px;
    background: var(--primary);
    color: var(--white);
    z-index: 10000;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

#primary_nav {
    padding: 15px 0;
}

#primary_nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#main_logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

#main_logo img {
    max-height: 50px;
    width: auto;
}

.nav_links {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.primary_menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 20px;
}

.primary_menu .menu-item {
    position: relative;
}

.primary_menu .menu-item > a,
.primary_menu .menu-item > button {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    font-family: var(--font-primary);
    font-weight: var(--font-extra-bold);
    transition: var(--transition);
    border: none;
    background: none;
    cursor: pointer;
}

.primary_menu .menu-item > a:hover,
.primary_menu .menu-item > button:hover {
    color: var(--primary);
}

.dropdown_wrap .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown_wrap:hover .sub-menu,
.dropdown_wrap button[aria-expanded='true'] + .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu .menu-item {
    display: block;
}

.sub-menu .menu-item a {
    padding: 10px 20px;
    display: block;
    color: var(--text-color);
    font-size: 14px;
    font-family: var(--font-primary);
    font-weight: var(--font-extra-bold);
}

.sub-menu .menu-item a:hover {
    background: rgba(98, 65, 30, 0.05);
    color: var(--primary);
}

.log_in a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 15px;
    font-family: var(--font-primary);
    font-weight: var(--font-extra-bold);
}

.log_in svg {
    width: 24px;
    height: 24px;
}

.log_in .red_circ_bknd {
    fill: var(--primary);
}

.log_in .login_ico_fore {
    fill: var(--white);
}

.order_online .cta {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: var(--font-extra-bold);
    display: inline-flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(98, 65, 30, 0.2);
}

.order_online .cta:hover {
    background: var(--gradient-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(98, 65, 30, 0.3);
}

.cta_ani {
    position: relative;
}

.cta_ani .ani_txt {
    position: relative;
    z-index: 2;
    font-family: var(--font-primary);
    font-weight: var(--font-extra-bold);
}

.cta_ani .bknd_red,
.cta_ani .bknd_white {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: var(--transition);
}

.cta_ani .bknd_red {
    background: linear-gradient(
        135deg,
        var(--primary, #dc3545) 0%,
        #c82333 100%
    );
    z-index: 1;
}

.cta_ani .bknd_white {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    transform: translateX(-100%);
    z-index: 1;
}

.cta_ani:hover .bknd_white {
    transform: translateX(0);
}

.cta_ani:hover .ani_txt {
    color: var(--primary, #dc3545);
}

/* Ensure all buttons with cta_ani have consistent styling */
.cta.cta_ani,
button.cta.cta_ani,
a.cta.cta_ani {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: var(--font-extra-bold);
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 3px 12px rgba(98, 65, 30, 0.15);
    background: linear-gradient(
        135deg,
        var(--primary, #dc3545) 0%,
        #c82333 100%
    );
    color: var(--white, #ffffff);
}

.cta.cta_ani:hover,
button.cta.cta_ani:hover,
a.cta.cta_ani:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(98, 65, 30, 0.3);
}

/* Override for specific button classes to work with cta_ani */
.btn-order-submit.cta.cta_ani,
.btn-view-all.cta.cta_ani,
.btn-back.cta.cta_ani,
.btn-back-home.cta.cta_ani,
.btn-map.cta.cta_ani,
.map-link-btn-modern.cta.cta_ani,
.btn-order-item.cta.cta_ani,
.btn-skip-category.cta.cta_ani,
.product-detail-popup-btn.cta.cta_ani {
    position: relative;
    overflow: hidden;
}

/* Ensure ani_txt is properly styled in all contexts */
.cta.cta_ani .ani_txt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Ensure icons inside ani_txt are properly aligned */
.cta.cta_ani .ani_txt i,
.cta.cta_ani .ani_txt svg {
    display: inline-block;
    vertical-align: middle;
}

/* Mobile Header */
#mobile_header {
    display: none;
}

@media (max-width: 991px) {
    #primary_nav {
        display: none;
    }

    #mobile_header {
        display: block;
    }

    #mob_hdr_group {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px;
    }

    .toggle_wrap {
        cursor: pointer;
    }

    #toggle {
        width: 30px;
        height: 30px;
        position: relative;
        cursor: pointer;
    }

    .toggle_icon {
        position: absolute;
        width: 30px;
        height: 3px;
        background: var(--text-color);
        transition: var(--transition);
        top: 50%;
        left: 0;
        transform: translateY(-50%);
    }

    .toggle_icon:first-child {
        transform: translateY(-9px);
    }

    .toggle_icon:last-child {
        transform: translateY(9px);
    }

    .toggle_icon.show {
        opacity: 1;
    }

    .toggle_icon:not(.show) {
        opacity: 0;
    }

    #toggle_menu.show + #close_menu:not(.show) {
        opacity: 0;
    }

    #close_menu.show {
        transform: translateY(-50%) rotate(45deg);
    }

    #close_menu.show ~ #toggle_menu {
        opacity: 0;
    }

    .mobile_logo img {
        max-height: 40px;
    }

    .mobile_logo .brand-name {
        font-family: var(--font-primary);
        font-weight: var(--font-extra-bold);
    }

    .login_loc {
        display: flex;
        gap: 15px;
        align-items: center;
    }

    .login_loc a {
        font-family: var(--font-primary);
        font-weight: var(--font-extra-bold);
    }

    .login_loc svg {
        width: 24px;
        height: 24px;
        fill: var(--text-color);
    }

    #mobile_menu {
        display: none;
        padding: 20px;
        background: var(--white);
        box-shadow: var(--shadow);
    }

    #mobile_menu.active {
        display: block;
    }

    #mobile_menu .primary_menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    #mobile_menu .primary_menu .menu-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    #mobile_menu .primary_menu .menu-item > a,
    #mobile_menu .primary_menu .menu-item > button {
        width: 100%;
        text-align: left;
        padding: 15px;
        font-family: var(--font-primary);
        font-weight: var(--font-extra-bold);
    }

    #mobile_menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--light-color);
        display: none;
    }

    #mobile_menu .sub-menu a {
        font-family: var(--font-primary);
        font-weight: var(--font-extra-bold);
    }

    #mobile_menu .dropdown_wrap.active .sub-menu {
        display: block;
    }

    .social_row {
        display: flex;
        gap: 15px;
        margin-top: 20px;
        justify-content: center;
    }

    .social_icon {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .social_icon svg {
        width: 100%;
        height: 100%;
    }

    .soc_0 {
        fill: var(--light-color);
    }

    .red_circ_bknd {
        fill: var(--primary);
    }

    .soc_1 {
        fill: var(--white);
    }
}

.header-top-bar {
    background: var(--dark-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}

.header-contact .contact-link {
    color: var(--white);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-contact .contact-link:hover {
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-link {
    color: var(--white);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-link:hover {
    color: var(--secondary-color);
}

.btn-order-now {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(98, 65, 30, 0.2);
}

.btn-order-now:hover {
    background: var(--gradient-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(98, 65, 30, 0.3);
}

/* Navigation */
.navbar {
    padding: 15px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 24px;
    color: var(--dark-color);
}

.logo-img {
    height: 50px;
    width: auto;
}

.brand-name {
    font-size: 24px;
    font-family: var(--font-primary);
    font-weight: var(--font-extra-bold);
}

.navbar-nav .nav-link {
    color: var(--text-color);
    font-family: var(--font-primary);
    font-weight: var(--font-medium);
    padding: 10px 15px;
    margin: 0 5px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--primary);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 10px 0;
}

.dropdown-item {
    padding: 10px 20px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: rgba(98, 65, 30, 0.05);
    color: var(--primary);
}

.btn-order {
    background: var(--gradient-primary);
    color: var(--text-on-primary);
    padding: 14px 32px;
    border-radius: 30px;
    font-family: var(--font-primary);
    font-weight: var(--font-extra-bold);
    border: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(98, 65, 30, 0.2);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-order::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-light);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.btn-order > * {
    position: relative;
    z-index: 1;
}

.btn-order:hover {
    background: var(--gradient-light);
    color: var(--text-on-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(98, 65, 30, 0.35);
}

.btn-order:hover::before {
    left: 0;
}

.btn-order:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(98, 65, 30, 0.25);
}

.find-location-bar {
    background: var(--light-color);
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
}

.find-location-link,
.login-link {
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.find-location-link:hover,
.login-link:hover {
    color: var(--primary);
}

/* ===== HERO SECTION ===== */
/* Hero section styles moved to public/css/frontend/sections/hero.css */

/* ===== ORDER SECTION ===== */
/* Order section styles moved to public/css/frontend/sections/order-section.css */

/* ===== SECTIONS ===== */
section {
    padding: 80px 0;
    font-family: var(--font-primary);
    position: relative;
}

section * {
    font-family: var(--font-primary);
}

/* Headings use ExtraBold */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-extra-bold);
}

/* Body text uses Medium */
p,
span,
div,
a,
li,
td,
th,
label {
    font-weight: var(--font-medium);
}

/* Common section title style */
.section-title {
    font-size: 42px;
    font-family: var(--font-primary);
    font-weight: var(--font-extra-bold);
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* ===== MENU CATEGORIES ===== */
/* Menu categories styles moved to public/css/frontend/sections/menu-categories.css */

/* ===== FEATURED ITEMS ===== */
/* Featured items styles moved to public/css/frontend/sections/featured-items.css */

/* ===== PROMOTIONS ===== */
/* Promotions styles moved to public/css/frontend/sections/promotions.css */

/* ===== COMMUNITY SECTION ===== */
/* Community section styles moved to public/css/frontend/sections/community.css */

/* ===== MOBILE APP SECTION ===== */
/* Mobile app section styles moved to public/css/frontend/sections/mobile-app.css */

/* ===== FOOTER ===== */
footer {
    background: #000000;
    color: #ffffff;
    padding: 50px 0 15px;
    font-family: var(--font-primary);
    position: relative;
    overflow: hidden;
    margin-top: 40px;
}

/* Ensure mobile bottom nav is not affected by footer overflow */
footer .mobile-bottom-nav {
    position: fixed !important;
    overflow: visible !important;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
}

footer * {
    font-family: var(--font-primary);
}

/* Footer Main Content */
.footer-main-content {
    margin-bottom: 25px;
}

/* Footer Grid */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Footer Columns */
.footer-col {
    min-width: 0;
}

.footer-col-logo {
    grid-column: span 1;
}

.footer-col-menu {
    grid-column: span 1;
}

.footer-col-apps {
    grid-column: span 1;
}

/* Footer Logo */
.footer-logo {
    display: inline-block;
    margin-bottom: 12px;
}

.footer-logo img {
    max-width: 90px;
    height: auto;
    display: block;
}

.footer-logo-text {
    display: inline-block;
    font-size: 18px;
    font-weight: var(--font-bold);
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.footer-logo-text:hover {
    color: var(--primary-color, #dc3545);
}

/* Footer Description */
.footer-desc {
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 14px;
    max-width: 260px;
}

/* Footer Contact */
.footer-contact {
    margin-bottom: 14px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.5;
}

.footer-contact-item:last-child {
    margin-bottom: 0;
}

.footer-contact-item svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact-item a:hover {
    color: var(--primary-color, #dc3545);
}

.footer-contact-item span {
    color: rgba(255, 255, 255, 0.7);
}

/* Footer Social */
.footer-social {
    margin-top: 16px;
}

.footer-social-label {
    font-size: 12px;
    font-weight: var(--font-medium);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
}

.social-icon svg {
    width: 32px;
    height: 32px;
}

.social-icon .soc_0 {
    fill: rgba(255, 255, 255, 0.1);
}

.social-icon .red_circ_bknd {
    fill: rgba(255, 255, 255, 0.05);
}

.social-icon .soc_1 {
    fill: rgba(255, 255, 255, 0.8);
    transition: fill 0.3s ease;
}

.social-icon:hover .soc_1 {
    fill: var(--primary-color, #dc3545);
}

/* Footer Menu Title */
.footer-menu-title {
    font-size: 15px;
    font-weight: var(--font-bold);
    color: #ffffff;
    margin-bottom: 14px;
    line-height: 1.3;
}

/* Footer Menu List */
.footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu-list li {
    margin-bottom: 8px;
}

.footer-menu-list li:last-child {
    margin-bottom: 0;
}

.footer-menu-list a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    line-height: 1.5;
}

.footer-menu-list a:hover {
    color: var(--primary-color, #dc3545);
    padding-left: 4px;
}

/* Footer Apps */
.footer-apps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-app-link {
    display: inline-block;
    transition: transform 0.3s ease;
    max-width: 130px;
}

.footer-app-link:hover {
    transform: translateY(-2px);
}

.footer-app-link svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
    margin-top: 25px;
}

.footer-copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.copyright-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    margin: 0;
    line-height: 1.5;
}

/* Footer Legal */
.footer-legal {
    margin-top: 0;
}

.footer-legal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-legal-list li {
    position: relative;
}

.footer-legal-list li:not(:last-child)::after {
    content: '•';
    position: absolute;
    right: -8px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 9px;
}

.footer-legal-list a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal-list a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Footer Menu Grid */
.footer-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    list-style: none;
    padding: 0;
    margin: 0;
}

#footer_menu .nav_menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    list-style: none;
    padding: 0;
    margin: 0;
}

#footer_menu .menu-item {
    flex: 1 1 200px;
}

#footer_menu .menu-item > a,
#footer_menu .menu-item > button {
    color: var(--white);
    text-decoration: none;
    font-weight: var(--font-extra-bold);
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

#footer_menu .menu-item > a:hover,
#footer_menu .menu-item > button:hover {
    color: var(--secondary-color);
    transform: translateX(4px);
}

#footer_menu .menu-item > a i,
#footer_menu .menu-item > button i {
    font-size: 18px;
    opacity: 0.9;
}

.subexpander {
    position: relative;
    width: 100%;
    justify-content: space-between;
}

.subexpander .expand-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.subexpander[aria-expanded='true'] .expand-icon {
    transform: rotate(180deg);
}

#footer_menu .sub-menu {
    list-style: none;
    padding: 12px 0 0 24px;
    margin: 0;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#footer_menu .menu-item-has-children.active .sub-menu {
    display: block;
}

#footer_menu .sub-menu .menu-item {
    margin-bottom: 10px;
}

#footer_menu .sub-menu .menu-item:last-child {
    margin-bottom: 0;
}

#footer_menu .sub-menu a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-weight: var(--font-medium);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    position: relative;
}

#footer_menu .sub-menu a::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: var(--transition);
}

#footer_menu .sub-menu a:hover {
    color: var(--white);
    padding-left: 4px;
}

#footer_menu .sub-menu a:hover::before {
    background: var(--secondary-color);
    width: 6px;
    height: 6px;
}

#footer_menu .sub-menu a i {
    font-size: 14px;
    opacity: 0.8;
}

/* Footer App Section */
.footer-app-section {
    margin: 60px 0;
    text-align: center;
}

.footer-section-title {
    font-size: 24px;
    font-weight: var(--font-extra-bold);
    margin-bottom: 12px;
    color: var(--white);
    line-height: 1.3;
}

.footer-section-subtitle {
    font-size: 15px;
    font-weight: var(--font-medium);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
    line-height: 1.5;
}

#app_links {
    margin: 60px 0;
    text-align: center;
}

#app_links h2 {
    font-size: 24px;
    font-weight: var(--font-extra-bold);
    margin-bottom: 12px;
    color: var(--white);
}

.app_links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.app-link {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1);
}

.app-link:hover {
    transform: translateY(-4px);
    filter: brightness(1.1);
}

.app-link:active {
    transform: translateY(-2px);
}

.app_links svg {
    height: 54px;
    width: auto;
    display: block;
}

/* Footer Social Section */
.footer-social-section {
    margin: 60px 0;
    text-align: center;
}

#footer_social {
    margin: 60px 0;
    text-align: center;
}

#footer_social h2 {
    font-size: 24px;
    font-weight: var(--font-extra-bold);
    margin-bottom: 12px;
    color: var(--white);
}

#footer_social .social_row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.social_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.social_icon:hover {
    transform: translateY(-4px) scale(1.05);
}

.social_icon:active {
    transform: translateY(-2px) scale(1.02);
}

/* Footer Join Section */
.footer-join-section {
    margin: 60px 0;
    padding: 50px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.join-content {
    max-width: 600px;
    margin: 0 auto;
}

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

.join-subtitle {
    display: block;
    font-size: 16px;
    font-weight: var(--font-medium);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.join-main-title {
    display: block;
    font-size: 28px;
    font-weight: var(--font-extra-bold);
    color: var(--white);
    line-height: 1.3;
}

.join-button {
    margin-top: 10px;
}

#join {
    margin: 60px 0;
    text-align: center;
}

#join h2 {
    font-size: 28px;
    font-weight: var(--font-extra-bold);
    margin-bottom: 30px;
    color: var(--white);
}

#join .lwr {
    display: block;
    font-size: 16px;
    font-weight: var(--font-medium);
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

#join .nowrp {
    display: block;
    font-size: 28px;
    font-weight: var(--font-extra-bold);
    color: var(--white);
}

.accolade_badge {
    text-align: center;
    margin: 40px 0;
}

.accolade_badge img {
    max-width: 200px;
    height: auto;
}

.accolade_badge .portrait {
    display: block;
}

.accolade_badge .landscape {
    display: none;
}

@media (min-width: 768px) {
    .accolade_badge .portrait {
        display: none;
    }

    .accolade_badge .landscape {
        display: block;
    }
}

/* Footer Copyright */
.footer-copyright {
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    margin-top: 40px;
}

.copyright-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.copyright-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: var(--font-medium);
    margin: 0;
    line-height: 1.6;
}

#copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    margin-top: 60px;
}

#copyright .copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: var(--font-medium);
    margin-bottom: 20px;
}

.footer-legal-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 24px;
    justify-content: center;
    align-items: center;
}

#footer_legal .nav_menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 24px;
    justify-content: center;
}

#footer_legal .menu-item {
    position: relative;
}

#footer_legal .menu-item:not(:last-child)::after {
    content: '•';
    position: absolute;
    right: -14px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

#footer_legal .menu-item a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: var(--transition);
    padding: 4px 0;
    display: inline-block;
}

#footer_legal .menu-item a:hover {
    color: var(--white);
    transform: translateY(-2px);
}

/* Footer Responsive */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px 20px;
    }

    .footer-col-logo {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 35px 0 100px;
    }

    .footer-main-content {
        margin-bottom: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-col-logo,
    .footer-col-menu,
    .footer-col-apps {
        grid-column: span 1;
    }

    .footer-desc {
        max-width: 100%;
    }

    .footer-contact-item {
        font-size: 11px;
    }

    .footer-apps {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .footer-app-link {
        max-width: 115px;
    }

    .footer-copyright {
        gap: 10px;
    }

    .footer-legal-list {
        flex-direction: column;
        gap: 6px;
    }

    .footer-legal-list li:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 30px 0 100px;
    }

    .footer-grid {
        gap: 22px;
    }

    .footer-menu-title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .footer-menu-list li {
        margin-bottom: 6px;
    }

    .footer-menu-list a {
        font-size: 11px;
    }

    .footer-app-link {
        max-width: 105px;
    }

    .footer-contact-item {
        font-size: 10px;
    }
}

    #footer_menu .nav_menu,
    .footer-menu-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    #footer_menu .menu-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 16px 0;
    }

    #footer_menu .menu-item:last-child {
        border-bottom: none;
    }

    .footer-app-section,
    #app_links,
    .footer-social-section,
    #footer_social,
    .footer-join-section,
    #join {
        margin: 40px 0;
    }

    .footer-join-section {
        padding: 40px 20px;
    }

    .join-main-title,
    #join .nowrp {
        font-size: 22px;
    }

    .footer-section-title,
    #app_links h2,
    #footer_social h2 {
        font-size: 20px;
    }

    .copyright-content {
        gap: 16px;
    }

    .footer-legal-menu,
    #footer_legal .nav_menu {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    #footer_legal .menu-item::after {
        display: none;
    }

    .app_links {
        flex-direction: column;
        align-items: center;
    }

    .app_links svg {
        height: 48px;
    }
}

.footer-top {
    margin-bottom: 40px;
}

.footer-title {
    font-size: 18px;
    font-weight: var(--font-extra-bold);
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: var(--font-medium);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(98, 65, 30, 0.3);
}

.mobile-app-section .app-title {
    font-size: 16px;
    font-weight: var(--font-extra-bold);
    margin-bottom: 15px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.copyright-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: var(--font-medium);
}

.footer-bottom-links {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-bottom-links li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: var(--font-medium);
}

.footer-bottom-links li a:hover {
    color: var(--white);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .order-card {
        padding: 20px;
    }

    .order-tabs {
        flex-direction: column;
    }

    .input-group {
        flex-direction: column;
    }

    .app-cta-card {
        padding: 30px 20px;
    }

    .app-title {
        font-size: 28px;
    }

    .footer-bottom-links {
        justify-content: flex-start;
        margin-top: 15px;
    }

    .navbar-brand {
        font-size: 20px;
    }

    .logo-img {
        height: 40px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 50px 0;
    }

    section {
        padding: 40px 0;
    }

    .app-store-badge,
    .play-store-badge {
        height: 40px;
    }
}

/* ===== MOBILE BOTTOM NAVIGATION BAR ===== */
.mobile-bottom-nav {
    display: none;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 9999 !important;
    padding: 0;
    margin: 0 !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-overflow-scrolling: touch;
    contain: layout style paint;
}

.mobile-nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    height: auto;
    position: relative;
    gap: 0;
    box-sizing: border-box;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: 6px 4px;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 0.65;
    transform: scale(1);
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    gap: 2px;
}

.mobile-nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 12px;
    background: rgba(98, 65, 30, 0.08);
    transform: translate(-50%, -50%);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    opacity: 0;
}

.mobile-nav-item:active::before {
    width: 56px;
    height: 56px;
    opacity: 1;
}

.mobile-nav-item svg {
    width: 22px;
    height: 22px;
    margin-bottom: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    display: block;
    flex-shrink: 0;
}

.mobile-nav-label {
    font-size: 10px;
    font-weight: var(--font-medium);
    line-height: 1.2;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    position: relative;
    z-index: 1;
    margin-top: 0;
    display: block;
}

.mobile-nav-item.active {
    color: var(--primary-color);
    opacity: 1;
    transform: scale(1);
}

.mobile-nav-item.active::before {
    width: 40px;
    height: 40px;
    background: rgba(98, 65, 30, 0.12);
    opacity: 1;
    border-radius: 10px;
}

.mobile-nav-item.active svg {
    transform: scale(1.05);
    color: var(--primary-color);
}

.mobile-nav-item.active .mobile-nav-label {
    font-weight: var(--font-semi-bold);
    color: var(--primary-color);
    transform: scale(1);
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: var(--primary-color);
    opacity: 0.85;
    transform: scale(1);
    outline: none;
}

.mobile-nav-item:hover svg,
.mobile-nav-item:focus svg {
    transform: scale(1.05);
}

/* Category Button (replacing Cart) */
.mobile-nav-category {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
    padding: 6px 4px;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.65;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-nav-category::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 12px;
    background: rgba(98, 65, 30, 0.08);
    transform: translate(-50%, -50%);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    opacity: 0;
}

.mobile-nav-category:active::before {
    width: 56px;
    height: 56px;
    opacity: 1;
}

.mobile-nav-category-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-bottom: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    flex-shrink: 0;
}

.mobile-nav-category-button svg {
    color: var(--text-light);
    width: 22px;
    height: 22px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.65;
}

.mobile-nav-category.active {
    color: var(--primary-color);
    opacity: 1;
}

.mobile-nav-category.active .mobile-nav-category-button svg {
    transform: scale(1.05);
    color: var(--primary-color);
    opacity: 1;
}

.mobile-nav-category.active .mobile-nav-label {
    font-weight: var(--font-semi-bold);
    color: var(--primary-color);
}

.mobile-nav-category.active::before {
    width: 40px;
    height: 40px;
    background: rgba(98, 65, 30, 0.12);
    opacity: 1;
    border-radius: 10px;
}

.mobile-nav-category:hover,
.mobile-nav-category:focus {
    color: var(--primary-color);
    opacity: 0.85;
    outline: none;
}

.mobile-nav-category:hover .mobile-nav-category-button svg,
.mobile-nav-category:focus .mobile-nav-category-button svg {
    transform: scale(1.05);
    opacity: 0.85;
}

/* Cart Button with Badge (keeping for reference, but not used) */
.mobile-nav-cart {
    position: relative;
    margin-top: -8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
}

.mobile-nav-cart-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-bottom: 3px;
    box-shadow: 0 4px 16px rgba(98, 65, 30, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    flex-shrink: 0;
}

.mobile-nav-cart-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-cart-button:active::before {
    width: 56px;
    height: 56px;
}

.mobile-nav-cart-button svg {
    color: var(--white);
    margin-bottom: 0;
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-cart-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ff4444;
    color: var(--white);
    font-size: 9px;
    font-weight: var(--font-extra-bold);
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--white);
    line-height: 1;
    z-index: 3;
    animation: badgePulse 0.3s ease-out;
    box-shadow: 0 2px 6px rgba(255, 68, 68, 0.4);
}

.mobile-nav-cart-badge:empty {
    display: none;
}

.mobile-nav-cart:hover .mobile-nav-cart-button {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 20px rgba(98, 65, 30, 0.4);
}

.mobile-nav-cart:hover .mobile-nav-cart-button svg {
    transform: scale(1.1);
}

.mobile-nav-cart:active .mobile-nav-cart-button {
    transform: scale(0.95);
}

.mobile-nav-cart .mobile-nav-label {
    color: var(--primary-color);
    font-weight: var(--font-extra-bold);
    margin-top: 2px;
}

.mobile-nav-cart.active .mobile-nav-cart-button {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(98, 65, 30, 0.5);
}

.mobile-nav-cart.active .mobile-nav-cart-button svg {
    transform: scale(1.1);
}

@keyframes badgePulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Show only on mobile devices */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }

    /* Ensure footer doesn't affect mobile nav */
    footer {
        overflow: visible !important;
        position: relative;
    }

    footer .mobile-bottom-nav {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        transform: translateZ(0) !important;
    }

    /* Ensure no parent element affects fixed positioning */
    footer,
    footer > *,
    .container {
        transform: none !important;
    }

    .mobile-nav-container {
        padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
        justify-content: center;
        align-items: center;
    }

    .mobile-nav-item {
        padding: 5px 3px;
        flex: 1 1 0;
        min-width: 0;
        gap: 2px;
    }

    .mobile-nav-item.active::before {
        width: 36px;
        height: 36px;
    }

    .mobile-nav-item svg {
        width: 22px;
        height: 22px;
    }

    .mobile-nav-label {
        font-size: 9px;
    }

    .mobile-nav-category.active::before {
        width: 36px;
        height: 36px;
    }

    .mobile-nav-cart-button {
        width: 50px;
        height: 50px;
    }

    /* Add padding to main content to prevent content from being hidden behind nav */
    main,
    .main-content,
    #content {
        padding-bottom: 70px;
    }

    /* If footer is the last element, add margin to prevent overlap */
    footer {
        margin-bottom: 70px;
    }
}

/* Small mobile devices (320px - 480px) */
@media (max-width: 480px) {
    .mobile-nav-container {
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }

    .mobile-nav-item {
        padding: 4px 2px;
        gap: 2px;
    }

    .mobile-nav-item.active::before {
        width: 34px;
        height: 34px;
    }

    .mobile-nav-item svg {
        width: 20px;
        height: 20px;
    }

    .mobile-nav-label {
        font-size: 8px;
    }

    .mobile-nav-category.active::before {
        width: 34px;
        height: 34px;
    }

    .mobile-nav-category-button {
        width: 20px;
        height: 20px;
    }

    .mobile-nav-category-button svg {
        width: 20px;
        height: 20px;
    }

    .mobile-nav-cart-button {
        width: 48px;
        height: 48px;
    }

    .mobile-nav-cart-badge {
        min-width: 16px;
        height: 16px;
        font-size: 8px;
        top: -2px;
        right: -2px;
    }
}

/* Extra small devices (320px - 375px) */
@media (max-width: 375px) {
    .mobile-nav-container {
        padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
    }

    .mobile-nav-item {
        padding: 4px 1px;
        gap: 1px;
    }

    .mobile-nav-item.active::before {
        width: 32px;
        height: 32px;
    }

    .mobile-nav-item svg {
        width: 20px;
        height: 20px;
        margin-bottom: 0;
    }

    .mobile-nav-label {
        font-size: 7px;
    }

    .mobile-nav-category.active::before {
        width: 32px;
        height: 32px;
    }

    .mobile-nav-category-button {
        width: 20px;
        height: 20px;
    }

    .mobile-nav-category-button svg {
        width: 20px;
        height: 20px;
    }

    .mobile-nav-cart-button {
        width: 46px;
        height: 46px;
    }
}

/* Large mobile devices (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .mobile-nav-container {
        padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    }

    .mobile-nav-item {
        padding: 6px 4px;
        gap: 3px;
    }

    .mobile-nav-item.active::before {
        width: 44px;
        height: 44px;
    }

    .mobile-nav-item svg {
        width: 24px;
        height: 24px;
        margin-bottom: 0;
    }

    .mobile-nav-label {
        font-size: 10px;
    }

    .mobile-nav-category.active::before {
        width: 44px;
        height: 44px;
    }

    .mobile-nav-category-button {
        width: 24px;
        height: 24px;
    }

    .mobile-nav-category-button svg {
        width: 24px;
        height: 24px;
    }

    .mobile-nav-cart-button {
        width: 54px;
        height: 54px;
    }
}

/* Hide on desktop */
@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
        position: fixed !important;
    }
}

/* Additional fixes to ensure fixed positioning works */
body .mobile-bottom-nav,
html .mobile-bottom-nav,
.container .mobile-bottom-nav,
footer .mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure container is centered */
.mobile-nav-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Safe area for iOS devices */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

/* Mobile Category Popup */
.mobile-category-popup {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    z-index: 10000 !important;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: opacity, visibility;
    margin: 0 !important;
    padding: 0 !important;
}

.mobile-category-popup.active {
    pointer-events: all;
    opacity: 1;
    visibility: visible;
}

.mobile-category-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.mobile-category-popup.active .mobile-category-popup-overlay {
    opacity: 1;
}

.mobile-category-popup-content {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 85vh;
    background: var(--white);
    border-radius: 24px 24px 0 0;
    transform: translateY(100%) translateZ(0);
    -webkit-transform: translateY(100%) translateZ(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 10002 !important;
    margin: 0 !important;
    padding: 0 !important;
    will-change: transform;
    -webkit-overflow-scrolling: touch;
    /* Ensure proper height calculation */
    box-sizing: border-box;
    /* Content should fit its children, not expand unnecessarily */
    align-items: stretch;
}

.mobile-category-popup.active .mobile-category-popup-content {
    transform: translateY(0) translateZ(0);
    -webkit-transform: translateY(0) translateZ(0);
}

.mobile-category-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--white);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    min-height: 60px;
}

.mobile-category-popup-header h2 {
    font-size: 20px;
    font-weight: var(--font-extra-bold);
    color: var(--primary-color);
    margin: 0;
    font-family: var(--font-primary);
}

.mobile-category-popup-close {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.mobile-category-popup-close:hover {
    background: rgba(98, 65, 30, 0.1);
    transform: rotate(90deg);
}

.mobile-category-popup-close:active {
    transform: rotate(90deg) scale(0.95);
}

.mobile-category-popup-close svg {
    width: 24px;
    height: 24px;
}

.mobile-category-popup-body {
    flex: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
    /* Prevent scroll propagation */
    overscroll-behavior: contain;
    -webkit-overscroll-behavior: contain;
    /* Body should only take space needed by content */
    min-height: 0;
    max-height: calc(85vh - 60px);
    box-sizing: border-box;
    /* Ensure body fits content exactly - no unnecessary expansion */
    height: fit-content;
}

.mobile-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px 16px 16px;
    box-sizing: border-box;
    /* Ensure last item is fully visible without excessive space */
    margin-bottom: 0;
    /* Prevent unnecessary expansion */
    min-height: 0;
    width: 100%;
    flex-shrink: 0;
}

.mobile-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border: 2px solid rgba(98, 65, 30, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin: 0;
}

.mobile-category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(98, 65, 30, 0.05);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-category-item:hover::before,
.mobile-category-item:active::before {
    transform: scaleX(1);
}

.mobile-category-item:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(98, 65, 30, 0.15);
}

.mobile-category-item.active {
    background: rgba(98, 65, 30, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 2px 12px rgba(98, 65, 30, 0.2);
}

.mobile-category-item.active::before {
    transform: scaleX(1);
    background: rgba(98, 65, 30, 0.1);
}

.category-icon,
.category-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.category-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.category-name {
    flex: 1;
    font-size: 16px;
    font-weight: var(--font-semi-bold);
    color: var(--primary-color);
    position: relative;
    z-index: 1;
}

.mobile-category-item.active .category-name {
    font-weight: var(--font-extra-bold);
}

/* Focus effect when scrolling to active category */
.mobile-category-item.active:focus-within,
.mobile-category-item.active.scrolling-to {
    background: rgba(98, 65, 30, 0.12);
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(98, 65, 30, 0.25);
    transform: scale(1.02);
}

.category-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    animation: checkSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-check svg {
    width: 20px;
    height: 20px;
}

.mobile-category-empty {
    padding: 40px 20px;
    text-align: center;
}

.mobile-category-empty p {
    color: rgba(98, 65, 30, 0.6);
    font-size: 16px;
    margin: 0;
}

@keyframes checkSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-10px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Smooth scrollbar for category list */
.mobile-category-popup-body::-webkit-scrollbar {
    width: 4px;
}

.mobile-category-popup-body::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-category-popup-body::-webkit-scrollbar-thumb {
    background: rgba(98, 65, 30, 0.2);
    border-radius: 2px;
}

.mobile-category-popup-body::-webkit-scrollbar-thumb:hover {
    background: rgba(98, 65, 30, 0.3);
}

/* Animation for popup appearing from bottom nav */
@keyframes popupSlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Ensure popup appears above bottom nav and stays fixed */
@media (max-width: 768px) {
    .mobile-category-popup {
        z-index: 10001 !important;
        position: fixed !important;
        /* Ensure no parent transforms affect this */
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }

    .mobile-category-popup-content {
        padding-bottom: 0;
        position: fixed !important;
        bottom: 0 !important;
        /* Ensure content stays fixed */
        transform: translateY(100%) translateZ(0) !important;
        -webkit-transform: translateY(100%) translateZ(0) !important;
    }

    .mobile-category-popup-body {
        padding: 0 !important;
        flex: none !important;
        max-height: calc(85vh - 60px) !important;
        height: fit-content !important;
    }

    .mobile-category-list {
        padding: 12px 16px 16px 16px !important;
        margin-bottom: 0 !important;
    }

    .mobile-category-popup.active .mobile-category-popup-content {
        transform: translateY(0) translateZ(0) !important;
        -webkit-transform: translateY(0) translateZ(0) !important;
    }

    /* Prevent any parent from affecting positioning */
    body.mobile-category-popup-open,
    html.mobile-category-popup-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        /* Prevent any transforms */
        transform: none !important;
        -webkit-transform: none !important;
    }

    /* Ensure no parent container affects popup */
    footer .mobile-category-popup,
    .container .mobile-category-popup,
    body .mobile-category-popup {
        position: fixed !important;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }

    /* Prevent scroll on popup body when selecting category */
    .mobile-category-popup-body {
        overscroll-behavior-y: contain !important;
        -webkit-overscroll-behavior-y: contain !important;
    }
}
