* {
  box-sizing: border-box;
}

:root {
  --rd-text: #303030;
  --rd-muted: #6f6f6f;
  --rd-border: #d7d7d7;
  --rd-gap: 32px;
}

html {
  scroll-behavior: smooth;
}

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

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

.rd-new-arrivals {
  overflow: hidden;
  padding: 52px 0 102px;
  background: #ffffff;
}

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

.rd-new-arrivals__header {
  position: relative;
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  margin-bottom: 46px;
}

.rd-new-arrivals__title {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin: 0;
  color: var(--rd-text);
  font-size: clamp(34px, 2.45vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.15px;
  text-transform: uppercase;
}

.rd-new-arrivals__title-star {
  font-size: 45px;
  line-height: 1;
}

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

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

.rd-new-arrivals__arrow--prev {
  color: #c4c4c4;
}

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

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

.rd-new-arrivals__viewport.is-dragging {
  cursor: grabbing;
}

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

.rd-new-arrivals__track.is-dragging {
  transition: none;
}

.rd-product-card {
  position: relative;
  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;
  transition: border-color 220ms ease;
}

.rd-product-card:hover {
  border-color: #979797;
}

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

.rd-product-card__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
  transition: opacity 380ms ease, transform 480ms cubic-bezier(.2, .72, .24, 1);
  pointer-events: none;
}

.rd-product-card__image--secondary {
  opacity: 0;
  transform: scale(1.025);
}

.rd-product-card:hover .rd-product-card__image--primary {
  opacity: 0;
  transform: scale(1.025);
}

.rd-product-card:hover .rd-product-card__image--secondary {
  opacity: 1;
  transform: scale(1);
}

.rd-product-card__cart {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #4b4b4b;
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  color: #2d2d2d;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 220ms ease, transform 220ms ease;
  box-shadow: 0 6px 16px rgba(0,0,0,.10);
}

.rd-product-card:hover .rd-product-card__cart,
.rd-product-card:focus-within .rd-product-card__cart {
  opacity: 1;
  transform: translateY(0);
}

.rd-product-card__cart svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rd-product-card__content {
  padding: 18px 18px 17px;
  text-align: center;
}

.rd-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-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-product-card__price {
  margin: 0;
  color: var(--rd-text);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
}

.rd-new-arrivals__arrow:focus-visible,
.rd-new-arrivals__viewport:focus-visible,
.rd-product-card:focus-visible,
.rd-product-card__cart:focus-visible {
  outline: 2px solid #202020;
  outline-offset: 5px;
}

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

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

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

  .rd-new-arrivals__title {
    font-size: clamp(31px, 4vw, 44px);
  }

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

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

  .rd-new-arrivals {
    padding: 42px 0 62px;
  }

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

  .rd-new-arrivals__header {
    display: block;
    min-height: 0;
    margin-bottom: 26px;
    padding: 0;
  }

  .rd-new-arrivals__title {
    gap: 10px;
    font-size: 27px;
    letter-spacing: -0.7px;
  }

  .rd-new-arrivals__title-star {
    font-size: 34px;
  }

  .rd-new-arrivals__controls {
    position: static;
    justify-content: flex-end;
    margin-top: 9px;
    transform: none;
  }

  .rd-new-arrivals__arrow {
    width: 32px;
    height: 32px;
    font-size: 26px;
  }

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

  .rd-product-card__cart {
    width: 38px;
    height: 38px;
    opacity: 1;
    transform: none;
  }

  .rd-product-card__content {
    padding: 14px 13px;
  }

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

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

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

@media (prefers-reduced-motion: reduce) {
  .rd-new-arrivals__track,
  .rd-product-card__image,
  .rd-product-card__cart {
    transition: none;
  }
}
