.related-products-showcase {
  position: relative;
  margin-top: 30px;
  padding: 18px 18px 12px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgb(30 34 40 / 6%);
}

.related-products__header,
.related-products__title-wrap {
  display: flex;
  align-items: center;
}

.related-products__header {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.related-products__title-wrap {
  gap: 10px;
}

.related-products__title-wrap > img {
  width: 23px;
  filter: invert(14%) sepia(99%) saturate(6382%) hue-rotate(349deg) brightness(100%);
}

.related-products__title-wrap h2 {
  margin: 0;
  font-size: 17px;
}

.related-products__header > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.related-products__header > a span {
  font-size: 20px;
  line-height: 1;
}

.related-products__viewport {
  position: relative;
}

.related-products__track {
  display: grid;
  grid-auto-columns: calc((100% - 48px) / 5);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.related-products__track::-webkit-scrollbar {
  display: none;
}

.related-product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  background: #fff;
  scroll-snap-align: start;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.related-product-card:hover,
.related-product-card:focus-within {
  border-color: #f1b2b8;
  box-shadow: 0 8px 20px rgb(45 25 28 / 10%);
  transform: translateY(-2px);
}

.related-product-card__media {
  position: relative;
  display: grid;
  height: 145px;
  place-items: center;
  padding: 16px 13px 8px;
  background: linear-gradient(180deg, #fff, #fdfdfd);
}

.related-product-card__media > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.related-product-card__badge {
  position: absolute;
  z-index: 2;
  top: 9px;
  left: 9px;
  padding: 4px 7px;
  border-radius: 5px;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.related-product-card__badge--orange { background: #ff7900; }
.related-product-card__badge--green { background: #0ba43e; }
.related-product-card__badge--blue { background: #0877df; }
.related-product-card__badge--purple { background: #7654d8; }

.related-product-card__body {
  position: relative;
  padding: 5px 44px 13px 12px;
}

.related-product-card__body h3 {
  min-height: 38px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}

.related-product-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.related-product-card__rating span {
  color: #ffa600;
  font-size: 14px;
}

.related-product-card__rating b {
  color: #f39a00;
  font-size: 10px;
}

.related-product-card__rating small {
  color: #999;
  font-size: 9px;
}

.related-product-card__price {
  display: block;
  margin-top: 5px;
  color: var(--brand-red);
  font-size: 15px;
}

.related-product-card__shipping {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #effbf1;
  color: #26a547;
  font-size: 8px;
  font-weight: 600;
}

.related-product-card__add {
  position: absolute;
  right: 11px;
  bottom: 13px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  padding: 0;
  border: 1px solid #d9d9d9;
  border-radius: 50%;
  background: #fff;
  color: #25272b;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.related-product-card__add span {
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

.related-product-card__add:hover,
.related-product-card__add:focus-visible,
.related-product-card__add.is-added {
  border-color: var(--brand-red);
  background: var(--brand-red);
  color: #fff;
  transform: scale(1.06);
}

.related-products__arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  padding: 0;
  border: 1px solid #e2e2e2;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 14px rgb(0 0 0 / 12%);
  cursor: pointer;
  transform: translateY(-50%);
}

.related-products__arrow img {
  width: 18px;
}

.related-products__arrow--prev {
  left: -15px;
}

.related-products__arrow--prev img {
  transform: rotate(180deg);
}

.related-products__arrow--next {
  right: -15px;
}

.related-products__arrow:disabled {
  visibility: hidden;
  opacity: 0;
}

.related-products__notice {
  position: absolute;
  right: 18px;
  bottom: 2px;
  margin: 0;
  color: #239244;
  font-size: 10px;
}

@media (max-width: 991.98px) {
  .related-products__track {
    grid-auto-columns: calc((100% - 24px) / 3);
  }
}

@media (max-width: 575.98px) {
  .related-products-showcase {
    margin-inline: -12px;
    padding: 16px 12px 10px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .related-products__title-wrap h2 {
    font-size: 15px;
  }

  .related-products__track {
    grid-auto-columns: min(68vw, 225px);
  }

  .related-products__arrow {
    display: none;
  }
}

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

  .related-product-card,
  .related-product-card__add {
    transition: none;
  }
}
