:root {
    --kbb-blue: #006993;
    --kbb-blue-dark: #005778;
    --kbb-orange: #fcb033;
    --kbb-ink: #172a33;
    --kbb-grey: #f3f6f7;
    --kbb-rule: #dce4e7;
}

/* Trade utility rail */
.ct-header [data-row="top"] {
    background: var(--kbb-blue) !important;
}

.ct-header [data-row="top"] .ct-header-text {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.075em;
    line-height: 1.35;
    text-transform: uppercase;
}

.ct-header [data-row="top"] .ct-header-text p {
    margin: 0;
}

.ct-header [data-row="top"] .ct-header-text a {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.58);
    text-underline-offset: 3px;
}

.ct-header [data-row="top"] .ct-header-text a:hover,
.ct-header [data-row="top"] .ct-header-text a:focus-visible {
    color: var(--kbb-orange);
}

/* Header shell; navigation typography inherits Blocksy's global settings. */
.ct-header [data-row="middle"] {
    border-bottom: 1px solid rgba(23, 42, 51, 0.09);
    background: #fff;
}

.ct-header .menu-item.kbb-nav-login > .ct-menu-link,
.ct-header .menu-item.kbb-nav-apply > .ct-menu-link {
    min-height: 40px;
    margin-left: 4px;
    padding: 0 14px;
    border: 1px solid var(--kbb-blue);
    justify-content: center;
}

.ct-header .menu-item.kbb-nav-login > .ct-menu-link {
    color: var(--kbb-blue) !important;
    background: #fff;
}

.ct-header .menu-item.kbb-nav-apply > .ct-menu-link {
    border-color: var(--kbb-orange);
    color: var(--kbb-ink) !important;
    background: var(--kbb-orange);
}

.ct-header .menu-item.kbb-nav-login > .ct-menu-link:hover,
.ct-header .menu-item.kbb-nav-login > .ct-menu-link:focus-visible {
    color: #fff !important;
    background: var(--kbb-blue);
}

.ct-header .menu-item.kbb-nav-apply > .ct-menu-link:hover,
.ct-header .menu-item.kbb-nav-apply > .ct-menu-link:focus-visible {
    border-color: var(--kbb-blue-dark);
    color: #fff !important;
    background: var(--kbb-blue-dark);
}

@media (min-width: 1000px) {
    .ct-header .menu-container .menu > li.kbb-nav-login,
    .ct-header .menu-container .menu > li.kbb-nav-apply {
        align-self: center;
        height: auto !important;
        max-height: 42px;
    }

}

/* Reusable Blocksy trade-account CTA */
.kbb-footer-cta {
    position: relative;
    overflow: hidden;
    background: var(--kbb-blue) !important;
}

.kbb-footer-cta::after {
    position: absolute;
    right: -28px;
    bottom: 50%;
    width: 190px;
    height: 2px;
    background: var(--kbb-orange);
    content: "";
}

.kbb-footer-cta::before {
    position: absolute;
    right: 145px;
    bottom: calc(50% - 8px);
    z-index: 2;
    width: 16px;
    height: 16px;
    border: 2px solid var(--kbb-orange);
    border-radius: 50%;
    background: var(--kbb-blue);
    content: "";
}

.kbb-footer-cta .kt-row-column-wrap {
    position: relative;
    z-index: 1;
    max-width: 1490px !important;
    min-height: 138px;
    padding-top: 28px !important;
    padding-bottom: 28px !important;
}

.kbb-footer-cta h2 {
    max-width: 720px;
    margin-bottom: 8px;
    color: #fff !important;
    font-size: clamp(1.8rem, 2.6vw, 2.7rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.025em;
}

.kbb-footer-cta p {
    max-width: 720px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.82) !important;
    line-height: 1.55;
}

.kbb-footer-cta .kbb-check-list {
    display: none;
}

.kbb-footer-cta .kb-buttons-wrap {
    gap: 12px;
    flex-wrap: wrap;
}

