/* ==========================================================================
   NEW BURGER MENU (Mobile <1023px) — Production-optimized stylesheet
========================================================================== */

/* CSS Variables - mobile focused */
:root {
    --burger-primary: #444E8E;
    --burger-accent: #505db1;
    --burger-text: #464646;
    --bg-light: #F6F8FF;
    --burger-animation: 0.12s cubic-bezier(0.4, 0, 0.2, 1);
    --burger-radius: 12px;
    --btn-radius: 30px;
    --burger-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --burger-text-bold: 600;
    --burger-text-normal: 500;
    --burger-z-overlay: 1001;
    --burger-z-container: 1004;
    --burger-z-header: 1003;        /* Header sits above burger container */
    --burger-z-popover: 1006;       /* Phone/cart popovers sit above everything */
    --safe-area: env(safe-area-inset-bottom, 0px);
    --burger-viewport-height: 100vh;
    --overlay-locked-top: 118px;
}

/* Android 16 fix: removed transform: translateZ(0) and backface-visibility from:
   - .new_burger_subcategories, .new_burger_third_level_categories
   - .new_burger_category_item.new_burger_expanded .new_burger_subcategories
   - .new_burger_category_item (transform: translateZ(0))
   - .new_burger_category_item.new_burger_expanded (transform + will-change)
   to fix random element rendering on Android 16
*/



/* NO hover effects on mobile - handled in media query above */
.new_burger_offer_icon_simple {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.new_burger_offers_item,
.new_burger_offer_item_simple,
#newBurgerContainer a {
    outline: none !important;
}



/* SCROLL LOCK - only when the burger is active */
html.burger-scroll-locked {
    overflow: hidden !important;
    height: 100% !important;
}

html.burger-scroll-locked body {
    overflow: hidden;
    position: fixed;
    width: 100%;
    touch-action: none;
}






/* MOBILE ONLY - Hide on desktop */
@media (min-width: 1024px) {
    .new_burger_toggle,
    .new_burger_overlay,
    .new_burger_container {
        display: none;
    }
}

