/*
 * Site header, mega menu, phone menu and Training Academy side cart
 * (Phase 3 plan 09). Markup: includes/site-header/site-header.php.
 *
 * Part A is the "Boon Aesthetics Header & Mega Menu" block that lived in
 * Appearance > Customize > Additional CSS. Part B is the <style> the old
 * header snippet printed at the top of the page body. Same rules, same order.
 *
 * :where(.boon-header), and the two like it for the phone menu and the side
 * cart, tie a rule to the header without making it any stronger than it was.
 * So the theme and Elementor win and lose against it exactly where they always
 * did. Don't swap one for a plain .boon-header prefix without checking the
 * page: that outranks the theme's button, link and heading rules and repaints
 * the header. A rule that has to win is written with the real class.
 *
 * site-header.php prints this file straight after Additional CSS, the last
 * styles in the page head, which is where part B always came. Keep it there:
 * part B has to come after part A and after Additional CSS to win its ties.
 */

/* ==================================================================
   Part A - from Additional CSS
   ================================================================== */

/* ------------------------------------------------------------------
   1. Header Structure & Z-Index Fixes
   ------------------------------------------------------------------ */
.boon-header {
    background: transparent;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: none;
    isolation: isolate;
}

.boon-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #272727;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 5;
    pointer-events: none;
}

:where(.boon-header) .header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

:where(.boon-header) .header-logo {
    position: relative;
    z-index: 10;
}

:where(.boon-header) .header-logo a {
  display: flex;
  align-items: center;
  line-height: 0;
}
:where(.boon-header) .header-logo img { height: 50px; width: auto;display:block; }

/* ------------------------------------------------------------------
   2. Navigation & Top Level Links
   ------------------------------------------------------------------ */
:where(.boon-header) .header-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

:where(.boon-header) .main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 35px;
    align-items: center;
}

:where(.boon-header) .main-menu > .menu-item > a {
    position: relative;
    z-index: 10;
    color: #FFFFFF;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
}

:where(.boon-header) .main-menu .menu-item a:hover { color: #F9A981; }

/* ------------------------------------------------------------------
   3. Regular Dropdown Styling (About, etc.)
   ------------------------------------------------------------------ */
:where(.boon-header) .menu-item-has-children { position: relative; }

.boon-header .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #FFFFFF;
    min-width: 240px;
    list-style: none;
    margin-top: 35px;
    padding: 12px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 1;
}

:where(.boon-header) .menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

:where(.boon-header) .sub-menu-item { margin: 0 0 4px 0; padding: 0; }

:where(.boon-header) .sub-menu-item a {
    display: block;
    padding: 8px 16px;
    color: #272727 !important;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    border-left: none;
    z-index: 1;
}

:where(.boon-header) .sub-menu-item a:hover {
    background: #FEE5DB;
    color: #272727 !important;
    padding-left: 16px;
}

/* ------------------------------------------------------------------
   4. Mega Menu Styling
   ------------------------------------------------------------------ */
:where(.boon-header) .menu-item-has-mega { position: relative; }

:where(.boon-header) .treatments-mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    width: 100vw;
    max-width: 1400px;
    background: #FFFFFF;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 20px 20px;
    padding: 40px 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: 35px;
    z-index: 1;
}

:where(.boon-header) .menu-item-has-mega:hover .treatments-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

:where(.boon-header) .mega-menu-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 35px;
    max-width: 1300px;
    margin: 0 auto;
}

:where(.boon-header) .mega-menu-column { padding: 0; }
:where(.boon-header) .mega-menu-category-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px!important;
    font-weight: 600!important;
    color: #F9A981;
    margin: 0 0 8px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #FEE5DB;
}
:where(.boon-header) .mega-menu-treatment-list { list-style: none; margin: 0; padding: 0; }
:where(.boon-header) .mega-menu-treatment-item { margin-bottom: 8px; }
:where(.boon-header) .mega-menu-treatment-link {
    display: block;
    background: #FFFFFF;
    border-radius: 8px; padding: 4px 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}
:where(.boon-header) .mega-menu-treatment-link:hover { background: #FEE5DB; }
:where(.boon-header) .mega-menu-treatment-link .treatment-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px!important;
    font-weight: 500!important;
    color: #272727;
}

:where(.boon-header) .mega-menu-treatment-list--indented .mega-menu-treatment-item {
    border-left: 1px solid #FDC7B0;
    padding-left: 5px;
}

