/* =====================================================
   FORTUNA ONLINE – product-card.css (v4 – redesign premium)
   Moderne · Robuste · Performant · 3 colonnes
   ===================================================== */

/* ── Variables locales ── */
:root {
  --pc-red:         #8b0000;
  --pc-red-light:   #b01010;
  --pc-red-glow:    rgba(139,0,0,.18);
  --pc-gold:        #c9a227;
  --pc-dark:        #0f0f0f;
  --pc-surface:     #ffffff;
  --pc-gray-bg:     #f8f8f8;
  --pc-border:      #ebebeb;
  --pc-text-muted:  #888;
  --pc-shadow:      0 2px 16px rgba(0,0,0,.07);
  --pc-shadow-lg:   0 16px 48px rgba(0,0,0,.13);
  --pc-radius:      16px;
  --pc-radius-sm:   10px;
  --pc-transition:  .3s cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════════════════════════
   GRILLE — TOUJOURS 3 COLONNES (configurable)
══════════════════════════════════════════════ */
#productsGrid.row {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

/* Force 3 colonnes sur desktop dans la zone col-lg-9 */
.col-lg-9 #productsGrid .pc-col,
.col-lg-9 #productsGrid > [class*="col-"] {
  flex: 0 0 auto;
  width: 33.3333% !important;
}
@media (max-width: 991px) {
  .col-lg-9 #productsGrid .pc-col,
  .col-lg-9 #productsGrid > [class*="col-"] {
    width: 50% !important;
  }
}
@media (max-width: 575px) {
  .col-lg-9 #productsGrid .pc-col,
  .col-lg-9 #productsGrid > [class*="col-"] {
    width: 50% !important;
  }
}

/* ── Vue liste ── */
#productsGrid.list-view { display: flex !important; flex-direction: column; gap: 14px; }
#productsGrid.list-view .pc-col,
#productsGrid.list-view > [class*="col-"] { width: 100% !important; max-width: 100% !important; flex: none !important; }
#productsGrid.list-view .pc-card { flex-direction: row; height: 180px; }
#productsGrid.list-view .pc-img-wrap { width: 160px; flex-shrink: 0; aspect-ratio: unset; height: 100%; border-radius: var(--pc-radius) 0 0 var(--pc-radius); }
#productsGrid.list-view .pc-cart-overlay { display: none; }
#productsGrid.list-view .pc-info { padding: 18px 20px; justify-content: center; }
@media (max-width: 575px) {
  #productsGrid.list-view .pc-card { flex-direction: column; height: auto; }
  #productsGrid.list-view .pc-img-wrap { width: 100%; height: 220px; border-radius: var(--pc-radius) var(--pc-radius) 0 0; }
}

/* ══════════════════════════════════════════════
   CARTE PRODUIT — design premium
══════════════════════════════════════════════ */
.pc-card {
  background: var(--pc-surface);
  border-radius: var(--pc-radius);
  overflow: hidden;
  border: 1px solid var(--pc-border);
  box-shadow: var(--pc-shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: box-shadow var(--pc-transition), transform var(--pc-transition), border-color var(--pc-transition);
  will-change: transform;
}
.pc-card:hover {
  box-shadow: var(--pc-shadow-lg);
  transform: translateY(-6px);
  border-color: rgba(139,0,0,.15);
}
@media (max-width: 768px) {
  .pc-card:hover { transform: translateY(-3px); }
}

/* ══════════════════════════════════════════════
   ZONE IMAGE
══════════════════════════════════════════════ */
.pc-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--pc-gray-bg);
  aspect-ratio: 3 / 4;
  flex-shrink: 0;
  display: block;
  text-decoration: none;
}
.pc-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(0,0,0,.3) 100%);
  opacity: 0;
  transition: opacity var(--pc-transition);
  z-index: 1;
  pointer-events: none;
}
.pc-card:hover .pc-img-wrap::after { opacity: 1; }