.kbb-footer-cta .kb-button {
    min-height: 48px;
    border-radius: 0 !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.kbb-footer-cta .kbb-cta-apply,
.kbb-footer-cta .kbb-cta-support {
    border-color: var(--kbb-orange) !important;
    color: var(--kbb-ink) !important;
    background: var(--kbb-orange) !important;
}

.kbb-footer-cta .kbb-cta-login,
.kbb-footer-cta .kbb-cta-phone {
    border: 1px solid rgba(255, 255, 255, 0.78) !important;
    color: #fff !important;
    background: transparent !important;
}

.kbb-footer-cta .kbb-cta-apply:hover,
.kbb-footer-cta .kbb-cta-apply:focus-visible,
.kbb-footer-cta .kbb-cta-support:hover,
.kbb-footer-cta .kbb-cta-support:focus-visible {
    border-color: #fff !important;
    background: #fff !important;
}

.kbb-footer-cta .kbb-cta-login:hover,
.kbb-footer-cta .kbb-cta-login:focus-visible,
.kbb-footer-cta .kbb-cta-phone:hover,
.kbb-footer-cta .kbb-cta-phone:focus-visible {
    border-color: var(--kbb-orange) !important;
    color: var(--kbb-ink) !important;
    background: var(--kbb-orange) !important;
}

/* CTA variants: one Blocksy block, with a narrow application-page exception. */
.kbb-footer-cta .kbb-cta-login-copy,
.kbb-footer-cta .kbb-cta-customer-copy,
.kbb-footer-cta .kbb-cta-support,
.kbb-footer-cta .kbb-cta-phone {
    display: none;
}

.kbb-trade-account-page .kbb-footer-cta .kbb-cta-guest-copy,
.kbb-trade-account-page .kbb-footer-cta .kbb-cta-apply {
    display: none !important;
}

.kbb-trade-account-page .kbb-footer-cta .kbb-cta-login-copy {
    display: block;
}

/* Signed-in customers see a support CTA in the same sitewide position. */
.logged-in .kbb-footer-cta .kbb-cta-guest-copy,
.logged-in .kbb-footer-cta .kbb-cta-login-copy,
.logged-in .kbb-footer-cta .kbb-cta-apply,
.logged-in .kbb-footer-cta .kbb-cta-login {
    display: none !important;
}

.logged-in .kbb-footer-cta .kbb-cta-customer-copy {
    display: inline;
}

.logged-in .kbb-footer-cta .kbb-cta-support,
.logged-in .kbb-footer-cta .kbb-cta-phone {
    display: inline-flex;
}

/* Structured, understated footer */
.ct-footer [data-row="top"] {
    border-top: 1px solid var(--kbb-rule);
    background: #fff;
}

.ct-footer .widget-title {
    color: var(--kbb-ink);
    font-size: 13px !important;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.ct-footer .widget-menu a,
.ct-footer p,
.ct-footer p a {
    color: #52636b;
    font-size: 14px;
}

.ct-footer .widget-menu a:hover,
.ct-footer p a:hover {
    color: var(--kbb-blue);
}

/*
 * Blocksy's stock desktop handoff is 999.98px. The two KBB desktop headers
 * have different safe minimum widths: the customer tools fit from 1200px,
 * while the wider guest navigation and account actions fit from 1440px.
 */
@media (min-width: 1000px) and (max-width: 1199.98px) {
    #header [data-device="desktop"] {
        display: none !important;
    }

    #header [data-device="mobile"] {
        display: block !important;
    }
}

@media (min-width: 1200px) and (max-width: 1439.98px) {
    body:not(.logged-in) #header [data-device="desktop"],
    #header:has(.header-menu-2) [data-device="desktop"] {
        display: none !important;
    }

    body:not(.logged-in) #header [data-device="mobile"],
    #header:has(.header-menu-2) [data-device="mobile"] {
        display: block !important;
    }
}

/*
 * Keep the full guest desktop header genuinely usable at its 1440px handoff.
 * This only tightens layout gutters; Blocksy remains authoritative for menu
 * typography, colours and weights.
 */
@media (min-width: 1440px) and (max-width: 1599.98px) {
    #header:has(.header-menu-2) [data-device="desktop"] .ct-container {
        width: calc(100% - 40px);
    }

    #header:has(.header-menu-2) [data-device="desktop"] .header-menu-2 {
        flex-shrink: 0;
    }

    #header:has(.header-menu-2) [data-device="desktop"] .header-menu-1 .ct-menu-link {
        padding-inline: 8px;
    }

    #header:has(.header-menu-2) [data-device="desktop"] .header-menu-2 .ct-menu-link {
        padding-inline: 10px;
    }
}

