/* ==============================================================================
5. HEADER & NAVIGATION
============================================================================== */

/* Header */
body #header-outer,
#header-outer #top {
    border-radius: var(--border-radius-p-2) !important;
}

body #header-outer {
    min-height: 56px;
    display: flex;
    align-items: center;
}

body #header-outer.scrolling {
    background: rgba(252, 255, 246, 0.7) !important;
    backdrop-filter: blur(15px);
}

body #header-outer.at-top,
body #header-outer.invisible {
    background: none !important;
}

body #header-outer.at-top #top .slide-out-widget-area-toggle a .lines-button:after,
body #header-outer.invisible #top .slide-out-widget-area-toggle a .lines-button:after,
body #header-outer.at-top #top .slide-out-widget-area-toggle a .lines:after,
body #header-outer.invisible #top .slide-out-widget-area-toggle a .lines:after,
body #header-outer.at-top #top .slide-out-widget-area-toggle a .lines:before,
body #header-outer.invisible #top .slide-out-widget-area-toggle a .lines:before {
    background-color: var(--color-white);
}

body #header-outer.scrolling #top .slide-out-widget-area-toggle a .lines-button:after,
body #header-outer.scrolling #top .slide-out-widget-area-toggle a .lines:after,
body #header-outer.scrolling #top .slide-out-widget-area-toggle a .lines:before {
    background-color: var(--color-black);
}

body #header-outer.scrolling.at-top a#logo:before,
body #header-outer.at-top a#logo:before,
body #header-outer.invisible a#logo:before {
    content: "";
    width: 115px;
    background: url(https://media.palomarr.com/2024/05/palomarr-logo-w.png) no-repeat;
    height: 22px;
    display: inline-block;
    background-size: contain;
}

body #header-outer.scrolling .container a#logo:before,
body.page-template-suppliers-php #header-outer.at-top a#logo:before,
body.page-template-suppliers-php #header-outer.invisible a#logo:before {
    content: none;
}

body #header-outer.at-top a#logo img,
body #header-outer.invisible a#logo img,
body.page-template-suppliers-php .menu-item-131281,
body #header-outer.scrolling.at-top a#logo img {
    display: none;
}

body #header-outer.scrolling .container a#logo img,
body.page-template-suppliers-php #header-outer.at-top a#logo img,
body.page-template-suppliers-php #header-outer.invisible a#logo img {
    display: block;
}

body #header-outer,
body #header-space {
    width: calc(100% - var(--container-padding)* 2);
    max-width: calc(var(--container-width) - var(--container-padding)* 2);
}

body #header-outer.at-top .container,
body #header-outer.invisible .container {
    padding: 0;
}

body #header-outer.scrolling #top .container {
    padding: 0 1.2rem;
}

body #header-outer .container {
    transition: 0.2s all;
}

body #header-outer #top nav>ul.sf-menu>.button_solid_color>a:before {
    background: #59786E !important;
    height: 28px;
}

body #header-outer.scrolling #top .container nav>ul.sf-menu>.button_solid_color>a:before {
    background: #47AA8B !important;
    height: 28px;
}

#header-outer #top nav>ul>.button_solid_color>a span {
    padding: 0 8px;
}

#header-outer[data-header-button_style="shadow_hover_scale"] #top nav>ul>li[class*="button_solid_color"]>a:before,
#header-outer li[class*="menu-item-btn-style"]>a:hover:after,
#header-outer[data-header-button_style="shadow_hover_scale"] .slide-out-widget-area-toggle[data-custom-color="true"] a:before {
    box-shadow: none !important;
}

#header-outer.at-top[data-lhe="animated_underline"] nav>ul>li:not([class*="button_"])>a .menu-title-text:after,
#header-outer.invisible[data-lhe="animated_underline"] nav>ul>li:not([class*="button_"])>a .menu-title-text:after {
    border-color: var(--color-white) !important;
}

body #header-outer.hero-search-visible #top .container nav>ul>li>a.palomarr-header-login-link {
    color: var(--text-light) !important;
}

#header-outer.scrolling[data-lhe="animated_underline"] .container nav>ul>li:not([class*="button_"])>a .menu-title-text:after {
    border-color: var(--color-black) !important;
}

body.page-template-home-2025 #header-outer .col_last nav {
    display: block !important;
}

body.page-template-home-2025 #hero .vc_col-sm-8 {
    max-width: 54rem;
}

p#breadcrumbs {
    display: none;
}

.single-results #header-outer[data-lhe="animated_underline"]:not([data-format="left-header"]) #top nav>ul>li:not([class*="button_"])>a .menu-title-text:after {
    display: none !important;
}

.page-template-results header .pagemenu-hide {
    display: flex !important;
}

/* Header login button */
#header-outer .palomarr-header-login {
    margin-left: 1.25rem;
}

#header-outer .palomarr-header-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.5rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    letter-spacing: 0;
    text-transform: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#header-outer:not(.at-top) .palomarr-header-login-link {
    color: var(--color-black);
    border-color: rgba(37, 40, 39, 0.3) !important;
}

#header-outer .palomarr-header-login-link:hover,
#header-outer .palomarr-header-login-link:focus {
    background-color: var(--color-primary);
    border-color: var(--color-primary) !important;
    color: var(--color-white);
}

