/**
 * Homepage visual pass: vehicle card stays data-driven, hero message and
 * catalog cards follow the approved layout. Header rules are not in this file.
 */

/* Burgundy card car stays as drawn: front to the right. No mirror. */
.home-welcome__car {
  transform: none;
}

/* ── Hero: silver car on the physical left, nose pointing left ── */
html body:not(#hp-x) .hp-hero--desktop {
  direction: ltr;
  grid-template-columns: minmax(0, 1.7fr) minmax(168px, .5fr);
  gap: 16px;
}
html body:not(#hp-x) .hp-hero--desktop .hp-hero__visual { order: 1; }
html body:not(#hp-x) .hp-hero--desktop .hp-hero__copy {
  order: 2;
  direction: rtl;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
}
html[dir="ltr"] body:not(#hp-x) .hp-hero--desktop .hp-hero__copy {
  direction: ltr;
  align-items: flex-start;
  text-align: left;
}
html body:not(#hp-x) .hp-hero__message {
  margin: 0;
  max-width: 22rem;
  padding: 0;
  color: #fff;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-weight: 800;
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.35;
}
html body:not(#hp-x) .hp-hero__message .hp-hero__model {
  color: #f5c518;
  font-style: normal;
}
html body:not(#hp-x) .hp-hero img.hp-hero__car {
  transform: none !important;
}
html body.is-home-page:not(#hp-x) #desktopHeroCarousel .hp-hero--desktop img.hp-hero__car {
  width: 100% !important;
  max-height: 100% !important;
  object-position: left center !important;
  transform: none !important;
}
html body.is-home-page:not(#hp-x) #desktopHeroCarousel .hp-hero--desktop .hp-hero__visual {
  justify-content: flex-start;
  overflow: hidden;
}
html body.is-home-page:not(#sd-x) #mobV2CatalogTitle#mobV2CatalogTitle .mob-v2-catalog-astra {
  color: #f5c518 !important;
  -webkit-text-fill-color: #f5c518 !important;
}

@media (max-width: 900px) {
  body.is-home-page {
    --mob-v2-hero-h: clamp(280px, 36dvh, 330px);
  }
  html body.is-home-page #hero#hero {
    height: clamp(280px, 36dvh, 330px) !important;
    min-height: clamp(280px, 36dvh, 330px) !important;
    max-height: none !important;
  }
  html body:not(#hp-x) .hp-hero--mobile {
    padding: 14px 12px 0 !important;
  }
  html[dir="rtl"] body:not(#hp-x) .hp-hero--mobile .hp-hero__copy {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    left: auto;
    max-width: 78%;
    margin: 0;
    direction: rtl;
    align-items: flex-end;
    text-align: right;
  }
  html[dir="ltr"] body:not(#hp-x) .hp-hero--mobile .hp-hero__copy {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    right: auto;
    max-width: 78%;
    margin: 0;
    direction: ltr;
    align-items: flex-start;
    text-align: left;
  }
  html body:not(#hp-x) .hp-hero--mobile .hp-hero__message {
    max-width: none;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 22px;
  }
  html body.is-home-page:not(#hp-x) #hero#hero #heroSlider .hp-hero--mobile img.hp-hero__car {
    left: 0 !important;
    right: auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: 0 !important;
    width: min(92%, 520px) !important;
    max-height: 68% !important;
    bottom: 0 !important;
    object-position: left bottom !important;
    transform: none !important;
  }

  /* Catalog heading: white plus yellow, not the header. */
  html body.is-home-page:not(#sd-x) #mobV2CatalogTitle#mobV2CatalogTitle .mob-v2-catalog-astra {
    color: #f5c518 !important;
    -webkit-text-fill-color: #f5c518 !important;
  }

  /* Homepage category cards only. The open catalog drawer is left alone. */
  html body.is-home-page:not(#sd-x) #mobV2CatalogHost .catalog-drawer:not(.open) #catalogGroupsList .ct-tree--inline-home > .ct-node--group > .ct-row--group {
    background: #141618 !important;
    border: 1px solid rgba(255, 255, 255, .1) !important;
    border-radius: 16px !important;
  }
  html body.is-home-page:not(#sd-x) #mobV2CatalogHost .catalog-drawer:not(.open) #catalogGroupsList .ct-tree--inline-home .ct-icon--art {
    background: #f4f5f7 !important;
    border-radius: 12px 12px 0 0 !important;
  }
  html body.is-home-page:not(#sd-x) #mobV2CatalogHost .catalog-drawer:not(.open) #catalogGroupsList .ct-tree--inline-home .ct-label {
    background: #141618 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }
  html body.is-home-page:not(#sd-x) #mobV2CatalogHost .catalog-drawer:not(.open) #catalogGroupsList .ct-tree--inline-home > .ct-node--group > .ct-row::after {
    width: 28px !important;
    height: 16px !important;
    margin: 0 10px 8px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 16'%3E%3Cpath d='M15 2 L7 8 L15 14' fill='none' stroke='%231a56d6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M24 2 L16 8 L24 14' fill='none' stroke='%231a56d6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 28px 16px no-repeat !important;
    transform: none !important;
  }
  html[dir="ltr"] body.is-home-page:not(#sd-x) #mobV2CatalogHost .catalog-drawer:not(.open) #catalogGroupsList .ct-tree--inline-home > .ct-node--group > .ct-row::after {
    margin: 0 10px 8px 0 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 16'%3E%3Cpath d='M13 2 L21 8 L13 14' fill='none' stroke='%231a56d6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M4 2 L12 8 L4 14' fill='none' stroke='%231a56d6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  }
}
