/* =====================================================================
   Mazda UAE - vehicle catalog (/cars/ and /ar/cars/), new design
   Loaded by Views/Partials/Facelift/_Catalog.cshtml. The page's block is
   Views/B20Vehicles.cshtml, the same view as the header's Vehicles menu;
   these rules give it the menu's design (css/site-chrome.css, "Vehicles
   menu") on this page. Every rule is scoped under .vcat, so the header's
   own copy of the block is untouched. The side panel links stay in
   capitals: GTM's link-text conversions ("Test Drive", "Locations") must
   not count them.
   ===================================================================== */

.vcat {
    --vcat-ink: #0b0b0c;
    --vcat-paper: #f4f4f2;
    --vcat-muted: #5f5f5f;
    --vcat-accent: #911921;
    --vcat-accent-hi: #c8202b;
    --vcat-ease: cubic-bezier(.2, .7, .2, 1);
    --vcat-ease-out: cubic-bezier(.16, 1, .3, 1);
    --vcat-gutter: clamp(16px, 4vw, 48px);
    --vcat-max: 1320px;
    --vcat-font: "MazdaType", "Mazda Arabic", "Mazda Type", "IBM Plex Sans Arabic", Helvetica, Arial, sans-serif;
    padding: 48px 0 clamp(64px, 8vw, 112px);
    background: #fff;
    font-family: var(--vcat-font);
    color: var(--vcat-ink);
    text-align: start;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* local reset (the site styles bare elements; its phone styles set p { width: 90% }; a site rule sets
   a { font-family: MazdaType !important }, which would drop the Arabic font on links) */
.vcat *, .vcat *::before, .vcat *::after { box-sizing: border-box; }
.vcat * { font-family: inherit; }
.vcat h1, .vcat p { margin: 0; padding: 0; }
.vcat p { width: auto !important; }
.vcat h1 { font-family: var(--vcat-font) !important; }
.vcat a { font-family: var(--vcat-font) !important; }

/* container: 85% of the screen on desktop, as on the other pages */
.vcat .vcat-container {
    width: 100%;
    max-width: calc(var(--vcat-max) + 2 * var(--vcat-gutter));
    margin-inline: auto;
    padding-inline: var(--vcat-gutter);
}
@media (min-width: 1200px) {
    .vcat .vcat-container { width: 85%; max-width: none; padding-inline: 0; }
}

/* ---------- heading ---------- */
.vcat .vcat-intro { margin-bottom: 32px; }
.vcat .vcat-title {
    font-size: clamp(26px, 2.4vw, 40px) !important;
    line-height: 1.08;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-align: start !important;
    color: var(--vcat-ink);
}
.vcat .vcat-lead {
    max-width: 62ch;
    margin-top: 14px;
    font-size: clamp(15px, 1.1vw, 17px);
    line-height: 1.65;
    text-align: start !important;
    color: var(--vcat-muted);
}
body.is-rtl .vcat .vcat-title { letter-spacing: 0; text-transform: none; line-height: 1.35; }
body.is-rtl .vcat .vcat-lead { font-size: clamp(16px, 1.2vw, 18px); }

/* ---------- the block: cars on the left, dark side panel on the right ---------- */
.vcat .vm {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 40px;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--vcat-ink);
    text-align: start;
}
.vcat .vm__main { min-width: 0; }

/* filter pills */
.vcat .vm .vehicle-categories {
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
    padding: 0 0 28px;
    border: 0;
    background: none;
    overflow-x: auto;
    scrollbar-width: none;
}
.vcat .vm .vehicle-categories::-webkit-scrollbar { display: none; }
.vcat .vm .vehicle-category {
    height: 40px;
    margin: 0;
    padding: 0 8px;
    padding-inline-start: 18px;
    gap: 10px;
    border: 1px solid rgba(11, 11, 12, .16);
    border-radius: 999px;
    background: #fff;
    color: var(--vcat-ink);
    opacity: 1;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .25s var(--vcat-ease), border-color .25s var(--vcat-ease), color .25s var(--vcat-ease);
}
.vcat .vm .vehicle-category[aria-pressed="true"] {
    border-color: var(--vcat-ink);
    background: var(--vcat-ink);
    color: #fff;
    text-decoration: none;
}
.vcat .vm .vehicle-category:focus-visible { outline: 2px solid var(--vcat-ink); outline-offset: 2px; }
.vcat .vm .vehicle-category-radio { display: none; }
.vcat .vm .vehicle-category__count {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(11, 11, 12, .07);
    font-size: 11px;
    letter-spacing: 0;
    transition: background-color .25s var(--vcat-ease);
}
.vcat .vm .vehicle-category[aria-pressed="true"] .vehicle-category__count { background: rgba(255, 255, 255, .18); }

