/* =========================================================
   SPOTLESS — UNIVERSAL SHARED HEADER
   Applies to every page that uses #site-header.
========================================================= */

/* Prevent page-specific button rules from changing header controls */
#site-header .th-btn.style4 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* =========================================================
   DESKTOP HEADER
========================================================= */

#site-header .header-logo {
    margin-left: 20px;
}

#site-header .header-logo img {
    display: block;
    width: auto;
    height: 78px;
    object-fit: contain;
}

#site-header .main-menu {
    margin-left: 60px;
}

/* =========================================================
   MOBILE / TABLET
========================================================= */

@media (max-width: 991px) {

    #site-header .header-top {
        display: none !important;
    }

    #site-header .th-header,
    #site-header .sticky-wrapper,
    #site-header .sticky-wrapper.sticky {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
        box-shadow: none !important;
    }

    #site-header .sticky-wrapper .menu-area,
    #site-header .sticky-wrapper.sticky .menu-area {
        position: relative !important;
        top: auto !important;
        min-height: 86px !important;
        padding: 7px 0 !important;
        background: #fff !important;
        box-shadow: 0 3px 12px rgba(15, 35, 60, 0.06) !important;
        transform: none !important;
    }

    #site-header .menu-area .row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    #site-header .menu-area .col,
    #site-header .menu-area .col-auto {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
    }

    #site-header .header-logo {
        margin-left: 0 !important;
        line-height: 1 !important;
    }

    #site-header .header-logo img {
        display: block !important;
        width: auto !important;
        height: 58px !important;
        max-width: 180px !important;
        object-fit: contain !important;
    }

    #site-header .header-button {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0 !important;
    }

    #site-header .header-button .th-btn {
        display: none !important;
    }

    /* Normal hamburger button */
    #site-header .header-button > .th-menu-toggle {
        position: static !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 7px !important;
    }

    /* =====================================================
       MOBILE DRAWER
    ===================================================== */

    #site-header .th-menu-wrapper .th-menu-area {
        position: relative !important;
        overflow: visible !important;
        padding: 0 !important;
        background: #fff !important;
    }

    /* Full mobile drawer logo */
    #site-header .th-menu-wrapper .mobile-logo {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        min-height: 102px !important;

        margin: 0 !important;

        /* No left padding — removes the vertical strip */
        padding: 14px 42px 14px 0 !important;

        background: #fff !important;
        background-image: none !important;

        border: 0 !important;
        border-left: 0 !important;
        border-bottom: 1px solid #eceff3 !important;

        box-shadow: none !important;
        outline: 0 !important;
        overflow: visible !important;
    }

    #site-header .th-menu-wrapper .mobile-logo a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 0 !important;

        background: transparent !important;
        background-image: none !important;

        border: 0 !important;
        box-shadow: none !important;
        outline: 0 !important;
        overflow: visible !important;
    }

    #site-header .th-menu-wrapper .mobile-logo img {
        display: block !important;

        width: auto !important;
        height: auto !important;

        max-width: 100% !important;
        max-height: 72px !important;

        margin: 0 auto !important;
        padding: 0 !important;

        object-fit: contain !important;
        object-position: center !important;

        transform: translateX(8px) !important;
        clip-path: none !important;
    }

    /* Remove theme-generated decorations around mobile logo */
    #site-header .th-menu-wrapper .mobile-logo::before,
    #site-header .th-menu-wrapper .mobile-logo::after,
    #site-header .th-menu-wrapper .mobile-logo a::before,
    #site-header .th-menu-wrapper .mobile-logo a::after {
        display: none !important;
        content: none !important;
    }

    /* Close X centered on the red drawer edge */
    #site-header .th-menu-wrapper
    .th-menu-area > .th-menu-toggle {
        position: absolute !important;

        top: 18px !important;
        right: -18px !important;
        left: auto !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;

        margin: 0 !important;
        padding: 0 !important;

        border-radius: 7px !important;
        font-size: 15px !important;
        line-height: 1 !important;

        z-index: 99999 !important;
    }

    #site-header .th-menu-wrapper .th-mobile-menu {
        text-align: left !important;
    }

    #site-header .th-menu-wrapper .mobile-quote-btn {
        display: flex !important;
        width: 100% !important;
        margin-top: 22px !important;
    }
}

/* =========================================================
   SMALLER PHONES
========================================================= */

@media (max-width: 390px) {

    #site-header .header-logo img {
        height: 54px !important;
        max-width: 165px !important;
    }

    #site-header .header-button > .th-menu-toggle {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
    }

    #site-header .th-menu-wrapper .mobile-logo {
        min-height: 98px !important;

        /* No left padding — removes the strip on smaller phones */
        padding: 14px 40px 14px 0 !important;
    }

    #site-header .th-menu-wrapper .mobile-logo img {
        max-width: 100% !important;
        max-height: 68px !important;
        transform: translateX(8px) !important;
    }

    #site-header .th-menu-wrapper
    .th-menu-area > .th-menu-toggle {
        top: 17px !important;
    }
}

/* =========================================================
   Remove white strips around mobile header
========================================================= */

@media (max-width: 991px) {

    #site-header .th-menu-wrapper,
    #site-header .th-menu-area,
    #site-header .mobile-logo,
    #site-header .mobile-logo a {
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        border-left: none !important;
        border-right: none !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    #site-header .mobile-logo img {
        display: block !important;
        margin: 0 auto !important;
        transform: translateX(8px) !important;
    }
}

/* Remove Bootstrap side gutters from mobile header */
@media (max-width: 991px) {

    #site-header .sticky-wrapper > .container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #site-header .sticky-wrapper .menu-area {
        width: 100% !important;
        margin: 0 !important;
        padding: 7px 18px !important;
    }
}

/* Keep page content visible behind the open mobile menu */
@media (max-width: 991px) {

    #site-header .th-menu-wrapper {
        background: rgba(0, 0, 0, 0.65) !important;
    }

    #site-header .th-menu-wrapper .th-menu-area {
        background: #ffffff !important;
    }
}

/* ========================================================= */