/* Shared mobile navigation. Desktop headers keep their existing styling. */
.evro-mobile-top-bar,
.evro-mobile-menu,
.evro-mobile-menu[hidden] {
    display: none;
}

/* Detail and form headers have a permanent shrink class. The legacy transforms
   moved their left/right links outside the viewport at every desktop width. */
@media (min-width: 768px) {
    .header.sticky {
        display: flex;
        padding: 0 !important;
        background: #fff;
        border-bottom: 1px solid #eae8e2;
    }

    .header .navibar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: clamp(12px, 2vw, 32px);
        width: calc(100% - 40px);
        max-width: 1320px;
    }

    .header .navibar .nav-left,
    .header .navibar .nav-right {
        flex-direction: row;
        gap: clamp(10px, 1.4vw, 22px);
        min-width: 0;
        transform: none;
    }

    .header .navibar .nav-left { justify-content: flex-start; }
    .header .navibar .nav-right { justify-content: flex-end; }

    .header .navibar ul li a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0;
        color: #444a40;
        font-size: clamp(10px, 1.05vw, 14px);
        line-height: 1.3;
        white-space: nowrap;
    }

    .header .logo-container {
        position: static;
        width: clamp(130px, 14vw, 180px);
        margin: 0;
    }

    .header .logo-container img {
        display: block;
        width: 100%;
        height: auto;
    }
}

@media (max-width: 767px) {
    body {
        padding-top: 64px;
    }

    body.evro-menu-open {
        overflow: hidden;
    }

    .main-header,
    .header.sticky {
        display: none;
    }

    .evro-mobile-top-bar {
        position: fixed;
        inset: 0 0 auto;
        z-index: 1100;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;
        width: 100%;
        height: 64px;
        padding: 0 16px;
        background: #fff;
        border-bottom: 1px solid #eae8e2;
        box-shadow: none;
    }

    .evro-mobile-brand {
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        min-height: 44px;
    }

    .evro-mobile-top-bar img.mobile-logo,
    .evro-mobile-menu img.mobile-logo {
        position: static;
        display: block;
        width: 145px;
        max-width: 145px;
        height: auto;
        margin: 0;
        transform: none;
    }

    .evro-mobile-top-bar .evro-menu-toggle,
    .evro-mobile-menu .evro-menu-close {
        position: static;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin: 0 -6px 0 0;
        padding: 0;
        color: #1e211f;
        border: 0;
        border-radius: 12px;
        background: transparent;
        box-shadow: none;
        cursor: pointer;
        transform: none;
        -webkit-tap-highlight-color: transparent;
    }

    .evro-menu-toggle:hover,
    .evro-menu-close:hover {
        background: #f6f5f2;
    }

    .evro-mobile-top-bar a:focus-visible,
    .evro-mobile-top-bar button:focus-visible,
    .evro-mobile-menu a:focus-visible,
    .evro-mobile-menu button:focus-visible {
        outline: 2px solid #ad8e5e;
        outline-offset: 4px;
    }

    .evro-mobile-menu.active {
        position: fixed;
        inset: 0;
        z-index: 1200;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        box-sizing: border-box;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        color: #1e211f;
        background: #fff;
        animation: evro-menu-in 180ms ease-out;
    }

    .evro-mobile-menu[hidden] {
        display: none;
    }

    .evro-mobile-menu::before {
        display: none;
    }

    .evro-mobile-menu-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex: 0 0 64px;
        padding: 0 16px;
        border-bottom: 1px solid #eae8e2;
    }

    .evro-mobile-navigation {
        padding: 28px 24px 24px;
    }

    .evro-mobile-menu .evro-menu-eyebrow {
        display: block;
        margin: 0 0 14px;
        color: #8b7553;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.6;
        letter-spacing: 1.5px;
        text-transform: uppercase;
    }

    .evro-mobile-menu .mobile-menu-links {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .evro-mobile-menu .mobile-menu-links li {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid #efede8;
    }

    .evro-mobile-menu .mobile-menu-links li a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 54px;
        padding: 10px 0;
        color: #1e211f;
        font-family: inherit;
        font-size: 21px;
        font-weight: 500;
        line-height: 1.35;
        letter-spacing: -.45px;
        text-decoration: none;
    }

    .evro-mobile-menu .mobile-menu-links a[aria-current],
    .evro-mobile-menu .mobile-menu-links a:hover,
    .evro-mobile-menu .mobile-menu-links a span {
        color: #957749;
    }

    .evro-menu-contact {
        margin-top: auto;
        padding: 24px 24px max(24px, env(safe-area-inset-bottom));
        background: #f6f5f2;
    }

    .evro-mobile-menu .evro-menu-contact .evro-menu-eyebrow {
        margin-bottom: 10px;
    }

    .evro-menu-contact .evro-menu-phone {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 44px;
        color: #1e211f;
        font-size: 23px;
        font-weight: 500;
        letter-spacing: -.5px;
        text-decoration: none;
    }

    .evro-menu-contact p {
        margin: 8px 0 0;
        color: #72766f;
        font-size: 12px;
        line-height: 1.6;
    }

    @keyframes evro-menu-in {
        from { opacity: 0; transform: translateX(16px); }
        to { opacity: 1; transform: translateX(0); }
    }
}

/* Earlier responsive sheets used 768px inclusively; keep that boundary usable. */
@media (min-width: 768px) and (max-width: 768px) {
    .main-header,
    .header.sticky {
        display: flex;
    }

    .main-navibar {
        position: relative;
        display: flex;
        flex-direction: row;
        height: auto;
        background: transparent;
    }

    .main-navibar .nav-left,
    .main-navibar .nav-right,
    .navibar .nav-left,
    .navibar .nav-right {
        flex-direction: row;
    }

    .main-logo-container {
        top: 36%;
    }

    .shrink .main-logo-container {
        top: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .evro-mobile-menu.active {
        animation: none;
    }
}
