/* 1. Top Bar Banner */
.top-bar-banner {
    background-color: #88F;
    color: #ffffff;
    text-align: center;
    padding: 9px 0;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 5;
}

.top-bar-banner p{
    color: #FFF;
    text-align: center;
    font-family: Manrope;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: -0.42px;
}

/* 2. Header Layout - Fixed 63px Height */
.site-header {
    background: #fff;
    height: 63px; /* Strictly 63px max height */
    max-height: 63px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
    overflow: visible !important; /* Allows logo to spill out */
}

/* Ensure the container inside the header also respects the height */
.site-header .container {
    height: 100%;
}

.nav-div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    overflow: visible;
}

.nav-div .menu-div ul li:last-child {
    margin-bottom: 15px !important ;
}

/* 3. Logo Floating Logic - Fixed 100px x 100px */
.site-branding {
    position: relative;
    width: 100px; /* Match logo width */
    height: 100%; /* Keep within the 63px header for alignment */
    overflow: visible;
}

.site-branding img {
    max-height: 100px !important;
    width: 100px !important;
    height: 100px !important;
    position: absolute;
    top: -30px; 
    left: 0;
    z-index: 99999;
    border-radius: 50%; /* Ensures the circular look */
}

/* 4. Navigation Menu */
.menu-div {
    flex-grow: 1;
    display: flex;
    justify-content: flex-start !important;
    padding-left: 40px; /* Space between 100px logo and links */
    height: 100%;
}

.menu-wrapper {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    align-items: center;
    height: 100%;
}

.menu-wrapper li a {
    color: #486284;
    font-family: Manrope;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    text-transform: capitalize;
}

.menu-wrapper li a:hover {
    color: #252E6F;
	text-decoration: none;
}

/* 5. Header Right Actions */
.header-right-actions {
    display: flex !important; 
    align-items: center;
    gap: 20px;
    height: 100%;
}

.search-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
    padding: 5px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.search-toggle-btn:focus {
    outline: none;
}


.header-cta-btn {
    background-color: #2c346b; 
    color: #fff !important;
    padding: 0 25px;
    height: 40px; /* Button height fits within 63px header */
    line-height: 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    /* transition: background 0.3s ease; */
    white-space: nowrap;
    margin-bottom: 20px !important;
    border: 1px solid #2c346b;
    transition: 0.3s ease-in-out all;
}

.header-cta-btn:hover {
    background-color: #fff; 
    color: #2c346b !important;
    border: 1px solid #2c346b;
    text-decoration: none;
    transition: 0.3s ease-in-out all;
}


/* 6. Mobile Adjustments */
@media (max-width: 767px) {
    .top-bar-banner {
        padding: 12px 0px;
    }

    .desktop-only-menu { 
        display: none !important; 
    }
    .site-header {
        height: auto; /* Allow header to expand on mobile if needed */
        max-height: none;
    }
    .site-branding img {
        position: static;
        width: 60px !important;
        height: 60px !important;
    }
    .site-branding {
        width: auto;
    }

    .header-cta-btn {
        background-color: #2c346b;
        color: #fff !important;
        padding: 0 25px;
        height: 40px;
        line-height: 40px;
        border-radius: 50px;
        text-decoration: none;
        font-weight: 600;
        font-size: 14px;
        font-family: Manrope;
        white-space: nowrap;
        display: flex;
        justify-content: center;
        margin-bottom: 20px !important;
        margin: 0 20px;
    }

    .mobile-menu-wrapper li:last-child {
        border-bottom: none !important;
        padding-bottom: 50px;
    }
}

/* =========================================
   CUSTOM MEGA MENU (No Plugin Version)
   ========================================= */

/* 1. Parent Menu Item Handling */
/* We set position: static so the dropdown positions relative to the Header, not the Link */
li.has-qvr-mega {
    position: static !important; 
}

