/* MG navigation, including the contact page and the vehicle submenu. */
@media (min-width:850px) {
    #header .header-nav-main { flex-wrap: nowrap; }
    #header .header-nav-main > li { margin-right:2px!important; margin-left:2px!important; flex:0 0 auto; }
    #header .header-nav-main > li > a { padding-right:8px!important; padding-left:8px!important; white-space:nowrap; flex-wrap:nowrap!important; text-transform:uppercase!important; font-weight:400!important; letter-spacing:.02em; }
}
@media (min-width:850px) and (max-width:1179px) {
    #header .header-nav-main > li { margin-right:1px!important; margin-left:1px!important; }
    #header .header-nav-main > li > a { padding-right:5px!important; padding-left:5px!important; font-size:12px!important; }
}
@media (min-width:850px) and (max-width:999px) {
    #header .header-nav-main > li > a { padding-right:4px!important; padding-left:4px!important; }
    #header .header-nav-main > li > a > .ux-menu-icon { display:none; }
}
.mg-product-menu > .nav-dropdown {
    --mg-products-top: calc(90px + var(--wp-admin--admin-bar--height, 0px));
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 20px;
    position: fixed !important;
    top: var(--mg-products-top) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(720px, calc(100vw - 32px));
    min-width: 0;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - var(--mg-products-top) - 16px) !important;
    max-height: calc(100dvh - var(--mg-products-top) - 16px) !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 20px 12px;
    margin: 0 !important;
    border: 1px solid #e9e9e9;
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .16);
    background: #fff;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1100;
}
.mg-product-menu > .nav-dropdown::after { display: none; }
.mg-product-menu:hover > .nav-dropdown,
.mg-product-menu:focus-within > .nav-dropdown,
.mg-product-menu.current-dropdown > .nav-dropdown,
.mg-product-menu.mg-nav-open > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.mg-product-menu.mg-nav-closed > .nav-dropdown {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.mg-product-menu > .nav-dropdown > li {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    list-style: none;
}
.mg-product-menu > .nav-dropdown > .mg-product-group-sedan { grid-column: 1; }
.mg-product-menu > .nav-dropdown > .mg-product-group-suv-mpv { grid-column: 2; }
.mg-product-menu > .nav-dropdown > .mg-product-group-electric-hybrid { grid-column: 3; }
.mg-product-menu > .nav-dropdown > .mg-product-row-1 { grid-row: 1; }
.mg-product-menu > .nav-dropdown > .mg-product-row-2 { grid-row: 2; }
.mg-product-menu > .nav-dropdown > .mg-product-row-3 { grid-row: 3; }
.mg-product-menu > .nav-dropdown > .mg-product-row-4 { grid-row: 4; }
.mg-product-menu .mg-product-group-label {
    display: block;
    padding: 3px 12px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #747474;
}
.mg-product-menu > .nav-dropdown > li > a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 12px;
    margin: 0;
    border: 0;
    border-radius: 5px;
    color: #202020;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
}
.mg-product-menu > .nav-dropdown > li > a:hover,
.mg-product-menu > .nav-dropdown > li.current-menu-item > a {
    background: #f7f4f4;
    color: var(--fs-color-primary, #c3002f);
}
.mg-product-menu > a:focus-visible,
.mg-product-menu > .nav-dropdown a:focus-visible {
    outline: 2px solid var(--fs-color-primary, #c3002f);
    outline-offset: 2px;
}
.mg-product-menu > .nav-dropdown > .mg-products-view-all {
    grid-column: 1 / -1;
    grid-row: 5;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ececec;
}
.mg-product-menu > .nav-dropdown > .mg-products-view-all > a {
    justify-content: center;
    color: var(--fs-color-primary, #c3002f);
}
.mg-products-view-all > a::after { content: " →"; margin-left: 8px; }

/* Compact disclosures for the other public desktop header dropdowns. */
.mg-product-menu>.nav-dropdown{width:min(1120px,calc(100vw - 32px));grid-template-columns:repeat(6,minmax(0,1fr));gap:8px 10px;padding:22px 24px 14px;border-radius:0 0 12px 12px}
.mg-product-menu>.nav-dropdown>.mg-products-filter-row{grid-column:1/-1;grid-row:auto;margin-bottom:4px}
.mg-products-filters{display:flex;flex-wrap:wrap;gap:8px;padding:0 4px 10px}
.mg-products-filters button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;min-width:0;margin:0;padding:7px 14px;border:1px solid #111;border-radius:999px;background:#111;color:#fff;font:600 11px/1.4 Arial,sans-serif;text-transform:uppercase;letter-spacing:0;box-shadow:none;cursor:pointer}
.mg-products-filters button[aria-pressed=true]{border-color:#b70d24;background:#b70d24}
.mg-products-filters button:focus-visible{outline:3px solid #b70d24;outline-offset:3px}
.mg-products-filters button span{opacity:.8}
.mg-product-menu>.nav-dropdown>li>a.mg-menu-car{display:flex;flex-direction:column;justify-content:flex-start;gap:8px;min-height:132px;padding:10px 4px;border-radius:10px;font-size:13px;text-align:center}
.mg-menu-car__name{display:flex;align-items:center;justify-content:center;min-height:28px;font-weight:700;color:#111}
.mg-menu-car__name img{display:block;width:auto;max-width:100px;height:auto;max-height:28px;object-fit:contain}
.mg-menu-car__photo{display:block;width:112px!important;max-width:100%;height:63px!important;margin:0!important;object-fit:contain;transition:transform .25s ease}
.mg-product-menu>.nav-dropdown>li>a.mg-menu-car:hover,.mg-product-menu>.nav-dropdown>li.current-menu-item>a.mg-menu-car{background:transparent;color:#202020}
@media(hover:hover){.mg-menu-car:hover .mg-menu-car__photo{transform:translateY(-3px) scale(1.04)}}
.mg-menu-car__price{display:block;font-size:12px;font-weight:400;line-height:1.5;color:#17212b;white-space:nowrap}
.mg-menu-car__price strong{font-weight:700}
.mg-product-menu>.nav-dropdown>.mg-products-view-all{grid-column:1/-1;grid-row:auto}
.mg-product-menu li[hidden]{display:none!important}
@media(min-width:850px) and (max-width:999px){.mg-product-menu>.nav-dropdown{gap:6px;padding:18px}.mg-product-menu>.nav-dropdown>li>a.mg-menu-car{padding-inline:2px}.mg-menu-car__photo{width:96px!important;height:54px!important}.mg-menu-car__price{font-size:10px}}

.header-nav > li.mg-secondary-menu > .nav-dropdown {
    box-sizing: border-box;
    display: block !important;
    position: fixed !important;
    top: var(--mg-products-top, calc(90px + var(--wp-admin--admin-bar--height, 0px))) !important;
    left: var(--mg-secondary-left, 16px) !important;
    right: auto !important;
    transform: none !important;
    width: var(--mg-secondary-width, 280px);
    min-width: 0;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - var(--mg-products-top, 110px) - 16px) !important;
    max-height: calc(100dvh - var(--mg-products-top, 110px) - 16px) !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
    margin: 0 !important;
    border: 1px solid #e9e9e9;
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .16);
    background: #fff;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1100;
}
.header-nav > li.mg-secondary-menu > .nav-dropdown::after { display: none; }
.header-nav > li.mg-secondary-menu:hover > .nav-dropdown,
.header-nav > li.mg-secondary-menu:focus-within > .nav-dropdown,
.header-nav > li.mg-secondary-menu.current-dropdown > .nav-dropdown,
.header-nav > li.mg-secondary-menu.mg-nav-open > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.header-nav > li.mg-secondary-menu.mg-nav-closed > .nav-dropdown {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.header-nav > li.mg-secondary-menu > .nav-dropdown > li {
    display: block;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.header-nav > li.mg-secondary-menu > .nav-dropdown > li > a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 12px;
    margin: 0;
    border: 0;
    border-radius: 5px;
    color: #202020;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
}
.header-nav > li.mg-secondary-menu > .nav-dropdown > li > a:hover,
.header-nav > li.mg-secondary-menu > .nav-dropdown > li.current-menu-item > a {
    background: #f7f4f4;
    color: var(--fs-color-primary, #c3002f);
}
.header-nav > li.mg-secondary-menu > a:focus-visible,
.header-nav > li.mg-secondary-menu > .nav-dropdown a:focus-visible {
    outline: 2px solid var(--fs-color-primary, #c3002f);
    outline-offset: 2px;
}

/* Keep the native mobile drawer's parent anchor and separate toggle button. */
.nav-sidebar .mg-product-menu > .children {
    max-height: calc(100vh - 190px);
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px 12px 10px;
    background: #fff;
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
}
.nav-sidebar .mg-product-menu > .children > li { display: block; padding: 0; margin: 0; }
.nav-sidebar .mg-product-menu .mg-product-group-label {
    padding: 14px 10px 4px;
    font-size: 10px;
}
.nav-sidebar .mg-product-menu > .children > li:first-child .mg-product-group-label { padding-top: 2px; }
.nav-sidebar .mg-product-menu > .children > li > a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: #252525;
    text-transform: none;
}
.nav-sidebar .mg-product-menu > .children > .mg-products-view-all {
    position: sticky;
    bottom: -10px;
    padding-top: 6px;
    margin-top: 6px;
    border-top: 1px solid #ececec;
    background: #fff;
    z-index: 1;
}
.nav-sidebar .mg-product-menu > .children > .mg-products-view-all > a { color: var(--fs-color-primary, #c3002f); }
.nav-sidebar .mg-product-menu > .children a:focus-visible,
.nav-sidebar .mg-product-menu > button.toggle:focus-visible {
    outline: 2px solid var(--fs-color-primary, #c3002f);
    outline-offset: -2px;
}
.nav-sidebar .mg-product-menu>.children{display:none!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:14px 12px}
.nav-sidebar .mg-product-menu.active>.children{display:grid!important}
.nav-sidebar .mg-product-menu>.children>.mg-products-filter-row,.nav-sidebar .mg-product-menu>.children>.mg-products-view-all{grid-column:1/-1}
.nav-sidebar .mg-product-menu>.children>.mg-products-filter-row{display:none!important}
.nav-sidebar .mg-product-menu>.children>li>a.mg-menu-car{display:flex;flex-direction:column;gap:7px;padding:10px 4px;border-radius:10px;text-align:center;min-height:140px}
.nav-sidebar .mg-products-filters{gap:6px;padding:0 0 8px}
.nav-sidebar .mg-products-filters button{min-height:36px;padding:7px 10px;font-size:10px}
.nav-sidebar .mg-menu-car__photo{width:110px!important;height:62px!important}
.nav-sidebar .mg-menu-car__name img{max-width:86px;max-height:26px}
.nav-sidebar .mg-menu-car__price{font-size:10px}
@media (prefers-reduced-motion: reduce) {
    .mg-menu-car__photo{transition:none!important}
    .mg-product-menu > .nav-dropdown,
    .header-nav > li.mg-secondary-menu > .nav-dropdown { transition: none; }
}
