.hmbrandcarousel {
  --hmbc-text: #202024;
  --hmbc-muted: #5f6268;
  --hmbc-line: #c8c8c8;
  --hmbc-strong: #191919;
  --hmbc-card-gap: 8px;

  color: var(--hmbc-text);
  margin: 56px 0;
  overflow: hidden;
}

.hmbrandcarousel__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

.hmbrandcarousel__header {
  margin-bottom: 34px;
}

.hmbrandcarousel__title {
  margin: 0 0 12px;
  color: var(--hmbc-text);
  font-size: 42px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.hmbrandcarousel__all-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--hmbc-text);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
}

.hmbrandcarousel__all-link:hover,
.hmbrandcarousel__all-link:focus {
  color: var(--hmbc-muted);
  text-decoration: none;
}

.hmbrandcarousel__stage {
  position: relative;
}

.hmbrandcarousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.hmbrandcarousel__viewport::-webkit-scrollbar {
  display: none;
}

.hmbrandcarousel__track {
  display: flex;
  gap: var(--hmbc-card-gap);
  width: max-content;
  min-width: 100%;
}

.hmbrandcarousel__card {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 calc((100vw - 72px) / 5);
  min-width: 220px;
  max-width: 270px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background-color: #d8d8d4;
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.hmbrandcarousel__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.18) 100%),
    rgba(255, 255, 255, 0.04);
}

.hmbrandcarousel__logo-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20%;
}

.hmbrandcarousel__logo {
  display: block;
  max-width: 72%;
  max-height: 42%;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.18));
}

.hmbrandcarousel__logo-fallback {
  display: block;
  max-width: 88%;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  overflow-wrap: anywhere;
}

.hmbrandcarousel__button {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  max-width: calc(100% - 32px);
  min-height: 30px;
  padding: 7px 26px;
  border-radius: 999px;
  background: #fff;
  color: var(--hmbc-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.hmbrandcarousel__button:hover,
.hmbrandcarousel__button:focus {
  color: var(--hmbc-text);
  background: #f3f3f1;
  text-decoration: none;
}

.hmbrandcarousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #050505;
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.18s ease, opacity 0.18s ease;
}

.hmbrandcarousel__arrow:hover,
.hmbrandcarousel__arrow:focus {
  background: #343434;
}

.hmbrandcarousel__arrow[hidden] {
  display: none;
}

.hmbrandcarousel__arrow--prev {
  left: -15px;
}

.hmbrandcarousel__arrow--next {
  right: -15px;
}

.hmbrandcarousel__arrow-icon {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hmbrandcarousel__progress {
  position: relative;
  height: 2px;
  margin-top: 14px;
  background: var(--hmbc-line);
  cursor: pointer;
  overflow: hidden;
}

.hmbrandcarousel__progress-thumb {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 20%;
  height: 100%;
  background: var(--hmbc-strong);
  transform-origin: left center;
}

@media (max-width: 1199px) {
  .hmbrandcarousel__card {
    flex-basis: calc((100vw - 58px) / 3);
  }
}

@media (min-width: 992px) {
  .hmbrandcarousel__arrow {
    opacity: 0;
    pointer-events: none;
  }

  .hmbrandcarousel__stage:hover .hmbrandcarousel__arrow,
  .hmbrandcarousel__stage:focus-within .hmbrandcarousel__arrow {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 767px) {
  .hmbrandcarousel {
    margin: 42px 0;
  }

  .hmbrandcarousel__inner {
    padding: 0 16px;
  }

  .hmbrandcarousel__header {
    margin-bottom: 24px;
  }

  .hmbrandcarousel__title {
    font-size: 32px;
  }

  .hmbrandcarousel__card {
    flex-basis: 78vw;
    min-width: 240px;
    max-width: 360px;
  }

  .hmbrandcarousel__arrow {
    width: 40px;
    height: 40px;
  }

  .hmbrandcarousel__arrow--prev {
    left: -15px;
  }

  .hmbrandcarousel__arrow--next {
    right: -15px;
  }
}
