/* ============================================================
   COMPONENT: Product Card Grid and Empty States
   ============================================================ */
/* ============================================================
   COMPONENT: Product Card (Card Grid)
   ============================================================ */
.product-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-2);
}

.product-card {
  position: relative;
  display: grid;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  cursor: pointer;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.product-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface-muted);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.product-card:hover .product-card-image img { transform: scale(1.04); }

.product-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.product-card-badge.ready {
  background: rgba(34, 197, 94, 0.18);
  color: var(--success);
  box-shadow: var(--shadow-glow-green), inset 0 0 0 1px rgba(34, 197, 94, 0.25);
}

.product-card-badge.needs-attrs {
  background: rgba(245, 158, 11, 0.18);
  color: var(--warning);
  box-shadow: var(--shadow-glow-orange), inset 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.product-card-badge.blocked {
  background: rgba(239, 68, 68, 0.18);
  color: var(--danger);
  box-shadow: var(--shadow-glow-red), inset 0 0 0 1px rgba(239, 68, 68, 0.25);
}

.product-card-body {
  display: grid;
  gap: 6px;
  padding: 4px 6px 6px;
}

.product-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.product-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

.product-card-metric {
  display: grid;
  gap: 2px;
}

.product-card-metric .label {
  font-size: 11px;
  color: var(--text-muted);
}

.product-card-metric .value {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.product-card-metric .value.positive { color: var(--success); }
.product-card-metric .value.negative { color: var(--danger); }

.product-card-confidence {
  width: fit-content;
  padding: 2px 7px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

/* ============================================================
   COMPONENT: Product Card Skeleton & Empty State
   ============================================================ */
.product-card-skeleton {
  position: relative;
  display: grid;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  overflow: hidden;
  pointer-events: none;
}

.product-card-skeleton-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-surface-muted) 25%, var(--bg-surface-hover) 50%, var(--bg-surface-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.product-card-skeleton-body {
  display: grid;
  gap: 8px;
  padding: 4px 6px 6px;
}

.product-card-skeleton-title {
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-surface-muted) 25%, var(--bg-surface-hover) 50%, var(--bg-surface-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.product-card-skeleton-title.short {
  width: 60%;
}

.product-card-skeleton-meta {
  height: 14px;
  width: 40%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-surface-muted) 25%, var(--bg-surface-hover) 50%, var(--bg-surface-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.product-card-skeleton-metrics {
  display: flex;
  gap: var(--space-2);
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

.product-card-skeleton-metric {
  height: 32px;
  width: 50%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-surface-muted) 25%, var(--bg-surface-hover) 50%, var(--bg-surface-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Product Card Empty State */
.product-card-empty {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-3);
  text-align: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(249, 115, 22, 0.03));
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.product-card-empty-illustration {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  width: 80px;
  height: 56px;
  margin-bottom: 4px;
}

.product-card-empty-illustration span {
  width: 12px;
  border-radius: 999px 999px 2px 2px;
  background: var(--primary-soft);
  animation: barPulse 2s ease-in-out infinite;
}

.product-card-empty-illustration span:nth-child(1) { height: 20px; animation-delay: 0s; }
.product-card-empty-illustration span:nth-child(2) { height: 36px; background: var(--action-soft); animation-delay: 0.2s; }
.product-card-empty-illustration span:nth-child(3) { height: 28px; background: var(--success-soft); animation-delay: 0.4s; }

@keyframes barPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.08); }
}

.product-card-empty h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.product-card-empty p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
}
