/* EnFavori Canonical Header — single source */
:root {
    --efh-navy: var(--ef-color-navy);
    --efh-navy-deep: var(--ef-color-navy-dark);
    --efh-turquoise: var(--ef-color-turquoise);
    --efh-turquoise-dark: var(--ef-color-turquoise-dark);
    --efh-text: var(--ef-color-navy);
    --efh-border: var(--ef-color-border);
    --efh-header-height: var(--ef-header-height);
    --efh-control-height: var(--ef-control-height);
    --efh-container: var(--ef-container-max);
}

html { scrollbar-gutter: stable; }
body.ef-mobile-menu-open { overflow: hidden !important; }
.ef-header,
.ef-header * { box-sizing: border-box; }

.ef-header {
    position: sticky;
    font-family: var(--ef-font-sans);
    color: var(--efh-text);
    top: 0;
    z-index: 1040;
    width: 100%;
    height: var(--efh-header-height);
    min-height: var(--efh-header-height);
    background: #fff;
    border-bottom: 1px solid #e5ebf2;
    box-shadow: 0 2px 10px rgba(17,45,80,.05);
}

.ef-header-inner {
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    grid-template-areas: "logo nav actions";
    grid-template-rows: 1fr;
    align-items: center;
    width: calc(100% - (var(--ef-page-gutter) * 2));
    max-width: var(--efh-container);
    height: 100%;
    margin: 0 auto;
    padding: 0;
    column-gap: 24px;
}

.ef-mobile-menu-button {
    grid-area: menu;
    display: none;
}

.ef-header-logo-link {
    grid-area: logo;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    align-self: center;
    height: var(--efh-control-height);
    min-width: 0;
    margin: 0;
    padding: 0;
    text-decoration: none !important;
}

.ef-header-logo-link .ef-header-logo {
    display: block !important;
    width: auto;
    height: var(--efh-control-height);
    max-width: 270px;
    max-height: var(--efh-control-height);
    margin: 0;
    object-fit: contain;
}

.ef-desktop-nav {
    grid-area: nav;
    display: flex;
    align-items: flex-end;
    align-self: center;
    min-width: 0;
    height: var(--efh-control-height);
    gap: 2px;
    white-space: nowrap;
    transform: none;
}

.ef-nav-link,
.ef-nav-group > summary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    min-height: 32px;
    margin: 0;
    padding: 0 10px;
    color: var(--efh-text) !important;
    -webkit-text-fill-color: var(--efh-text) !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 9px;
    font-family: var(--ef-font-sans);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    list-style: none;
    cursor: pointer;
}

.ef-nav-group {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: var(--efh-control-height);
    margin: 0;
}

.ef-nav-group > summary::-webkit-details-marker { display: none; }
.ef-nav-group > summary::marker { content: ''; }

.ef-nav-link:hover,
.ef-nav-link:focus,
.ef-nav-group:hover > summary,
.ef-nav-group:focus-within > summary,
.ef-nav-group[open] > summary {
    color: #0d2746 !important;
    -webkit-text-fill-color: #0d2746 !important;
    background: #f3f7fb !important;
    outline: none;
}

.ef-nav-group > summary i {
    color: currentColor !important;
    font-size: 10px;
    line-height: 1;
    transition: transform .14s ease;
}

.ef-nav-group:hover > summary i,
.ef-nav-group:focus-within > summary i,
.ef-nav-group[open] > summary i {
    transform: rotate(180deg);
}

.ef-nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1100;
    display: none;
    width: min(390px, calc(100vw - 28px));
    max-height: min(540px, calc(100vh - 110px));
    margin: 0;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border: 1px solid var(--efh-border);
    border-top: 3px solid var(--efh-turquoise);
    border-radius: 0 0 11px 11px;
    box-shadow: 0 18px 38px rgba(15,23,42,.17);
    white-space: normal;
}

.ef-nav-group:hover > .ef-nav-dropdown,
.ef-nav-group:focus-within > .ef-nav-dropdown,
.ef-nav-group[open] > .ef-nav-dropdown { display: block; }

.ef-nav-item {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin: 0;
    padding: 9px 12px;
    color: #26364b !important;
    -webkit-text-fill-color: #26364b !important;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none !important;
}

.ef-nav-item:hover,
.ef-nav-item:focus {
    color: var(--efh-navy) !important;
    -webkit-text-fill-color: var(--efh-navy) !important;
    background: #eef9f7;
    border-color: #d6f1ed;
    outline: none;
}

.ef-nav-item.is-all {
    margin-bottom: 5px;
    color: #087c73 !important;
    -webkit-text-fill-color: #087c73 !important;
    background: #f0faf8;
    border-color: #c8ece7;
    font-weight: 900;
}