.pc-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
  display: block;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.pc-card:hover .pc-img-wrap img { transform: scale(1.08); }

/* ══════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════ */
.pc-badge {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}
.pc-badge span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 4px;
  display: inline-block;
  line-height: 1.4;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.pc-badge-new   { background: var(--pc-dark); color: #fff; }
.pc-badge-sale  { background: var(--pc-red);  color: #fff; }
.pc-badge-hot   { background: var(--pc-gold); color: var(--pc-dark); }
.pc-badge-promo { background: #1a9e5c;        color: #fff; }

/* ══════════════════════════════════════════════
   ACTIONS FLOTTANTES
══════════════════════════════════════════════ */
.pc-actions {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 7px;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity .24s ease, transform .24s ease;
  pointer-events: none;
}
.pc-card:hover .pc-actions,
.pc-actions:focus-within { opacity: 1; transform: translateX(0); pointer-events: all; }
@media (hover: none) { .pc-actions { opacity: 1; transform: translateX(0); pointer-events: all; } }

.pc-action-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.97);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: var(--pc-dark);
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,.16);
  transition: background var(--pc-transition), color var(--pc-transition), transform .15s ease;
  text-decoration: none;
}
.pc-action-btn:hover  { background: var(--pc-red); color: #fff; transform: scale(1.08); }
.pc-action-btn:active { transform: scale(.88); }
.pc-wishlist-btn.is-active { background: var(--pc-red); color: #fff; }
.pc-wishlist-btn.is-active i::before { content: '\f004'; }

/* ══════════════════════════════════════════════
   DOTS COULEUR
══════════════════════════════════════════════ */
.pc-color-dots {
  position: absolute;
  bottom: 58px; left: 12px;
  display: flex;
  gap: 5px;
  z-index: 4;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .24s ease, transform .24s ease;
  pointer-events: none;
}
.pc-card:hover .pc-color-dots { opacity: 1; transform: translateY(0); pointer-events: all; }
@media (hover: none) { .pc-color-dots { opacity: 1; transform: translateY(0); pointer-events: all; } }

.pc-color-dot {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  transition: transform .15s ease, border-color .15s ease;
  display: inline-block;
}
.pc-color-dot:hover    { transform: scale(1.3); }
.pc-color-dot.is-active { border-color: var(--pc-red); transform: scale(1.2); }

/* ══════════════════════════════════════════════
   OVERLAY PANIER
══════════════════════════════════════════════ */
.pc-cart-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(105%);
  opacity: 0;
  transition: transform .28s ease, opacity .24s ease;
  z-index: 4;
  display: flex;
  justify-content: center;
}
.pc-card:hover .pc-cart-overlay { transform: translateY(0); opacity: 1; }
@media (hover: none) { .pc-cart-overlay { transform: translateY(0); opacity: 1; } }

.pc-cart-overlay .pc-add-to-cart {
  width: 100%;
  background: var(--pc-red);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  border: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .22s ease, transform .15s ease, box-shadow .22s ease;
  box-shadow: 0 6px 22px var(--pc-red-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.pc-cart-overlay .pc-add-to-cart:hover { background: var(--pc-red-light); box-shadow: 0 8px 28px rgba(139,0,0,.32); }
.pc-cart-overlay .pc-add-to-cart:active { transform: scale(.97); }

/* ══════════════════════════════════════════════
   INFOS PRODUIT
══════════════════════════════════════════════ */
.pc-info {
  padding: 14px 15px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 5px;
  border-top: 1px solid var(--pc-border);
}

.pc-cat {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--pc-red);
  opacity: .85;
}

.pc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--pc-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  transition: color .2s ease;
}
.pc-name:hover, a:hover .pc-name { color: var(--pc-red); }

/* Étoiles */
.pc-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}
.pc-stars { display: flex; align-items: center; gap: 1px; }
.pc-stars svg { width: 10px; height: 10px; flex-shrink: 0; }
.pc-reviews { font-size: 10px; color: var(--pc-text-muted); }

