.brandcarousel {
  --brandcarousel-visible: 6;
  width: 100%;
  margin: 2.5rem 0;
  position: relative;
}

.brandcarousel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.brandcarousel__title {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.2;
  font-weight: 700;
}

.brandcarousel__controls {
  display: flex;
  gap: .5rem;
  flex: 0 0 auto;
}

.brandcarousel__arrow {
  width: 42px;
  height: 42px;
  border: none;
  background: #fff;
  color: #222;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}

.brandcarousel__arrow:hover {
  transform: translateY(-1px);
  border-color: #999;
}

.brandcarousel__viewport {
  overflow: hidden;
  width: 100%;
}

.brandcarousel__track {
  display: flex;
  align-items: stretch;
  transition: transform .45s ease;
  will-change: transform;
}

.brandcarousel__item {
  flex: 0 0 calc(100% / var(--brandcarousel-visible));
  min-width: 0;
  padding: 0 .75rem;
  box-sizing: border-box;
}

.brandcarousel__link {
  min-height: 120px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: 1rem;
  background: #fff;
  text-decoration: none !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.brandcarousel__link:hover {
  transform: translateY(-2px);
  border-color: #ddd;
  box-shadow: 0 8px 22px rgba(0,0,0,.07);
}

.brandcarousel__image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 76px;
}

.brandcarousel__image {
  display: block;
  max-width: 100%;
  max-height: 76px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brandcarousel__name {
  color: #222;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

@media (max-width: 991px) {
  .brandcarousel {
    margin: 2rem 0;
  }

  .brandcarousel__title {
    font-size: 1.4rem;
  }
}

@media (max-width: 575px) {
  .brandcarousel__header {
    align-items: flex-end;
  }

  .brandcarousel__arrow {
    width: 38px;
    height: 38px;
  }

  .brandcarousel__item {
    padding: 0 .4rem;
  }

  .brandcarousel__link {
    min-height: 100px;
    padding: .75rem;
  }

  .brandcarousel__image-wrap,
  .brandcarousel__image {
    max-height: 62px;
    height: 62px;
  }
}
