* {
  box-sizing: border-box;
}

:root {
  --rd-text: #2d2d2d;
  --rd-muted: #707070;
  --rd-border: #d7d7d7;
  --rd-background: #ffffff;
  --rd-gap: 40px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--rd-background);
  color: var(--rd-text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.rd-products {
  overflow: hidden;
  padding: 92px 0 104px;
  background: #ffffff;
}

.rd-products__shell {
  width: min(1880px, calc(100% - 128px));
  margin: 0 auto;
}

.rd-products__header {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  margin-bottom: 54px;
}

.rd-products__tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 27px;
}

.rd-products__tab {
  min-height: 58px;
  padding: 0 31px;
  border: 1.5px solid #2d2d2d;
  border-radius: 999px;
  background: #ffffff;
  color: #2d2d2d;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 190ms ease,
    color 190ms ease,
    transform 190ms ease;
}

.rd-products__tab:hover {
  transform: translateY(-1px);
}

.rd-products__tab.is-active {
  background: #2d2d2d;
  color: #ffffff;
}

.rd-products__controls {
  position: absolute;
  right: 0;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 22px;
  transform: translateY(-50%);
}

.rd-products__arrow {
  display: grid;
  width: 39px;
  height: 39px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #1f1f1f;
  font: inherit;
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: opacity 180ms ease;
}

.rd-products__arrow--prev {
  color: #c3c3c3;
}

.rd-products__arrow[disabled] {
  cursor: default;
  opacity: .3;
}

.rd-products__tab:focus-visible,
.rd-products__arrow:focus-visible,
.rd-tab-product-card:focus-visible,
.rd-products__viewport:focus-visible {
  outline: 2px solid #222222;
  outline-offset: 5px;
}

.rd-products__viewport {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.rd-products__viewport.is-dragging {
  cursor: grabbing;
}

.rd-products__track {
  display: flex;
  align-items: stretch;
  gap: var(--rd-gap);
  will-change: transform;
  transition: transform 520ms cubic-bezier(.22, .72, .24, 1);
}

.rd-products__track.is-dragging {
  transition: none;
}

.rd-tab-product-card {
  position: relative;
  display: flex;
  height: auto;
  flex-direction: column;
  flex: 0 0 calc((100% - (var(--rd-gap) * 3)) / 4);
  min-width: 0;
  border: 1px solid var(--rd-border);
  background: #ffffff;
  color: var(--rd-text);
  text-decoration: none;
  scroll-snap-align: start;
  transition: border-color 220ms ease;
}

.rd-tab-product-card:hover {
  border-color: #8d8d8d;
}

.rd-tab-product-card__media {
  position: relative;
  aspect-ratio: 338 / 383;
  overflow: hidden;
  border-bottom: 1px solid var(--rd-border);
  background: #ffffff;
  perspective: 1200px;
}

.rd-tab-product-card__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  padding: 7px 11px 6px;
  border: 1px solid rgba(25, 25, 25, .18);
  background: rgba(255, 255, 255, .9);
  color: var(--rd-text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.rd-tab-product-card__flip {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  transition: transform 720ms cubic-bezier(.2, .72, .22, 1);
  will-change: transform;
}

.rd-tab-product-card__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.rd-tab-product-card__face--back {
  transform: rotateY(180deg);
}

.rd-tab-product-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
  pointer-events: none;
  transition: transform 720ms cubic-bezier(.22, .72, .24, 1);
}

.rd-tab-product-card:hover .rd-tab-product-card__flip,
.rd-tab-product-card:focus-visible .rd-tab-product-card__flip {
  transform: rotateY(180deg);
}

.rd-tab-product-card:hover .rd-tab-product-card__face--back .rd-tab-product-card__image,
.rd-tab-product-card:focus-visible .rd-tab-product-card__face--back .rd-tab-product-card__image {
  transform: scale(1.035);
}

.rd-tab-product-card__content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 18px 17px;
  text-align: center;
}

.rd-tab-product-card__category {
  display: block;
  margin-bottom: 7px;
  color: var(--rd-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
}

.rd-tab-product-card__title {
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--rd-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rd-tab-product-card__price {
  margin: 0;
  color: var(--rd-text);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
}

.rd-tab-product-card__current {
  white-space: nowrap;
}

.rd-tab-product-card__compare {
  margin-left: 6px;
  color: #9b9b9b;
  font-size: 15px;
  font-weight: 400;
  text-decoration: line-through;
}

.rd-products__empty {
  width: 100%;
  padding: 70px 20px;
  text-align: center;
}

@media (max-width: 1200px) {
  :root {
    --rd-gap: 24px;
  }

  .rd-products__shell {
    width: min(100% - 64px, 1140px);
  }

  .rd-products__header {
    justify-content: flex-start;
    padding-right: 110px;
  }

  .rd-products__tabs {
    gap: 14px;
  }

  .rd-products__tab {
    min-height: 50px;
    padding-inline: 23px;
    font-size: 15px;
  }

  .rd-tab-product-card {
    flex-basis: calc((100% - (var(--rd-gap) * 2)) / 3);
  }
}

@media (max-width: 767px) {
  :root {
    --rd-gap: 14px;
  }

  .rd-products {
    padding: 52px 0 62px;
  }

  .rd-products__shell {
    width: calc(100% - 30px);
  }

  .rd-products__header {
    display: block;
    min-height: 0;
    margin-bottom: 30px;
    padding: 0;
  }

  .rd-products__tabs {
    justify-content: flex-start;
    gap: 9px;
    overflow-x: auto;
    padding: 1px 0 8px;
    scrollbar-width: none;
  }

  .rd-products__tabs::-webkit-scrollbar {
    display: none;
  }

  .rd-products__tab {
    min-height: 42px;
    padding-inline: 17px;
    font-size: 12px;
  }

  .rd-products__controls {
    position: static;
    justify-content: flex-end;
    margin-top: 11px;
    transform: none;
  }

  .rd-products__arrow {
    width: 33px;
    height: 33px;
    font-size: 26px;
  }

  .rd-tab-product-card {
    flex-basis: 78%;
  }

  .rd-tab-product-card__content {
    min-height: 0;
    padding: 14px 13px;
  }

  .rd-tab-product-card__tag {
    top: 10px;
    left: 10px;
    padding: 6px 9px 5px;
    font-size: 9px;
  }

  .rd-tab-product-card__category {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .rd-tab-product-card__title {
    margin-bottom: 6px;
    font-size: 14px;
  }

  .rd-tab-product-card__price {
    font-size: 18px;
  }

  .rd-tab-product-card__compare {
    margin-left: 4px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rd-products__track,
  .rd-tab-product-card__image,
  .rd-tab-product-card__flip,
  .rd-products__tab {
    transition: none;
  }
}