/* Prix */
.pc-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
}
.pc-price-current {
  font-size: 15px;
  font-weight: 800;
  color: var(--pc-red);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.3px;
}
.pc-price-old {
  font-size: 11px;
  color: #bbb;
  text-decoration: line-through;
  white-space: nowrap;
}
.pc-price-discount {
  font-size: 9.5px;
  font-weight: 800;
  color: #16a34a;
  background: rgba(22,163,74,.1);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .4px;
}

/* Tailles */
.pc-sizes {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.pc-size-tag {
  padding: 2px 7px;
  border: 1.5px solid var(--pc-border);
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
  color: #666;
  transition: all .15s ease;
  line-height: 1.6;
}
.pc-size-tag:hover,
.pc-size-tag.is-active { background: var(--pc-red); border-color: var(--pc-red); color: #fff; }
.pc-size-tag.is-unavailable { opacity: .3; cursor: not-allowed; text-decoration: line-through; pointer-events: none; }

/* Bouton panier (vue liste) */
.pc-add-to-cart {
  width: 100%;
  background: var(--pc-dark);
  color: #fff;
  border: none;
  padding: 11px 14px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .22s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
  margin-top: 8px;
  white-space: nowrap;
}
.pc-add-to-cart:hover { background: var(--pc-red); box-shadow: 0 8px 22px var(--pc-red-glow); }
.pc-add-to-cart:active { transform: scale(.97); }
.pc-add-to-cart.is-loading { pointer-events: none; opacity: .7; }
.pc-add-to-cart.is-loading i { display: none; }
.pc-add-to-cart.is-loading::after {
  content: '';
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pc-spin .55s linear infinite;
}
@keyframes pc-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
#pc-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99999;
  font-size: 13px;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 10px;
  color: #fff;
  background: var(--pc-dark);
  border-left: 4px solid var(--pc-red);
  box-shadow: 0 10px 36px rgba(0,0,0,.24);
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .28s ease, transform .28s ease;
  max-width: 320px;
}
#pc-toast.pc-toast--error   { border-color: #c0392b; background: #c0392b; }
#pc-toast.pc-toast--visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════════
   SKELETON LOADER
══════════════════════════════════════════════ */
@keyframes pc-shimmer { to { background-position: -200% 0; } }
.pc-card.is-skeleton .pc-img-wrap,
.pc-card.is-skeleton .pc-name,
.pc-card.is-skeleton .pc-cat,
.pc-card.is-skeleton .pc-price-current,
.pc-card.is-skeleton .pc-add-to-cart {
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: pc-shimmer 1.4s infinite;
  color: transparent;
  border-radius: 6px;
}
.pc-card.is-skeleton .pc-img-wrap { aspect-ratio: 3/4; }

/* ══════════════════════════════════════════════
   ACCESSIBILITÉ
══════════════════════════════════════════════ */
.pc-action-btn:focus-visible,
.pc-add-to-cart:focus-visible,
.pc-color-dot:focus-visible,
.pc-size-tag:focus-visible {
  outline: 2px solid var(--pc-red);
  outline-offset: 3px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Mobile 2 colonnes
══════════════════════════════════════════════ */
@media (max-width: 575px) {
  .pc-info { padding: 10px 10px 12px; gap: 4px; }
  .pc-name  { font-size: 12px; -webkit-line-clamp: 2; }
  .pc-price-current { font-size: 13px; }
  .pc-size-tag { font-size: 9px; padding: 1px 5px; }
  .pc-cart-overlay { transform: translateY(0); opacity: 1; }
  .pc-cart-overlay .pc-add-to-cart { font-size: 10px; padding: 8px 10px; }
}

/* ── col helper ── */
.pc-col { display: flex; }
.pc-col .pc-card { width: 100%; }