/* AFCMall v1.3.17 — Proportional Header Logo Repair
   Loaded as the final stylesheet to override older logo/mobile rules. */

.site-header {
    --afc-logo-desktop-height: var(--header-logo-desktop-height, 72px);
    --afc-logo-desktop-width: var(--header-logo-desktop-width, 280px);
    --afc-logo-mobile-height: var(--header-logo-mobile-height, 54px);
    --afc-logo-mobile-width: var(--header-logo-mobile-width, 200px);
}

.site-header .container.nav-wrap {
    height: auto !important;
    min-height: max(82px, calc(var(--afc-logo-desktop-height) + 20px)) !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    gap: 18px;
}

.site-header .afc-header-brand,
.site-header a.brand.afc-header-brand {
    display: inline-flex !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: var(--afc-logo-desktop-width) !important;
    height: auto !important;
    max-height: none !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: 0 1 auto !important;
    overflow: visible !important;
    line-height: 0 !important;
}

.site-header .afc-header-brand > .afc-header-logo,
.site-header .afc-header-brand .afc-cp-protected-image,
.site-header .afc-header-brand .afc-cp-image-watermark-wrap > img {
    display: block !important;
    width: auto !important;
    height: var(--afc-logo-desktop-height) !important;
    min-height: 0 !important;
    max-width: var(--afc-logo-desktop-width) !important;
    max-height: var(--afc-logo-desktop-height) !important;
    margin: 0 !important;
    padding: 0 !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: left center !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter:
        drop-shadow(0 6px 12px rgba(6,24,42,.10))
        drop-shadow(0 1px 0 rgba(255,255,255,.42));
    transform-origin: left center;
    transition:
        height .22s ease,
        max-width .22s ease,
        transform .22s ease,
        filter .22s ease;
}

.site-header .afc-header-brand:hover > .afc-header-logo,
.site-header .afc-header-brand:hover .afc-cp-protected-image,
.site-header .afc-header-brand:hover .afc-cp-image-watermark-wrap > img {
    filter:
        drop-shadow(0 9px 18px rgba(6,24,42,.14))
        drop-shadow(0 1px 0 rgba(255,255,255,.56));
    transform: translateY(-1px) scale(1.012);
}

.site-header .afc-header-brand .afc-cp-image-watermark-wrap {
    display: inline-flex !important;
    width: auto !important;
    max-width: var(--afc-logo-desktop-width) !important;
    height: var(--afc-logo-desktop-height) !important;
    max-height: var(--afc-logo-desktop-height) !important;
    align-items: center !important;
    overflow: visible !important;
}

/* Prevent the center menu and right CTA from squeezing the logo too aggressively. */
@media (min-width: 981px) {
    .site-header .afc-header-brand {
        flex-shrink: 0 !important;
    }

    .site-header .afc-mobile-menu-panel {
        min-width: 0;
        flex: 1 1 auto;
    }
}

@media (max-width: 1220px) and (min-width: 981px) {
    .site-header .afc-header-brand,
    .site-header a.brand.afc-header-brand {
        max-width: min(var(--afc-logo-desktop-width), 230px) !important;
    }

    .site-header .afc-header-brand > .afc-header-logo,
    .site-header .afc-header-brand .afc-cp-protected-image,
    .site-header .afc-header-brand .afc-cp-image-watermark-wrap > img {
        height: min(var(--afc-logo-desktop-height), 66px) !important;
        max-width: min(var(--afc-logo-desktop-width), 230px) !important;
        max-height: min(var(--afc-logo-desktop-height), 66px) !important;
    }
}

@media (max-width: 980px) {
    .site-header .container.nav-wrap {
        min-height: max(72px, calc(var(--afc-logo-mobile-height) + 18px)) !important;
        padding-top: 9px !important;
        padding-bottom: 9px !important;
        gap: 12px !important;
    }

    .site-header .afc-header-brand,
    .site-header a.brand.afc-header-brand {
        width: auto !important;
        max-width: min(
            var(--afc-logo-mobile-width),
            calc(100vw - 108px)
        ) !important;
        flex: 0 1 auto !important;
    }

    .site-header .afc-header-brand > .afc-header-logo,
    .site-header .afc-header-brand .afc-cp-protected-image,
    .site-header .afc-header-brand .afc-cp-image-watermark-wrap > img {
        width: auto !important;
        height: var(--afc-logo-mobile-height) !important;
        max-width: min(
            var(--afc-logo-mobile-width),
            calc(100vw - 108px)
        ) !important;
        max-height: var(--afc-logo-mobile-height) !important;
        object-position: left center !important;
    }

    .site-header .afc-header-brand .afc-cp-image-watermark-wrap {
        width: auto !important;
        max-width: min(
            var(--afc-logo-mobile-width),
            calc(100vw - 108px)
        ) !important;
        height: var(--afc-logo-mobile-height) !important;
        max-height: var(--afc-logo-mobile-height) !important;
    }

    .site-header .mobile-toggle {
        width: 46px !important;
        min-width: 46px !important;
        height: 46px !important;
        min-height: 46px !important;
        flex: 0 0 46px !important;
        margin-left: auto !important;
    }
}

@media (max-width: 420px) {
    .site-header .afc-header-brand,
    .site-header a.brand.afc-header-brand,
    .site-header .afc-header-brand > .afc-header-logo,
    .site-header .afc-header-brand .afc-cp-protected-image,
    .site-header .afc-header-brand .afc-cp-image-watermark-wrap,
    .site-header .afc-header-brand .afc-cp-image-watermark-wrap > img {
        max-width: min(
            var(--afc-logo-mobile-width),
            calc(100vw - 96px)
        ) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header .afc-header-brand > .afc-header-logo,
    .site-header .afc-header-brand .afc-cp-protected-image,
    .site-header .afc-header-brand .afc-cp-image-watermark-wrap > img {
        transition: none !important;
    }
}
