/* ==========================================================================
   Collections Index — Photo-forward collection cards
   ========================================================================== */

/* --- Break out of app-workspace__content padding for edge-to-edge cards --- */

.app-workspace__content:has(.collections-index) {
  padding: 0;
  max-width: none;
}

/* --- Index container --- */

.collections-index {
  width: 100%;
}

/* --- Card container --- */

.coll-card {
  position: relative;
  width: 100%;
}

/* --- Photo area: 4:3 aspect ratio --- */

.coll-card__photo-area {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-parch);
  text-decoration: none;
}

/* --- Full-bleed cover photo with crossfade transition --- */

.coll-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity var(--duration-fast, 120ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

/* --- Gradient overlay (transparent to ink 85%) --- */

.coll-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent 0%, rgba(26, 13, 8, 0.85) 100%);
  padding: var(--space-12, 48px) var(--space-4, 16px) var(--space-3, 12px);
  pointer-events: none;
}

/* --- Collection name --- */

.coll-card__name {
  font-family: var(--font-accent, 'Fraunces', serif);
  font-style: italic;
  font-weight: 700;
  font-size: 22px;
  color: var(--color-ivory);
  line-height: 1.2;
  margin: 0 0 var(--space-1, 4px) 0;
}

/* --- Item name (subtitle) with crossfade and ellipsis --- */

.coll-card__item-name {
  font-family: var(--font-body, 'Sora', sans-serif);
  font-size: 12px;
  color: rgba(250, 246, 238, 0.6);
  margin: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: opacity var(--duration-fast, 120ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

/* --- Carousel dots: absolute top-right --- */

.coll-card__dots {
  position: absolute;
  top: var(--space-3, 12px);
  right: var(--space-3, 12px);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-1, 4px);
  z-index: 2;
}

.coll-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(250, 246, 238, 0.35);
  transition: width var(--duration-fast, 120ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
              background var(--duration-fast, 120ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
              border-radius var(--duration-fast, 120ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.coll-card__dot--active {
  width: 16px;
  background: var(--color-ivory);
  border-radius: 3px;
}

/* --- Grail badge: absolute top-left --- */

.coll-card__grail-badge {
  position: absolute;
  top: var(--space-3, 12px);
  left: var(--space-3, 12px);
  display: flex;
  align-items: center;
  gap: var(--space-1, 4px);
  background: var(--color-red);
  color: var(--color-ivory);
  font-family: var(--font-body, 'Sora', sans-serif);
  font-size: 10px;
  font-weight: 600;
  padding: 3px var(--space-2, 8px);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(192, 48, 26, 0.4);
  z-index: 2;
}

/* --- Stats bar: dark glass --- */

.coll-card__stats {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-4, 16px);
  padding: var(--space-2, 8px) var(--space-4, 16px);
  background: rgba(26, 13, 8, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.coll-card__stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.coll-card__stat-value {
  font-family: var(--font-display, 'Bebas Neue', Impact, sans-serif);
  font-size: 20px;
  color: var(--color-ivory);
  line-height: 1.1;
}

.coll-card__stat-value--amber {
  color: var(--color-amber);
}

.coll-card__stat-value--mint {
  color: var(--color-mint);
}

.coll-card__stat-value--red {
  color: var(--color-red);
}

.coll-card__stat-label {
  font-family: var(--font-body, 'Sora', sans-serif);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 246, 238, 0.4);
  line-height: 1.2;
}

.coll-card__stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(250, 246, 238, 0.12);
  flex-shrink: 0;
}

/* --- Card divider: ivory gap between cards --- */

.coll-card__divider {
  height: var(--space-2, 8px);
  background: var(--color-ivory);
}

/* --- Fallback: empty collection placeholder --- */

.coll-card__fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-parch);
}

.coll-card__fallback svg {
  width: 80px;
  height: 80px;
  opacity: 0.15;
}

/* --- Reduced motion --- */

@media (prefers-reduced-motion: reduce) {
  .coll-card__photo {
    transition: none;
  }

  .coll-card__item-name {
    transition: none;
  }

  .coll-card__dot {
    transition: none;
  }
}