@media (max-width: 1439.98px) {
    #offcanvas [data-device="desktop"] {
        display: none !important;
    }

    #offcanvas [data-device="mobile"] {
        display: flex !important;
        flex-direction: column;
    }

    #offcanvas {
        --side-panel-width: min(65vw, 560px) !important;
        --panel-content-height: 100% !important;
    }

    #offcanvas .ct-panel-inner {
        background-color: #fff !important;
    }

    #offcanvas .ct-toggle-close {
        --theme-icon-color: var(--kbb-blue) !important;
    }

    #offcanvas .ct-toggle-close:hover {
        --theme-icon-color: var(--kbb-orange) !important;
    }

    #offcanvas [data-id="offcanvas-logo"] {
        --logo-max-height: 100px;
    }
    .mobile-menu .menu-item.kbb-nav-login > a,
    .mobile-menu .menu-item.kbb-nav-apply > a {
        width: 100%;
        margin-top: 10px;
        padding: 12px 16px;
        border: 1px solid var(--kbb-blue);
        text-align: center;
    }

    .mobile-menu .menu-item.kbb-nav-apply > a {
        border-color: var(--kbb-orange);
        color: var(--kbb-ink) !important;
        background: var(--kbb-orange);
    }
}

@media (max-width: 689px) {
    .ct-header [data-row="top"] .ct-header-text {
        font-size: 10px;
        letter-spacing: 0.035em;
    }

    .kbb-footer-cta {
        text-align: left !important;
    }

    .kbb-footer-cta::after {
        right: -82px;
        bottom: 34px;
    }

    .kbb-footer-cta::before {
        right: 89px;
        bottom: 26px;
    }

    .kbb-footer-cta .kt-row-column-wrap {
        padding-top: 32px !important;
        padding-bottom: 38px !important;
    }

    .kbb-footer-cta .kb-buttons-wrap {
        align-items: stretch;
    }

    .kbb-footer-cta .kb-button {
        width: 100%;
        justify-content: center;
    }
}

/* Shared manufacturing-capacity statement used on high-intent landing pages. */
.kbb-capacity {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: clamp(68px, 7vw, 112px) clamp(22px, 5vw, 72px);
    color: #fff;
    background: var(--kbb-blue-dark);
}

.kbb-capacity::after {
    position: absolute;
    right: -92px;
    bottom: 42px;
    width: 250px;
    height: 1px;
    content: "";
    transform: rotate(-12deg);
    transform-origin: right center;
    background: var(--kbb-orange);
}

.kbb-capacity__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(42px, 6vw, 88px);
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
}

.kbb-capacity__media {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 12px;
    min-height: 520px;
}

.kbb-capacity__media figure {
    min-width: 0;
    margin: 0;
}

.kbb-capacity__media figure:last-child {
    margin-top: 56px;
    margin-bottom: 56px;
}

.kbb-capacity__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kbb-capacity__eyebrow {
    margin: 0 0 14px;
    color: var(--kbb-orange);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.15em;
    line-height: 1.4;
    text-transform: uppercase;
}

.kbb-capacity h2 {
    max-width: 720px;
    margin: 0 0 20px;
    color: #fff;
    font-size: clamp(2.7rem, 4.5vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.kbb-capacity__lead {
    max-width: 700px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(1.02rem, 1.3vw, 1.2rem);
    line-height: 1.65;
}

.kbb-capacity__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: clamp(34px, 4vw, 54px);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.kbb-capacity__stat {
    min-height: 144px;
    padding: 24px 22px;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.kbb-capacity__stat strong,
.kbb-capacity__stat span {
    display: block;
}

.kbb-capacity__stat strong {
    margin-bottom: 10px;
    color: var(--kbb-orange);
    font-size: clamp(1.55rem, 2.4vw, 2.45rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1;
}

.kbb-capacity__stat span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
    line-height: 1.45;
}

@media (max-width: 999px) {
    .kbb-capacity__inner {
        grid-template-columns: 1fr;
    }

    .kbb-capacity__media {
        min-height: 420px;
    }
}

@media (max-width: 549px) {
    .kbb-capacity {
        padding: 62px 20px 72px;
    }

    .kbb-capacity__media {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .kbb-capacity__media figure,
    .kbb-capacity__media figure:last-child {
        height: 260px;
        margin: 0;
    }

    .kbb-capacity__stats {
        grid-template-columns: 1fr;
    }

    .kbb-capacity__stat {
        min-height: 0;
    }
}
