/*
 * Favourites (2026-11): heart buttons on product cards / product page, header heart, /favorite page.
 * Own styles: /css/app.css is a static precompiled Tailwind build. JS: public/js/favorites.js.
 */
.favorite-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border: 0; background: none; color: #374151; padding: 0; line-height: 1; }
.favorite-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; transition: transform .15s ease, fill .15s ease, color .15s ease; }
.favorite-btn:hover { color: #dc2626; }
.favorite-btn.is-active { color: #dc2626; }
.favorite-btn.is-active svg { fill: currentColor; }
.favorite-btn:active svg { transform: scale(.85); }

/* Round heart on top of a product card image */
.favorite-btn.fav-card { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 9999px; background: rgba(255,255,255,.95); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
/* Product cards (.fav-card-wrap): heart bottom-right of the image, discount badge stays top-right.
   The heart is a sibling of the image link, so it is placed from the image height:
   h-72 (18rem) everywhere, except .product-card-image (Home: 9rem on mobile, 18rem from lg). */
.fav-card-wrap > .favorite-btn.fav-card { top: calc(18rem - 44px); }
.fav-card-wrap:has(> .product-card-image) > .favorite-btn.fav-card { top: calc(9rem - 44px); }
@media (min-width: 1024px) {
    .fav-card-wrap:has(> .product-card-image) > .favorite-btn.fav-card { top: calc(18rem - 44px); }
}

/* Product page: square heart next to "Adaugă în coș" */
.favorite-btn.fav-buy { width: 48px; min-height: 48px; flex-shrink: 0; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; }
.favorite-btn.fav-buy svg { width: 22px; height: 22px; }

/* Product page, out of stock: full-width "Adaugă la favorite" (no cart button there) */
.favorite-btn.fav-wide { flex: 1; min-height: 48px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font-size: 16px; font-weight: 700; color: #111827; }
.favorite-btn.fav-wide.is-active { color: #dc2626; border-color: #fca5a5; background: #fef2f2; }

/* Header heart with counter (same look as the cart icon) */
.fav-header { position: relative; display: flex; align-items: center; color: #374151; }
.fav-header:hover { color: #f97316; }
.fav-header svg { width: 24px; height: 24px; }
.fav-count { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 9999px; background: #c2410c; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.fav-count.hidden { display: none; }
