/* ==========================================================================
   home.css — home page only. Section order and measurements follow the
   reference: split hero (finder panel 322px into the container + slideshow),
   gray band (categories carousel, new arrivals), white band (four tiles).
   ========================================================================== */

/* ---------------------------------------------------------------- Hero */
.hero { display: grid; grid-template-columns: minmax(0, calc((100% - var(--container)) / 2 + 322px)) minmax(0, 1fr); min-height: 529px; }
.hero__finder { background: linear-gradient(180deg, #B8383A 0%, var(--red) 55%, var(--red-dark) 100%); padding: 70px 42px 40px 0; }
.hero__finder form { width: 280px; margin-left: auto; }
.hero__finder label { display: block; color: #fff; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.hero__finder .field { margin-bottom: 19px; }
.hero__finder select {
  width: 100%; height: 39px; padding: 0 32px 0 8px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23757575' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 16px;
  appearance: none; -webkit-appearance: none; color: var(--ink); cursor: pointer;
}
.hero__finder select:invalid, .hero__finder select.is-empty { color: var(--ink-3); font-style: italic; }
.hero__finder select:disabled { opacity: .7; cursor: default; }
.hero__finder form.is-loading select { background-color: #F6F6F6; }
.hero__finder .btn:disabled { opacity: .7; }
.hero__finder .btn { height: 45px; margin-top: 4px; }
.hero__finder .finder__note { color: rgba(255,255,255,.85); font-size: 13px; margin: 14px 0 0; }
.hero__finder .finder__note a { color: #fff; text-decoration: underline; }

.hero__slides { position: relative; overflow: hidden; background: var(--red-dark); min-height: 529px; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); }
.slide.is-current { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.74) 0%, rgba(0,0,0,.42) 50%, rgba(0,0,0,.12) 100%); }
.slide__body { position: absolute; left: 63px; top: 70px; max-width: 520px; z-index: 2; }
.slide__body .h--xl--white { margin-bottom: 40px; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.slide__text { display: block; font-size: 24px; line-height: 1.43; color: var(--green-light); margin-bottom: 28px; }
.hero__dots { position: absolute; left: 52px; bottom: 34px; z-index: 3; display: flex; }
.hero__dots button { width: 30px; height: 30px; padding: 10px; margin-right: 7px; background: none; border: 0; }
.hero__dots button span { display: block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; background: transparent; }
.hero__dots button.is-current span { background: var(--green-light); border-color: var(--green-light); }
.hero__mbtns { display: none; }

@media (max-width: 1199px) {
  .hero { grid-template-columns: 340px minmax(0, 1fr); }
  .hero__finder { padding: 50px 30px 40px; }
  .hero__finder form { margin: 0 auto; }
  .slide__body { left: 40px; top: 50px; max-width: 480px; }
  .slide__body .h--xl--white { font-size: 48px; }
}
@media (max-width: 991px) {
  .slide__body .h--xl--white { font-size: 40px; margin-bottom: 26px; }
  .slide__text { font-size: 20px; }
}
@media (max-width: 767px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__slides { order: 1; min-height: 387px; }
  .slide__body { left: 10px; right: 10px; top: 30px; max-width: none; }
  .slide__body .h--xl--white { font-size: 36px; line-height: 1.1; margin-bottom: 20px; }
  .slide__text { font-size: 22px; margin-bottom: 18px; }
  .slide__body .btn { padding-left: 24px; padding-right: 24px; }
  .hero__dots { left: 10px; bottom: 10px; }
  .hero__finder { order: 2; padding: 10px 10px 0; }
  .hero__finder form { width: 100%; }
  .hero__finder .btn { width: 100%; }
  .hero__mbtns { display: grid; order: 3; gap: 24px; padding: 17px 10px 30px; background: var(--gray); }
  .hero__mbtns .btn { width: 100%; padding-left: 10px; padding-right: 10px; }
}

/* ---------------------------------------------------------------- Categories carousel (gray band) */
.band { padding: 30px 0; }   /* reference: gray band has 30px above the tiles and 30px below the last row */
.cats { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 40px; padding-bottom: 30px; align-items: center; }
.cats__intro h2 { margin-bottom: 23px; }
.cats__intro p { margin: 15px 0; }
.cats__ctrl { display: flex; align-items: center; gap: 4px; }
.cats__ctrl button { background: none; border: 0; color: var(--red); width: 26px; height: 26px; display: grid; place-items: center; padding: 0; }
.cats__ctrl button:disabled { opacity: .35; }
.cats__ctrl .ctrl-prev .ic { transform: rotate(180deg); }
.cats__ctrl .dot { width: 22px; height: 22px; display: grid; place-items: center; }
.cats__ctrl .dot span { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--red); display: block; }
.cats__ctrl .dot.is-current span { background: var(--red); }
.cats__viewport { overflow: hidden; }
.cats__track { display: flex; transition: transform .45s var(--ease); }
.cats__page { flex: 0 0 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px 20px; align-content: start; }
.cat { display: block; background: #fff; border: 1px solid var(--line); border-radius: 3px; color: #000; font-weight: 700; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: box-shadow .15s, transform .15s; }
.cat:hover { text-decoration: none; color: var(--red); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat__img { height: 108px; display: grid; place-items: center; border-bottom: 1px solid var(--gray-2); background: #fff; overflow: hidden; }
.part-icon { width: 76px; height: 76px; color: var(--red); }
/* Photo on white: the renders are trimmed to the part at build time, so the picture is
   simply letterboxed in a taller box with a little breathing room; multiply blend hides any
   off-white halo. The SVG line icon only shows if the photo is missing. */
.cat__img { position: relative; height: 136px; }
.cat__pic { position: absolute; inset: 8px; display: block; }
.cat__pic img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .2s var(--ease); }
.cat:hover .cat__pic img { transform: scale(1.06); }
.cat__img:has(.cat__pic) .part-icon { display: none; }
.cat__img.is-fallback .cat__pic { display: none; }
.cat__img.is-fallback .part-icon { display: block; }
.cat__name { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 6px; min-height: 52px; line-height: 1.3; }
@media (max-width: 991px) { .cats { grid-template-columns: 1fr; gap: 20px; } .cats__page { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) { .cats { display: none; } }

/* ---------------------------------------------------------------- New arrivals */
.band-h2 { background: var(--red); color: #fff; font-family: var(--font-body); font-size: 16px; font-weight: 700; line-height: 1.43; letter-spacing: .1px; text-transform: uppercase; padding: 7px 20px; margin: 0 0 13px; }
.parts-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 991px) { .parts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) { .parts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.arrivals__more { margin: 14px 0 0; text-align: right; }

/* Part card (shared with the inventory page via inventory.css) */
.pcard { position: relative; background: #fff; border: 1px solid var(--line); color: #000; display: flex; flex-direction: column; overflow: hidden; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); text-decoration: none; color: #000; }
.pcard__media { position: relative; height: 152px; background: var(--gray); overflow: hidden; display: grid; place-items: center; }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }
.pcard__nophoto { font-size: 13px; color: var(--ink-3); font-style: italic; padding: 10px; text-align: center; }
.pcard__ribbon { position: absolute; left: -34px; top: 12px; transform: rotate(-45deg); background: var(--green); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .06em; text-transform: uppercase; padding: 5px 40px; z-index: 2; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.pcard__kind { position: absolute; right: 6px; bottom: 6px; font-size: 11px; font-weight: 600; background: rgba(0,0,0,.55); color: #fff; padding: 2px 6px; border-radius: 2px; }
.pcard__body { padding: 10px 10px 12px; display: flex; flex-direction: column; flex: 1; }
.pcard__type { font-weight: 700; line-height: 1.25; margin-bottom: 3px; }
.pcard__vehicle, .pcard__miles { font-size: 13px; font-weight: 600; line-height: 1.43; }
.pcard__price { font-size: 18px; font-weight: 700; margin-top: auto; padding-top: 26px; }
.pcard__price.is-call { font-size: 15px; }
.pcard__actions { display: flex; gap: 5px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.pcard__actions .btn { flex: 1 1 0; padding: 8px 5px; font-size: 13px; line-height: 1.1; white-space: normal; }
.pcard--skeleton .pcard__media { background: var(--gray-2); }
.pcard--skeleton .sk { display: block; height: 12px; background: var(--gray-2); border-radius: 3px; margin: 6px 0; }
.pcard--skeleton .w80 { width: 80%; } .pcard--skeleton .w60 { width: 60%; } .pcard--skeleton .w40 { width: 40%; }

/* ---------------------------------------------------------------- Four tiles (white band) */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 31px; }
.tile { position: relative; display: block; aspect-ratio: 1; padding: 36px; background: #B0B3B8 center / cover no-repeat; color: #fff; overflow: hidden; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,.55) 100%); }
.tile h3 { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 400; font-size: 38px; line-height: 1.05; text-transform: uppercase; color: #fff; margin: 0; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); text-decoration: none; color: #fff; }
@media (max-width: 991px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 767px) { .tiles-band { display: none; } }