/* CTA */
:where(.boon-header) .mega-menu-cta {
    background: linear-gradient(135deg, #FEE5DB, #FDC7B0);
    border-radius: 10px;
    padding: 20px;
    text-align: center; display: flex!important; justify-content: center; align-items: center;
}
:where(.boon-header) .mega-menu-cta-content h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #272727;
    margin: 0 0 7px 0;
}
:where(.boon-header) .mega-menu-cta-content p {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #5C5C5C;
    line-height: 1.6;
    margin-bottom: 12px;
}
:where(.boon-header) .mega-menu-cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: #F9A981;
    color: #FFFFFF !important;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 169, 129, 0.3);
}
:where(.boon-header) .mega-menu-cta-button:hover {
    background: #DD9D81;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 169, 129, 0.4);
    color: #272727!important;
}

/* ------------------------------------------------------------------
   5. Mobile Menu Elements (Slide-Out Drawer & Flat List)
   ------------------------------------------------------------------ */

/* Hamburger Button */
:where(.boon-header) .mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 6px;
    z-index: 20;
    margin-left: 20px;
}

:where(.boon-header) .mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: #FFFFFF;
    border-radius: 2px;
    transition: all 0.3s ease;
}

:where(.boon-header) .mobile-menu-toggle:hover span { background: #F9A981; }

/* Dark Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* The Sliding Drawer - WIDE & SCROLLABLE */
:where(.mobile-menu-overlay) .mobile-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 90%;
    max-width: 400px;
    background: #272727;
    padding: 80px 30px 40px;
    overflow-y: auto;
    box-shadow: 5px 0 30px rgba(0,0,0,0.5);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);

    /* HIDE SCROLLBARS (But keep scrolling) */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
:where(.mobile-menu-overlay) .mobile-menu-content::-webkit-scrollbar {
    display: none;
}

.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu-overlay.active .mobile-menu-content { transform: translateX(0); }

/* Close Button */
:where(.mobile-menu-overlay) .mobile-menu-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none!important;
    border: none!important;
    color: #FFFFFF;
    font-size: 28px!important;
    cursor: pointer;
    line-height: 1;
    padding: 10px;
    transition: color 0.3s ease;
}


/* Menu List Items */
:where(.mobile-menu-overlay) .mobile-menu-list { list-style: none; margin: 0; padding: 0; }
:where(.mobile-menu-overlay) .mobile-menu-list > li { border-bottom: 1px solid rgba(255,255,255,0.1); }

/* Split Button Layout */
:where(.mobile-menu-overlay) .mobile-link-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

:where(.mobile-menu-overlay) .mobile-menu-list > li > .mobile-link-wrapper > a {
    flex-grow: 1;
    padding: 20px 0;
    color: #FFFFFF;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Toggle Button */
:where(.mobile-menu-overlay) .mobile-submenu-toggle {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-left: 1px solid rgba(255,255,255,0.05);
}

:where(.mobile-menu-overlay) .mobile-submenu-toggle::after {
    content: '+';
    font-size: 28px;
    color: #FFFFFF;
    font-weight: 300;
    transition: transform 0.3s ease;
}

:where(.mobile-menu-overlay) .has-mobile-sub.open > .mobile-link-wrapper .mobile-submenu-toggle::after {
    transform: rotate(45deg);
    color: #F9A981;
}

/* Sub Menus - FLAT LIST STYLE (About & Treatments) */
:where(.mobile-menu-overlay) .mobile-sub-menu {
    display: none;
    background: rgba(0,0,0,0.2);
    margin: 0 -30px; /* Stretch to edges */
    padding: 10px 30px;
    width: calc(100% + 60px);
    list-style: none !important; /* Force remove bullets */
}

:where(.mobile-menu-overlay) .has-mobile-sub.open > .mobile-sub-menu {
    display: block;
    animation: boon-site-header-slide-down 0.3s ease;
}

/* Category Headers (Orange - Used in Treatments) */
:where(.mobile-menu-overlay) .mobile-cat-header {
    color: #F9A981;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 15px 0 10px 0;
    border-bottom: 1px solid rgba(249, 169, 129, 0.2);
}

:where(.mobile-menu-overlay) .mobile-cat-header:first-child { padding-top: 10px; }

/* Sub Menu Items (Treatments AND About) */
/* This now applies the grey line to ALL sub-items */
:where(.mobile-menu-overlay) .mobile-treatment-item,
:where(.mobile-menu-overlay) .mobile-sub-menu li:not(.mobile-cat-header) {
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.05); /* Grey separator */
}

/* REMOVE BORDER FROM LAST ITEM to avoid conflict with main menu lines */
:where(.mobile-menu-overlay) .mobile-sub-menu li:last-child {
    border-bottom: none;
}

