.item-shelf {
  width: 100%;
  min-height: 124px;
  overflow: hidden;
  padding: 6px 4px;
}

.item-shelf__track {
  display: flex;
  width: max-content;
  gap: 5px;
  will-change: transform;
}

.item-card {
  --glow: rgba(var(--red-rgb), 0.28);
  position: relative;
  width: 164px;
  height: 112px;
  flex: 0 0 164px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 8px;
  background: var(--surface);
}

.item-card.rarity-legendary {
  --glow: rgba(var(--gold-rgb), 0.28);
}

.item-card::before {
  position: absolute;
  z-index: -1;
  inset: -20px -12px 8px;
  background: radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--glow) 88%, transparent), transparent 64%);
  content: "";
}

.item-card__image {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 122px;
  height: 69px;
  object-fit: contain;
  transform: translateX(-50%);
  user-select: none;
  pointer-events: none;
}

.item-card__copy {
  position: absolute;
  right: 12px;
  bottom: 9px;
  left: 12px;
  min-width: 0;
}

.item-card__name,
.item-card__description {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-card__name {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 16px;
}

.item-card__description {
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 13px;
}

@media (max-width: 600px) {
  .item-shelf {
    min-height: 114px;
    padding: 5px 4px;
  }

  .item-shelf__track {
    gap: 5px;
  }

  .item-card {
    width: clamp(132px, 42vw, 164px);
    height: 104px;
    flex-basis: clamp(132px, 42vw, 164px);
    border-radius: 8px;
  }

  .item-card__image {
    width: 108px;
    height: 63px;
  }

  .item-card__copy {
    right: 10px;
    bottom: 8px;
    left: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .item-shelf__track {
    will-change: auto;
  }
}
