carousel-collection {
  display: block;
  position: relative;
  z-index: 6;
  width: 100%;
}

carousel-collection .carousel {
  margin: 1.3vw 0;
  width: 100%;
}

carousel-collection .carousel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 3.6%;
  margin-bottom: 4px;
  min-height: 24px;
}

carousel-collection .carousel-head h2 {
  font-size: clamp(16px, 1.4vw, 22px);
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

carousel-collection .indicators {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 2px;
}

carousel-collection .indicators .dot {
  width: 13px;
  height: 2px;
  background: color-mix(in srgb, transparent, var(--text) 35%);
  transition: background 0.25s;
}

carousel-collection .indicators .dot[active] {
  background: var(--text);
}

carousel-collection .carousel-body {
  position: relative;
  overflow: hidden;
  padding: 14px 3.6% 22px;
  width: 100%;
}

carousel-collection .carousel-body .track {
  display: flex;
  will-change: transform;
}

carousel-collection .carousel-body > button {
  position: absolute;
  top: 14px;
  bottom: 22px;
  width: 3.6%;
  border-width: medium;
  border-style: none;
  border-color: currentcolor;
  border-image: initial;
  background: color-mix(in srgb, transparent, var(--background) 50%);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.28s,
    background 0.2s;
}

carousel-collection .carousel[data-loop]:hover .carousel-body > button {
  opacity: 1;
  pointer-events: auto;
}

carousel-collection .carousel-body > button:hover {
  background: color-mix(in srgb, transparent, var(--background) 25%);
}

carousel-collection .carousel-body > button:nth-of-type(1) {
  left: 0px;
}

carousel-collection .carousel-body > button:nth-of-type(2) {
  right: 0px;
}

carousel-collection .carousel-body > button svg {
  min-width: 1.3rem;
  min-height: 1.3rem;
}

carousel-collection .carousel-body > button:nth-of-type(1) svg {
  rotate: 180deg;
}

carousel-collection .card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

carousel-collection .card[data-skeleton] {
  cursor: default;
  pointer-events: none;
}

carousel-collection .card .art {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: transform 0.2s ease;
}

carousel-collection .card:not([data-skeleton]):hover .art {
  transform: scale(1.03);
}

carousel-collection .card .label {
  font-weight: 700;
  font-size: clamp(12px, 0.95vw, 15px);
  text-align: center;
  color: var(--text);
  text-shadow: rgba(0, 0, 0, 0.6) 0px 2px 8px;
  padding: 0 10px;
}

carousel-collection .carousel[data-variant='horizontal'] .art {
  aspect-ratio: 16 / 9;
  border-radius: 5px;
}

carousel-collection .carousel[data-variant='horizontal'] .art .label {
  font-size: clamp(13px, 1.2vw, 19px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

carousel-collection .carousel[data-variant='icons'] .art {
  aspect-ratio: 1 / 1;
  border-radius: 22%;
}

carousel-collection .carousel[data-variant='icons'] .glyph {
  font-weight: 800;
  font-size: clamp(22px, 2.2vw, 36px);
  color: var(--text);
  text-shadow: rgba(0, 0, 0, 0.6) 0px 2px 8px;
}

carousel-collection .carousel[data-variant='icons'] .label {
  margin-top: 8px;
  font-size: clamp(11px, 0.85vw, 14px);
  font-weight: 500;
  text-shadow: none;
}

carousel-collection .carousel[data-variant='posters'] .art {
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  align-items: flex-end;
}

carousel-collection .carousel[data-variant='posters'] .art .label {
  width: 100%;
  padding: 20px 10px 12px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent);
  font-size: clamp(12px, 1vw, 16px);
}

/* ---- Skeleton cards / headers (fill gaps and empty rows) ---- */

@keyframes carouselSkeletonShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

carousel-collection .card[data-skeleton] .art,
carousel-collection .card[data-skeleton] .label,
carousel-collection .carousel-head h2:empty {
  background-image: linear-gradient(
    90deg,
    color-mix(in srgb, var(--background), var(--text) 6%) 25%,
    color-mix(in srgb, var(--background), var(--text) 14%) 37%,
    color-mix(in srgb, var(--background), var(--text) 6%) 63%
  );
  background-size: 200% 100%;
  animation: carouselSkeletonShimmer 1.4s ease-in-out infinite;
}

carousel-collection .carousel-head h2:empty {
  width: 220px;
  max-width: 40vw;
  height: clamp(16px, 1.4vw, 22px);
  border-radius: 6px;
}

carousel-collection .card[data-skeleton] .label {
  margin-top: 8px;
  width: 70%;
  height: clamp(12px, 0.95vw, 15px);
  border-radius: 4px;
  text-shadow: none;
}
