/* ═══════════════════════════════════════════════════════════════════
   Copango — Product Cards (vitrine e-commerce moderne)
   Cartes produit, bouton quick-add, badges stock/promo
   ═══════════════════════════════════════════════════════════════════ */

/* ── Grille produits ─────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-6);
}

/* ── Carte produit ───────────────────────────────────────────── */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-xl, 1rem);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  height: 100%;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary-200, #bbf7d0);
}

/* Image / media */
.product-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-muted, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.product-card:hover .product-card__media img {
  transform: scale(1.06);
}
.product-card__placeholder {
  color: var(--color-primary-500, #22c55e);
  font-size: 3rem;
  opacity: 0.3;
}

/* Badges (coin haut-gauche) */
.product-card__badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  z-index: 2;
}
.product-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  line-height: 1.2;
  box-shadow: var(--shadow-sm);
}
.badge-eco      { background: #dcfce7; color: #166534; }
.badge-france   { background: #dbeafe; color: #1e40af; }
.badge-promo    { background: #fef3c7; color: #92400e; }
.badge-stock    { background: #fee2e2; color: #b91c1c; }
.badge-stock-low{ background: #ffedd5; color: #c2410c; }
.badge-new      { background: #ede9fe; color: #5b21b6; }

/* Bouton quick-add (apparaît au survol, coin bas-droit de l'image) */
.product-card__quick-add {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--color-primary-600, #16a34a);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.55rem 1rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition-base), transform var(--transition-base), background var(--transition-fast);
}
.product-card:hover .product-card__quick-add {
  opacity: 1;
  transform: translateY(0);
}
.product-card__quick-add:hover {
  background: var(--color-primary-700, #15803d);
}
.product-card__quick-add:disabled {
  background: var(--color-border, #cbd5e1);
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

/* Corps texte */
.product-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  flex: 1;
}
.product-card__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-strong, #0f172a);
  line-height: var(--leading-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}
.product-card__shop {
  font-size: var(--text-xs);
  color: var(--color-text-soft, #64748b);
  margin-bottom: var(--space-1);
}
.product-card__price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
}
.product-card__price {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-primary-700, #15803d);
}
.product-card__price-old {
  font-size: var(--text-sm);
  color: var(--color-text-soft, #94a3b8);
  text-decoration: line-through;
  font-weight: var(--weight-normal);
}

/* ── Vitrine home (section hightlight) ───────────────────────── */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-6);
}
