/* ============================================================
   MATERIAL BRANDS — its own section: statement, an endless loop of
   logo cards in a raised frame, and the authorised-dealer note.
   Two identical tracks sit side by side and both slide left by 100%
   of their own width, so the loop is seamless at any card count.
   ============================================================ */
.brands {
  padding: clamp(56px, 7vw, 96px) 0;
  background: #fff;
  text-align: center;
}
.brands__title {
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(19px, 1.8vw, 26px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -.01em;
  color: #3a3f45;
}
.brands__rule {
  display: block;
  width: 154px;
  height: 4px;
  margin: 26px auto clamp(36px, 5vw, 64px);
  border-radius: 4px;
  background: linear-gradient(90deg, #1d2226, #8a8f95);
}

/* ---------- Frame + endless loop ---------- */
.brands__frame {
  padding: clamp(22px, 3vw, 38px) 0;
  border: 1px solid #ececef;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(20, 24, 30, .08), 0 2px 6px rgba(20, 24, 30, .04);
}
.brands__viewport {
  display: flex;
  overflow: hidden;
  /* soft fade at both edges so cards glide in and out */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.brands__track {
  display: flex;
  flex-shrink: 0;
  gap: clamp(16px, 2.2vw, 30px);
  margin: 0;
  padding: 6px clamp(8px, 1.1vw, 15px);   /* half-gap each side keeps spacing even across the seam */
  list-style: none;
  animation: brandsLoop 36s linear infinite;
}
.brands__viewport:hover .brands__track,
.brands__viewport:focus-within .brands__track { animation-play-state: paused; }
@keyframes brandsLoop { to { transform: translateX(-100%); } }

.brands__card {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: clamp(168px, 14vw, 212px);
  height: clamp(132px, 10.5vw, 156px);
  padding: 22px 16px 16px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 24, 30, .05);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.brands__card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(20, 24, 30, .1); }
.brands__card img {
  flex: 1 1 auto;
  min-height: 0;
  width: auto;
  max-width: 88%;
  max-height: 68px;
  object-fit: contain;
}
.brands__card span { font-size: 13.5px; font-weight: 500; color: #50565d; }

/* ---------- Authorised-dealer note ---------- */
.brands__note {
  margin-top: clamp(36px, 5vw, 60px);
  padding: clamp(28px, 3.5vw, 46px) clamp(20px, 4vw, 64px);
  border: 1px solid #d9dbdf;
  border-radius: 18px;
  background: linear-gradient(100deg, #f4f4f5, #e9eaec);
}
.brands__note h3 {
  margin: 0 0 12px;
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 600;
  letter-spacing: -.01em;
  color: #16191c;
}
.brands__note p {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(14.5px, 1.2vw, 17px);
  line-height: 1.65;
  color: #4a5057;
}

@media (max-width: 600px) {
  .brands__rule { width: 110px; margin-top: 18px; }
  .brands__frame { border-radius: 18px; margin-inline: -4px; }
  .brands__track { animation-duration: 26s; }
  .brands__card { width: 148px; height: 118px; padding: 16px 12px 12px; gap: 10px; }
  .brands__card img { max-height: 54px; }
  .brands__card span { font-size: 12.5px; }
}

/* Reduced motion: no scrolling — one static, wrapped grid of cards. */
@media (prefers-reduced-motion: reduce) {
  .brands__viewport { -webkit-mask-image: none; mask-image: none; }
  .brands__track { flex-wrap: wrap; justify-content: center; flex-shrink: 1; animation: none; }
  .brands__track[aria-hidden="true"] { display: none; }
}
