.games-slider {
  margin-block: var(--space-block-gap);
  position: relative;
}

.games-slider__title { margin-bottom: var(--space-h2-text); }

/* Wraps just the viewport + nav (not the heading above), so the overlay
   nav below can center itself on the game row alone via inset: 0. */
.games-slider__track {
  position: relative;
}

/* Deliberate exception to the site-wide "only tables scroll sideways"
   rule — this is a genuine horizontal carousel at every width. */
.games-slider__viewport {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.games-slider__viewport::-webkit-scrollbar { display: none; }

.games-slider__slide {
  flex: 0 0 auto;
  width: 160px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.games-slider__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  /* contain (not cover): thumbnails aren't guaranteed to be perfectly
     square, and cover would crop whichever edge overflows. Every slide is
     still the same fixed 1/1 box (so the row stays uniform), the image
     itself just never gets cut off inside it. */
  object-fit: contain;
  background: var(--color-bg-dark);
  border-radius: var(--radius-card);
}

.games-slider__name {
  font-size: var(--fs-small);
  color: var(--color-white);
  text-align: center;
  margin: 0;
}

/* Mobile: no button row underneath the games — the two buttons instead
   overlay directly on top of the row (.games-slider__track is their
   positioning parent), one pinned to each edge, vertically centered.
   pointer-events: none on the row itself so the empty space between the
   two buttons doesn't block swiping/scrolling the games underneath; the
   buttons opt back into pointer-events themselves. */
.games-slider__nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 0.5rem;
  pointer-events: none;
}

.games-slider__btn {
  pointer-events: auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-overlay);
  box-shadow: var(--shadow-card);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.games-slider__btn:hover {
  background: var(--color-btn-secondary-border);
}

@media (min-width: 768px) {
  .games-slider__slide { width: 200px; }

  /* From here up, back to a plain static row below the games — the
     overlay treatment above is a mobile-only space-saving choice. */
  .games-slider__nav {
    position: static;
    inset: auto;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-inline: 0;
    pointer-events: auto;
  }

  .games-slider__btn {
    background: var(--color-card-bg);
    box-shadow: none;
  }
  .games-slider__btn:hover {
    background: var(--color-btn-secondary-border);
  }
}
