/* ============================================
   Card Component
   Reusable card patterns for content grouping
   ============================================ */

/* Base Card */
.card {
  margin: 2rem 0;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.card h3 {
  margin-top: 0;
}

.card h4 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

/* Card Variants */
.card-primary {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

.card-elevated {
  box-shadow: var(--shadow-md);
}

/* Color Swatch Card */
.color-swatch {
  height: 120px;
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.color-swatch span {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.color-swatch code {
  font-size: 0.75rem;
  opacity: 0.9;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* Grid Layouts */
/* Generic card grid - defaults to auto-fit for flexible layouts */
/* For 3-column layouts, use .card-grid-three from three-column-grid.css */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin: 0 auto;
}


.card-grid-lg {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .card {
    padding: 1rem;
  }
}