/* 2. The Wrapper (Hidden by default) */
.qvr-mega-menu-wrapper {
    position: absolute;
    top: 75%;       
    left: 0;
    right: 0;    
    width: 100%;
    z-index: 9999;   /* Sit on top of everything */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
    background-color: transparent; 
    padding-top: 0px; 
}

/* 3. Show on Hover */
li.has-qvr-mega:hover .qvr-mega-menu-wrapper,
.qvr-mega-menu-wrapper:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 4. The Content Box (The visual part) */
.qvr-mm-container {
    max-width: 1140px; /* Constrain content width */
    margin: 0 auto;    /* Center it */
    background-color: #fff; 
    border-radius: 0 0 8px 8px;
    display: flex;
    overflow: hidden;
    min-height: 400px; 
    border-top: none; /* Looks attached to header */
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 5. SIDEBAR (Brand/Category/Suitable) */
.qvr-mm-sidebar {
    width: 25%;
    min-width: 240px;
    background-color: #fff;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
}

ul.qvr-mm-tabs {
    list-style: none;
    margin: 0;
    padding: 0;
}

li.mm-tab-item {
    padding: 15px 40px;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: all 0.2s;
    line-height: 1.2;
    color:#A8A8A8;
    font-family: Manrope;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

li.mm-tab-item:hover {
    color: #252E6F;
    background-color: #fcfcfc;
}

li.mm-tab-item.active {
    color: #252E6F;
    font-weight: 700;
    background-color: #F9F9FB; /* Match Content BG */
    border-left-color: #252E6F; /* Blue active indicator */
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* 6. CONTENT PANEL */
.qvr-mm-content {
    flex: 1;
    background-color: #F6F5F9;
    padding: 30px 30px;
    margin: 30px !important; 
    border-radius: 10px;
}

.mm-panel {
    display: none;
    animation: slideIn 0.3s ease;
}

.mm-panel.active {
    display: block;
}

/* Link Lists */
ul.mm-link-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 2-Column Layout */
ul.mm-link-grid.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 60px; /* Wider gap for readability */
}

ul.mm-link-grid li a {
    color: #333;
    font-family: Manrope;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    text-decoration: none;
}

ul.mm-link-grid li a:hover {
    color: #252E6F;
    font-weight: 600;
}

/* Empty State */
.mm-empty {
    color: #999;
    font-style: italic;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(5px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Mobile: Hide purely custom mega menu */
@media (max-width: 992px) {
    .qvr-mega-menu-wrapper {
        display: none !important;
    }
}

/* Inline Search Wrapper */
#qvr-header-search-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 10%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    /* transition: all 0.3s ease; */
    max-height: 56px;
}

#qvr-header-search-wrap.qvr-search-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-inner-inline {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.asl-search-box-container {
    flex: 1;
}

/* Force clean results dropdown */
div.asl_r {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    border-radius: 0 0 10px 10px !important;
    border: none !important;
    margin-top: 0 !important;
}

#qvr-search-close {
    outline: none;
    border: none;
    background: transparent;
    cursor: pointer;
}

/* --- QVR CLEAN SEARCH RESULTS DROPDOWN --- */

/* The main results container */
div.asl_r {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 0 12px 12px !important; /* Rounded bottom corners */
    box-shadow: 0 15px 35px rgba(37, 46, 111, 0.12) !important; /* Soft navy shadow */
    margin-top: 0 !important;
    padding: 10px 0 !important;
}

/* Individual result item */
div.asl_r .results .item {
    padding: 15px 25px !important;
    border-bottom: 1px solid #f0f2f5 !important;
    transition: background 0.2s ease;
}

div.asl_r .results .item:last-child {
    border-bottom: none !important;
}

/* Hover state for results */
div.asl_r .results .item:hover, 
div.asl_r .results .item.hovered {
    background-color: #f8fafc !important;
}

/* Product Image Styling */
div.asl_r .results .item .asl_content img {
    width: 50px !important;
    height: 50px !important;
    border-radius: 6px !important;
    margin-right: 15px !important;
    object-fit: contain !important;
    background: #fff;
}

/* Product Title Styling */
div.asl_r .results .item .asl_content h3 a {
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #252E6F !important; /* Your brand navy */
    text-decoration: none !important;
}

/* Hide the "Search for..." bar at the bottom if it still appears */
div.asl_r .asl_res_phrase {
    display: none !important;
}

/* Styling the "No Results" message */
div.asl_r .nores {
    padding: 20px !important;
    color: #64748b !important;
    font-style: italic;
    text-align: center;
}

/* Style for the new Clear button */
.search-clear-text {
    background: none;
    border: none;
    color: #252E6F;
    font-size: 14px;
    cursor: pointer;
    padding: 10px;
    font-family: inherit;
}

.search-clear-text i {
    font-style: italic;
}

/* Ensure the input line is clean and matches the video aesthetic */
.proinput input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 300 !important;
    font-size: 18px !important;
    padding-left: 0 !important;
}

