.homepage-section-stack .brands-section {
  padding-bottom: 36px;
}

.homepage-section-stack .brands-section h2 {
  margin-bottom: 16px;
}

.homepage-section-stack .brand-strip {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.homepage-section-stack .brand-logo {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 18px 22px;
  border-right: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
  background: var(--white);
}

.homepage-section-stack .brand-logo:nth-child(7n) {
  border-right: 0;
}

.homepage-section-stack .brand-logo:nth-last-child(-n + 7) {
  border-bottom: 0;
}

.homepage-section-stack .brand-logo.has-image img {
  display: block;
  width: 100%;
  max-width: 164px;
  height: 64px;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

/* Optical sizing: normalize perceived logo weight, not just raw pixels. */
.homepage-section-stack .brand-logo.dentsply-sirona.has-image img {
  display: none;
}

.homepage-section-stack .brand-logo.dentsply-sirona.has-image::before {
  content: "";
  display: block;
  width: 172px;
  max-width: 100%;
  height: 66px;
  background: url('/images/brands/dentsply-sirona.svg') center / contain no-repeat;
}

.homepage-section-stack .brand-logo.megagen.has-image img {
  max-width: 184px;
  height: 66px;
}

.homepage-section-stack .brand-logo.planmeca.has-image img {
  max-width: 176px;
  height: 58px;
}

.homepage-section-stack .brand-logo.runyes.has-image img {
  max-width: 172px;
  height: 66px;
}

.homepage-section-stack .brand-logo.solventum.has-image img {
  display: none;
}

.homepage-section-stack .brand-logo.solventum.has-image::before {
  content: "";
  display: block;
  width: 150px;
  max-width: 100%;
  height: 54px;
  background: url('/images/brands/solventum.svg') center / contain no-repeat;
}

.homepage-section-stack .brand-logo.kavo.has-image img {
  max-width: 158px;
  height: 60px;
}

.homepage-section-stack .brand-logo.kettenbach.has-image img {
  width: 136px;
  max-width: 136px;
  height: 60px;
  object-fit: contain;
  object-position: center;
  transform: none;
}

.homepage-section-stack .brand-logo.huons.has-image img {
  width: 160px;
  max-width: 160px;
  height: 58px;
  object-fit: contain;
  object-position: center;
}

.homepage-section-stack .brand-logo.ekom.has-image img {
  max-width: 138px;
  height: 54px;
}

.homepage-section-stack .brand-logo.beesure.has-image img {
  max-width: 154px;
  height: 60px;
}

.homepage-section-stack .brand-logo.nsk.has-image img {
  max-width: 132px;
  height: 52px;
}

.homepage-section-stack .brand-logo.metasys.has-image img {
  max-width: 164px;
  height: 58px;
}

.homepage-section-stack .brand-logo.durr-dental.has-image img {
  max-width: 150px;
  height: 60px;
}

.homepage-section-stack .brand-logo.micro-nx.has-image img {
  max-width: 158px;
  height: 56px;
}

@media (max-width: 1200px) {
  .homepage-section-stack .brand-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .homepage-section-stack .brand-logo,
  .homepage-section-stack .brand-logo:nth-child(7n),
  .homepage-section-stack .brand-logo:nth-last-child(-n + 7) {
    border-right: 1px solid var(--line-light);
    border-bottom: 1px solid var(--line-light);
  }

  .homepage-section-stack .brand-logo:nth-child(4n) {
    border-right: 0;
  }

  .homepage-section-stack .brand-logo:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 820px) {
  .homepage-section-stack .brand-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .homepage-section-stack .brand-logo,
  .homepage-section-stack .brand-logo:nth-child(4n),
  .homepage-section-stack .brand-logo:nth-last-child(-n + 2) {
    min-height: 92px;
    padding: 16px 18px;
    border-right: 1px solid var(--line-light);
    border-bottom: 1px solid var(--line-light);
  }

  .homepage-section-stack .brand-logo:nth-child(2n) {
    border-right: 0;
  }

  .homepage-section-stack .brand-logo:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .homepage-section-stack .brand-logo.has-image img {
    width: 100% !important;
    max-width: 132px !important;
    height: 54px !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
  }

  .homepage-section-stack .brand-logo.dentsply-sirona.has-image::before,
  .homepage-section-stack .brand-logo.solventum.has-image::before {
    width: 132px;
    height: 54px;
  }
}

@media (max-width: 560px) {
  .homepage-section-stack .brands-section {
    padding-bottom: 28px;
  }

  .homepage-section-stack .brand-strip {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
  }

  .homepage-section-stack .brand-logo {
    flex: 0 0 auto;
    width: auto;
    min-height: 84px;
    padding: 14px 16px;
    border-radius: 0;
    scroll-snap-align: none;
  }

  .homepage-section-stack .brand-logo.has-image img {
    max-width: 118px !important;
    height: 48px !important;
  }

  .homepage-section-stack .brand-logo.dentsply-sirona.has-image::before,
  .homepage-section-stack .brand-logo.solventum.has-image::before {
    width: 118px;
    height: 48px;
  }
}