/* Link Styling */
:where(.mobile-menu-overlay) .mobile-treatment-item a,
:where(.mobile-menu-overlay) .mobile-sub-menu li a {
    display: block;
    padding: 10px 0;
    color: #dddddd;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

:where(.mobile-menu-overlay) .mobile-treatment-item a:hover,
:where(.mobile-menu-overlay) .mobile-sub-menu li a:hover {
    color: #FFFFFF;
    padding-left: 10px;
    background: rgba(255,255,255,0.05);
}

@keyframes boon-site-header-slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------
   6. Media Queries
   ------------------------------------------------------------------ */

/* Tablet & Mobile */
@media (max-width: 1024px) {
    :where(.boon-header) .main-menu { display: none; }
    :where(.boon-header) .mobile-menu-toggle { display: flex; }
    :where(.boon-header) .treatments-mega-menu { display: none !important; }
    :where(.boon-header) .header-logo img {
        height: 55px;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    :where(.boon-header) .header-container { padding: 0 20px; }
    :where(.boon-header) .header-logo img { height: 45px; }
}

/* Small Screens */
@media (max-width: 480px) {
    :where(.mobile-menu-overlay) .mobile-menu-content { padding: 60px 20px; }
    :where(.mobile-menu-overlay) .mobile-menu-list a { font-size: 16px; padding: 12px 15px; }
}

/* ------------------------------------------------------------------
   7. Finishing Touches (Backgrounds & Bridges)
   ------------------------------------------------------------------ */

/* 1. Background Pattern for Mega Menu (Uses ::before) */
:where(.boon-header) .treatments-mega-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(249, 169, 129, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(221, 157, 129, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 2. Invisible Bridge for REGULAR Dropdowns (Uses ::before) */
:where(.boon-header) .sub-menu::before {
    content: '';
    display: block;
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    height: 40px;
    background: transparent;
    z-index: 10;
}

/* 3. Invisible Bridge for MEGA Menu (MUST use ::after to avoid conflict) */
:where(.boon-header) .treatments-mega-menu::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    height: 40px;
    background: transparent;
    z-index: 10;
}

/* ------------------------------------------------------------------
   8. Desktop Menu Indicators (Static Down Arrow)
   ------------------------------------------------------------------ */

@media (min-width: 1025px) {

    /* 1. Flex container to align text and arrow */
    :where(.boon-header) .main-menu .menu-item-has-children > a,
    :where(.boon-header) .main-menu .menu-item-has-mega > a {
        display: flex;
        align-items: center;
        gap: 8px; /* Space between text and arrow */
    }

    /* 2. Create the DOWN arrow */
    :where(.boon-header) .main-menu .menu-item-has-children > a::after,
    :where(.boon-header) .main-menu .menu-item-has-mega > a::after {
        content: '';
        display: block;
        width: 6px;
        height: 6px;

        /* Define the arrow shape */
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;

        /* Rotate to make it look like a "v" */
        transform: rotate(45deg);

        /* Lift it slightly for visual alignment */
        margin-bottom: 2px;
    }
}

/* ==================================================================
   Part B - from the old header snippet
   ================================================================== */

/* Hide every other header on the site: the theme's and Elementor's. This is
   why no other plugin markup may use a <header> element. */
header:not(.boon-header),
.elementor-location-header:not(.boon-header) {
    display: none !important;
}
.boon-header {
    display: block !important;
}

/* Logo: standard vs training */
.boon-header .header-logo img {
    height: 50px;
    width: auto;
}
.boon-header--training .header-logo img {
    height: 70px;
}

/* Cart button */
:where(.boon-header) .boon-header-cart {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-left: 24px;
    position: relative;
    z-index: 10;
}
.boon-header .header-container:has(.boon-header-cart) .header-nav {
    flex: 0 1 auto;
}
:where(.boon-header) .boon-cart-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid #ffffff;
    border-radius: 4px;
    cursor: pointer;
    padding: 7px 12px 7px 10px;
    color: #FDC7B0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
:where(.boon-header) .boon-cart-toggle:hover {
    border-color: #FDC7B0;
    background: #FDC7B0;
    color: #272727;
}
:where(.boon-header) .boon-cart-toggle:hover .boon-cart-total { color: #272727; }
:where(.boon-header) .boon-cart-toggle:hover .boon-cart-icon  { background: #272727; }
:where(.boon-header) .boon-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FDC7B0;
    border-radius: 3px;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}
:where(.boon-header) .boon-cart-icon svg { display: block; stroke: #ffffff; }
:where(.boon-header) .boon-cart-total    { color: #FDC7B0; }

/* Side cart overlay */
.boon-side-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.boon-side-cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Side cart drawer */
:where(.boon-side-cart-overlay) .boon-side-cart {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 380px;
    max-width: 95vw;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25,1,0.5,1);
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
}
.boon-side-cart-overlay.active .boon-side-cart {
    transform: translateX(0);
}

:where(.boon-side-cart-overlay) .boon-side-cart__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
:where(.boon-side-cart-overlay) .boon-side-cart__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #272727;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
:where(.boon-side-cart-overlay) .boon-side-cart__count {
    background: #FDC7B0;
    color: #272727;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
:where(.boon-side-cart-overlay) .boon-side-cart__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #272727;
    font-size: 24px;
    line-height: 1;
    transition: color 0.2s;
}
:where(.boon-side-cart-overlay) .boon-side-cart__close:hover { color: #FDC7B0; }

:where(.boon-side-cart-overlay) .boon-side-cart__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
:where(.boon-side-cart-overlay) .boon-side-cart__body::-webkit-scrollbar { display: none; }
:where(.boon-side-cart-overlay) .boon-side-cart__body.loading {
    opacity: 0.5;
    pointer-events: none;
}

:where(.boon-side-cart-overlay) .boon-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    color: #aaaaaa;
    text-align: center;
}
:where(.boon-side-cart-overlay) .boon-cart-empty p {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    margin: 0;
}

:where(.boon-side-cart-overlay) .boon-cart-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
}
:where(.boon-side-cart-overlay) .boon-cart-item:last-child { border-bottom: none; }

:where(.boon-side-cart-overlay) .boon-cart-item-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f9f9f9;
}
:where(.boon-side-cart-overlay) .boon-cart-item-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
:where(.boon-side-cart-overlay) .boon-cart-item-details { flex: 1; min-width: 0; }
:where(.boon-side-cart-overlay) .boon-cart-item-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #272727;
    line-height: 1.3;
    margin-bottom: 6px;
}
:where(.boon-side-cart-overlay) .boon-cart-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
:where(.boon-side-cart-overlay) .boon-cart-item-qty {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #888888;
}
:where(.boon-side-cart-overlay) .boon-cart-item-price,
:where(.boon-side-cart-overlay) .boon-cart-item-price .amount {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #272727;
}
:where(.boon-side-cart-overlay) .boon-cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #cccccc;
    font-size: 20px;
    line-height: 1;
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.2s;
}
:where(.boon-side-cart-overlay) .boon-cart-item-remove:hover { color: #272727; }

:where(.boon-side-cart-overlay) .boon-side-cart__footer {
    border-top: 1px solid #f0f0f0;
    padding: 20px 24px;
    flex-shrink: 0;
    background: #ffffff;
}
:where(.boon-side-cart-overlay) .boon-side-cart__subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
:where(.boon-side-cart-overlay) .boon-side-cart__subtotal-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #272727;
}
:where(.boon-side-cart-overlay) .boon-side-cart__subtotal-amount,
:where(.boon-side-cart-overlay) .boon-side-cart__subtotal-amount .amount {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #272727;
}
:where(.boon-side-cart-overlay) .boon-side-cart__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
:where(.boon-side-cart-overlay) .boon-side-cart__btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}
:where(.boon-side-cart-overlay) .boon-side-cart__btn--checkout {
    background: #272727;
    color: #ffffff !important;
}
:where(.boon-side-cart-overlay) .boon-side-cart__btn--checkout:hover {
    background: #FDC7B0;
    color: #272727 !important;
}
:where(.boon-side-cart-overlay) .boon-side-cart__btn--view {
    background: transparent;
    color: #272727 !important;
    border: 1px solid #272727;
}
:where(.boon-side-cart-overlay) .boon-side-cart__btn--view:hover {
    background: #272727;
    color: #ffffff !important;
}