/* MOBILE STYLES - Apply only under 1023px */
@media (max-width: 1023px) {
    /* Normalize UL/LI spacing inside burger (Android/Chrome gap fix)
       On some devices, SSR markup uses <ul> for subcategories. When we collapse using
       max-height: 0, the user‑agent top/bottom margins on UL remain and create large
       vertical gaps between top‑level categories. Reset margins/padding/list-style
       for any lists inside the burger to ensure consistent spacing. */
    #newBurgerContainer ul,
    #newBurgerContainer li,
    .new_burger_categories ul,
    .new_burger_categories li,
    .nb-list {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    /* Explicitly zero vertical margins on subcategory lists (SSR <ul>) */
    .new_burger_subcategories,
    .new_burger_third_level_categories {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    /* ================================
       Z-ORDER FIX: header popovers above burger
       popovers (phone/cart/user) > burger container > burger overlay
    ================================= */
    .header-container,
    .header {
        position: relative;
        z-index: auto; /* Do not create a stacking context; allow burger container to sit above header */
    }

    /* Phone dropdowns (desktop + mobile), user menu, and cart mini dropdown */
    #additionalInfoContainer,
    #additionalInfoContainerMobile,
    .ss-header-dropdown,
    .block-cart-header {
        /* do not change their current geometry, only guarantee stacking */
        z-index: var(--burger-z-popover);
        position: absolute;
        pointer-events: auto;
    }

    /* Burger Toggle - Natural Header Integration */
    .new_burger_toggle {
        position: absolute;
        left: 10px;
        top: 30%;
        transform: translateY(-50%);
        z-index: calc(var(--burger-z-container) + 1);
        background: transparent;
        border: none;
        padding: 2px;
        cursor: pointer;
        transition: none;
    }

    .sticky-header .new_burger_toggle {
        top: 50%;
    }
    
    /* Ensure parent header has relative positioning */
    .header {
        position: relative;
    }
    
    /* Burger Icon Animation */
    .new_burger_icon {
        width: 24px;
        height: 18px;
        position: relative;
    }
    
    .new_burger_icon span {
        display: block;
        position: absolute;
        height: 2px;
        width: 100%;
        background: var(--burger-primary);
        border-radius: 2px;
        transition: var(--burger-animation);
    }
    
    .sticky-header .new_burger_icon span {
        background: white;
    }
    
    .new_burger_icon span:nth-child(1) { top: 0px; }
    .new_burger_icon span:nth-child(2) { top: 8px; }
    .new_burger_icon span:nth-child(3) { top: 16px; }
    
    /* Active state - burger to X */
    .new_burger_toggle.new_burger_active .new_burger_icon span:nth-child(1) {
        top: 8px;
        transform: rotate(135deg);
    }
    
    .new_burger_toggle.new_burger_active .new_burger_icon span:nth-child(2) {
        opacity: 0;
        left: -60px;
    }
    
    .new_burger_toggle.new_burger_active .new_burger_icon span:nth-child(3) {
        top: 8px;
        transform: rotate(-135deg);
    }
    
    /* Keep white color even when active in sticky header */
    .sticky-header .new_burger_toggle.new_burger_active .new_burger_icon span {
        background: white;
    }

    /* Ensure sticky header + banner stay above overlay on iOS Safari */
    body.sticky-header .header-container {
        -webkit-transform: none !important;
        transform: none !important;
        z-index: var(--burger-z-header);
        will-change: top;
    }

    body.sticky-header .header {
        position: relative;
        z-index: var(--burger-z-header);
    }

    body.sticky-header #sticky-banner-container {
        position: relative;
        z-index: calc(var(--burger-z-header) + 1);
    }

    /* Overlay - Dynamic positioning based on sticky states */
    .new_burger_overlay {
        position: fixed;
        top: var(--overlay-locked-top, 118px); /* Under header */
        left: 0;
        right: 0;
        bottom: 0;
        height: auto;
        min-height: 0;
        max-height: none;
        background: rgba(16, 18, 27, 0.4); 
        backdrop-filter: blur(8px); 
        -webkit-backdrop-filter: blur(8px); /* Safari support */
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
        padding-bottom: var(--safe-area);
    }

    /* Prevent horizontal scrolling when the menu is open */
    html.burger-scroll-locked,
    html.burger-scroll-locked body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .new_burger_overlay.new_burger_active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Lock overlay position while menu is open */
    /* Positioning handled by inline styles (iOS 15-16 compatibility) */
    .new_burger_overlay.position-locked {
        bottom: 0;
        height: auto !important;
    }   
    
    /* Make sure the wrapper doesn't block backdrop-filter */
    .wrapper.ps-static.ro-lang-class {
        contain: none;
        transform: none;
        overflow: visible;
    }


    /* Sticky presets: CSS-only fallback for initial render before JS runs.
       When menu is open, JS overrides via inline top + __burger_syncPosition(). */
    .new_burger_overlay.sticky-banner-active,
    .new_burger_container.sticky-banner-active {
        --overlay-locked-top: 118px;
    }

    .new_burger_overlay.sticky-header-active,
    .new_burger_container.sticky-header-active {
        --overlay-locked-top: 138px;
    }

    .new_burger_overlay.both-sticky-active,
    .new_burger_container.both-sticky-active {
        --overlay-locked-top: 188px;
    }
    


    /* Menu container (slides from left). Duplicates removed, same behavior */
    .new_burger_container {
        position: fixed;
        top: var(--overlay-locked-top, 118px); /* default; overridden by `.position-locked` + CSS var */
        left: 0;
        width: 85vw;
        max-width: 380px;
        bottom: 0;
        height: auto;
        max-height: calc(var(--burger-viewport-height, 100vh) - var(--overlay-locked-top, 118px));
        min-height: 0;
        background: #fff;
        transform: translateX(-100%);
        transition: transform var(--burger-animation);
        overflow-y: auto;  /* vertical scroll lives here only */
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        z-index: var(--burger-z-container);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        font-weight: var(--burger-text-bold);
    }

    .new_burger_container.animating {
        will-change: transform;
    }


    /*Prevent any element to overflow */
    .new_burger_overlay *,
    .new_burger_container * {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Fix for wrapper if interference */
    .wrapper.ps-static.ro-lang-class {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    /* When overlay is locked, positioning handled by inline styles (iOS 15-16 compatibility) */
    /* Note: 'top' is NOT set here - it's set dynamically via __burger_syncPosition() */
    /* Removed 'top: 0' to fix iOS 17 cascade conflict causing container desync */
    .new_burger_container.position-locked {
        bottom: 0;
        height: auto;
        max-height: var(--burger-viewport-height, 100vh);
    }

    .new_burger_container.new_burger_active {
        transform: translateX(0);
        transition-delay: 10ms; 
    }

    /* VIEW SYSTEM - Optimized for mobile */
    /* Views are absolutely positioned to overlay without affecting scroll height */
    .new_burger_view {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        min-height: 100%;
        background: white;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 0;
        transition: opacity var(--burger-animation) ease, visibility var(--burger-animation) ease;
        overflow: visible;
        -webkit-overflow-scrolling: touch;
        /* Removed padding-bottom: was creating scrollable white space on all devices.
           Padding now applied to bottom-most content container (.new_burger_bottom_links) */
        /* Content height determined by children, not by fixed 100% */
    }

    /* Ensure active view receives pointer events and is visible */
    .new_burger_view.new_burger_view_active {
        z-index: 10;
        pointer-events: auto;
        visibility: visible;
        opacity: 1;
    }
    

    
    .new_burger_view_main {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: auto;
        min-height: 100%;
        /* Removed padding-bottom: was duplicated with parent .new_burger_view and created
           scrollable white space. Breathing room now only on actual content containers. */
        opacity: 0;
        transition: opacity 0.15s ease;
        transition-delay: 0ms;
        /* Hidden state - will be shown by JavaScript when view is activated */
        overflow: visible;
    }

    /* When main view is active, show it */
    .new_burger_view_active .new_burger_view_main {
        opacity: 1;
    }
    


    /* View Header - Sticky */
    .new_burger_view_header {
        display: flex;
        align-items: center;
        flex-direction: row;
        gap: 20px;
        padding: 1.6rem 2rem;
        background: var(--bg-light);
        top: 0;
        z-index: calc(var(--burger-z-container) + 1);
        box-sizing: border-box;
    }
    
    .new_burger_back_btn {
        display: flex;
        gap: 20px;
        background: none;
        border: none;
        font-size: 2.4rem;
        cursor: pointer;
        color: var(--burger-primary);
        border-radius: 50%;
        margin-right: 12px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .new_burger_back_arrow {
        width: 25px;
        height: 26px;
        flex-shrink: 0;
    }

    /* MAIN ACTION BUTTONS - Mobile optimized */
    .new_burger_main_actions {
        display: flex;
        gap: 40px;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        padding: 1.5rem;
        background-color: var(--bg-light);
    }

    .new_burger_btn {
        padding: 1.5rem 2.4rem;
        border-radius: var(--btn-radius);
        text-decoration: none;
        text-align: center;
        transition: all 0.2s ease;
        border: none;
        cursor: pointer;
        font-size: 1.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }
    
    .new_burger_btn_primary {
        background: var(--burger-primary);
        color: white;
    }
    
    .new_burger_btn_secondary {
        background: transparent;
        color: var(--burger-primary);
        border: 1px solid var(--burger-primary);
    }

    /* OFFERS SECTION - Mobile optimized */   
    .new_burger_categories,
    .new_burger_bottom_links {
        padding: 1rem 2rem;
    }

    /* Add breathing room at bottom of main view (moved from .new_burger_view container) */
    .new_burger_bottom_links {
        padding-bottom: calc(1.25rem + 16px + var(--safe-area));
    }
    
    /* Base styles for all offer items */
    .new_burger_offers_item,
    .new_burger_offer_item_simple {
        display: flex;
        font-size: 1.3rem;
        font-weight: normal;
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        gap: 20px;
        padding: 1rem 2rem;
        text-decoration: none;
        color: var(--burger-text);
        -webkit-tap-highlight-color: transparent;
        box-sizing: border-box;
    }

    .new_burger_offer_item_simple:not(:last-child) {
        border-bottom: 1px solid #f8f8f8;
    }

    /* BEM Modifier: Account section (Contul meu) */
    .new_burger_offers_item--account {
        justify-content: flex-start;
        gap: 20px;
        color: var(--burger-text);
        background-color: #f7f8ff;
        border-bottom: 1px solid #dce0f8;
    }

    /* BEM Modifier: Weekly offers section (Ofertele săptămânii) */
    .new_burger_offers_item--offers {
        background-color: #fff9f9;
        border-bottom: 1px solid #fdd1d1;
    }

    /* BEM Modifier: Resealed items section (Resigilate) */
    .new_burger_offers_item--outlet {
        background-color: #fafaf4;
        border-bottom: 1px solid #dbdcb1;
    }


    .new_burger_offers_icon {
        width: 20px;
        height: 20px;
        margin-right: 1rem;
        flex-shrink: 0;
    }
    


    .new_burger_arrow {
        font-size: 1.4rem;
    }

    /* CATEGORIES - Mobile optimized with touch */
    .new_burger_categories {
        position: relative;
        z-index: 1;
        overflow: visible;
    }

    .new_burger_category_item + .new_burger_category_item {
        margin-top: 0;
        clear: both;
    }

    .new_burger_category_item.new_burger_expanded + .new_burger_category_item {
        margin-top: 0;
        position: relative;
        z-index: 2;
        background: white;
    }
    
    .new_burger_category_item {
        position: relative;
        z-index: auto;
        background: white;
        border-radius: 4px;
        display: block;
        width: 100%;
    }

    .new_burger_category_item:last-child .new_burger_category_link {
        border-bottom: none;
    }
    
    .new_burger_category_link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: .7rem 0;
        text-decoration: none;
        color: var(--burger-text);
        border-bottom: 1px solid #f8f8f8;
        -webkit-tap-highlight-color: transparent;
        min-height: 35px;
        position: relative;
        z-index: auto;
    }

    /* Android 16 fix: removed transform: translateZ(0) and backface-visibility from .new_burger_category_link, .new_burger_subcategory_link, .new_burger_third_level_link */

    .new_burger_category_text,
    .new_burger_offer_inf,
    .new_burger_offer_text_simple,
    .new_burger_offers_text  {
        flex: 1;
        font-size: 1.3rem;
    }

    .new_burger_offers_item .new_burger_category_arrow {
        transform: rotate(180deg);
    }
    
    .new_burger_category_arrow {
        width: 20px;
        height: 21px;
        flex-shrink: 0;
        transition: transform 0.12s ease;
        transform: rotate(0deg);
    }

    /* Use text color to drive SVG arrow color via currentColor */
    .new_burger_category_arrow,
    .new_burger_subcategory_arrow {
        color: var(--burger-text);
    }

    .new_burger_category_item.new_burger_expanded .new_burger_category_arrow {
        transform: rotate(90deg);
        color: var(--burger-accent);
    }

    .new_burger_category_arrow,
    .new_burger_subcategory_arrow {
        transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .new_burger_category_arrow.animating,
    .new_burger_subcategory_arrow.animating {
        will-change: transform;
    }

    /* Subcategories - Smooth accordion */
    .new_burger_subcategories {
        position: relative;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.12s ease;
        margin-left: 0.5rem;
        background: white;
        z-index: 6;
    }

    /* Prevent scroll anchoring inside expanding accordions */
    .new_burger_subcategories,
    .new_burger_third_level_categories {
        overflow-anchor: none;
    }
    
    .new_burger_category_item.new_burger_expanded .new_burger_subcategories {
        max-height: none; 
        overflow: visible; 
        padding: 0;
        background: white;
    }
    
    .new_burger_subcategory_item {
        margin-bottom: 4px;
        position: relative;
        z-index: auto;
        background: transparent;
    }

    .new_burger_subcategory_link {
        display: block;
        padding: 0 1rem;
        text-decoration: none;
        color: var(--burger-text); /* Force visible color */
        font-size: 1.3rem;
        min-height: 33px;
        line-height: 1.3;
        background: white;
    }

    /* Third level categories */
    .new_burger_third_level_categories {
        position: relative;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.10s ease;
        margin-left: 1rem;
        background: white;
        font-weight: var(--burger-text-normal);
    }

    .new_burger_subcategory_expandable {
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: var(--burger-text);
    }

    .new_burger_subcategory_arrow {
        width: 20px;
        height: 21px;
        flex-shrink: 0;
        transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
        transform: rotate(0deg);
    }

    .new_burger_subcategory_item.new_burger_sub_expanded .new_burger_subcategory_arrow {
        transform: rotate(90deg);
        color: var(--burger-accent);
    }

    /* ————————— ANCHOR ISOLATION IN BURGER ————————— */


    /* Button colors inside burger (override global anchor rules) */
    .new_burger_overlay .new_burger_btn_primary,
    .new_burger_overlay .new_burger_btn_primary:link,
    .new_burger_overlay .new_burger_btn_primary:visited {
        color: #fff;
        text-decoration: none;
    }
    .new_burger_overlay .new_burger_btn_secondary,
    .new_burger_overlay .new_burger_btn_secondary:link,
    .new_burger_overlay .new_burger_btn_secondary:visited {
        color: var(--burger-primary);
        text-decoration: none;
    }
     
    .new_offfers_item a,
    .new_offfers_item a:link,
    .new_offfers_item a:visited {
        color: var(--burger-primary);
        text-decoration: none;
    }

    /* ACTIVE STATE COLORING – keep text & arrows in accent when expanded */
    /* Top-level category active */
    .new_burger_category_item.new_burger_expanded .new_burger_category_link,
    .new_burger_subcategory_item.new_burger_sub_expanded > .new_burger_subcategory_link {
        color: var(--burger-accent);
    }
    /* Arrow color follows `color` via currentColor; no direct path fill needed */



    .new_burger_third_level_link {
        display: block;
        padding: 0.5rem 1rem;
        text-decoration: none;
        font-size: 1.3rem;
        min-height: 36px;
        line-height: 1.2;
        background: white;
    }

    /* BOTTOM LINKS - Mobile optimized */
    .new_burger_bottom_links {
        padding: 0 1.5rem 1.5rem;
        border-top: 1px solid #f0f0f0;
        background: var(--bg-light);
    }
    
    .new_burger_bottom_item {
        display: flex;
        align-items: center;
        padding: 1rem 0;
        text-decoration: none;
        color: var(--burger-text);
        border-bottom: 1px solid #f0f0f0;
        -webkit-tap-highlight-color: transparent;
        min-height: 36px;
        gap: 20px;
        font-weight: normal;
        font-size: 1.3rem;
    }

    .new_burger_bottom_item:last-child {
        border-bottom: none;
    }
    
    .new_burger_bottom_icon {
        width: 20px;
        height: 20px;
        margin-right: 1rem;
        flex-shrink: 0;
    }

    /* OFFERS VIEW - Mobile optimized */   
    .new_burger_offer_item {
        margin-bottom: 1rem;
        border-radius: var(--burger-radius);
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        background: white;
    }
    
    .new_burger_offer_header {
        display: flex;
        align-items: center;
        padding: 1rem;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        min-height: 60px;
    }
    
    .new_burger_offer_icon {
        margin-right: 1rem;
        position: relative;
    }
    
    .new_burger_offer_badge {
        background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
        color: white;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 1.1rem;
        text-align: center;
        min-width: 50px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    

    
    .new_burger_offer_info h4 {
        margin: 0 0 4px 0;
        font-size: 1.6rem;
        color: var(--burger-text);
    }
    
    .new_burger_offer_info p {
        margin: 0;
        font-size: 1.4rem;
    }

    .new_burger_view_title {
        font-size: 1.4rem;
        font-weight: var(--burger-text-bold);
        line-height: 1.8;
    }

    /* ACCESSIBILITY & MOBILE TOUCH OPTIMIZATIONS */

    /* Smooth scroll pentru container — OFF to avoid jump/bounce */
    .new_burger_container {
        scroll-behavior: auto; /* was: smooth */
        scroll-padding-top: 20px; /* Padding cand scroll-ezi la categorii */
        overscroll-behavior: contain; /* prevent page from absorbing scroll */
        overflow-anchor: none; /* disable Chrome scroll anchoring */
    }
    
    /* Visual feedback for active category */
    .new_burger_category_item.new_burger_expanded {
        z-index: 5;
        margin-bottom: 0;
        position: relative;
        border-radius: 8px;
        transition: background-color 0.3s ease;
    }
    
    /* Highlight expanded category */
    .new_burger_category_item.new_burger_expanded .new_burger_category_link {
        font-weight: 600;
        color: var(--burger-accent);
        background: rgba(68, 78, 142, 0.05);
        border-radius: 5px 5px 0 0;
        padding: 1.2rem 1rem;
    }


    /* Container sticky presets: CSS-only fallback before JS runs.
       Overridden by inline styles via __burger_syncPosition() when menu is open. */
    .new_burger_container.sticky-banner-active { --overlay-locked-top: 118px; }
    .new_burger_container.sticky-header-active { --overlay-locked-top: 138px; }
    .new_burger_container.both-sticky-active { --overlay-locked-top: 188px; }
    .new_burger_container.no-sticky-active { --overlay-locked-top: 70px; }


    /* URGENT: FORCE VISIBILITY PENTRU SUBCATEGORII */
    /* 🚨 CRITICAL FIX - Force visible color pentru subcategorii */
    .new_burger_subcategory_link,
    .new_burger_subcategory_link:link,
    .new_burger_subcategory_link:visited,
    .new_burger_subcategory_expandable,
    .new_burger_subcategory_expandable:link,
    .new_burger_subcategory_expandable:visited,
    .new_burger_subcategory_expandable span {
        display: flex !important;
    }

    /* 🚨 CRITICAL FIX - Third level categories visibility */
    .new_burger_third_level_link,
    .new_burger_third_level_link:link,
    .new_burger_third_level_link:visited {
        color: var(--burger-text); /* Force dark text */
        background-color: white; /* Force white background */
        visibility: visible;
        opacity: 1;
        display: block !important;
    }

    /* 🚨 CRITICAL FIX - Container visibility enforcement */
    .new_burger_subcategories {
        background: white;
        visibility: visible;
        opacity: 1;
    }

    .new_burger_third_level_categories {
        background: white;
        visibility: visible;
        opacity: 1;
    }

    /* 🚨 CRITICAL FIX - Override orice inline red color */
    .new_burger_overlay *[style*="color: red"],
    .new_burger_overlay *[style*="color:red"] {
        color: var(--burger-text) !important;
    }

    /* 🚨 CRITICAL FIX - Force layout pentru expanded state */
    .new_burger_category_item.new_burger_expanded .new_burger_subcategories {
        max-height: none !important;
        overflow: visible;
        height: auto;
        padding: 1rem 0 0;
        margin: 0;
        display: block;
        position: relative;
    }

    .new_burger_subcategory_item.new_burger_sub_expanded .new_burger_third_level_categories {
        max-height: none !important;
        overflow: visible;
        height: auto;
        padding: 1rem 0 0;
        margin: 0 1rem;
        display: block;
        position: relative;
    }
}

@media (max-width: 459px) {
    .new_burger_btn {
        font-size: 1.2rem;
        font-weight: 700;
        padding: 1rem 2rem;
    }
    .new_burger_main_actions {
        gap: 20px;
    }
    
}

/* Fallback pentru edge cases */
@media (max-width: 380px) {
    .new_burger_category_item.new_burger_expanded .new_burger_subcategories {
        max-height: 800px;
    }

    .new_burger_btn {
       padding: 1rem  1.5rem;
    }
}







/* ================================
DYNAMIC MENU REORDERING STYLES   
================================ */
@media (max-width: 1023px) {

    /* Recent item styling */
    .recent-item {
        position: relative;
    }

    .recent-item .new_burger_category_link {
        font-weight: var(--burger-text-bold);
        background: linear-gradient(90deg, rgba(68, 78, 142, 0.05) 0%, transparent 100%);
        border-radius: 6px;
        padding: 1.2rem 1rem;
        margin: 0 -1rem;
    }

    /* Recent indicator bullet */
    .recent-indicator {
        color: var(--burger-accent);
        margin-right: 8px;
        font-size: 12px;
        font-weight: bold;
        animation: recentPulse 2s infinite;
    }

    @keyframes recentPulse {

        0%,
        100% {
            opacity: 1;
        }

        50% {
            opacity: 0.6;
        }
    }

 

    @keyframes highlightFade {
        0% {
            background: linear-gradient(90deg, rgba(68, 78, 142, 0.15) 0%, transparent 100%);
            border-left-color: var(--burger-accent);
        }

        100% {
            background: transparent;
            border-left-color: transparent;
        }
    }

    /* Recent subcategory styling */
    .recent-subcategory .new_burger_subcategory_link {
        font-weight: var(--burger-text-bold);
        background: rgba(244, 246, 255, 0.7);
        border-radius: 4px;
        padding: 0.75rem 1rem;
        margin: 0 -0.5rem;
    }


    
    .catalog-product-view .swipe-control.new_burger_toggle {
        position: absolute;
    }   

}




.new_burger_category_item.new_burger_expanded .new_burger_category_link {
    color: var(--burger-accent);
    font-weight: 700;
    background: transparent;
    border-radius: 0;
    padding: .7rem 0; 
    text-decoration: none;
}


/* C — Hide legacy nav on mobile when new burger is present */
@media (max-width: 1023px) {
  body.has-new-burger .sf-menu-phone,
  body.has-new-burger .swipe,
  body.has-new-burger .nav-container.nav_mobile {
    display: none !important; /* Force hide legacy mobile nav */
  }
}

/* Hide legacy nav on mobile when the new burger is active */
@media (max-width: 1023px) {
  html.new-burger-enabled .nav-container { display: none !important; }
}

/* === L1 panel transition (height-based, iOS-friendly) === */
.bm-l1-panel {
  height: 0;
  overflow: hidden;
  transition: height .24s ease;
  will-change: height;
}

@media (prefers-reduced-motion: reduce) {
  .bm-l1-panel { transition: none; }
}

/* Inert fallback: when burger is open, prevent pointer events on inerted content */
html.burger-scroll-locked .bm-inerted,
html.burger-scroll-locked .bm-inerted * {
  pointer-events: none !important;
}