@media only screen and (max-width: 999px) {
    #header-outer .palomarr-header-login {
        margin-left: 0;
    }

    #header-outer .palomarr-header-login-link {
        padding: 0.5rem 1.2rem;
    }
}

@media only screen and (max-width: 640px) {
    #header-outer {
        margin: 1rem 1.5rem 0 !important;
        width: calc(100% - 3rem) !important;
    }

    #header-outer .palomarr-header-login-link,
    #header-outer.at-top .palomarr-header-login-link {
        background: url(/wp-content/uploads/2025/07/icon-user-w-02.svg) no-repeat center center !important;
        background-size: 23px !important;
        border: none !important;
        font-size: 0 !important;
        width: 24px !important;
        height: 24px !important;
        padding: 0 !important;
        opacity: 0.9;
    }

    #header-outer:not(.at-top) .palomarr-header-login-link {
        background-image: url(/wp-content/uploads/2025/08/icon-user-g-03.svg) !important;
    }
}

.header-avatar-link {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.header-avatar-link img {
    width: 2.2rem !important;
    margin-bottom: 0 !important;
    border-radius: 100%;
}

@media only screen and (max-width: 640px) {
    .header-avatar-link {
        margin-left: 0;
    }

    .header-avatar-link img {
        width: 1.8rem !important;
        height: 1.8rem !important;
    }
}

@media only screen and (max-width: 1024px) {
    #top .span_9>.slide-out-widget-area-toggle {
        display: none;
    }
}

#header-outer[data-header-button_style*="hover_scale"]:not([data-format="centered-menu-under-logo"]):not([data-format="centered-menu-bottom-bar"]) #top nav li.menu-item-133154 a {
    margin-right: 0;
}

#header-outer[data-header-button_style*="hover_scale"]:not([data-format="centered-menu-under-logo"]):not([data-format="centered-menu-bottom-bar"]) #top nav li.menu-item-133154 a:before {
    height: 42px;
}

#header-outer[data-header-button_style*="hover_scale"]:not([data-format="centered-menu-under-logo"]):not([data-format="centered-menu-bottom-bar"]) #top nav li[class*="button"]>a:before {
    content: none;
}

#header-outer[data-header-button_style*="hover_scale"]:not([data-format="centered-menu-under-logo"]):not([data-format="centered-menu-bottom-bar"]) #top nav li[class*="button"]>a:hover:before,
#header-outer[data-header-button_style*="hover_scale"]:not([data-format="centered-menu-under-logo"]):not([data-format="centered-menu-bottom-bar"]) #top nav ul .slide-out-widget-area-toggle[data-custom-color="true"] a:hover:before {
    -webkit-transform: scale(1.03) translateY(-50%) !important;
    transform: scale(1.03) translateY(-50%) !important;
}

#header-outer[data-header-button_style*="hover_scale"]:not([data-format="centered-menu-under-logo"]):not([data-format="centered-menu-bottom-bar"]) #top nav li.menu-item-133154>a:hover:before {
    -webkit-transform: scale(1.03) translateY(-48%) !important;
    transform: scale(1.03) translateY(-48%) !important;
}

#header-outer.transparent #top nav>ul>li[class*=button_bordered]>a:before,
#top nav>ul>li[class*=button_bordered]>a:before {
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

#header-outer.transparent #top nav>ul>li[class*=button_bordered]>a:hover:before,
#top nav>ul>li[class*=button_bordered]>a:hover:before {
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
}

#top nav>ul>li>a {
    font-size: 0.9rem;
}

/* Desktop: Use CSS Grid for stable 3-column header layout */
@media only screen and (min-width: 641px) {
    #header-outer .row {
        display: grid !important;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        width: 100%;
        gap: 0;
    }

    #header-outer .row>div {
        display: flex;
        align-items: center;
    }

    /* Logo stays in column 1 */
    #header-outer .row>.col.span_3 {
        grid-column: 1;
    }

    /* AI search container fills column 2 */
    #header-outer .row>#header-ai-search-container {
        grid-column: 2;
        justify-self: center;
        width: 100%;
    }

    /* Nav stays in column 3 */
    #header-outer .row>.col.span_9 {
        grid-column: 3;
        justify-self: end;
    }
}

.sf-menu .button_solid_color {
    margin-right: 1rem;
}

.sf-menu .button_solid_color a {
    padding: 0 1rem !important;
}

.sf-menu .button_solid_color a span {
    font-size: 0.85rem !important;
}

#header-outer .button_solid_color a {
    background: #59786E !important;
    padding: 8.25px 16px !important;
    border-radius: 100px;
    transition: 0.3s all !important;
}

#header-outer .button_solid_color a:hover {
    background: #67887d !important;
}

#header-outer .button_solid_color a:before {
    content: none;
}

#header-space {
    transition: 0.3s all !important;
}

body #header-outer.scrolling.at-top {
    box-shadow: none !important;
    backdrop-filter: none !important;
    transform: translateY(calc((100% + max(calc(var(--container-padding) / 3), 25px)) * -1)) !important;
}

body #header-outer.scrolling.at-top .container {
    padding: 0 !important;
}

#header-outer:not([data-format=left-header]) #top>.container>.row nav {
    display: flex !important;
}

#header-outer:not([data-format=left-header]) #top>.container>.row nav .sf-menu:not(.buttons) {
    display: none !important;
}

@media only screen and (max-width: 999px) {
    body #header-outer #logo {
        margin: 0 !important;
    }
}
