/* AFCMall v1.3.18 — Stable Compact Premium Header Navigation
   Loaded last so older navigation/button hover rules cannot shift the Header. */

@media (min-width: 981px) {
    .site-header .container.nav-wrap {
        align-items: center !important;
    }

    .site-header .main-nav.afc-nav-header {
        display: flex !important;
        min-width: 0;
        align-items: center !important;
        justify-content: center !important;
        flex: 1 1 auto !important;
        flex-wrap: nowrap !important;
        gap: clamp(3px, var(--afc-nav-gap, 5px), 10px) !important;
        line-height: 1 !important;
    }

    .site-header .main-nav.afc-nav-header > a,
    .site-header .main-nav.afc-nav-header > .nav-dd > a {
        position: relative;
        display: inline-flex !important;
        width: auto !important;
        min-width: 0 !important;
        height: var(--afc-nav-item-height, 40px) !important;
        min-height: var(--afc-nav-item-height, 40px) !important;
        max-height: var(--afc-nav-item-height, 40px) !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        padding:
            0
            clamp(5px, var(--afc-nav-pad-x, 7px), 10px)
            !important;
        border: 1px solid transparent;
        border-radius: var(--afc-nav-radius, 10px);
        line-height: 1 !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
        transform: none !important;
        translate: none !important;
    }

    .site-header .main-nav.afc-nav-header > .nav-dd {
        position: relative;
        display: inline-flex !important;
        width: auto !important;
        height: var(--afc-nav-item-height, 40px) !important;
        min-height: var(--afc-nav-item-height, 40px) !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        line-height: 1 !important;
    }

    .site-header .main-nav.afc-nav-header a:hover,
    .site-header .main-nav.afc-nav-header a:focus-visible,
    .site-header .main-nav.afc-nav-header .is-active {
        translate: none !important;
    }

    .site-header .main-nav.afc-nav-header.afc-nav-motion-stable a,
    .site-header .main-nav.afc-nav-header.afc-nav-motion-stable a:hover,
    .site-header .main-nav.afc-nav-header.afc-nav-motion-stable a:focus-visible,
    .site-header .main-nav.afc-nav-header.afc-nav-motion-stable .is-active {
        transform: none !important;
    }

    .site-header .main-nav.afc-nav-header.afc-nav-motion-lift a:hover,
    .site-header .main-nav.afc-nav-header.afc-nav-motion-lift a:focus-visible {
        transform: translateY(-1px) !important;
    }

    /* Default: no border. Active underline remains enough for a premium look. */
    .site-header .main-nav.afc-nav-header.afc-nav-separator-none > a,
    .site-header .main-nav.afc-nav-header.afc-nav-separator-none > .nav-dd > a {
        border-color: transparent !important;
    }

    /* Optional subtle separators selected from Backoffice. */
    .site-header .main-nav.afc-nav-header.afc-nav-separator-line > * + * {
        border-left: 1px solid rgba(20, 50, 78, .12);
        padding-left: clamp(3px, calc(var(--afc-nav-gap, 5px) / 2), 6px);
    }

    .site-header .main-nav.afc-nav-header.afc-nav-separator-dot > * + *::before {
        content: "";
        position: absolute;
        top: 50%;
        left: calc((var(--afc-nav-gap, 5px) / -2) - 1px);
        width: 3px;
        height: 3px;
        border-radius: 50%;
        background: color-mix(
            in srgb,
            var(--afc-nav-normal, #1f2937) 28%,
            transparent
        );
        transform: translateY(-50%);
        pointer-events: none;
    }

    .site-header .main-nav.afc-nav-header.afc-nav-separator-pill > a,
    .site-header .main-nav.afc-nav-header.afc-nav-separator-pill > .nav-dd > a {
        border-color: rgba(20, 50, 78, .10) !important;
        background: rgba(255,255,255,.26);
    }

    .site-header .nav-actions.afc-nav-premium-actions {
        display: flex !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        gap: 7px !important;
        margin: 0 !important;
    }

    .site-header .nav-actions.afc-nav-premium-actions .btn {
        min-height: 42px !important;
        height: 42px !important;
        margin: 0 !important;
        padding: 8px 13px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        transform: none !important;
        translate: none !important;
    }

    .site-header .nav-actions.afc-nav-premium-actions .btn:hover,
    .site-header .nav-actions.afc-nav-premium-actions .btn:focus-visible,
    .site-header .nav-actions.afc-nav-premium-actions .btn:active {
        transform: none !important;
        translate: none !important;
    }
}

/* Compact intermediate desktop before the mobile menu breakpoint. */
@media (max-width: 1220px) and (min-width: 981px) {
    .site-header .main-nav.afc-nav-header {
        gap: 2px !important;
        font-size: min(var(--afc-nav-size-desktop, 13px), 13px) !important;
        letter-spacing: 0 !important;
    }

    .site-header .main-nav.afc-nav-header > a,
    .site-header .main-nav.afc-nav-header > .nav-dd > a {
        padding-inline: 5px !important;
    }

    .site-header .nav-actions.afc-nav-premium-actions .btn {
        padding-inline: 10px !important;
        font-size: 11px !important;
    }

    .site-header .nav-actions.afc-nav-premium-actions .afc-btn-icon {
        width: 23px !important;
        height: 23px !important;
        flex-basis: 23px !important;
    }
}

/* Mobile menu: fixed rows, close spacing, no vertical jump. */
@media (max-width: 980px) {
    .site-header .afc-mobile-menu-panel .main-nav {
        gap: 2px !important;
    }

    .site-header .afc-mobile-menu-panel .main-nav > a,
    .site-header .afc-mobile-menu-panel .main-nav > .nav-dd > a,
    .site-header .afc-mobile-menu-panel .nav-dd > div a {
        display: flex !important;
        min-height: 42px !important;
        align-items: center !important;
        margin: 0 !important;
        line-height: 1.25 !important;
        transform: none !important;
        translate: none !important;
    }

    .site-header .afc-mobile-menu-panel .main-nav a:hover,
    .site-header .afc-mobile-menu-panel .main-nav a:focus-visible,
    .site-header .afc-mobile-menu-panel .main-nav .is-active,
    .site-header .afc-mobile-menu-panel .nav-actions .btn,
    .site-header .afc-mobile-menu-panel .nav-actions .btn:hover,
    .site-header .afc-mobile-menu-panel .nav-actions .btn:active {
        transform: none !important;
        translate: none !important;
    }

    .site-header .afc-mobile-menu-panel .nav-dd {
        height: auto !important;
        margin: 0 !important;
    }

    .site-header .afc-mobile-menu-panel .nav-dd > div {
        margin: 1px 0 5px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header .main-nav a,
    .site-header .nav-actions .btn {
        animation: none !important;
        transition: color .01ms linear !important;
    }
}
