/* =============================================================
   COMPONENT — CARD & PRODUCT CARD
   ============================================================= */

/* --- Base card --- */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-base);
}

.card:hover {
  border-color: var(--color-accent-border);
  box-shadow: var(--shadow-lg), var(--shadow-accent-sm);
}

/* --- Product Card --- */
.product-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-base);
}

.product-card:hover {
  border-color: var(--color-accent-border);
  box-shadow: var(--shadow-lg), var(--shadow-accent-sm);
  transform: translateY(-2px);
}

.product-card__image {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--color-bg-elevated);
  overflow: hidden;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image img {
  transform: scale(1.04);
}

/* Image gradient overlay */
.product-card__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,13,0.5) 0%, transparent 50%);
  pointer-events: none;
}

.product-card__badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  z-index: 1;
}

.product-card__body {
  padding: var(--space-5) var(--space-5) var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__category {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.product-card__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  color: var(--color-text-primary);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-2);
}

.product-card__description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  flex: 1;
  margin-bottom: var(--space-5);

  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
}

.product-card__price {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.product-card__price .price-from {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--weight-regular);
  display: block;
  margin-bottom: 2px;
}

/* --- Category Card --- */
.category-card {
  position: relative;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-base);
}

.category-card:hover {
  border-color: var(--color-accent-border);
  box-shadow: var(--shadow-lg), var(--shadow-accent-sm);
  transform: translateY(-2px);
}

.category-card__bg {
  position: absolute;
  inset: 0;
  background: var(--color-bg-elevated);
}

.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,13,0.9) 0%, rgba(8,8,13,0.3) 60%, transparent 100%);
}

.category-card__content {
  position: relative;
  z-index: 1;
  padding: var(--space-5) var(--space-5) var(--space-5);
}

.category-card__icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
  display: block;
}

.category-card__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  color: var(--color-text-primary);
  line-height: var(--leading-snug);
}

.category-card__count {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: var(--space-1);
}

/* --- Feature Card --- */
.feature-card {
  padding: var(--space-8) var(--space-6);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  background: var(--color-accent-dim);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  color: var(--color-accent-light);
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.feature-card__body {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}
