.brand-carousel {
  --brand-gap: 22px;
  padding: 88px 20px;
  overflow: hidden;
  border-top: 1px solid #dfeaed;
  border-bottom: 1px solid #dfeaed;
  background: #fff;
  color: #091736;
}

.brand-carousel__inner {
  width: min(100%, 1140px);
  margin: 0 auto;
}

.brand-carousel__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .65fr) auto;
  gap: 48px;
  align-items: end;
}

.brand-carousel__eyebrow {
  margin: 0 0 10px;
  color: #f35748;
  font: 800 12px/1.4 Manrope, Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.brand-carousel h2 {
  max-width: 620px;
  margin: 0;
  color: #091736;
  font: 800 clamp(30px, 4vw, 45px)/1.08 Manrope, Arial, sans-serif;
  letter-spacing: -.035em;
  text-align: left;
  text-wrap: balance;
}

.brand-carousel__copy {
  max-width: 470px;
  margin: 0 0 3px;
  color: #526176;
  font: 400 15px/1.65 "Source Sans 3", Arial, sans-serif;
}

.brand-carousel__controls {
  display: flex;
  gap: 9px;
}

.brand-carousel__controls button {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid #bfd5da;
  border-radius: 0;
  background: #fff;
  color: #091736;
  cursor: pointer;
  font: 700 23px/1 Manrope, Arial, sans-serif;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.brand-carousel__controls button:hover,
.brand-carousel__controls button:focus-visible {
  border-color: #4ab7c3;
  background: #4ab7c3;
  color: #fff;
  outline: none;
}

.brand-carousel__controls button:disabled {
  cursor: default;
  opacity: .45;
}

.brand-carousel__viewport {
  margin-top: 46px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.brand-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.brand-carousel__viewport:focus-visible {
  outline: 3px solid rgba(74, 183, 195, .32);
  outline-offset: 7px;
}

.brand-carousel__track {
  position: relative;
  display: grid;
  grid-auto-columns: calc(25% - 16.5px);
  grid-auto-flow: column;
  gap: var(--brand-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-carousel__card {
  display: flex;
  min-width: 0;
  min-height: 172px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 24px 18px 18px;
  border: 1px solid #dce8eb;
  background: #fff;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.brand-carousel__card:hover {
  border-color: #9fcbd2;
  box-shadow: 0 13px 34px rgba(9, 23, 54, .08);
  transform: translateY(-2px);
}

.brand-carousel__card img {
  display: block;
  width: 220px;
  max-width: 100%;
  height: 78px;
  object-fit: contain;
  filter: saturate(.92);
}

.brand-carousel__card--compact img {
  width: 92px;
  height: 92px;
}

.brand-carousel__card--wide img {
  width: 235px;
}

.brand-carousel__card span {
  margin-top: 13px;
  color: #637185;
  font: 800 10px/1.3 Manrope, Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.brand-carousel__footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  margin-top: 24px;
}

.brand-carousel__progress {
  height: 2px;
  overflow: hidden;
  background: #dce8eb;
}

.brand-carousel__progress span {
  display: block;
  width: 50%;
  height: 100%;
  background: #4ab7c3;
  transform-origin: left center;
  transition: width .3s ease;
}

.brand-carousel__count {
  min-width: 42px;
  color: #526176;
  font: 800 12px/1 Manrope, Arial, sans-serif;
  letter-spacing: .08em;
  text-align: right;
}

.brand-carousel__status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.brand-carousel--local {
  background: #fff;
}

@media (max-width: 1000px) {
  .brand-carousel__track {
    grid-auto-columns: calc(33.333% - 14.667px);
  }

  .brand-carousel__heading {
    grid-template-columns: 1fr auto;
  }

  .brand-carousel__copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .brand-carousel__controls {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 720px) {
  .brand-carousel {
    --brand-gap: 15px;
    padding: 66px 18px;
  }

  .brand-carousel__track {
    grid-auto-columns: calc(50% - 7.5px);
  }

  .brand-carousel__heading {
    gap: 24px;
  }

  .brand-carousel__viewport {
    margin-top: 34px;
  }

  .brand-carousel__card {
    min-height: 166px;
    padding-inline: 14px;
  }

  .brand-carousel__card img {
    width: 190px;
  }

  .brand-carousel__card--compact img {
    width: 86px;
  }

  .brand-carousel__card--wide img {
    width: 205px;
  }
}

@media (max-width: 480px) {
  .brand-carousel {
    --brand-gap: 13px;
    padding-inline: 14px;
  }

  .brand-carousel__viewport{overflow:visible}
  .brand-carousel__track{grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:1fr 1fr;gap:12px}

  .brand-carousel__heading {
    grid-template-columns: 1fr;
  }

  .brand-carousel__copy {
    grid-column: 1;
    grid-row: auto;
  }

  .brand-carousel__controls {
    display:none;
  }

  .brand-carousel__controls button {
    width: 48px;
    height: 48px;
  }

  .brand-carousel__card {
    min-height: 132px;
  }

  .brand-carousel__card img {
    width: 145px;
    height: 62px;
  }

  .brand-carousel__card--compact img {
    width: 72px;
    height: 72px;
  }

  .brand-carousel__card--wide img {
    width: 155px;
  }
  .brand-carousel__footer{display:none}
  .brand-carousel__card[data-brand-clone]{display:none}
}

@media (prefers-reduced-motion: reduce) {
  .brand-carousel__viewport {
    scroll-behavior: auto;
  }

  .brand-carousel__card,
  .brand-carousel__progress span {
    transition: none;
  }
}

/* Static manufacturer grid: predictable on every subpage and breakpoint. */
.brand-carousel__controls,.brand-carousel__footer{display:none}
.brand-carousel__viewport{overflow:visible}
.brand-carousel__track{display:grid;grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.brand-carousel__card[data-brand-clone]{display:none}
@media(max-width:900px){.brand-carousel__track{grid-template-columns:repeat(2,minmax(0,1fr))}}
