/* ==========================================================================
   FABIAN CLEAN - UNIFIED MOBILE BOTTOM NAVIGATION & DRAWERS
   Clean, Evenly Distributed, Mobile Responsive Navigation
   ========================================================================== */

/* --- Desktop (> 1024px): Hide Mobile Bottom Navigation --- */
@media (min-width: 1025px) {
    .mobile-bottom-nav,
    .bottom-more-drawer,
    .bottom-more-overlay {
        display: none !important;
    }
}

/* --- Mobile & Tablet (<= 1024px): Bottom Navigation & Drawers --- */
@media (max-width: 1024px) {

    /* Keep body content from being covered by bottom bar — exactly nav height */
    body {
        padding-bottom: 64px !important;
    }

    /* Fixed Bottom Navigation Bar */
    .mobile-bottom-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 64px !important;
        min-height: 64px !important;
        background: #ffffff !important;
        border-top: 1px solid #e2e8f0 !important;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08) !important;
        z-index: 999999 !important;
        padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)) !important;
        margin: 0 !important;
        align-items: center !important;
        justify-content: space-around !important;
        box-sizing: border-box !important;
    }

    /* Evenly Distributed Navigation Items (Home, Categories, WhatsApp, Menu) */
    .bottom-nav-item {
        flex: 1 1 25% !important;
        width: 25% !important;
        max-width: 25% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 6px 2px !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        outline: none !important;
        text-decoration: none !important;
        cursor: pointer !important;
        color: #334155 !important;
        position: relative !important;
        transition: all 0.2s ease !important;
        box-sizing: border-box !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    /* Icon Container - Uniform across ALL 4 tabs */
    .bottom-nav-item .nav-icon-wrapper {
        position: relative !important;
        width: 44px !important;
        height: 28px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 14px !important;
        background: transparent !important;
        margin: 0 auto 3px !important;
        transition: all 0.2s ease !important;
    }

    /* Icons - Uniform across ALL 4 tabs */
    .bottom-nav-item i {
        font-size: 20px !important;
        color: #334155 !important;
        transition: transform 0.2s ease, color 0.2s ease !important;
        line-height: 1 !important;
        display: inline-block !important;
    }

    /* Labels - Uniform across ALL 4 tabs */
    .bottom-nav-item span {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        letter-spacing: -0.1px !important;
        color: #334155 !important;
        transition: color 0.2s ease, font-weight 0.2s ease !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Tap feedback */
    .bottom-nav-item:active {
        transform: scale(0.93) !important;
    }

    /* Hover */
    @media (hover: hover) {
        .bottom-nav-item:hover {
            color: #1e293b !important;
        }
        .bottom-nav-item:hover .nav-icon-wrapper {
            background: #f1f5f9 !important;
        }
        .bottom-nav-item:hover i,
        .bottom-nav-item:hover span {
            color: #1e293b !important;
        }
    }

    /* --- ACTIVE STATE (Brand Crimson Red #991b1b) --- */
    .bottom-nav-item.active {
        color: #991b1b !important;
    }

    .bottom-nav-item.active .nav-icon-wrapper {
        background: rgba(153, 27, 27, 0.08) !important;
    }

    .bottom-nav-item.active i {
        color: #991b1b !important;
        transform: translateY(-1px) !important;
    }

    .bottom-nav-item.active span {
        color: #991b1b !important;
        font-weight: 700 !important;
    }

    /* Active indicator line removed as requested */
    .bottom-nav-item.active::after {
        display: none !important;
        content: none !important;
    }

    /* --- DRAWERS (Categories & Menu) --- */

    /* Overlay */
    .bottom-more-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(15, 23, 42, 0.45) !important;
        backdrop-filter: blur(6px) !important;
        -webkit-backdrop-filter: blur(6px) !important;
        z-index: 1000000 !important;
        display: none !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
    }

    .bottom-more-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }

    /* Drawer Sheet */
    .bottom-more-drawer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 85vh !important;
        background: #ffffff !important;
        border-top-left-radius: 24px !important;
        border-top-right-radius: 24px !important;
        z-index: 1000001 !important;
        padding: 14px 20px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
        transform: translateY(105%) !important;
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1) !important;
        box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.16) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: block !important;
        visibility: hidden !important;
    }

    .bottom-more-drawer.active {
        transform: translateY(0) !important;
        visibility: visible !important;
    }

    /* Drag Handle indicator */
    .drawer-drag-handle {
        width: 40px !important;
        height: 4px !important;
        background: #cbd5e1 !important;
        border-radius: 99px !important;
        margin: 0 auto 14px !important;
    }

    /* Drawer Header */
    .bottom-more-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-bottom: 14px !important;
        margin-bottom: 16px !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .drawer-title-wrapper {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .drawer-header-icon {
        width: 32px !important;
        height: 32px !important;
        border-radius: 10px !important;
        background: rgba(153, 27, 27, 0.1) !important;
        color: #991b1b !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 14px !important;
    }

    .drawer-header-text,
    .bottom-more-header span {
        font-family: 'Inter', sans-serif !important;
        font-weight: 750 !important;
        font-size: 17px !important;
        color: #0f172a !important;
        letter-spacing: -0.3px !important;
    }

    .bottom-more-close {
        background: #f1f5f9 !important;
        border: 1px solid #e2e8f0 !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
        line-height: 1 !important;
        color: #64748b !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .bottom-more-close:hover,
    .bottom-more-close:active {
        background: #e2e8f0 !important;
        color: #0f172a !important;
    }

    /* All Products Button inside Category Drawer */
    .drawer-quick-link-wrap {
        margin-bottom: 14px !important;
    }

    .drawer-all-products-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 12px 16px !important;
        background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%) !important;
        color: #ffffff !important;
        border-radius: 12px !important;
        text-decoration: none !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        box-shadow: 0 4px 12px rgba(153, 27, 27, 0.2) !important;
    }

    .drawer-all-products-btn span {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    /* Categories Accordion */
    .category-accordion {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 0 !important;
    }

    .category-item {
        background: #ffffff !important;
        border-radius: 14px !important;
        border: 1px solid #e2e8f0 !important;
        overflow: hidden !important;
        transition: all 0.25s ease !important;
    }

    .category-item.active {
        border-color: #991b1b !important;
        box-shadow: 0 4px 16px rgba(153, 27, 27, 0.08) !important;
    }

    .category-header {
        display: flex !important;
        align-items: center !important;
        padding: 12px 16px !important;
        cursor: pointer !important;
        gap: 12px !important;
        background: #ffffff !important;
        border: none !important;
        user-select: none !important;
    }

    .category-icon-badge {
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 15px !important;
        flex-shrink: 0 !important;
        background: #f8fafc !important;
        color: #991b1b !important;
        border: 1px solid #f1f5f9 !important;
    }

    .category-name {
        flex: 1 !important;
        font-family: 'Inter', sans-serif !important;
        font-weight: 700 !important;
        font-size: 15px !important;
        color: #1e293b !important;
        text-align: left !important;
    }

    .category-chevron {
        font-size: 13px !important;
        color: #94a3b8 !important;
        transition: transform 0.25s ease !important;
    }

    .category-item.active .category-chevron {
        transform: rotate(180deg) !important;
        color: #991b1b !important;
    }

    .category-body {
        max-height: 0 !important;
        visibility: hidden !important;
        overflow: hidden !important;
        transition: max-height 0.3s ease, visibility 0.3s ease !important;
        background: #f8fafc !important;
    }

    .category-item.active .category-body {
        max-height: 800px !important;
        visibility: visible !important;
        border-top: 1px solid #f1f5f9 !important;
    }

    .subcategory-list {
        padding: 10px 16px 14px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    .subcategory-item {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 9px 12px !important;
        background: #ffffff !important;
        border-radius: 8px !important;
        border: 1px solid #e2e8f0 !important;
        color: #334155 !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
    }

    .subcategory-item:hover,
    .subcategory-item:active {
        background: #fef2f2 !important;
        border-color: #fecaca !important;
        color: #991b1b !important;
    }

    .subcategory-item::after {
        content: '\f054' !important;
        font-family: 'Font Awesome 6 Free' !important;
        font-weight: 900 !important;
        font-size: 10px !important;
        color: #cbd5e1 !important;
    }

    /* Menu Items */
    .more-item {
        display: flex !important;
        align-items: center !important;
        padding: 12px 14px !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 14px !important;
        margin-bottom: 8px !important;
        text-decoration: none !important;
        color: #1e293b !important;
        box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02) !important;
        transition: all 0.2s ease !important;
    }

    .more-item:last-child {
        margin-bottom: 0 !important;
    }

    .more-icon-box {
        width: 40px !important;
        height: 40px !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        font-size: 17px !important;
    }

    .more-icon-box.bg-blue {
        background: #e0e7ff !important;
        color: #4338ca !important;
    }

    .more-icon-box.bg-peach {
        background: #fee2e2 !important;
        color: #dc2626 !important;
    }

    .more-icon-box.bg-purple {
        background: #f3e8ff !important;
        color: #7e22ce !important;
    }

    .more-item-details {
        flex: 1 !important;
        margin-left: 12px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .more-label {
        font-family: 'Inter', sans-serif !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        margin-bottom: 2px !important;
    }

    .more-subtext {
        font-size: 12px !important;
        font-weight: 500 !important;
        color: #64748b !important;
    }

    .more-chevron {
        color: #cbd5e1 !important;
        font-size: 13px !important;
    }
}
