/**
 * EF Favoris — styles frontend.
 * Volontairement sobres — le thème peut surcharger librement.
 */

/* Bouton cœur — base */
.effv-heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    cursor: pointer;
    color: #cbd5e1;
    transition: color 0.15s ease, background 0.15s ease, transform 0.05s ease;
    -webkit-tap-highlight-color: transparent;
}

.effv-heart:hover { color: var(--effv-color, #ef4444); background: #fff; }
.effv-heart:active { transform: scale(0.95); }

.effv-heart.is-active { color: var(--effv-color, #ef4444); }
.effv-heart.is-active .effv-heart__icon { animation: effv-pop 0.25s ease; }

.effv-heart__icon { display: block; }

@keyframes effv-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Variante overlay : positionné en haut-droite sur les cartes produits.
   La carte produit doit avoir position: relative (la plupart des thèmes WC l'ont). */
li.product, .products .product, .woocommerce ul.products li.product {
    position: relative;
}
.effv-heart--overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}

/* Variante inline : utilisée sur la fiche produit, avec un peu d'air autour */
.effv-heart--inline {
    margin: 6px 0 14px;
}

/* Toast minimal — popup discret en bas */
.effv-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.94);
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.effv-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ====== Page Mes favoris ====== */

.effv-wishlist {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.effv-wishlist__head {
    margin-bottom: 18px;
}

.effv-wishlist__count {
    color: #64748b;
    font-size: 14px;
}

.effv-wishlist__empty {
    background: #f8fafc;
    border-radius: 10px;
    padding: 28px 18px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.effv-wishlist__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.effv-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease;
}
.effv-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.06); }

.effv-card__img {
    aspect-ratio: 1 / 1;
    background: #f1f5f9 center / cover no-repeat;
}
.effv-card__img--missing {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 28px;
}

.effv-card__body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.effv-card__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #1e293b;
    text-decoration: none;
    margin: 0;
}
.effv-card__title:hover { color: #2563eb; }

.effv-card__price {
    font-size: 14px;
    color: #2563eb;
    font-weight: 700;
    margin: 0;
}

.effv-card__stock {
    font-size: 11px;
    color: #64748b;
}
.effv-card__stock--in    { color: #16a34a; }
.effv-card__stock--out   { color: #dc2626; }

.effv-card__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}
