#index .ks-home-slider {
  display: grid;
  grid-template-rows: minmax(min-content, 1fr) auto;
  min-width: 0;
}

#index .ks-home-slider-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  border-radius: 8px;
}

#index .ks-home-slider-track > .ks-home-hero {
  min-width: 0;
  scroll-snap-align: start;
}

#index .ks-home-slider-track[data-slide-animating] { scroll-snap-type: none; }
#index .ks-home-slider-track::-webkit-scrollbar { display: none; }

#index .ks-home-slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 6px;
  transition: none;
}

/* Reserve the controls' space before the script makes them interactive. */
#index .ks-home-slider-controls[hidden] {
  display: flex !important;
  visibility: hidden;
}

#index .ks-home-slider-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ks-ink);
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}

#index .ks-home-slider-controls button:hover {
  background: var(--ks-paper);
  border-color: var(--ks-line);
}

#index .ks-home-slider-controls [data-slide-step]::before {
  content: '';
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}

#index .ks-home-slider-controls [data-slide-step="-1"]::before { transform: rotate(-135deg); }

#index .ks-home-slider-controls [data-slide-index] { width: 26px; }

#index .ks-home-slider-controls [data-slide-index]::before {
  content: '';
  width: 18px;
  height: 6px;
  border-radius: 10px;
  background: #b1b7bb;
}

#index .ks-home-slider-controls [aria-current="true"]::before { background: var(--ks-brand); }

#index .ks-home-slider-controls [data-slide-rotation]::before {
  content: '';
  width: 12px;
  height: 14px;
  border-inline: 4px solid currentColor;
}

#index .ks-home-slider-controls [data-rotation-paused]::before {
  width: 0;
  height: 0;
  border: 0;
  border-block: 7px solid transparent;
  border-inline-start: 11px solid currentColor;
}

#index .ks-home-slider :is(.ks-home-slider-track,.ks-home-slider-controls button,.ks-showcase-product):focus-visible {
  outline: 2px solid var(--ks-brand);
  outline-offset: -2px;
}

#index .ks-home-slider .ks-home-hero-title {
  margin: clamp(4px, 1vh, 10px) 0 clamp(7px, 1.2vh, 12px);
  color: inherit;
  font-family: var(--ks-sans);
  /* Match the hero h1 override in the theme's global typography rules. */
  font-size: clamp(2rem, min(3.9vw, 6vh - 4px), 3.5rem) !important;
  font-style: normal;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.025em;
}

#index .ks-home-slider .ks-home-hero-title em {
  display: block;
  color: var(--ks-brand);
  font: inherit;
}

#index .ks-home-slider .ks-home-intro {
  font: 400 clamp(.875rem, 1.65vh, 1rem)/1.5 var(--ks-sans);
}

#index .ks-home-slider .ks-home-actions :is(.ks-button, .ks-text-link) {
  font-family: var(--ks-sans);
  font-size: clamp(.8125rem, 1.65vh, 1rem);
  line-height: 1.3;
}

#index .ks-eurovent-brand {
  position: relative;
  display: block;
  width: clamp(110px, 11vw, 144px);
  aspect-ratio: 1690 / 340;
  overflow: hidden;
}

/* Trim the white margins of the manufacturer asset in the layout. */
#index .ks-eurovent-brand img {
  position: absolute;
  top: -82.35%;
  left: -8.88%;
  width: 118.28%;
  max-width: none;
  height: auto;
}

#index .ks-domax-brand {
  display: block;
  width: clamp(86px, 9.3vw, 110px);
  height: auto;
}

#index .ks-product-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
  gap: clamp(6px, 1.1vw, 14px);
  min-width: 0;
  padding: clamp(10px, 2.2vw, 30px);
  background: linear-gradient(135deg, #42474b, #262a2d);
}

#index .ks-showcase-product {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: clamp(6px, 1vw, 12px);
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--ks-paper);
  color: var(--ks-ink);
  text-align: center;
  text-decoration: none;
}

