/* ============================================================================
   mobile-nav.css  —  Multi-level drilldown drawer (visiofactory-style)
   Mobile-only: appears on max-width:767px. Desktop nav untouched.
   ============================================================================ */

/* Hide drawer + overlay on desktop */
.mobile-nav-drawer,
.mobile-nav-overlay {
    display: none;
}

/* ---------- Mobile breakpoint ---------- */
@media (max-width: 767px) {

    .mobile-nav-overlay {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease;
    }
    .mobile-nav-drawer.mn-open ~ .mobile-nav-overlay,
    body.mn-open .mobile-nav-overlay {
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav-drawer {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 88%;
        max-width: 380px;
        height: 100vh;
        height: 100dvh;
        background: #fff;
        z-index: 9999;
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow: hidden;
    }
    .mobile-nav-drawer.mn-open {
        transform: translateX(0);
    }

    /* ---------- Panels (stacked, slide left/right) ---------- */
    .mn-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        display: flex;
        flex-direction: column;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        visibility: hidden;
    }
    .mn-panel.mn-panel-active {
        transform: translateX(0);
        visibility: visible;
    }
    .mn-panel.mn-panel-behind {
        transform: translateX(-30%);
        visibility: visible;
    }

    /* Root panel sits at translateX(0) by default (no slide-in from right) */
    .mn-panel[data-mn-panel="root"] {
        transform: translateX(0);
        visibility: visible;
    }
    .mn-panel[data-mn-panel="root"].mn-panel-behind {
        transform: translateX(-30%);
    }

    /* ---------- Panel header (sticky top) ---------- */
    .mn-panel-header {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        height: 56px;
        padding: 0 8px;
        background: #5089b0;
        color: #fff;
        position: relative;
    }
    .mn-panel-title {
        flex: 1;
        text-align: center;
        font-size: 17px;
        font-weight: 600;
        letter-spacing: 0.3px;
    }
    .mn-back,
    .mn-close {
        background: transparent;
        border: 0;
        color: #fff;
        font-size: 20px;
        padding: 8px 12px;
        cursor: pointer;
        line-height: 1;
        min-width: 44px;
        min-height: 44px;
    }
    .mn-back:active,
    .mn-close:active {
        background: rgba(255, 255, 255, 0.15);
    }
    .mn-panel-header .mn-close {
        margin-left: auto;
    }
    /* When .mn-back is absent, give title proper left padding */
    .mn-panel[data-mn-panel="root"] .mn-panel-title {
        padding-left: 12px;
        text-align: left;
    }

    /* ---------- Panel list (scrollable area) ---------- */
    .mn-panel-list {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        padding: 0;
        list-style: none;
        background: #fff;
    }

    /* ---------- Items ---------- */
    .mn-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        font-size: 15px;
        color: #222;
        text-decoration: none;
        border-bottom: 1px solid #f0f2f4;
        background: #fff;
        min-height: 48px;
        line-height: 1.3;
    }
    .mn-item > span:first-child {
        flex: 1;
        display: flex;
        align-items: center;
    }
    .mn-item:active,
    .mn-item:focus {
        background: #f5f8fb;
        text-decoration: none;
        color: #222;
    }
    .mn-item:hover {
        text-decoration: none;
        color: #222;
    }
    .mn-icon {
        width: 22px;
        margin-right: 12px;
        color: #5089b0;
        font-size: 16px;
        text-align: center;
    }
    .mn-icon-accent { color: #e8a318; }
    .mn-chev {
        color: #b0b8c0;
        font-size: 18px;
        margin-left: 8px;
    }

    /* Featured item (highlighted) */
    .mn-item-featured {
        background: #fff8e7;
    }
    .mn-item-featured:active {
        background: #fdf0d0;
    }

    /* Section titles inside panel list */
    .mn-section-title {
        padding: 14px 16px 6px;
        font-size: 11px;
        text-transform: uppercase;
        color: #8a96a3;
        letter-spacing: 0.8px;
        font-weight: 600;
        background: #f8fafc;
        border-bottom: 1px solid #eef1f4;
    }

    /* Divider line inside list */
    .mn-divider {
        height: 8px;
        background: #f4f6f8;
        border: 0;
    }

    /* ---------- Badges (Luxury Typography — Vogue/Net-A-Porter style) ---------- */
    .mn-badge {
        display: inline-block;
        margin-left: 10px;
        font-size: 11px;
        font-style: italic;
        font-weight: 400;
        letter-spacing: 0.3px;
        text-transform: lowercase;
        vertical-align: middle;
        background: transparent;
        border: 0;
        padding: 0;
        font-family: Georgia, "Times New Roman", serif;
        line-height: 1;
        white-space: nowrap;
    }
    .mn-badge-best {
        color: #b78a3b; /* warm gold */
    }
    .mn-badge-new {
        color: #2a7a4d; /* deep emerald */
    }

    /* ---------- Body lock when drawer open ---------- */
    body.mn-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    /* ---------- Hide old desktop mega menu on mobile (already hidden via .hidden-xs, but safety) ---------- */
    /* (no rules — existing Bootstrap classes handle this) */
}
