/* cl-home.css: Industrial Injection's home (templates/home.html), from their measurements at 1440 and in their
   390px phone stage: the dark gradient page, the hero still, the brand line, the engine tiles, the product rows,
   the category squares and the part search.
   Every rule sits in @layer site (cl-site.css: the layer order). */
@layer base, kit, site;

@layer site {

.cl-home { background: linear-gradient(to right bottom, #202020, #000000); color: var(--site-chrome-fg); padding-bottom: 1px; }

/* ---------- the hero still ---------- */
.cl-hero { position: relative; background: var(--site-chrome-deep); }
.cl-hero__photo { display: block; height: 605px; overflow: hidden; }
.cl-hero__photo picture, .cl-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.cl-hero__band { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; }
.cl-hero__pick { display: none; }

/* ---------- the brand line ---------- */
.cl-brandline { display: flex; align-items: center; justify-content: center; gap: 16px; height: 66px; padding: 0 20px; background: var(--site-chrome-bg); border-bottom: 2px solid var(--site-chrome-fg); text-align: center; }
.cl-brandline__h { font: 800 20px/24px var(--site-font-heading); letter-spacing: 0.6px; text-transform: uppercase; }

/* ---------- the engine tiles ---------- */
.cl-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 60px 20px; }
.cl-tile { height: 240px; }
.cl-tile--wide { grid-column: 1 / -1; height: 327px; }
.cl-tile a { position: relative; display: block; height: 100%; overflow: hidden; background: var(--site-chrome-bg); }
.cl-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.cl-tile a:hover img { transform: scale(1.04); }
.cl-tile__body { position: relative; display: flex; flex-direction: column; align-items: center; gap: 48px; height: 100%; padding: 54px 20px 20px; text-align: center; }
.cl-tile--wide .cl-tile__body { padding-top: 98px; }
.cl-tile__h { font: 800 36px/39.6px var(--site-font-heading); letter-spacing: 1.08px; text-transform: uppercase; }
.cl-tile a:hover .cl-tile__btn { background: var(--site-button-hover-bg); border-color: var(--site-button-hover-bg); }

/* ---------- the product rows: Best Sellers, Common Rail Injectors ---------- */
.cl-row { margin-top: 59px; padding: 0 40px 60px; }
.cl-row__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; margin-bottom: 40px; }
.cl-row__h { font: 800 28px/33.6px var(--site-font-heading); letter-spacing: 0.84px; text-transform: uppercase; }
.cl-row__all { flex: none; display: inline-flex; align-items: center; min-height: 34px; font: 700 16px/19.2px var(--site-font-body); text-decoration: underline; text-underline-offset: 3px; }
.cl-row__grid { display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: 383px; background: var(--site-chrome-bg); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.cl-row--short .cl-row__grid { grid-auto-rows: 364px; }
.cl-card { box-shadow: inset -1px -1px 0 rgba(255, 255, 255, 0.1); }
.cl-card a { display: block; height: 100%; padding: 14px; }
.cl-card__img { display: block; aspect-ratio: 1; background: var(--cs-photo); }
.cl-card__img img { width: 100%; height: 100%; object-fit: contain; }
.cl-card__name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 20px 6px 0; font: 400 16px/19.2px var(--site-font-body); }
.cl-card a:hover .cl-card__name { text-decoration: underline; }

/* ---------- the category squares ---------- */
.cl-cats { display: grid; grid-template-columns: repeat(6, 208px); justify-content: space-between; row-gap: 47px; margin-top: 60px; padding: 32px 16px 47px; background: var(--site-chrome-bg); }
.cl-cats a { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cl-cats img { width: 70%; height: auto; aspect-ratio: 1; margin: 15% 0; object-fit: cover; }
.cl-cats span { display: block; margin-top: 12px; font: 700 16px/19.2px var(--site-font-body); }
.cl-cats a:hover span { text-decoration: underline; }

/* ---------- the part search, where their reviews widget sits ---------- */
.cl-find { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; min-height: 519px; padding: 60px 20px; text-align: center; }
.cl-find__h { font: 800 28px/33.6px var(--site-font-heading); letter-spacing: 0.84px; text-transform: uppercase; }
.cl-find__form { display: flex; width: 100%; max-width: 640px; height: 50px; background: var(--site-chrome-field); box-shadow: inset 0 0 0 1px var(--site-chrome-line); }
.cl-find__form input { flex: 1; min-width: 0; padding: 0 16px; background: transparent; border: 0; color: var(--site-chrome-fg); font: 400 16px/1 var(--site-font-body); }
.cl-find__form input::placeholder { color: var(--site-chrome-fg); opacity: 1; }
.cl-find__form .cl-btn { min-height: 50px; }

/* ---------- phones: their 390px stage ---------- */
@media (max-width: 979.98px) {
  .cl-hero__photo { height: auto; aspect-ratio: 1; }
  .cl-hero__band { position: static; }
  .cl-js .cl-hero__pick { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; height: 40px; background: var(--site-button-bg); color: var(--site-button-fg); font: 700 16px/1 var(--site-font-body); }
  .cl-js .cl-hero__pick:hover { background: var(--site-button-hover-bg); }
  .cl-js .cl-hero:not(.is-open) .cl-hero__band { display: none; }
  .cl-js .cl-hero.is-open .cl-hero__pick { position: static; width: 100%; }
  .cl-brandline { flex-direction: column; gap: 16px; height: 100px; padding: 0 22px; }
  .cl-tiles { grid-template-columns: 1fr; gap: 10px; padding: 30px 10px 48px; }
  .cl-tile, .cl-tile--wide { height: 148px; }
  .cl-tile__body, .cl-tile--wide .cl-tile__body { justify-content: center; gap: 10px; padding: 10px; }
  .cl-tile__h { font-size: 26px; line-height: 28px; }
  .cl-tile__btn { min-height: 40px; padding: 0 10px; font-size: 14px; }
  .cl-row { margin-top: 40px; padding: 0 0 40px; }
  .cl-row--short .cl-row__grid { grid-auto-rows: 324px; }
  .cl-row__head { min-height: 29px; margin: 0 16px 9px; }
  .cl-row__all { min-height: 40px; }
  .cl-row__h { font-size: 24px; line-height: 29px; }
  .cl-row__grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 250px; grid-auto-rows: 340px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; box-shadow: none; }
  .cl-card { scroll-snap-align: start; }
  .cl-card a { padding: 13px; }
  .cl-card__name { margin-top: 12px; }
  .cl-cats { grid-template-columns: repeat(2, 1fr); column-gap: 16px; row-gap: 20px; margin-top: 40px; padding: 32px 16px 28px; }
  .cl-cats span { font-size: 15px; }
  .cl-find { min-height: 517px; padding: 40px 16px; }
  .cl-find__h { font-size: 24px; line-height: 29px; }
}

}