#index .ks-showcase-product:hover { border-color: #a98265; }

#index .ks-showcase-product img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.24;
  object-fit: contain;
}

#index .ks-showcase-product :is(strong,span) {
  max-width: 100%;
  overflow-wrap: anywhere;
}

#index .ks-showcase-product strong {
  margin-top: 6px;
  font: 700 clamp(11px, 1.2vw, 15px)/1.25 var(--ks-sans);
  color: var(--ks-ink);
}

#index .ks-showcase-product span {
  margin: 4px 0 2px;
  font: 400 clamp(10px, .95vw, 13px)/1.25 var(--ks-sans);
  color: var(--ks-muted);
}

#index .ks-home-hero.ks-home-hero--sadolin {
  --ks-sadolin-highlight: #f0dcba;
  background: #24392e;
  color: #fff8eb;
}

#index .ks-home-hero--sadolin .ks-home-hero-copy {
  padding: clamp(16px, 2.9vh, 30px) clamp(24px, 3.15vw, 50px);
}

#index .ks-home-slider .ks-home-hero--sadolin .ks-home-hero-title em {
  color: var(--ks-sadolin-highlight);
}

#index .ks-home-hero--sadolin .ks-home-intro {
  max-width: 38ch;
  color: #e0e7dc;
}

#index .ks-home-hero--sadolin .ks-home-actions {
  gap: 5px 20px;
  margin-top: clamp(13px, 2vh, 20px);
}

#index .ks-home-hero--sadolin .ks-button {
  min-height: 44px;
  padding: 10px 16px;
  background: var(--ks-sadolin-highlight);
  color: #24392e;
}

#index .ks-home-hero--sadolin .ks-button:hover {
  background: #fff0d7;
  color: #192b22;
}

#index .ks-home-hero--sadolin .ks-text-link {
  min-height: 44px;
  color: #fff8eb;
  text-underline-offset: 5px;
}

#index .ks-home-hero--sadolin .ks-text-link:hover { color: var(--ks-sadolin-highlight); }

#index .ks-home-hero--sadolin .ks-home-actions a:focus-visible {
  outline: 2px solid #fff8eb;
  outline-offset: 3px;
  box-shadow: none;
}

#index .ks-home-hero--sadolin .ks-home-hero-image { background: #805d3d; }
#index .ks-home-hero--sadolin .ks-sadolin-photo { object-position: 53% 50%; }

#index .ks-sadolin-brand {
  display: block;
  width: clamp(76px, 7vw, 92px);
  height: auto;
  max-width: 100%;
  /* The official logo file includes transparent margins. */
  margin-block: -12px -11px;
  margin-inline-start: -6px;
}

#index .ks-home-hero.ks-home-hero--koopmans { background: #fffaf2; }

#index .ks-koopmans-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

#index .ks-koopmans-heading img {
  display: block;
  width: clamp(65px, 6vw, 88px);
  height: auto;
  margin-inline-start: -5px;
}

#index .ks-koopmans-heading .ks-eyebrow { color: #3a6849; }

#index .ks-home-hero--koopmans .ks-button { background: #245b38; }
#index .ks-home-hero--koopmans .ks-button:hover { background: #17442a; }

#index .ks-home-hero-image.ks-koopmans-product {
  background: radial-gradient(ellipse at 49% 43%, #f8e7c9 2%, transparent 67%), linear-gradient(120deg, #e6bd88, #bd7d4f);
}

#index .ks-home-hero-image.ks-koopmans-product img {
  object-fit: contain;
  padding: clamp(12px, 1.8vw, 24px);
  filter: drop-shadow(0 10px 15px #52351445);
}

@media (min-width: 768px) {
  #index .ks-home-hero:is(.ks-home-hero--sadolin,.ks-home-hero--koopmans) {
    grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  }
}

