/* ===================================================
   Mishcats custom mobile header
   Hidden by default (desktop). Everything below is scoped to <= 989px.
   =================================================== */

#mc-mobile-header {
    display: none;
    /* Dim colour on the bar's left side while the menu is open.
       Raise .08 for a darker dim, lower it for lighter. */
    --mc-mh-dim: rgba(0, 0, 0, .08);
}

@media (max-width: 989px) {

    /* ---- Hide Enfold's own header parts (slide-out menu is NOT hidden) ---- */
    #top #header .logo,
    #top #header #avia-menu,
    #top #header .custom-desktop-search-bar,
    #top #header #menu-item-shop {
        display: none !important;
    }
    #top #header .av-logo-container,
    #top #header #header_main,
    #top #header #header_main .container {
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    /* ---- The bar ---- */
    #mc-mobile-header {
        display: block;
        position: sticky;
        top: 0;
        z-index: 100000;              /* above Enfold's overlay so icons stay clickable */
        background: #f8f7f3;
        border-bottom: 1px solid #e9e3da;
        color: #46485f;
    }
    
    .mc-m-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 64px;
        padding: 0 14px;
    }

    /* ---- Logo ---- */
    .mc-m-logo { display: block; flex: 0 1 190px; min-width: 0; line-height: 0; }
    .mc-m-logo svg { width: 100%; height: 44px; display: block; }

    /* ---- Icon buttons ---- */
    .mc-m-icons { display: flex; align-items: center; gap: 4px; }
    .mc-m-btn {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        margin: 0;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
        color: #46485f;
        cursor: pointer;
    }
    .mc-m-btn:hover,
    .mc-m-btn:focus { color: #46485f; background: none; }

    /* ---- Cart count badge ---- */
    .mc-m-count {
        display: none;
        position: absolute;
        top: 2px;
        right: 0;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 9px;
        background: #efa300;
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        line-height: 18px;
        text-align: center;
    }
    .mc-m-count.is-active { display: block; }

    /* ---- Burger (3 lines that turn into an X) ---- */
    .mc-m-burger { flex-direction: column; gap: 5px; }
    .mc-m-burger span {
        display: block;
        width: 24px;
        height: 2px;
        background: #46485f;
        border-radius: 2px;
        transition: transform .2s ease, opacity .2s ease;
    }
    .mc-m-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mc-m-burger.is-open span:nth-child(2) { opacity: 0; }
    .mc-m-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* ---- Search panel (opens under the bar) ---- */
    .mc-m-search { display: none; gap: 8px; padding: 0 14px 12px; }
    .mc-m-search.is-open { display: flex; }
    .mc-m-search input[type="search"] {
        flex: 1;
        min-width: 0;
        height: 44px;
        margin: 0;
        padding: 0 14px;
        border: 1px solid #e9e3da;
        border-radius: 8px;
        background: #fff;
        font-size: 16px;
    }
    .mc-m-search button {
        height: 44px;
        margin: 0;
        padding: 0 18px;
        border: 0;
        border-radius: 8px;
        background: #efa300;
        color: #2a2b3a;
        font-weight: 700;
        cursor: pointer;
    }

        /* ---- Menu open: slide-out panel takes the FULL screen width ---- */
    #top .av-burger-overlay,
    #top .av-burger-overlay-scroll,
    #top .av-burger-overlay-inner {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* Panel background matches the bar, so bar + menu look like one piece */
    #top .av-burger-overlay-scroll,
    #top .av-burger-overlay-inner {
        background: #f8f7f3 !important;
    }

    /* Enfold sets a big top padding on the list with JS (194px in your screenshot).
       Our bar is 64px tall, so keep the first item just below it. */
    #top #av-burger-menu-ul {
        padding-top: 90px !important;
        padding-bottom: 40px !important;
    }

    /* Menu text starts at the same left edge as the logo */
    #top #av-burger-menu-ul > li > a {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
        /* ---- Account dropdown ---- */
    .mc-m-account { position: relative; }

    .mc-m-dropdown {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 5;
        min-width: 200px;
        margin: 0;
        padding: 6px 0;
        list-style: none;
        background: #f8f7f3;
        border: 1px solid #e9e3da;
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    }
    .mc-m-account.is-open .mc-m-dropdown { display: block; }

    .mc-m-dropdown li { margin: 0; padding: 0; list-style: none; }
    .mc-m-dropdown a {
        display: block;
        padding: 12px 18px;
        color: #46485f;
        font-size: 16px;
        line-height: 1.2;
        text-decoration: none;
    }
    .mc-m-dropdown a:hover { background: #f0ece4; }
}