/* Hide the plugin's default X button since we have our custom 'Clear' */
.proclose {
    display: none !important;
}

/* Keep the magnifying glass if you like, or hide it to match the video */
.promagnifier {
    display: none !important;
}

#ajaxsearchlite1 .probox .proinput input, div.asl_w .probox .proinput input {
    font-size: 12px !important;
}

/* --- MOBILE DESIGN ALIGNMENT --- */
@media (max-width: 767px) {
    .site-header {
        height: 63px !important; /* Keep fixed height consistent with desktop */
        max-height: 63px !important;
    }

    .nav-div {
        justify-content: space-between;
        padding: 0 15px;
    }

    /* Logo Styling based on design */
    .site-branding img {
        position: static !important;
        width: 60px !important; /* Adjusted size for mobile design */
        height: 60px !important;
    }

    /* Cluster icons together on the right */
    .header-right-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 15px !important;
        height: 100%;
    }

    /* Reset vertical alignment for mobile icons */
    .search-toggle-btn, 
    .header-mobile-menu {
        margin-bottom: 0 !important;
        padding: 5px;
        display: flex;
        align-items: center;
    }

    .mobile-menu-toggle {
        display: block !important;
    }

    /* Ensure search bar overlay spans full width correctly on mobile */
    #qvr-header-search-wrap {
        padding: 0px;
        max-height: 63px;
        z-index: 9999;
        left: 96px;
        width: 70%;
    }
    
    #qvr-search-close {
        font-size: 24px;
    }
}

/* Ensure Hamburger lines are black per design */
.mobile-menu-toggle_lines,
.mobile-menu-toggle_lines::before,
.mobile-menu-toggle_lines::after {
    background-color: #000;
}

.header-menu-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #fff !important;
    z-index: 1000000 !important;
    
    /* Force hidden state */
    visibility: hidden !important;
    opacity: 0 !important;
    /* transition: all 0.3s ease !important; */
    pointer-events: none !important; /* Makes it "click-through" when hidden */
}

/* Force visible state only when active */
.header-menu-sidebar.is-active {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important; /* Enables clicking when visible */
}

.header-menu-sidebar.is-active .header-menu-sidebar-bg {
    transform: translateX(0) !important;
}

/* Make sure body scroll lock actually works */
body.no-scroll {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* --- STICKY LOGIC --- */
.sticky-header-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000; /* Ensure it stays above content */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Optional: Slight scroll shadow */
}

/* Ensure Logo spills over properly */
.site-branding {
    position: relative;
    width: 100px;
    height: 100%;
}

.site-branding img {
    max-height: 100px !important;
    width: 100px !important;
    height: 100px !important;
    position: absolute;
    top: -30px; /* Floating out from top */
    left: 0;
    z-index: 99999;
    border-radius: 50%;
}

/* Mobile Adjustments for Sticky Banner */
@media (max-width: 767px) {
    .site-header {
        height: 63px !important;
    }

    /* Logo on mobile sits within header as per screenshot */
    .site-branding img {
        position: static !important;
        width: 60px !important;
        height: 60px !important;
        top: 0;
    }

    /* Banner text alignment for mobile */
    .top-bar-banner p {
        font-size: 12px;
        padding: 0 10px;
    }
}

