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

/* ---------- mini-cart: slide-in drawer from the RIGHT (mirrors the nav drawer) ----------
   Reuses the existing #mobicart container + .containerCart AJAX mechanism.
   Open/close logic lives in mobile-nav.js (cart drawer section). */
@media (max-width: 767px){
  #mobicart.navbar-cart{
    display:flex!important;
    flex-direction:column;
    position:fixed!important;
    top:0!important;right:0!important;left:auto!important;bottom:0!important;
    width:88%;max-width:380px;
    height:100vh;height:100dvh;max-height:none!important;
    background:#fff!important;
    z-index:9999!important;
    box-shadow:-2px 0 16px rgba(0,0,0,.2);
    transform:translateX(110%);
    transition:transform .3s ease;
    overflow:hidden!important;
    margin:0!important;padding:0!important;
    border-top:0;
  }
  #mobicart.navbar-cart.cdr-open{transform:translateX(0);}
  /* defuse bootstrap collapse behavior on this container */
  #mobicart.navbar-cart.collapse{display:flex!important;}
  #mobicart.navbar-cart.collapsing{height:100dvh!important;}

  /* header (injected by JS) */
  #mobicart .cdr-header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid #e8ecef;}
  #mobicart .cdr-title{font-weight:700;font-size:15px;color:#1A1A1A;}
  #mobicart .cdr-title i{margin-right:8px;}
  #mobicart .cdr-close{background:none;border:0;font-size:24px;line-height:1;color:#1A1A1A;padding:2px 8px;cursor:pointer;}

  /* body: scrollable content + sticky footer */
  #mobicart .cartMenu{flex:1 1 auto;display:flex!important;flex-direction:column;width:100%!important;max-width:100%!important;float:none!important;padding:0!important;margin:0!important;min-height:0;}
  #mobicart .miniCartTable{flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;max-height:none!important;padding:10px 14px!important;display:block;}
  #mobicart .miniCartFooter{flex:0 0 auto;background:#fff!important;border-top:1px solid #e8ecef!important;margin-top:0!important;padding:12px 14px calc(12px + env(safe-area-inset-bottom)) 14px!important;display:flex;gap:10px;}
  #mobicart .miniCartFooter .btn{flex:1;margin:0!important;float:none;}
  #mobicart .miniCartFooter .btn.btn-primary{background:#1A1A1A;border:0;border-radius:0;color:#fff;text-transform:uppercase;letter-spacing:1.5px;font-weight:600;font-size:12px;padding:13px 8px;}

  /* overlay + body scroll lock */
  .cart-drawer-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 .25s ease;}
  body.cdr-open .cart-drawer-overlay{opacity:1;visibility:visible;}
  /* iOS-effective body scroll lock: plain overflow:hidden is ignored by iOS Safari
     (swipes inside the drawer would scroll the underlying page). position:fixed
     freezes the body; JS sets body.style.top=-scrollY and restores it on close. */
  body.cdr-open{overflow:hidden;position:fixed;width:100%;left:0;right:0;}
  /* CRITICAL: #mobicart lives INSIDE the fixed navbar (stacking context, z-index:1030),
     so the body-level overlay (9998) would sit ON TOP of the drawer and block all taps.
     While the drawer is open, lift the navbar context above the overlay. */
  body.cdr-open .navbar-fixed-top{z-index:9999!important;}
}
/* overlay must not exist visually on desktop */
@media (min-width: 768px){
  .cart-drawer-overlay{display:none!important;}
}

/* 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) */

    /* ---------- Top header bar: single-row layout (hamburger | logo | icons) ----------
       FIX: το cart (#btn2) ήταν block-level και έπεφτε σε ξεχωριστή σειρά κάτω από το
       logo, ενώ filter/search δεν χωρούσαν → το header γινόταν 3 σειρές/107px.
       Κάνουμε το .navbar-header flex row. ΣΗΜΑΝΤΙΚΟ: χρειάζεται width:100%!important
       γιατί σε αυτή τη σελίδα ένα display:flex element μαζεύει σε shrink-to-content
       (ίδια συμπεριφορά με το #productslist) και σπρώχνεται δεξιά. Το flex:...!important
       στο brand είναι απαραίτητο γιατί άλλος κανόνας override-άρει το flex-grow. */
    .navbar-tshop .navbar-header {
        position: relative;
        display: flex !important;
        width: 100% !important;
        min-width: 100%;
        box-sizing: border-box;
        align-items: center;
        flex-wrap: nowrap;
        min-height: 54px;
        padding: 0 8px;
    }
    /* Bootstrap clearfix ::before/::after γίνονται flex-items και χαλάνε το layout */
    .navbar-tshop .navbar-header:before,
    .navbar-tshop .navbar-header:after { display: none !important; }
    .navbar-tshop .navbar-header > .navbar-toggle.pull-left {
        order: 1; flex: 0 0 auto !important; float: none !important; margin: 0 !important;
    }
    .navbar-tshop .navbar-header > .navbar-brand {
        order: 2; flex: 1 1 auto !important; min-width: 0;
        float: none !important; margin: 0 !important; padding: 0 !important; height: auto;
        display: flex !important; align-items: center; justify-content: center;
    }
    .navbar-tshop .navbar-header > .navbar-brand img {
        margin: 0 !important; max-height: 42px; width: auto; height: auto;
    }
    .navbar-tshop .navbar-header > #btn2 {
        order: 3; flex: 0 0 auto !important; float: none !important; margin: 0 !important;
    }
    .navbar-tshop .navbar-header > .cart-sidebar-toggle {
        order: 4; flex: 0 0 auto !important; float: none !important; margin: 0 !important;
    }
    .navbar-tshop .navbar-header > #getFullSearch {
        order: 5; flex: 0 0 auto !important; float: none !important; margin: 0 !important;
    }
    .navbar-tshop .navbar-header > #btn2 > .cartRespons {
        float: none !important; margin: 0 !important; display: block;
    }

    /* ---------- Top blue bar: info + phone icons side-by-side ----------
       FIX: τα δύο <li> (info, phone) ήταν float:left αλλά ο <ul.userMenu> μάζευε
       σε ~64px πλάτος → το phone δεν χωρούσε δίπλα και τυλιγόταν από κάτω.
       inline-block + nowrap τα κρατά στην ίδια σειρά. */
    .navbar-top .userMenu { white-space: nowrap; }
    .navbar-top .userMenu > li { display: inline-block !important; float: none !important; vertical-align: middle; }
    .navbar-top .userMenu > li > a { float: none !important; }
}