/* car tiles */
.vcat .vm .vehicle-selection {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 0;
    background: none;
    text-align: start;
    overflow: visible;
}
.vcat .vm .vehicle-selection__article {
    width: auto;
    margin: 0;
    opacity: 1;
    animation: none;
}
.vcat .vm .vehicle-selection__item-link {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    padding: 24px;
    border-radius: 4px;
    background: var(--vcat-paper);
    color: var(--vcat-ink);
    text-decoration: none;
    opacity: 1;
    transform: none;
    direction: inherit; /* the Arabic stylesheet sets these links to ltr */
    transition: background-color .35s var(--vcat-ease);
}
.vcat .vm .vehicle-selection__item-link:focus-visible { outline: 2px solid var(--vcat-ink); outline-offset: 2px; }
/* every picture gets the same frame, whatever its own size, so the names line up */
.vcat .vm .vehicle-selection__media { position: relative; display: block; aspect-ratio: 290 / 115; margin: 0 0 20px; }
.vcat .vm .vehicle-selection__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    object-fit: contain;
    transition: transform .6s var(--vcat-ease);
}
.vcat .vm .vehicle-selection__news {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    z-index: 1;
    width: auto !important;
    margin: 0;
    padding: 5px 8px;
    border-radius: 2px;
    background: var(--vcat-accent);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    letter-spacing: .14em;
}
.vcat .vm .vehicle-selection__title {
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-align: start;
    color: var(--vcat-ink);
}
.vcat .vm .vehicle-selection__copy {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.4;
    text-align: start;
    color: rgba(11, 11, 12, .62);
}
.vcat .vm .vehicle-selection__price {
    margin-top: auto;
    padding-top: 16px;
    padding-inline-end: 44px;
    text-transform: none;
}
.vcat .vm .vehicle-selection__price-num { color: var(--vcat-ink); font-weight: 700; white-space: nowrap; }
.vcat .vm .vehicle-selection__go {
    position: absolute;
    bottom: 20px;
    inset-inline-end: 20px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(11, 11, 12, .16);
    border-radius: 50%;
    color: var(--vcat-ink);
    transition: background-color .35s var(--vcat-ease), border-color .35s var(--vcat-ease), color .35s var(--vcat-ease);
}
body.is-rtl .vcat .vm .vehicle-selection__go svg { transform: scaleX(-1); }
@media (hover: hover) {
    .vcat .vm .vehicle-category:hover { border-color: var(--vcat-ink); }
    .vcat .vm .vehicle-selection__item-link:hover { background: #ebebe7; }
    .vcat .vm .vehicle-selection__item-link:hover .vehicle-selection__image { transform: translateX(6px) scale(1.04); }
    body.is-rtl .vcat .vm .vehicle-selection__item-link:hover .vehicle-selection__image { transform: translateX(-6px) scale(1.04); }
    .vcat .vm .vehicle-selection__item-link:hover .vehicle-selection__go { border-color: var(--vcat-ink); background: var(--vcat-ink); color: #fff; }
}

/* tiles rise in when the page opens and when a pill filters them */
.vcat .vm .vehicle-selection--animated .vehicle-selection__article {
    animation: vcat-in .55s var(--vcat-ease-out) both;
    animation-delay: calc(var(--i, 0) * 40ms + 60ms);
}
@keyframes vcat-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

/* side panel (the block's own styles hide its first part outside the new header) */
.vcat .vm__aside {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px;
    border-radius: 4px;
    background: var(--vcat-ink);
    color: #fff;
}
.vcat .vm__aside .vm__extra { display: flex; flex: 1 1 auto; flex-direction: column; }
.vcat .vm__aside .vm__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    background: #fff;
    color: var(--vcat-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .3s var(--vcat-ease), color .3s var(--vcat-ease);
}
.vcat .vm__aside .vm__cta svg { flex: none; }
.vcat .vm__aside .vm__links { margin: 12px 0 0; padding: 0; list-style: none; }
.vcat .vm__aside .vm__links li { margin: 0; padding: 0; list-style: none; }
.vcat .vm__aside .vm__link,
.vcat .vm .vehicle-crumbs .vehicle-crumb {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .88);
    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: color .25s var(--vcat-ease);
}
.vcat .vm__aside .vm__link svg { flex: none; color: rgba(255, 255, 255, .55); transition: color .25s var(--vcat-ease); }
/* one drawn chevron at the end of every row (the type links' own text chevron is hidden) */
.vcat .vm__aside .vm__link::after,
.vcat .vm .vehicle-crumbs .vehicle-crumb__chevron {
    content: "";
    order: 2;
    flex: none;
    width: 7px;
    height: 7px;
    margin-inline: auto 4px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    color: inherit;
    font-size: 0;
    opacity: .5;
    transform: rotate(45deg);
    transition: transform .25s var(--vcat-ease), opacity .25s var(--vcat-ease);
}
body.is-rtl .vcat .vm__aside .vm__link::after,
body.is-rtl .vcat .vm .vehicle-crumbs .vehicle-crumb__chevron { transform: rotate(-135deg); }
/* "Browse by type" and its links sit at the foot of the panel */
.vcat .vm__aside .vm__label {
    margin: auto 0 2px;
    padding-top: 26px;
    color: rgba(255, 255, 255, .5);
    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.vcat .vm .vehicle-crumbs {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    border: 0;
    background: none;
}
.vcat .vm .vehicle-crumbs .vehicle-crumb:last-child { border-bottom: 0; padding-bottom: 0; }
.vcat .vm .vehicle-crumbs .vehicle-crumb__label { padding: 0; border: 0; }
@media (hover: hover) {
    .vcat .vm__aside .vm__cta:hover { background: var(--vcat-accent-hi); color: #fff; }
    .vcat .vm__aside .vm__link:hover,
    .vcat .vm .vehicle-crumbs .vehicle-crumb:hover { color: #fff; }
    .vcat .vm__aside .vm__link:hover svg { color: #fff; }
    .vcat .vm__aside .vm__link:hover::after,
    .vcat .vm .vehicle-crumbs .vehicle-crumb:hover .vehicle-crumb__chevron { color: inherit; opacity: 1; transform: translateX(3px) rotate(45deg); }
    body.is-rtl .vcat .vm__aside .vm__link:hover::after,
    body.is-rtl .vcat .vm .vehicle-crumbs .vehicle-crumb:hover .vehicle-crumb__chevron { transform: translateX(-3px) rotate(-135deg); }
}
.vcat .vm__aside .vm__cta:focus-visible,
.vcat .vm__aside .vm__link:focus-visible,
.vcat .vm .vehicle-crumbs .vehicle-crumb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Arabic: no letter-spacing or capitals, a size up */
body.is-rtl .vcat .vm .vehicle-category,
body.is-rtl .vcat .vm__aside .vm__cta,
body.is-rtl .vcat .vm__aside .vm__link,
body.is-rtl .vcat .vm .vehicle-crumbs .vehicle-crumb,
body.is-rtl .vcat .vm__aside .vm__label { letter-spacing: 0; font-size: 13px; }
body.is-rtl .vcat .vm .vehicle-selection__title { letter-spacing: 0; text-transform: none; font-size: 16px; }

/* small laptops: still four across, smaller tiles */
@media (min-width: 960px) and (max-width: 1199px) {
    .vcat .vm { grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; }
    .vcat .vm__aside { padding: 20px; }
    .vcat .vm .vehicle-selection { gap: 12px; }
    .vcat .vm .vehicle-selection__item-link { padding: 18px 16px; }
    .vcat .vm .vehicle-selection__media { margin-bottom: 14px; }
    .vcat .vm .vehicle-selection__title { font-size: 12px; letter-spacing: .1em; }
    .vcat .vm .vehicle-selection__copy { font-size: 12px; }
    .vcat .vm .vehicle-selection__price { padding-inline-end: 0; padding-top: 10px; }
    .vcat .vm .vehicle-selection__go { display: none; }
    .vcat .vm__aside .vm__cta { padding: 0 12px; letter-spacing: .1em; }
    .vcat .vm__aside .vm__link,
    .vcat .vm .vehicle-crumbs .vehicle-crumb { letter-spacing: .1em; }
}
/* phones and tablets: tiles first, the side panel under them */
@media (max-width: 959px) {
    .vcat { padding-top: 32px; }
    .vcat .vcat-intro { margin-bottom: 24px; }
    .vcat .vm { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .vcat .vm .vehicle-categories { gap: 6px; margin-inline: calc(-1 * var(--vcat-gutter)); padding-inline: var(--vcat-gutter); padding-bottom: 16px; }
    .vcat .vm .vehicle-category { height: 36px; padding-inline-start: 14px; letter-spacing: .1em; }
    .vcat .vm .vehicle-selection { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .vcat .vm .vehicle-selection__item-link { padding: 14px 14px 16px; }
    .vcat .vm .vehicle-selection__media { margin-bottom: 12px; }
    .vcat .vm .vehicle-selection__title { font-size: 13px; letter-spacing: .1em; }
    .vcat .vm .vehicle-selection__copy { font-size: 12px; }
    .vcat .vm .vehicle-selection__price { padding-inline-end: 0; padding-top: 10px; }
    .vcat .vm .vehicle-selection__go { display: none; }
    .vcat .vm__aside { padding: 20px; }
}
@media (max-width: 559px) {
    .vcat .vm .vehicle-selection { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .vcat .vm .vehicle-selection--animated .vehicle-selection__article { animation: none; }
    .vcat .vm .vehicle-selection__image { transition: none; }
}
