/* ============================================================
   MOBILE CATEGORY NAVIGATION — MULTI-LEVEL SLIDE-IN DRAWER
   Inspired by Myntra, Amazon, and Flipkart mobile apps
   ============================================================ */

/* Mobile Navigation Backdrop Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Slide-in Drawer Container */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: -300px; /* Hidden off-screen */
    width: 290px;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-nav-drawer.active {
    left: 0; /* Slide in */
}

/* Prevent parent page scrolling when drawer is active */
body.mobile-nav-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Sticky Header inside Drawer */
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: #ffffff;
    border-bottom: 2px solid #fd7e14; /* Orange accent top/bottom accent border */
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-nav-brand {
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-nav-brand img {
    max-height: 28px;
    width: auto;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666666;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mobile-nav-close:hover {
    color: #fd7e14;
}

/* Sliding Panels Track Layout */
.mobile-nav-slider {
    flex: 1;
    overflow: hidden;
    position: relative;
    background-color: #f7f9fb;
}

.mobile-nav-track {
    display: flex;
    width: 300%; /* 3 Levels: Main, Sub, Sub-Sub */
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-panel {
    width: 33.333%;
    height: 100%;
    overflow-y: auto;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

/* Navigation Lists & Items */
.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #f1f3f6;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    min-height: 48px; /* Touch friendly tap target height */
    color: #333333;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    background-color: #ffffff;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    user-select: none;
}

.mobile-nav-link:active,
.mobile-nav-link:hover {
    background-color: #f8f9fa;
    color: #fd7e14; /* Orange text on active/hover */
}

.mobile-nav-link span {
    display: block;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-nav-link i.fa-chevron-right {
    font-size: 11px;
    color: #abb6c2;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

/* Back navigation button */
.mobile-nav-back {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: #f7f9fb;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-nav-back:active {
    background-color: #edf2f7;
    color: #fd7e14;
}

.mobile-nav-back i {
    font-size: 14px;
}

/* Panel Header/Title Display */
.mobile-nav-panel-title {
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
    background-color: #ffffff;
    border-bottom: 1px solid #edf2f7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hide standard navbar on mobile screens to prevent layout overlap */
@media (max-width: 991px) {
    .category-navbar {
        display: none !important;
    }
}
