/* Mobile header — MyFragranceMe brand colors */

@media (max-width: 991px) {
    header .header_area .header_top {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "menu logo actions"
            "search search search"
            "nav nav nav"
            "deliver deliver deliver";
        gap: 8px 10px;
        padding: 8px 10px 10px;
        align-items: center;
    }

    header .header_area .header_top .left-box {
        grid-area: menu;
        width: auto;
        margin: 0;
        flex-basis: auto;
    }

    header .header_area .header_top .left-box .header_left {
        display: flex;
        align-items: center;
        gap: 0;
    }

    header .mfm-mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 34px;
        margin: 0;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.85);
        border-radius: 4px;
        background: transparent;
        color: #fff;
        cursor: pointer;
    }

    header .mfm-mobile-menu-btn i {
        font-size: 18px;
        line-height: 1;
    }

    header .header_area .header_top .left-box .header_left .logo {
        display: none;
    }

    header .mfm-mobile-logo {
        display: block;
        grid-area: logo;
        text-align: left;
        padding-left: 4px;
    }

    header .mfm-mobile-logo img {
        width: auto;
        max-height: 34px;
        max-width: 150px;
        image-rendering: -webkit-optimize-contrast;
    }

    header .header_area .header_top .right-box {
        grid-area: actions;
        width: auto;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    header .mfm-mobile-top-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        grid-area: actions;
        justify-self: end;
    }

    header .mfm-mobile-top-actions .mfm-mobile-signin {
        color: var(--mfm-white);
        font-family: var(--mfm-font-primary);
        font-size: 12px;
        line-height: 1.2;
        text-align: right;
        white-space: nowrap;
    }

    header .mfm-mobile-top-actions .mfm-mobile-signin strong {
        display: block;
        font-family: var(--mfm-font-rounded);
        font-size: 13px;
    }

    header .mfm-mobile-cart {
        position: relative;
        display: inline-flex;
        align-items: center;
        color: #fff;
    }

    header .mfm-mobile-cart img {
        width: 28px;
        height: auto;
    }

    header .mfm-mobile-cart-count {
        position: absolute;
        top: -4px;
        right: -8px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--mfm-white);
        color: var(--mfm-green);
        font-family: var(--mfm-font-primary);
        font-size: 10px;
        font-weight: 700;
        line-height: 18px;
        text-align: center;
    }

    /* Hide desktop header blocks on mobile */
    header .header_area .header_top .right-box > .header_middle,
    header .header_area .header_top .right-box > .header_right,
    header .header_area .header_top .right-box > .header_bottm {
        display: none;
    }

    header .mfm-mobile-search-wrap {
        grid-area: search;
        display: block;
        width: 100%;
    }

    header .mfm-mobile-nav-scroll {
        grid-area: nav;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    header .mfm-mobile-nav-scroll::-webkit-scrollbar {
        display: none;
    }

    header .mfm-mobile-nav-scroll a {
        flex: 0 0 auto;
        padding: 6px 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.18);
        color: var(--mfm-white);
        font-family: var(--mfm-font-primary);
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        text-decoration: none;
    }

    header .mfm-mobile-deliver-bar {
        grid-area: deliver;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 4px 2px 0;
        color: var(--mfm-white);
        font-family: var(--mfm-font-primary);
        font-size: 12px;
        font-weight: 600;
    }

    header .header_area .header_top > .right-box {
        display: none !important;
    }

    header .mfm-mobile-deliver-bar i {
        font-size: 14px;
    }

    header .mfm-mobile-deliver-bar a {
        color: #fff;
        text-decoration: none;
    }
}

@media (min-width: 992px) {
    header .mfm-mobile-menu-btn,
    header .mfm-mobile-logo,
    header .mfm-mobile-top-actions,
    header .mfm-mobile-search-wrap,
    header .mfm-mobile-nav-scroll,
    header .mfm-mobile-deliver-bar {
        display: none !important;
    }
}

/* Drawer */
.mfm-mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(0, 0, 0, 0.45);
}

.mfm-mobile-drawer-overlay:not(.is-open) {
    display: none;
}

.mfm-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99991;
    width: min(86vw, 320px);
    height: 100%;
    background: #fff;
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.18);
}

.mfm-mobile-drawer.is-open {
    transform: translateX(0);
}

.mfm-mobile-drawer-head {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 44px 14px 16px;
    background: linear-gradient(180deg, var(--mfm-green-light) 0%, var(--mfm-green) 100%);
    color: var(--mfm-white);
    font-family: var(--mfm-font-rounded);
}

.mfm-mobile-drawer-head strong {
    font-size: 18px;
    font-family: var(--mfm-font-rounded);
}

.mfm-mobile-drawer-eyebrow {
    font-size: 12px;
    font-family: var(--mfm-font-secondary);
    font-weight: 300;
    opacity: 0.9;
}

.mfm-mobile-drawer-signin {
    color: var(--mfm-white);
    font-family: var(--mfm-font-primary);
    font-size: 13px;
    font-weight: 600;
}

.mfm-mobile-drawer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.mfm-mobile-drawer-body {
    padding: 8px 0 24px;
}

.mfm-mobile-drawer-home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(var(--mfm-green-rgb), 0.12);
    color: var(--mfm-black);
    font-family: var(--mfm-font-rounded);
    font-weight: 700;
}

.mfm-mobile-drawer-section {
    margin: 14px 16px 6px;
    font-size: 11px;
    font-family: var(--mfm-font-secondary);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mfm-silver);
}

.mfm-mobile-drawer-link {
    display: block;
    padding: 11px 16px;
    color: var(--mfm-black);
    font-family: var(--mfm-font-primary);
    font-size: 14px;
    border-bottom: 1px solid rgba(var(--mfm-green-rgb), 0.08);
}

.mfm-mobile-drawer-link:active,
.mfm-mobile-drawer-home:active {
    background: #f8faf5;
}

body.mfm-drawer-open {
    overflow: hidden;
}

/* Homepage carousel cards on mobile */
@media (max-width: 991px) {
    .blog_banner_active .single_banner,
    .home-slider .about_area {
        min-height: 220px !important;
        border-radius: 12px;
    }

    .cat-product-carousel .single-product-carousel,
    .new_item_carousel .single-product-carousel {
        padding: 0 4px;
    }

    .Trending_area .container,
    .mfm-blog-grid-section .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}