/* Mega menu: Alma Harmony + LHR parent link styles */
:where(.boon-header) .mega-menu-alma-parent {
    margin-bottom: 8px!important;
}
:where(.boon-header) .mega-menu-alma-link {
    display: block;
    font-weight: 700!important;
    color: inherit;
    text-decoration: none;
    padding: 4px 8px!important;
    transition: color 0.2s;
    margin-bottom: 8px!important;
}
:where(.boon-header) .mega-menu-alma-link:hover {
    color: #FDC7B0;
}
:where(.boon-header) .mega-menu-treatment-list--indented {
    padding-left: 10px;
}

/* Mobile: Alma Harmony + LHR parent link styles */
:where(.mobile-menu-overlay) .mobile-alma-parent {
    font-weight: 700;
    padding: 6px 0;
}
:where(.mobile-menu-overlay) .mobile-alma-parent a {
    font-weight: 700;
}
:where(.mobile-menu-overlay) .mobile-treatment-item--indented a {
    padding-left: 16px;
}

/* ==================================================================
   Part C - the clinic menus (plan 09 Task 3)

   Only with "Clinic URLs live" on. The header then carries
   boon-header--clinics, and boon-header--both as well on a page with no
   clinic (two menu items, "Leicester" and "Birmingham"). The switch is only
   printed on a clinic page. With "Clinic URLs live" off none of these rules
   matches anything, and parts A and B alone draw the header.

   These rules have to win, so they use the real classes, not :where().
   ================================================================== */

