/* Carte produit "doré-rosé" — image/nom cliquables vers la fiche produit,
   nom du vendeur cliquable vers sa mini-page, et 3 boutons d'action
   (panier en pleine largeur, favoris + partager en ligne dessous). */

.mb-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--mb-surface), var(--mb-surface)) padding-box,
    linear-gradient(135deg, #E8C9A8 0%, #A9714E 55%, #8B5A3C 100%) border-box;
  box-shadow: 0 3px 10px rgba(139, 90, 60, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.mb-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(139, 90, 60, 0.28);
}

.mb-product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--mb-surface-alt);
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}
.mb-product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.mb-product-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
.mb-product-card:hover .mb-product-card__media::after { transform: translateX(120%); }

.mb-product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #D9A876, #A9714E);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--mb-radius-sm);
  box-shadow: 0 2px 6px rgba(169, 113, 78, 0.4);
}
/* Réduction (-X%) : rouge, pour un contraste immédiat avec le reste du
   badge doré-rosé — le signal "promotion" doit sauter aux yeux. */
.mb-product-card__badge--discount {
  background: #C1272D;
  box-shadow: 0 2px 6px rgba(193, 39, 45, 0.4);
}
.mb-product-card__badge--boosted {
  background: #3A3A3A;
  color: #F0D8BC;
  font-size: 0.68rem;
}

.mb-product-card__unavailable {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.mb-product-card__body {
  display: block;
  padding: 12px 14px 4px;
  text-decoration: none;
  color: inherit;
}
.mb-product-card__name {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--mb-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mb-product-card__price {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  background: linear-gradient(135deg, #C68A5D, #8B5A3C);
  -webkit-background-clip: text;
  background-clip: text;
  color: #8B5A3C;
  -webkit-text-fill-color: transparent;
}
.mb-product-card__old-price {
  margin-left: 8px;
  font-weight: 400;
  color: var(--mb-text-muted);
  text-decoration: line-through;
  font-size: 0.85em;
  -webkit-text-fill-color: var(--mb-text-muted);
}

.mb-product-card__seller-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px;
  padding: 8px 0;
  border-top: 1px solid var(--mb-border);
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  font-size: 0.78rem;
  color: var(--mb-text-muted);
  cursor: pointer;
  width: calc(100% - 28px);
  text-align: left;
}
.mb-product-card__seller-banner:hover { color: var(--mb-accent); }
.mb-product-card__seller-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #D9A876, #A9714E);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Grille d'actions 2x2 : Ajouter au panier / Avis, Réserver / Partager.
   Un emplacement désactivé par Briguanté (flag REVIEWS/RESERVATIONS
   éteint) laisse un <span> vide plutôt qu'un trou visuel. --- */
.mb-product-card__actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 14px 14px;
}
.mb-product-card__actions-grid .mb-btn,
.mb-product-card__actions-grid .mb-btn--outline {
  padding: 8px 6px;
  font-size: 0.8rem;
  text-align: center;
}

/* Cœur actif : rempli, doré-rosé — c'est l'indicateur "ajouté aux favoris". */
.mb-product-card__favorite--active {
  background: linear-gradient(135deg, #D9A876, #A9714E);
  border-color: transparent;
  color: #FFFFFF;
}
.mb-product-card__favorite--active:hover { color: #FFFFFF; border-color: transparent; }

/* --- Variante 'minimal' (accueil.html) : cœur en overlay sur l'image,
   pas de ligne d'actions séparée. --- */
.mb-product-card--minimal .mb-product-card__seller-banner { margin-bottom: 4px; border-bottom: none; }
.mb-product-card--minimal .mb-product-card__body { padding-bottom: 14px; }
.mb-product-card__favorite--overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--mb-text);
  flex: none;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.mb-product-card__favorite--overlay:hover {
  background: linear-gradient(135deg, #D9A876, #A9714E);
  color: #FFFFFF;
  transform: translateY(0) scale(1.08);
}
.mb-product-card__favorite--overlay.mb-product-card__favorite--active {
  background: linear-gradient(135deg, #D9A876, #A9714E);
  color: #FFFFFF;
}

.mb-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .mb-products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .mb-products-grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- Fenêtre profil vendeur (seller-banner.js) --- */
.mb-seller-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: none; align-items: center; justify-content: center; z-index: 70; padding: 16px;
}
.mb-seller-modal-overlay--open { display: flex; }
.mb-seller-modal {
  background: var(--mb-surface); border-radius: var(--mb-radius-lg);
  max-width: 420px; width: 100%; max-height: 85vh; overflow-y: auto; position: relative;
}
.mb-seller-modal__close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(0,0,0,0.5); color: #fff; border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.mb-seller-modal__cover {
  height: 110px; background-color: var(--mb-surface-alt); background-size: cover; background-position: center;
}
.mb-seller-modal__body { padding: 16px; }
.mb-seller-modal__avatar-row { display: flex; align-items: center; gap: 12px; margin-top: -36px; }
.mb-seller-modal__avatar {
  width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--mb-surface);
  background-color: var(--mb-accent); background-size: cover; background-position: center;
  color: #fff; font-weight: 700; font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mb-seller-modal__stats {
  display: flex; justify-content: space-around; text-align: center; margin: 14px 0;
  padding: 12px 0; border-top: 1px solid var(--mb-border); border-bottom: 1px solid var(--mb-border);
}
.mb-seller-modal__stats div { display: flex; flex-direction: column; }
.mb-seller-modal__stats strong { font-size: 1.1rem; }
.mb-seller-modal__stats span { font-size: 0.75rem; color: var(--mb-text-muted); }
.mb-seller-modal__actions { display: flex; gap: 10px; }
.mb-seller-modal__actions .mb-btn, .mb-seller-modal__actions .mb-btn--outline { flex: 1; }