@media (min-width: 992px) and (max-height: 1000px) {
  #index .ks-home-hero--sadolin .ks-home-hero-copy {
    padding-block: clamp(10px, 1.45vh, 14px);
  }

  #index .ks-sadolin-brand { width: clamp(58px, 7.4vh, 70px); }

  #index .ks-home-hero--sadolin .ks-home-intro { max-width: 52ch; }
  #index .ks-home-hero--sadolin .ks-home-actions { margin-top: 8px; }
}

#index .ks-department-image--pair {
  position: relative;
  isolation: isolate;
}

#index .ks-department-image--pair > img {
  position: absolute;
}

#index .ks-department-image--pair > img:first-child {
  inset-block-start: 6%;
  inset-inline-start: 3%;
  width: 64%;
  height: 83%;
}

#index .ks-department-image--pair > img + img {
  inset-block-start: 13%;
  inset-inline-start: 54%;
  width: 44%;
  height: 82%;
}

#index .ks-department-image--screws > img:first-child {
  inset-block-start: 0;
  transform: scale(1.6);
}

#index .ks-department-image--screws > img + img {
  inset-block-start: 21%;
  inset-inline-start: 45%;
  width: 51%;
  height: 73%;
}

#index .ks-department-image--hardware > img:first-child {
  inset-block-start: 21%;
  width: 68%;
  height: 70%;
}

#index .ks-department-image--hardware > img + img {
  inset-block-start: 5%;
  inset-inline-start: 57%;
  width: 40%;
  height: 74%;
}

#index .ks-department-image--staples > img + img {
  inset-block-start: 34%;
  inset-inline-start: 51%;
  width: 45%;
  height: 57%;
}

@media (min-width: 992px) and (max-height: 890px),
       (min-width: 992px) and (max-width: 1199px) and (max-height: 980px) {
  body#index.ks-pro .ks-home:not(.ks-home-bottom) {
    --ks-home-row-gap: 10px;
    row-gap: var(--ks-home-row-gap);
  }

  #index .ks-home-slider { position: relative; }

  #index .ks-home-slider .ks-home-slider-controls {
    position: absolute;
    z-index: 1;
    inset-block-start: calc(100% + var(--ks-home-row-gap));
    inset-inline-end: 0;
    margin-top: 0;
  }

  #index .ks-home-slider + .ks-departments .ks-section-heading {
    min-height: 44px;
    /* Three 44px buttons, five 26px indicators, seven 3px gaps and 13px of clearance. */
    max-width: calc(100% - 296px);
  }

  #index .ks-product-showcase { padding-block: 12px; }
}

@media (min-width: 992px) and (max-height: 740px) {
  body#index.ks-pro .ks-home:not(.ks-home-bottom) {
    --ks-home-row-gap: 6px;
    margin-top: 6px;
  }

  #index .ks-home-slider .ks-home-hero-title { margin-block: 4px 7px; }
  #index .ks-departments .ks-section-heading { margin-bottom: 8px; }
  #index .ks-showcase-product img { max-height: 104px; }
}

@media (min-width: 992px) and (max-height: 715px) {
  #index .ks-home-slider .ks-home-hero-copy { padding-block: 7px; }
  #index .ks-home-slider .ks-home-hero-title { margin-block: 3px 5px; }
  #index .ks-home-slider .ks-home-actions { margin-top: 7px; }
}

@media (max-width: 575px) {
  #index .ks-product-showcase {
    aspect-ratio: 1.5;
    order: 0;
  }

  #index :is(.ks-home-hero--sadolin,.ks-home-hero--koopmans) .ks-home-hero-image {
    flex: none;
    aspect-ratio: 1.6;
  }

  #index .ks-home-hero--sadolin .ks-home-hero-copy {
    flex: 1;
    padding: 21px 22px 25px;
  }

  #index .ks-home-hero--sadolin .ks-home-actions { gap: 4px 14px; }
}