/* The panel hangs on the header and is centred on the page. In part A it
   hangs on its own menu item and is centred on that, which only looks right
   while "Treatments" sits near the middle of the window: a panel under
   "Leicester" would be cut off at the left edge. */
.boon-header--clinics .menu-item-has-mega { position: static; }

.boon-header--clinics .treatments-mega-menu {
    left: 0;
    right: 0;
    width: auto;
    margin: 2px auto 0; /* part A: 35px down from the menu item, which ends 2px below the header */
    transform: translateY(-20px);
    /* Two panels now open in the same place. One that is fading out must not
       catch the pointer, or it opens again in front of the one just asked for. */
    pointer-events: none;
}

.boon-header--clinics .menu-item-has-mega:hover .treatments-mega-menu {
    transform: translateY(0);
    pointer-events: auto;
    z-index: 2;
}

/* Nine items instead of eight: on a small laptop the gaps close so they stay
   on one line. */
@media (min-width: 1025px) and (max-width: 1199px) {
    .boon-header--both .main-menu { gap: 22px; }
}

/* A clinic page holds both clinics' lists and shows one. The lists set their
   own display (grid, and block when a phone row opens), which would otherwise
   beat the hidden attribute. */
.boon-header [data-boon-menu-panel][hidden],
.mobile-menu-overlay [data-boon-menu-panel][hidden] {
    display: none !important;
}

/* The Leicester / Birmingham switch. Every property the theme and the
   Elementor kit set on a bare <button> is set here, hover and focus too. */
.boon-header .boon-menu-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
    /* Pulled up into the panel's 40px top padding, so the switch adds 40px to
       the panel's height, not 64: the panel is already taller than a small
       laptop's window (edge-cases.md > Site header). */
    margin: -18px auto 22px;
}

.boon-header .boon-menu-switch-btn,
.mobile-menu-overlay .boon-menu-switch-btn {
    display: inline-block;
    margin: 0;
    padding: 10px 26px;
    border: 1.5px solid #FDC7B0;
    border-radius: 999px;
    background: #FFFFFF;
    color: #272727;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    text-align: center;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.boon-header .boon-menu-switch-btn:hover,
.boon-header .boon-menu-switch-btn:focus {
    background: #FEE5DB;
    border-color: #F9A981;
    color: #272727;
}

.boon-header .boon-menu-switch-btn:focus-visible,
.mobile-menu-overlay .boon-menu-switch-btn:focus-visible {
    outline: 2px solid #F9A981;
    outline-offset: 2px;
}

/* Phone menu: the same switch on the dark drawer, above the list. */
.mobile-menu-overlay .boon-menu-switch-row { padding-bottom: 0; }

.mobile-menu-overlay .boon-menu-switch {
    display: flex;
    gap: 10px;
    padding: 6px 0 4px;
}

.mobile-menu-overlay .boon-menu-switch-btn {
    flex: 1 1 0;
    border-color: rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #dddddd;
}

.mobile-menu-overlay .boon-menu-switch-btn:hover,
.mobile-menu-overlay .boon-menu-switch-btn:focus {
    border-color: #F9A981;
    background: transparent;
    color: #F9A981;
}

/* The clinic being shown. After the hover rules, and with hover and focus
   named, so a pressed button looks pressed whatever the pointer is doing. */
.boon-header .boon-menu-switch-btn[aria-pressed="true"],
.boon-header .boon-menu-switch-btn[aria-pressed="true"]:hover,
.boon-header .boon-menu-switch-btn[aria-pressed="true"]:focus,
.mobile-menu-overlay .boon-menu-switch-btn[aria-pressed="true"],
.mobile-menu-overlay .boon-menu-switch-btn[aria-pressed="true"]:hover,
.mobile-menu-overlay .boon-menu-switch-btn[aria-pressed="true"]:focus {
    border-color: #F9A981;
    background: #F9A981;
    color: #272727;
    cursor: default;
}