.ef-nav-item.is-district {
    color: #56697d !important;
    -webkit-text-fill-color: #56697d !important;
    font-size: 12px;
}

.ef-header-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: center;
    gap: 8px;
    height: var(--efh-control-height);
    margin: 0;
}

.ef-header-action,
.ef-mobile-menu-button,
.ef-mobile-close {
    position: relative;
    align-items: center;
    justify-content: center;
    height: var(--efh-control-height);
    min-height: var(--efh-control-height);
    margin: 0;
    color: var(--efh-text) !important;
    background: #fff;
    border: 1px solid var(--efh-border);
    border-radius: 10px;
    text-decoration: none !important;
    cursor: pointer;
}

.ef-header-action {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
    min-width: var(--efh-control-height);
    gap: 7px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.ef-header-action > i,
.ef-mobile-menu-button > i,
.ef-mobile-close > i {
    display: block;
    margin: 0;
    color: var(--efh-turquoise-dark) !important;
    font-size: 16px;
    line-height: 1;
}

.ef-white-location > i {
    color:#e53935 !important;
}

.ef-header-action-label {
    display: inline-block;
    line-height: 1;
}

.ef-header-action:hover,
.ef-header-action:focus-visible,
.ef-mobile-menu-button:hover,
.ef-mobile-menu-button:focus-visible {
    color: #0b756d !important;
    background: #f4fbfa;
    border-color: #bfe8e3;
    outline: none;
}

.ef-account-action {
    color: #fff !important;
    background: var(--efh-navy) !important;
    border-color: var(--efh-navy) !important;
}

.ef-account-action > i { color: #63d8cf !important; }

.ef-account-action:hover,
.ef-account-action:focus-visible {
    color: #fff !important;
    background: var(--efh-navy-deep) !important;
    border-color: var(--efh-navy-deep) !important;
}

.ef-header-profile {
    display: block;
    width: 24px;
    height: 24px;
    margin: 0;
    object-fit: cover;
    border-radius: 7px;
}

.ef-mobile-menu-button {
    width: var(--efh-control-height);
    min-width: var(--efh-control-height);
    padding: 0;
}

.ef-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(4,12,24,.62);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}

.ef-mobile-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ef-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    z-index: 1051;
    width: min(88vw,330px);
    max-width: calc(100vw - 8px);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    box-shadow: -18px 0 44px rgba(17,45,80,.18);
    transform: translateX(100%);
    transition: transform .24s ease;
}

.ef-mobile-menu.is-open { transform: translateX(0); }

.ef-mobile-menu-head {
    flex: 0 0 auto;
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #e5ebf2;
}

.ef-mobile-logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    text-decoration: none !important;
}

.ef-mobile-logo .ef-header-logo {
    display: block !important;
    width: auto;
    height: 36px;
    max-width: 235px;
    object-fit: contain;
}

.ef-mobile-close {
    display: inline-flex;
    flex: 0 0 38px;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    background: #f4f7fa;
}

.ef-mobile-menu-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ef-mobile-direct,
.ef-mobile-group {
    margin: 5px 0;
    border: 1px solid #e5ebf2;
    border-radius: 12px;
    overflow: hidden;
}

.ef-mobile-direct,
.ef-mobile-group > summary {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 10px;
    color: var(--efh-text) !important;
    background: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
    text-decoration: none !important;
    list-style: none;
    cursor: pointer;
}

.ef-mobile-direct.is-soft { background: #f8fbfd; }
.ef-mobile-group > summary::-webkit-details-marker { display: none; }
.ef-mobile-group > summary::marker { content: ''; }

.ef-mobile-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--efh-turquoise-dark);
    background: #edf8f7;
    border-radius: 9px;
}

