/**
 * Header tweaks that must load on every page.
 *
 * The Theme Builder header keeps its menu module in a 44px wide column, and
 * Divi anchors the mobile dropdown to that column, so the panel came out 44px
 * wide and every item ran off the right edge of the screen. Another rule in
 * the site's own menu CSS forces `left: auto`, so the panel is sized from the
 * right edge and an explicit width instead of from `left`.
 */

@media (max-width: 980px) {
    .et_pb_menu_0_tb_header .et_mobile_menu,
    .et-db #et-boc .et-l .et_pb_menu_0_tb_header ul.et_mobile_menu {
        position: fixed !important;
        top: 92px !important;
        right: 14px !important;
        left: auto !important;
        width: calc(100vw - 28px) !important;
        max-width: calc(100vw - 28px) !important;
        max-height: calc(100vh - 120px) !important;
        margin: 0 !important;
        padding: 6px 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        background: #fff !important;
        border-top: 3px solid #B18A10 !important;
        border-radius: 14px !important;
        box-shadow: 0 18px 40px rgba(10, 16, 74, .18) !important;
    }

    .et_pb_menu_0_tb_header .et_mobile_menu li a,
    .et-db #et-boc .et-l .et_pb_menu_0_tb_header ul.et_mobile_menu li a {
        padding: 14px 20px !important;
        font-size: 16px !important;
        line-height: 1.3 !important;
    }

    .et_pb_menu_0_tb_header .et_mobile_menu .sub-menu a,
    .et-db #et-boc .et-l .et_pb_menu_0_tb_header ul.et_mobile_menu .sub-menu a {
        padding-left: 36px !important;
        font-size: 15px !important;
    }

    /* The little pointer Divi draws above the panel would now sit in the wrong
       place, and the panel already reads as attached to the burger. */
    .et_pb_menu_0_tb_header .et_mobile_menu:after {
        display: none !important;
    }

    .et_pb_menu_0_tb_header .mobile_menu_bar {
        padding: 6px;
    }
}

/* ------------------------------------------------------------------
   Where am I: the current page is marked in the menu (10 Aug 2026).
   ------------------------------------------------------------------ */
.et_pb_menu_0_tb_header .et-menu > li > a {
    position: relative;
}

.et_pb_menu_0_tb_header .et-menu > li.current-menu-item > a,
.et_pb_menu_0_tb_header .et-menu > li.current-menu-ancestor > a,
.et_pb_menu_0_tb_header .et-menu > li.current_page_item > a,
.et_pb_menu_0_tb_header .et-menu > li.current_page_parent > a {
    color: #0A104A !important;
    font-weight: 700 !important;
}

.et_pb_menu_0_tb_header .et-menu > li.current-menu-item > a::after,
.et_pb_menu_0_tb_header .et-menu > li.current-menu-ancestor > a::after,
.et_pb_menu_0_tb_header .et-menu > li.current_page_item > a::after,
.et_pb_menu_0_tb_header .et-menu > li.current_page_parent > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 2px;
    border-radius: 2px;
    background: #B18A10;
}

.et_pb_menu_0_tb_header .sub-menu li.current-menu-item > a {
    color: #B18A10 !important;
    font-weight: 700 !important;
}

@media (max-width: 980px) {
    .et_pb_menu_0_tb_header .et_mobile_menu li.current-menu-item > a,
    .et_pb_menu_0_tb_header .et_mobile_menu li.current-menu-ancestor > a,
    .et_pb_menu_0_tb_header .et_mobile_menu li.current_page_item > a {
        color: #0A104A !important;
        font-weight: 700 !important;
        background: #faf7ee !important;
        box-shadow: inset 3px 0 0 #B18A10;
    }

    /* the desktop underline would look odd inside the panel */
    .et_pb_menu_0_tb_header .et_mobile_menu li > a::after {
        display: none !important;
    }
}

/* ------------------------------------------------------------------
   Page scrolling, 10 Aug 2026.

   Something in the theme sets overflow-x: hidden on <body>. Per spec that
   turns the other axis into auto, so <body> became its own scroll container:
   the page scrolled "inside itself", window.scrollTo did nothing, and on
   mobile the first screen felt stuck with the hero sliding under the fold.

   overflow-x: clip hides the same horizontal overflow but does not create a
   scroll container, so the document scrolls normally again. Browsers without
   clip support simply keep the old behaviour.
   ------------------------------------------------------------------ */
html {
    overflow-x: hidden;
}

body {
    overflow-x: clip !important;
    overflow-y: visible !important;
}

/* The side cart still needs to freeze the page while it is open. */
body.myc-side-cart-open {
    overflow: hidden !important;
}