/* --- BANNER DISPLAY LOGIC --- */
.desktop-only-banner {
    display: block;
}

.mobile-only-banner {
    display: none; /* Hide inside header on desktop */
}

.sticky-header-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: #fff;
}

/* --- MOBILE SPECIFIC CHANGES --- */
@media (max-width: 767px) {
    /* Hide the top-level banner */
    .desktop-only-banner {
        display: none !important;
    }

    /* Show the internal banner */
    .mobile-only-banner {
        display: block !important;
        order: 2; /* Moves it below the logo/actions row */
        width: 100%;
    }

    .container.header-container {
        order: 3;
        max-height: 45px;
    }

    .site-header {
        height: auto !important; /* Allow header to expand to fit banner */
        max-height: none !important;
        flex-direction: column; /* Stack logo row on top of banner */
    }

    .site-header .nav-div {
        max-height: 45px !important;
    }

    .header-container {
        display: flex;
        flex-direction: column;
    }

    .nav-div {
        order: 1; /* Keep logo and icons on top row */
        width: 100%;
        height: 63px; /* Logo row stays at your 63px height */
    }

    /* Adjust logo and icons to align as per design */
    .site-branding img {
        position: static !important;
        width: 65px !important;
        height: 75px !important;
        transform: translateY(-16px);
    }

    .header-right-actions {
        display: flex !important;
        flex-direction: row;
        gap: 15px;
        align-items: center;
    }
    
}

/* Hide right actions when the search bar is active */
#qvr-header-search-wrap.qvr-search-visible ~ .header-right-actions {
    display: none !important;
}

/* Optional: Ensure the branding logo also stays hidden if you want 
   the search bar to take up the full header width on mobile */
@media (max-width: 767px) {
    #qvr-header-search-wrap.qvr-search-visible ~ .site-branding {
        display: none !important;
    }
}

/* Container that hides the "off-screen" panel */
.section-content-overflow {
    overflow: hidden;
    width: 100%;
}

/* The wide container holding panels side-by-side */
.mobile-menu-slider {
    display: flex;
    width: 200%; /* Two panels wide */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0); /* Default: Show Panel 1 */
}

/* Move the slider to show Panel 2 */
.mobile-menu-slider.show-sub-menu {
    transform: translateX(-50%);
}

/* Each panel takes exactly half of the 200% width (which is 100% of the sidebar) */
.mobile-panel {
    width: 50%;
    flex-shrink: 0;
    padding: 20px;
    height: auto; /* Now respects internal content height */
}

/* Typography matching your design */
.mobile-sub-trigger, .sub-menu-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #252E6F !important;
    font-weight: 500;
    padding: 18px 0;
    font-family: 'Manrope', sans-serif;
}

/* --- MOBILE ACCORDION STYLING --- */

.mobile-accordion-item {
    border-bottom: 1px solid #F0F0F0;
    transition: background-color 0.3s ease;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
    cursor: pointer;
    color: #252E6F;
    font-weight: 600;
    font-size: 18px;
    font-family: 'Manrope', sans-serif;
}

/* The drill-down content area */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-accordion-item.is-open .accordion-content {
    max-height: 1200px; /* High value to allow long lists to expand */
    padding-bottom: 15px;
}

/* Dynamic Term Links */
.dynamic-term-list {
    list-style: none;
    padding: 0 5px;
    margin: 0;
}

.dynamic-term-list li a {
    display: block;
    padding: 14px 0;
    color: #486284;
    font-size: 16px;
    text-decoration: none;
    font-weight: 400;
    border: none !important; /* Remove borders from nested links */
}

/* Accordion Toggle Icons (+/-) */
.plus-icon {
    position: relative;
    width: 14px;
    height: 14px;
}

.plus-icon::before, .plus-icon::after {
    content: '';
    position: absolute;
    background-color: #252E6F;
    transition: transform 0.3s ease;
}

