/* ============================================================
   PRODUCT CARD — design unifié (identique à la Boutique)
   Chargé globalement → mêmes cartes sur toutes les pages.
   ============================================================ */

.products-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }

/* ── Carte ─────────────────────────────────────────────────── */
.product-card-list {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: transform .2s, box-shadow .2s;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}
.product-card-list:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.12); }

/* Badge */
.product-card-list .badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 8px; border-radius: 5px;
  color: #fff; font-weight: 500; font-size: 15px; font-family: "Urbane", sans-serif; z-index: 2;
}
.product-card-list .badge.sale { background: #f02443; color: #fff; }
.product-card-list .badge.new  { background: #17344c; color: #dfe7ef; }

/* Badge pourcentage de réduction (haut droite) */
.product-card-list .badge-discount {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  background: #f02443; color: #fff;
  font-family: "degular", Sans-serif; font-weight: 700; font-size: 14px;
  padding: 4px 9px; border-radius: 5px; line-height: 1;
}

/* Image */
.product-card-list .card-img-link { display: block; background: #f8f8f8; }
.product-card-list .card-img-link img { width: 100%; height: 200px; object-fit: cover; display: block; }
.product-card-list .card-no-img { width: 100%; height: 200px; display: flex; align-items: center; justify-content: center; background: #f8f8f8; color: #ddd; font-size: 2.5rem; }

/* Corps */
.product-card-list .card-body { padding: 12px 14px 4px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.product-card-list .card-category {
  font-family: "urbane", Sans-serif; font-size: 10px; font-weight: 300; background: #DFEBF7;
  padding: 4px 8px; border-radius: 6px; display: inline-block; align-self: flex-start;
  color: #17344c; margin-bottom: 5px;
}
.product-card-list .card-name {
  color: #17344c; margin: 5px 0 8px; text-decoration: none; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  min-height: 36px; line-height: 1.4; font-size: 15px; font-weight: 700; font-family: "urbane", Sans-serif;
}
.product-card-list .card-name:hover { color: #f02443; }

/* Prix */
.product-card-list .price-row { display: flex; align-items: center; gap: 4px; }
.product-card-list .old-price { color: #bbb; text-decoration: line-through; font-size: 20px; font-weight: 300; font-family: "degular", Sans-serif !important; }
.product-card-list .new-price { color: #17344c; font-family: "degular", Sans-serif !important; font-weight: 700; font-size: 20px; }

/* Stock */
.product-card-list .stock-ok { color: #28a745; font-size: .75rem; font-weight: 600; }
.product-card-list .stock-no { color: #dc3545; font-size: .75rem; font-weight: 600; }

/* Actions */
.product-card-list .card-actions { display: flex; gap: 8px; padding: 10px 14px 14px; align-items: center; margin-top: auto; }
.product-card-list .btn-add-cart {
  flex: 1; padding: 8px 12px; background: #17344c; color: #fff !important;
  border: 2px solid #17344c; border-radius: 8px; text-align: center; text-decoration: none !important;
  cursor: pointer; transition: .3s; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; box-sizing: border-box; font-family: "degular", Sans-serif !important; font-size: 20px; font-weight: 600;
}
.product-card-list .btn-add-cart:hover { background: #43dde6; color: #17344c !important; }
.product-card-list .btn-add-cart.btn-disabled { background: #f0f0f0; color: #bbb !important; cursor: not-allowed; border-color: #f0f0f0; }
.product-card-list .btn-wishlist {
  width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: #f5f5f5; color: #17344c; border: none; border-radius: 8px; cursor: pointer; transition: all .25s; font-size: .9rem;
}
.product-card-list .btn-wishlist:not(.active):hover { background: #ffe0e5 !important; color: #f02443 !important; }
.product-card-list .btn-wishlist.active { background: #f02443 !important; color: #fff !important; animation: wishPop .35s ease; }
.product-card-list .btn-wishlist.active i { transform: scale(1.15); }
.product-card-list .btn-wishlist.wl-loading { opacity: .6; cursor: wait; }

@keyframes wishPop { 0%{transform:scale(1)} 40%{transform:scale(1.35)} 70%{transform:scale(.9)} 100%{transform:scale(1)} }

/* ── Cartes en mode carrousel (page d'accueil) ────────────────
   On garde le conteneur .product-slider, mais les cartes prennent
   la largeur fixe d'un item de slider (comme les anciennes cartes). */
.product-slider > .product-card-list {
  flex: 0 0 calc((100% - 64px) / 5);
  max-width: calc((100% - 64px) / 5);
  min-width: 0;
  scroll-snap-align: start;
}

/* ── Responsive grille ───────────────────────────────────────── */
@media (max-width: 1200px) {
  .product-slider > .product-card-list { flex: 0 0 calc((100% - 48px) / 4); max-width: calc((100% - 48px) / 4); }
}
@media (max-width: 1199px) {
  .products-list { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
@media (max-width: 991px) {
  .products-list { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .product-slider > .product-card-list { flex: 0 0 calc((100% - 32px) / 3); max-width: calc((100% - 32px) / 3); }
}
@media (max-width: 767px) {
  .products-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card-list .card-img-link img { height: 160px; }
  .product-slider > .product-card-list { flex: 0 0 calc((100% - 16px) / 2); max-width: calc((100% - 16px) / 2); }
}
@media (max-width: 480px) {
  .products-list { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-card-list .card-body { padding: 8px 10px 2px; }
  .product-card-list .card-name { font-size: .8rem; }
  .product-card-list .new-price { font-size: .9rem; }
  .product-card-list .btn-add-cart { font-size: .75rem; padding: 7px 6px; }
  .product-card-list .btn-wishlist { width: 32px; height: 32px; font-size: .8rem; }
  .product-card-list .card-img-link img { height: 140px; }
}
