/* ==========================================================
   CARDS — Chewtoy's Dugout v9.0.0
   Single source of truth for all card components
   ========================================================== */

/* ── BASE ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card-hover);
}

/* ── VARIANTS ── */
.card--elevated {
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
}

.card--elevated:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.card--bordered {
  border: 1px solid var(--border-default);
}

.card--bordered:hover {
  border-color: var(--gold-600);
}

.card--interactive {
  cursor: pointer;
  user-select: none;
}

.card--interactive:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold-600);
}

.card--interactive:active {
  transform: scale(0.98);
}

.card--flat {
  box-shadow: none;
  border: none;
}

.card--glow {
  box-shadow: var(--shadow-card), var(--shadow-glow-gold);
}

.card--glow:hover {
  box-shadow: var(--shadow-card-hover), var(--shadow-glow-gold-strong);
}

.card--highlight {
  border-color: var(--gold-700);
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--gold-alpha-5) 100%);
}

.card--highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
}

.card--accent {
  border-left: 3px solid var(--gold-500);
  background: linear-gradient(90deg, var(--gold-alpha-5) 0%, var(--bg-card) 20%);
}

.card--primary {
  border: 1px solid var(--gold-600);
  background: linear-gradient(135deg, var(--gold-alpha-10) 0%, var(--bg-card) 100%);
  box-shadow: var(--shadow-glow-gold);
}

.card--empty-state {
  text-align: center;
  border: 2px dashed var(--border-subtle);
  background: transparent;
}

.card--empty-state:hover {
  border-color: var(--gold-600);
  background: var(--gold-alpha-5);
}

/* ── SIZES ── */
.card--sm { padding: var(--space-4); border-radius: var(--radius-md); }
.card--lg { padding: var(--space-8); border-radius: var(--radius-xl); }

/* ── SUB-COMPONENTS ── */
.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--text-primary);
  margin: 0;
  line-height: var(--leading-tight);
}

.card__title--sm  { font-size: var(--text-lg); }
.card__title--lg  { font-size: var(--text-3xl); }
.card__title--accent { color: var(--gold-500); }

.card__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: var(--space-1) 0 0 0;
}

.card__body {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

.card__body p { margin: 0 0 var(--space-4) 0; }
.card__body p:last-child { margin-bottom: 0; }

.card__footer {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.card__image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  object-fit: cover;
}

.card__badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--gold-600);
  color: var(--text-on-gold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--gradient-gold);
  color: var(--text-on-gold);
  font-size: var(--text-2xl);
  flex-shrink: 0;
}

/* ── CARD GROUPS ── */
.card-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

/* ── SPECIALTY CARDS ── */
.card--stat {
  text-align: center;
}

.card--stat .card__value {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  color: var(--gold-500);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.card--stat .card__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.card--feature {
  text-align: center;
  padding: var(--space-8);
}

.card--feature .card__icon {
  margin: 0 auto var(--space-4);
  width: 64px;
  height: 64px;
  font-size: var(--text-4xl);
}

.card--product {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card--product .card__body { flex-grow: 1; }
.card--product .card__footer { margin-top: auto; }

.card--product .card__price {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--gold-400);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .card--horizontal {
    grid-template-columns: 1fr;
  }
}
