.carousel {
  position: relative;
}

.carousel-track {
  list-style: none;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: 44px var(--gutter) 40px;
  margin-block: -32px -12px;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
.carousel-track.is-dragging,
.carousel-track.is-paging {
  scroll-behavior: auto;
  scroll-snap-type: none;
}
.carousel-track.is-dragging {
  cursor: grabbing;
}

.card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(150px, 23vw, 210px);
  aspect-ratio: 2 / 3;
  scroll-snap-align: start;
  border-radius: var(--raio);
  overflow: hidden;
  isolation: isolate;
  background: var(--preta-clara);
  border: 1px solid var(--hairline);
  cursor: pointer;
  user-select: none;
  transform-origin: 50% 85%;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease, border-color 0.3s ease;
}

.card img {
  -webkit-user-drag: none;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-8px) scale(1.12);
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}

.card--enter {
  animation: card-in 0.5s var(--ease) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.card-img--placeholder {
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--texto-suave);
  background: linear-gradient(160deg, #262626, #101010);
  border-radius: inherit;
}

.card--skeleton {
  border: 1px solid var(--hairline);
  background: linear-gradient(100deg, #161616 40%, #232323 50%, #161616 60%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

.card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px 12px;
  border-radius: 0 0 var(--raio) var(--raio);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 20%, rgba(0, 0, 0, 0));
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover .card-overlay,
.card:focus-visible .card-overlay {
  opacity: 1;
  transform: none;
}

.card-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.card-meta {
  font-size: 0.75rem;
  color: #b9b9b9;
}

.carousel-arrow {
  position: absolute;
  top: 44px;
  bottom: 40px;
  z-index: 5;
  width: clamp(44px, 4.5vw, 64px);
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0;
  transition: opacity var(--transicao), background var(--transicao);
}
.carousel-arrow--left {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 30%, rgba(0, 0, 0, 0));
}
.carousel-arrow--right {
  right: 0;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.72) 30%, rgba(0, 0, 0, 0));
}
.carousel:hover .carousel-arrow,
.carousel:focus-within .carousel-arrow {
  opacity: 1;
  transform: scaleX(1);
}
.carousel .carousel-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}
.carousel-arrow:hover {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 30%, rgba(0, 0, 0, 0));
}
.carousel-arrow--right:hover {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.9) 30%, rgba(0, 0, 0, 0));
}
.carousel-arrow .icon {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9));
}
