/* ==========================================================================
   FAVORIS (sans compte) — cœurs, lien header, page « Mes favoris »
   Chargé globalement (Taxi.js). Tailles en px : indépendantes du rem en vw du thème.
   ========================================================================== */

/* ---------- bouton cœur ---------- */
.ody-fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #3a343c;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.ody-fav-btn svg {
  width: 19px;
  height: 19px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  transition: fill 0.15s ease, stroke 0.15s ease;
}
.ody-fav-btn:hover {
  background: #fff;
}
/* Ordi : le cœur se remplit au survol (aperçu du clic) */
@media (hover: hover) {
  .ody-fav-btn:hover {
    color: #6e4a5a;
  }
  .ody-fav-btn:hover svg {
    fill: #6e4a5a;
  }
}
.ody-fav-btn:focus-visible {
  outline: 2px solid #6e4a5a;
  outline-offset: 2px;
}
.ody-fav-btn.is-active {
  color: #6e4a5a;
}
.ody-fav-btn.is-active svg {
  fill: #6e4a5a;
}
.ody-fav-btn.is-pop {
  animation: ody-fav-pop 0.35s ease;
}
@keyframes ody-fav-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .ody-fav-btn.is-pop { animation: none; }
}

/* Sur les cartes : coin haut-gauche de l'image (le badge ÉPUISÉ est en haut à droite) */
.product-card__image-wrapper {
  position: relative;
}
.ody-fav-btn--card {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
}

/* Sur la fiche produit : sous le titre */
.ody-fav-single {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
}
.ody-fav-btn--single {
  background: #e7deec;
}
.ody-fav-btn--single:hover {
  background: #ddd1e4;
}
.ody-fav-single__label {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: #3a343c;
}

/* ---------- lien du header : un cœur seul, ordi et téléphone ----------
   Vide sans favori, plein dès qu'il y en a au moins un (pas de chiffre : le
   panier affiche déjà « (n) »). Couleur = celle du menu (blanc sur les photos,
   Encre sur fond blanc). */
.ody-fav-header__link {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.ody-fav-header__icon {
  display: inline-flex !important;
}
.ody-fav-header__icon svg {
  width: 18px;
  height: 18px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  transition: fill 0.15s ease;
}
.ody-fav-header__link.has-items .ody-fav-header__icon svg {
  fill: currentColor;
}
@media (hover: hover) {
  .ody-fav-header__link:hover .ody-fav-header__icon svg {
    fill: currentColor;
  }
}
@media (max-width: 767px) {
  /* Le thème ne garde que « Panier » sur téléphone : on réaffiche notre lien */
  .header__nav-menu-item.ody-fav-header {
    display: block !important;
  }
  .ody-fav-header__icon svg {
    width: 21px;
    height: 21px;
  }
}

/* ---------- page « Mes favoris » ---------- */
.ody-fav-page {
  margin: 24px 0 64px;
  font-family: 'Manrope', sans-serif;
  color: #3a343c;
}
.ody-fav-page__loading,
.ody-fav-page__count {
  font-size: 15px;
  margin: 0 0 20px;
}
.ody-fav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 16px;
}
@media (min-width: 768px) {
  .ody-fav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 24px;
  }
}
@media (min-width: 1200px) {
  .ody-fav-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.ody-fav-grid .product-card {
  display: block;
  min-width: 0;
  text-decoration: none !important;
  color: #3a343c;
}
/* La page utilise le modèle « Page légale » : on neutralise le style « texte de loi » */
.ody-fav-grid .product-card *,
.ody-fav-grid .product-card:hover * {
  text-decoration: none !important;
}
.ody-fav-grid .product-card__content {
  padding: 12px 2px 0;
}
.ody-fav-grid .product-card__title {
  font-family: 'Erode', serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 6px;
}
.ody-fav-grid .product-card__price {
  font-size: 15px;
}
.ody-fav-grid .product-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0;
}

.ody-fav-empty {
  text-align: center;
  padding: 48px 16px;
  background: #e7deec;
  border-radius: 6px;
}
.ody-fav-empty__title {
  font-family: 'Erode', serif;
  font-size: 24px;
  margin: 0 0 8px;
}
.ody-fav-empty__text {
  font-size: 15px;
  margin: 0 0 24px;
}
.ody-fav-empty__cta {
  display: inline-block;
  padding: 12px 22px;
  background: #3a343c;
  color: #fff !important;
  border-radius: 4px;
  font-size: 15px;
  text-decoration: none !important;
}
