/* Drive.ma new-car showroom. Route-scoped so catalogue sub-pages retain their compact archive hero. */
.drive-showroom-page {
  --showroom-ink: #0b1423;
  --showroom-panel: #101b2e;
  --showroom-line: #d9e1eb;
  --showroom-orange: #cf4323;
  --showroom-orange-dark: #a93017;
  --showroom-chrome-offset: 13.125rem;
}

body.admin-bar .drive-showroom-page { --showroom-chrome-offset: 10.5rem; }

.drive-showroom-hero {
  background: var(--showroom-ink);
  color: #fff;
  isolation: isolate;
  min-height: max(34rem, calc(100vh - var(--showroom-chrome-offset)));
  min-height: max(34rem, calc(100svh - var(--showroom-chrome-offset)));
  overflow: hidden;
  position: relative;
}

.drive-showroom-hero__media,
.drive-showroom-hero__shade {
  inset: 0;
  position: absolute;
}

.drive-showroom-hero__media {
  display: grid;
  grid-template-columns: 1.05fr .92fr 1.2fr .92fr 1.05fr;
  z-index: -2;
}

.drive-showroom-hero__media figure {
  animation: showroom-panel-reveal 1.15s cubic-bezier(.2, .72, .18, 1) both;
  background: #17243a;
  clip-path: inset(0 100% 0 0);
  margin: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.drive-showroom-hero__media figure:nth-child(2) { animation-delay: .08s; }
.drive-showroom-hero__media figure:nth-child(3) { animation-delay: .16s; }
.drive-showroom-hero__media figure:nth-child(4) { animation-delay: .24s; }
.drive-showroom-hero__media figure:nth-child(5) { animation-delay: .32s; }

.drive-showroom-hero__media figure::after {
  background: linear-gradient(90deg, rgb(5 12 23 / 28%), transparent 35%, rgb(5 12 23 / 20%));
  content: "";
  inset: 0;
  position: absolute;
}

.drive-showroom-hero__media img {
  animation: showroom-image-settle 1.8s cubic-bezier(.2, .72, .18, 1) both;
  filter: saturate(.9) contrast(1.03);
  height: 100%;
  object-fit: cover;
  transform: scale(1.055);
  width: 100%;
}

.drive-showroom-hero__media figure:nth-child(1) img,
.drive-showroom-hero__media figure:nth-child(5) img { object-position: center; }
.drive-showroom-hero__media figure:nth-child(2) img { object-position: 62% center; }
.drive-showroom-hero__media figure:nth-child(4) img { object-position: 38% center; }

.drive-showroom-hero__shade {
  animation: showroom-shade-in .9s ease-out both;
  background:
    linear-gradient(180deg, rgb(5 12 23 / 22%) 0%, rgb(5 12 23 / 16%) 32%, rgb(5 12 23 / 92%) 82%, #07111f 100%),
    linear-gradient(90deg, rgb(5 12 23 / 72%) 0%, transparent 55%, rgb(5 12 23 / 28%) 100%);
  z-index: -1;
}

.drive-showroom-hero__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: max(34rem, calc(100vh - var(--showroom-chrome-offset)));
  min-height: max(34rem, calc(100svh - var(--showroom-chrome-offset)));
  padding-block: clamp(1rem, 2vw, 1.5rem) clamp(1.25rem, 3vw, 2.25rem);
}

.drive-showroom-hero .drive-breadcrumbs,
.drive-showroom-hero .drive-breadcrumbs :where(a, span) { color: #fff; }

.drive-showroom-hero__content {
  animation: showroom-copy-in .8s .42s cubic-bezier(.2, .72, .18, 1) both;
  margin-top: auto;
  max-width: 48rem;
  padding-bottom: clamp(1.25rem, 3vw, 2.25rem);
}

.drive-showroom-hero__kicker {
  color: #ffad98 !important;
  font-size: .8rem !important;
  font-weight: 800;
  letter-spacing: .02em;
  margin: 0 0 .65rem !important;
}

.drive-showroom-page .drive-showroom-hero h1 {
  color: #fff !important;
  font-size: clamp(2.65rem, 5.4vw, 5.2rem) !important;
  letter-spacing: -.055em;
  line-height: .94;
  margin: 0;
  max-width: 13ch;
  text-wrap: balance;
}

.drive-showroom-hero__content > p:not(.drive-showroom-hero__kicker) {
  color: #e4eaf2 !important;
  font-size: clamp(1rem, 1.35vw, 1.18rem) !important;
  line-height: 1.55;
  margin: 1rem 0 0 !important;
  max-width: 58ch;
}

.drive-showroom-hero__meta {
  align-items: baseline;
  display: flex;
  gap: .6rem;
  margin-top: 1rem;
}

.drive-showroom-hero__meta strong { color: #fff; font-size: 1.45rem; }
.drive-showroom-hero__meta span { color: #c8d2df; font-size: .8rem; }

.drive-showroom-finder {
  align-items: end;
  animation: showroom-copy-in .8s .56s cubic-bezier(.2, .72, .18, 1) both;
  background: #050b14;
  border: 1px solid rgb(255 255 255 / 18%);
  box-shadow: 0 18px 50px rgb(0 0 0 / 28%);
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(10rem, .72fr);
  padding: 1rem;
}

.drive-showroom-finder label { display: grid; gap: .4rem; min-width: 0; }
.drive-showroom-finder label > span { color: #dce4ef; font-size: .72rem; font-weight: 750; }
.drive-showroom-finder select {
  appearance: auto;
  background: #111c2c !important;
  border: 1px solid #41516a !important;
  border-radius: 4px !important;
  color: #fff !important;
  min-height: 3rem;
  padding-inline: .8rem !important;
  width: 100%;
}
.drive-showroom-finder button {
  background: var(--showroom-orange) !important;
  border: 1px solid var(--showroom-orange) !important;
  border-radius: 4px !important;
  color: #fff !important;
  font-size: .85rem;
  font-weight: 800;
  min-height: 3rem;
  padding-inline: 1rem;
}
.drive-showroom-finder button:hover { background: var(--showroom-orange-dark) !important; }
.drive-showroom-finder :where(select, button):focus-visible { outline: 3px solid #8bb5ff; outline-offset: 3px; }

.drive-showroom-browse {
  background: #fff;
  border-bottom: 1px solid var(--showroom-line);
  padding-block: clamp(2.25rem, 4vw, 3.5rem);
}

.drive-showroom-browse__heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}
.drive-showroom-browse__heading h2 { font-size: clamp(1.7rem, 3vw, 2.55rem); margin: 0; }
.drive-showroom-browse__heading p { color: #5d6878; margin: .35rem 0 0; }
.drive-showroom-browse__heading > a { color: var(--showroom-orange-dark); font-size: .82rem; font-weight: 800; }

.drive-showroom-categories {
  border-block: 1px solid var(--showroom-line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.25rem;
}
.drive-showroom-categories a {
  display: grid;
  gap: .25rem;
  min-height: 6.2rem;
  padding: 1.2rem;
  text-decoration: none;
}
.drive-showroom-categories a + a { border-left: 1px solid var(--showroom-line); }
.drive-showroom-categories strong { color: #121b2b; font-size: 1rem; }
.drive-showroom-categories span { color: #667085; font-size: .76rem; line-height: 1.45; }
.drive-showroom-categories a:hover,
.drive-showroom-categories a:focus-visible { background: #fff4f0; }
.drive-showroom-categories a:focus-visible { outline: 3px solid #155eef; outline-offset: -3px; }

.drive-showroom-brands {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-top: 1rem;
}
.drive-showroom-brands a {
  align-items: center;
  color: #253047;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-width: 0;
  padding: .75rem .35rem;
  text-decoration: none;
}
.drive-showroom-brands a:hover strong,
.drive-showroom-brands a:focus-visible strong { color: var(--showroom-orange-dark); }
.drive-showroom-brands a:focus-visible { outline: 3px solid #155eef; outline-offset: -2px; }
.drive-showroom-brands span {
  align-items: center;
  background: #f4f6f9;
  border: 1px solid #e1e6ed;
  border-radius: 50%;
  color: #172238;
  display: flex;
  font-size: .72rem;
  font-weight: 900;
  height: 3.2rem;
  justify-content: center;
  overflow: hidden;
  width: 3.2rem;
}
.drive-showroom-brands img { height: 100%; object-fit: contain; padding: .35rem; width: 100%; }
.drive-showroom-brands strong {
  font-size: .65rem;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-showroom-page > .drive-ad-slot { margin-block: clamp(1.5rem, 3vw, 2.5rem); }
.drive-showroom-page .drive-archive-body { padding-top: clamp(1rem, 2vw, 1.5rem); }

.drive-showroom-page .drive-storylines--showroom .drive-storylines__inner {
  padding-block: clamp(2.25rem, 4vw, 3.75rem);
}

.drive-showroom-page .drive-storylines--showroom .drive-storylines__header {
  margin-block-end: clamp(1rem, 2vw, 1.5rem);
}

@keyframes showroom-panel-reveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}

@keyframes showroom-image-settle {
  from { transform: scale(1.055); }
  to { transform: scale(1); }
}

@keyframes showroom-shade-in {
  from { opacity: .35; }
  to { opacity: 1; }
}

@keyframes showroom-copy-in {
  from { opacity: 0; transform: translateY(1.35rem); }
  to { opacity: 1; transform: translateY(0); }
}

html[data-drive-theme="dark"] .drive-showroom-browse { background: #0e1827; border-color: #314057; }
html[data-drive-theme="dark"] .drive-showroom-browse__heading h2,
html[data-drive-theme="dark"] .drive-showroom-categories strong { color: #f5f7fb !important; }
html[data-drive-theme="dark"] .drive-showroom-browse__heading p,
html[data-drive-theme="dark"] .drive-showroom-categories span { color: #b6c1d1 !important; }
html[data-drive-theme="dark"] .drive-showroom-categories { border-color: #314057; }
html[data-drive-theme="dark"] .drive-showroom-categories a + a { border-color: #314057; }
html[data-drive-theme="dark"] .drive-showroom-categories a:hover,
html[data-drive-theme="dark"] .drive-showroom-categories a:focus-visible { background: #17253a; }
html[data-drive-theme="dark"] .drive-showroom-brands a { color: #d9e1ec; }
html[data-drive-theme="dark"] .drive-showroom-brands span { background: #f8fafc; border-color: #dbe2eb; color: #172238; }

@media (max-width: 64rem) {
  .drive-showroom-hero__media { grid-template-columns: repeat(3, 1fr); }
  .drive-showroom-hero__media figure:nth-child(n + 4) { display: none; }
  .drive-showroom-finder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drive-showroom-brands { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 48rem) {
  .drive-showroom-page { --showroom-chrome-offset: 8.625rem; }
  .drive-showroom-hero {
    min-height: max(44rem, calc(100vh - var(--showroom-chrome-offset)));
    min-height: max(44rem, calc(100svh - var(--showroom-chrome-offset)));
  }
  .drive-showroom-hero__inner {
    min-height: max(44rem, calc(100vh - var(--showroom-chrome-offset)));
    min-height: max(44rem, calc(100svh - var(--showroom-chrome-offset)));
    padding-bottom: clamp(2rem, 6vw, 3rem);
  }
  .drive-showroom-hero__media { grid-template-columns: 1fr; }
  .drive-showroom-hero__media figure { display: none; }
  .drive-showroom-hero__media figure:first-child { display: block; }
  .drive-showroom-hero__shade {
    background: linear-gradient(180deg, rgb(5 12 23 / 28%) 0%, rgb(5 12 23 / 74%) 45%, #07111f 78%);
  }
  .drive-showroom-hero__content {
    margin-top: clamp(6rem, 24vw, 9rem);
    padding-bottom: 1rem;
  }
  .drive-showroom-page .drive-showroom-hero h1 { font-size: clamp(2.5rem, 11vw, 3.65rem) !important; }
  .drive-showroom-finder { grid-template-columns: 1fr; }
  .drive-showroom-finder label,
  .drive-showroom-finder label:nth-child(3),
  .drive-showroom-finder button { grid-column: 1; }
  .drive-showroom-browse__heading { align-items: flex-start; flex-direction: column; }
  .drive-showroom-categories { grid-template-columns: 1fr 1fr; }
  .drive-showroom-categories a:nth-child(3) { border-left: 0; border-top: 1px solid var(--showroom-line); }
  .drive-showroom-categories a:nth-child(4) { border-top: 1px solid var(--showroom-line); }
  .drive-showroom-brands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 24rem) {
  .drive-showroom-hero__inner { padding-bottom: 2rem; }
  .drive-showroom-categories { grid-template-columns: 1fr; }
  .drive-showroom-categories a + a { border-left: 0; border-top: 1px solid var(--showroom-line); }
  .drive-showroom-brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .drive-showroom-page * { scroll-behavior: auto !important; }
  .drive-showroom-hero__media figure,
  .drive-showroom-hero__media img,
  .drive-showroom-hero__shade,
  .drive-showroom-hero__content,
  .drive-showroom-finder {
    animation: none !important;
    clip-path: none;
    opacity: 1;
    transform: none;
  }
}
