* {
  box-sizing: border-box;
}

:root {
  --rd-text: #292929;
  --rd-muted: #666666;
  --rd-line: #d8d8d8;
  --rd-background: #ffffff;
  --rd-category-gap: 34px;
  --rd-category-visible: 5;
  --rd-category-circle-size: 156px;
}

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-category-carousel {
  position: relative;
  overflow: hidden;
  padding: 88px 0 28px;
  background: transparent;
}

.rd-category-shell {
  position: relative;
  width: min(1400px, calc(100% - 64px));
  margin: 0 auto;
}

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

.rd-category-header h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 0;
  color: var(--rd-text);
  font-size: clamp(30px, 2.55vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.2px;
  text-transform: uppercase;
}

.rd-title-star {
  display: inline-block;
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}

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

.rd-carousel-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #202020;
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: opacity 180ms ease, transform 180ms ease;
}

.rd-carousel-arrow:hover {
  transform: translateX(2px);
}

.rd-carousel-prev {
  color: #b9b9b9;
}

.rd-carousel-prev:hover {
  transform: translateX(-2px);
}

.rd-carousel-arrow:focus-visible,
.rd-category-card:focus-visible,
.rd-carousel-viewport:focus-visible {
  outline: 2px solid #222;
  outline-offset: 5px;
}

.rd-carousel-viewport {
  width: min(1240px, 100%);
  margin: 0 auto;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  padding: 6px 8px 12px;
}

.rd-carousel-viewport.is-dragging {
  cursor: grabbing;
}

.rd-carousel-track {
  display: flex;
  align-items: flex-start;
  gap: var(--rd-category-gap);
  will-change: transform;
  transition: transform 620ms cubic-bezier(.22, .72, .24, 1);
}

.rd-carousel-track.is-dragging {
  transition: none;
}

.rd-category-slide {
  display: flex;
  flex: 0 0 calc(
    (100% - (var(--rd-category-gap) * (var(--rd-category-visible) - 1)))
    / var(--rd-category-visible)
  );
  min-width: 0;
  flex-direction: column;
  scroll-snap-align: start;
}

.rd-category-card {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  border: 0;
  background: transparent;
  color: var(--rd-text);
  text-decoration: none;
}

.rd-category-image {
  position: relative;
  width: min(100%, var(--rd-category-circle-size));
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 8px 22px rgba(31, 25, 20, .08);
  transform: translateY(0);
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.rd-category-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  padding: 0;
  pointer-events: none;
  transition: transform 520ms cubic-bezier(.2, .72, .24, 1);
}

.rd-category-card:hover .rd-category-image,
.rd-category-card:focus-visible .rd-category-image {
  box-shadow: 0 13px 30px rgba(31, 25, 20, .14);
  transform: translateY(-4px);
}

.rd-category-card:hover .rd-category-image img,
.rd-category-card:focus-visible .rd-category-image img {
  transform: scale(1.05);
}

.rd-category-content {
  padding: 12px 4px 0;
  text-align: center;
}

.rd-category-content h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 1024px) {
  :root {
    --rd-category-gap: 22px;
    --rd-category-visible: 4;
    --rd-category-circle-size: 128px;
  }

  .rd-category-carousel {
    padding-top: 68px;
  }

  .rd-category-shell {
    width: min(100% - 40px, 960px);
  }

  .rd-category-header {
    justify-content: flex-start;
  }

  .rd-category-header h2 {
    font-size: clamp(27px, 4.2vw, 37px);
  }

}

@media (max-width: 640px) {
  :root {
    --rd-category-gap: 16px;
    --rd-category-visible: 3;
    --rd-category-circle-size: 96px;
  }

  .rd-category-carousel {
    padding: 50px 0 20px;
  }

  .rd-category-shell {
    width: calc(100% - 32px);
  }

  .rd-category-header {
    align-items: flex-start;
    margin-bottom: 25px;
    padding-right: 80px;
  }

  .rd-category-header h2 {
    justify-content: flex-start;
    gap: 8px;
    font-size: 24px;
    letter-spacing: -0.65px;
  }

  .rd-title-star {
    font-size: 30px;
  }

  .rd-carousel-controls {
    right: -3px;
    top: 44%;
    gap: 10px;
  }

  .rd-carousel-arrow {
    width: 31px;
    height: 31px;
    font-size: 27px;
  }

  .rd-category-content {
    padding-top: 8px;
  }

  .rd-category-content h3 {
    font-size: 11px;
    line-height: 1.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rd-carousel-track,
  .rd-category-image img,
  .rd-category-card,
  .rd-carousel-arrow {
    transition: none;
  }
}