/* Horizontal line */
.plus-icon::before {
    top: 6px;
    left: 0;
    width: 14px;
    height: 2px;
}

/* Vertical line (disappears when open) */
.plus-icon::after {
    top: 0;
    left: 6px;
    width: 2px;
    height: 14px;
}

.mobile-accordion-item.is-open .plus-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

/* 1. The Main Sidebar Container must allow vertical scrolling */
.header-menu-sidebar-bg {
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent horizontal overflow of the slider */
}

/* 2. The overflow container now handles the vertical scroll */
.section-content-overflow {
    flex: 1; /* Take up remaining space below the header */
    overflow-y: auto; /* Enable vertical scroll */
    overflow-x: hidden; /* Strictly hide horizontal scroll */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* 3. The Slider stays wide but within the scrollable parent */
.mobile-menu-slider {
    display: flex;
    width: 200%; 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: flex-start; /* Ensure height isn't forced to match between panels */
}

.mobile-sub-header {
    padding-left: 20px;
}

/* 4. Ensure each panel can grow vertically as needed */
.mobile-panel {
    height: auto !important;
    min-height: 100%;
    display: block;
    padding-bottom: 100px;
    padding-right: 0;
    padding-left: 0;
}

#mobile-menu-main-panel.mobile-panel > .mobile-menu-wrapper li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 1. Hide the arrow for all list items by default */
.mobile-menu-wrapper li .arrow-right {
    display: none;
}

/* 2. Show the arrow ONLY if the parent <li> has the specific class */
.mobile-menu-wrapper li.menu-item-has-children .arrow-right {
    display: inline-flex; /* or block, depending on your layout */
}

.section-content-overflow {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 100px); /* Subtracts the height of your sidebar logo/header */
}

/* --- MOBILE SIDEBAR DESIGN REFINEMENT --- */

/* 1. Sidebar Background */
.header-menu-sidebar-bg {
    background-color: #F9F9FB !important; /* Design light-grey background */
}