.ef-mobile-title { flex: 1 1 auto; min-width: 0; }
.ef-mobile-metrics { flex: 0 0 auto; display: flex; align-items: center; gap: 3px; margin-left: auto; }
.ef-mobile-stat { min-width: 44px; height: 32px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; padding: 3px 5px 2px; color: #fff; background: var(--efh-navy); border-radius: 8px; line-height: 1; }
.ef-mobile-stat.is-secondary { background: #087c73; }
.ef-mobile-stat strong { color: #fff; font-size: 12px; font-weight: 950; }
.ef-mobile-stat small { margin-top: 2px; color: #7ce9df; font-size: 6px; font-weight: 950; text-transform: uppercase; }
.ef-mobile-chevron { flex: 0 0 12px; width: 12px; color: #64748b; font-size: 11px; transition: transform .16s ease; }
.ef-mobile-group[open] > summary { background: #f7fbfb; border-bottom: 1px solid #d6efeb; }
.ef-mobile-group[open] .ef-mobile-chevron { color: var(--efh-turquoise-dark); transform: rotate(180deg); }
.ef-mobile-panel { padding: 4px 6px 6px; background: #fff; }
.ef-mobile-child { min-height: 38px; display: flex; align-items: center; gap: 8px; margin: 2px 0; padding: 7px 9px; color: #334155 !important; background: #fff; border-radius: 7px; font-size: 12px; font-weight: 700; line-height: 1.25; text-decoration: none !important; }
.ef-mobile-child:hover,.ef-mobile-child:focus { color: var(--efh-navy) !important; background: #eef9f7; outline: none; }
.ef-mobile-child.is-all { color: #087c73 !important; background: #f0faf8; font-weight: 900; }
.ef-mobile-child i { width: 18px; color: var(--efh-turquoise-dark); text-align: center; }

@media (min-width: 992px) and (max-width: 1199.98px) {
    .ef-header-inner {
        width: calc(100% - 32px);
        column-gap: 12px;
    }

    .ef-header-logo-link .ef-header-logo {
        height: 40px;
        max-width: 235px;
    }

    .ef-nav-link,
    .ef-nav-group > summary {
        padding: 0 6px;
        font-size: 12.5px;
    }

    .ef-header-action {
        width: var(--efh-control-height);
        min-width: var(--efh-control-height);
        padding: 0;
    }

    .ef-header-action-label { display: none; }
}

@media (max-width: 991.98px) {
    :root {
        --efh-header-height: 72px;
        --efh-control-height: 40px;
    }

    .ef-header-inner {
        /* EF_CANONICAL_LIST_MOBILE_V2 */
        grid-template-columns: minmax(0,1fr) auto 40px;
        grid-template-areas: "logo actions menu";
        grid-template-rows: 1fr;
        width: 100%;
        max-width: none;
        padding: 0 16px;
        column-gap: 8px;
    }

    .ef-mobile-menu-button {
        grid-area: menu;
        display: inline-flex;
        align-self: center;
        justify-self: center;
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        color: var(--efh-text) !important;
        background: transparent;
        border-color: transparent;
    }

    .ef-header-logo-link {
        grid-area: logo;
        align-self: center;
        justify-self: start;
        width: 100%;
        height: 40px;
        min-width: 0;
    }

    .ef-header-logo-link .ef-header-logo {
        height: 42px;
        max-width: min(245px,100%);
        max-height: 42px;
    }

    .ef-desktop-nav { display: none !important; transform: none; }

    .ef-header-actions {
        grid-area: actions;
        display: flex;
        align-items: center;
        align-self: center;
        justify-self: end;
        height: 40px;
        gap: 4px;
    }

    .ef-random { display: none !important; }

    .ef-header-action {
        display: inline-flex;
        flex: 0 0 40px;
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        gap: 0;
        color: var(--efh-text) !important;
        background: transparent !important;
        border-color: transparent !important;
        border-radius: 10px;
    }

    .ef-header-action-label { display: none !important; }

    .ef-header-action > i,
    .ef-mobile-menu-button > i {
        color: var(--efh-text) !important;
        font-size: 19px;
    }

    .ef-white-location > i {
        color:#e53935 !important;
    }

    .ef-account-action {
        color: var(--efh-text) !important;
        background: transparent !important;
        border-color: transparent !important;
    }

    .ef-account-action > i { color: var(--efh-text) !important; }

    .ef-account-action:hover,
    .ef-account-action:focus-visible {
        color: var(--efh-text) !important;
        background: transparent !important;
        border-color: transparent !important;
    }

    .ef-header-profile {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 430px) {
    :root { --efh-control-height: 38px; }

    .ef-header-inner {
        grid-template-columns: minmax(0,1fr) auto 38px;
        padding: 0 10px;
        column-gap: 6px;
    }

    .ef-mobile-menu-button,
    .ef-header-action {
        flex-basis: 38px;
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
    }

    .ef-header-actions { height: 38px; }
    .ef-header-logo-link { height: 40px; }
    .ef-header-logo-link .ef-header-logo { height: 40px; max-width: min(220px,100%); max-height: 40px; }
}

@media (max-width: 365px) {
    :root { --efh-control-height: 34px; }

    .ef-header-inner {
        grid-template-columns: minmax(0,1fr) auto 34px;
        padding: 0 7px;
        column-gap: 4px;
    }

    .ef-mobile-menu-button,
    .ef-header-action {
        flex-basis: 34px;
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
    }

    .ef-header-actions { height: 34px; }
    .ef-header-logo-link { height: 36px; }
    .ef-header-logo-link .ef-header-logo { height: 36px; max-width: min(195px,100%); max-height: 36px; }
    .ef-mobile-logo .ef-header-logo { height: 32px; max-width: 205px; }
}

@media (prefers-reduced-motion: reduce) {
    .ef-mobile-backdrop,
    .ef-mobile-menu,
    .ef-mobile-chevron { transition: none !important; }
}