/* 2. The Back Button (< Products) */
.mobile-back-btn {
    background: transparent;
    border: none;
    color: #252E6F !important; /* Brand Navy */
    font-size: 20px !important;
    font-weight: 700 !important;
    font-family: 'Manrope', sans-serif;
    padding: 20px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 3. Accordion Header Styling */
.accordion-header {
    color: #252E6F !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    padding: 25px 0 !important;
}

/* 4. Sub-menu List Items (Allergies, etc.) */
.dynamic-term-list li a {
    color: #252E6F !important;
    font-size: 18px !important; /* Larger as per screenshot */
    font-weight: 400 !important;
    padding: 20px 0 !important;
    border-bottom: 1px solid #E5E5E5 !important;
    display: block;
    text-align: center; /* Design shows centered sub-links */
}

/* --- THE CLIPPING & SCROLL FIX --- */

.section-content-overflow {
    flex: 1;
    overflow-y: auto !important; /* Force scroll */
    overflow-x: hidden;
    /* Calculate height: 100vh - Banner - Logo Header */
    height: calc(100vh - 120px) !important; 
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-slider {
    align-items: flex-start !important; /* Prevents Panel 1 from stretching Panel 2 */
}

.accordion-content {
    /* Use 'initial' for max-height when open to bypass clipping */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.mobile-accordion-item.is-open .accordion-content {
    max-height: 2000px !important; /* High enough for all categories */
}

/* --- MOBILE BACK BUTTON ALIGNMENT --- */
.mobile-back-btn {
    display: flex;
    align-items: center;
    gap: 15px; /* Spacing between chevron and text */
    padding: 20px 0;
    color: #252E6F !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    font-family: 'Manrope', sans-serif;
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
}

.mobile-back-btn:focus {
    outline: none;
}

.back-svg-icon svg {
    width: 10px; /* Scaled to fit text height */
    height: auto;
}

/* --- MENU 3: CENTERED SUB-LINKS --- */
.dynamic-term-list {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.dynamic-term-list li a {
    display: block;
    text-align: center; /* Center alignment as per design */
    color: #252E6F !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    padding: 18px 0 !important;
    border-bottom: 1px solid #F0F0F0 !important;
    text-decoration: none;
}

/* --- CLIPPING RESOLUTION --- */
.section-content-overflow {
    flex: 1;
    overflow-y: auto !important;
    overflow-x: hidden;
    /* Ensuring the container covers the full available height */
    height: calc(100vh - 150px) !important; 
    padding-bottom: 50px; /* Buffer for the bottom category items */
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

/* Force open state to accommodate ANY amount of categories */
.mobile-accordion-item.is-open .accordion-content {
    max-height: 2500px !important; 
}

/* --- ACCORDION DESIGN MATCH --- */

/* Only the selected (open) accordion gets the grey background */
.mobile-accordion-item.is-open {
    /* background-color: #F6F5F9 !important; */
}

/* Accordion Headers */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 20px; /* Padding for the background color to span correctly */
    cursor: pointer;
    color: #252E6F !important;
    font-weight: 600;
    font-size: 18px;
    font-family: 'Manrope', sans-serif;
}

/* Taxonomy Value Styling */
.dynamic-term-list li a {
    display: block;
    text-align: left !important; 
    color: #333 !important; 
    font-family: 'Manrope', sans-serif !important;
    font-size: 18px !important;
    font-style: normal;
    font-weight: 400 !important;
    line-height: normal;
    padding: 15px 40px 15px 20px !important; /* Indented from parent header */
    border: none !important;
    text-decoration: none;
}

/* Clipping & Transition Fix */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-accordion-item.is-open .accordion-content {
    max-height: 2500px !important; /* Ensure nothing is cut off */
}

/* --- PLUS ICON STYLING --- */
.plus-icon {
    position: relative;
    width: 14px;
    height: 14px;
}

.plus-icon::before, .plus-icon::after {
    content: '';
    position: absolute;
    background-color: #252E6F;
}

/* Horizontal line */
.plus-icon::before {
    top: 6px;
    left: 0;
    width: 14px;
    height: 2px;
}

/* Vertical line (disappears for '-' state) */
.plus-icon::after {
    top: 0;
    left: 6px;
    width: 2px;
    height: 14px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-accordion-item.is-open .plus-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

.mobile-menu-wrapper ul.dynamic-term-list li {
    padding: 0 !important;
    border-bottom: none !important;
}

/* --- HEADER SIDEBAR ACCORDION --- */

/* 1. Closed State */
.menu-accordion-item .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

/* 2. Open State - Forced expansion for Header Menu */
.menu-accordion-item.is-open .accordion-content {
    max-height: 800px !important; /* Adjusted for menu height */
    visibility: visible !important;
    padding-bottom: 10px;
}

/* 3. Icon Rotation for Header Menu */
.menu-accordion-item.is-open .plus-icon::after {
    transform: rotate(90deg) !important;
    opacity: 0 !important;
}

/* 4. Optional: Active Background for Menu */
.menu-accordion-item.is-open {
    background-color: #F6F5F9;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
}

.menu-accordion-item .menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.menu-accordion-item .menu-header .menu-header-span {
    color: #252E6F;
    font-family: Manrope;
    font-size: 22px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

.dynamic-term-list li a {
    color: #333 !important;
    font-family: Manrope !important;
    font-size: 18px !important;
    font-style: normal;
    font-weight: 500 !important;
    line-height: normal;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.dynamic-term-list li a:hover {
    color: #5D7FF9 !important;
    font-family: Manrope !important;
    font-size: 18px !important;
    font-style: normal;
    font-weight: 600 !important;
    line-height: normal;
}

#mobile-menu-main-panel.mobile-panel > .mobile-menu-wrapper li a {
    display: inline-block !important;
    justify-content: space-between !important;
    padding: 0 20px !important;
    width: auto;
}

.mobile-menu-wrapper li a span{
    color: #252E6F;
    font-family: Manrope;
    font-size: 22px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}
