/* =====================================================================
 * Fichier : assets/css/pages/wunschliste.css
 * Projet  : Brennholz Shop24
 * Rôle    : Styles propres à la liste de souhaits (wunschliste.php) :
 *           bandeau et incitation à la connexion (visiteur), synthèse
 *           (nombre, total indicatif, économies) et actions, grille de
 *           produits avec retrait animé, état vide et suggestions.
 *           Pour les clients connectés, la page utilise aussi le gabarit
 *           de l'espace client (assets/css/components/konto.css).
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * 1. Bandeau et incitation à la connexion (visiteur)
 * ------------------------------------------------------------------- */
.wl-hero { padding: clamp(1.6rem, 4vw, 2.6rem) 0; }
.wl-hero-embers { position: absolute; inset: 0; pointer-events: none; }
.wl-hero-inner { position: relative; z-index: 1; }
.wl-hero-row { display: flex; align-items: center; gap: 1.1rem; margin-top: 1rem; }
.wl-hero-icon { width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; background: var(--hfk-grad-fire); color: #fff; font-size: 1.6rem; box-shadow: var(--hfk-shadow-fire); animation: hfk-heart 2.4s ease-in-out infinite; }
.wl-hero h1 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.4rem); animation: hfk-fade-up .6s var(--hfk-ease) both; }
.wl-hero p { margin: .25rem 0 0; animation: hfk-fade-up .6s .1s var(--hfk-ease) both; }

.wl-section { padding-top: clamp(1.5rem, 3vw, 2.5rem); background: var(--hfk-cream); overflow-x: clip; }
.wl-guest { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.wl-login { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.3rem; padding: 1.1rem 1.3rem; background: #fff; border-left: 4px solid var(--hfk-sky); box-shadow: var(--hfk-shadow-sm); }
.wl-login-icon { width: 50px; height: 50px; flex: 0 0 50px; display: grid; place-items: center; background: #E3F0FC; color: var(--hfk-sky); font-size: 1.25rem; transition: transform .35s var(--hfk-ease); }
.wl-login:hover .wl-login-icon { transform: rotate(-8deg) scale(1.06); }
.wl-login > div { flex: 1 1 320px; min-width: 0; }
.wl-login strong { display: block; font-family: var(--hfk-font-head); color: var(--hfk-charcoal); }
.wl-login p { margin: .2rem 0 0; font-size: .9rem; color: var(--hfk-muted); }
.wl-login-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------------------------------------------------------------------
 * 2. Synthèse et actions
 * ------------------------------------------------------------------- */
.wl-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; min-width: 0; }
.wl-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.5rem; align-items: center; padding: 1.2rem 1.4rem; background: #fff; border-top: 4px solid var(--hfk-flame); box-shadow: var(--hfk-shadow-sm); }
.wl-figures { display: flex; flex-wrap: wrap; gap: .8rem 2rem; }
.wl-figures > div { min-width: 0; }
.wl-figures small { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hfk-muted); }
.wl-figures strong { display: inline-block; font-family: var(--hfk-font-head); font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.2; color: var(--hfk-charcoal); font-variant-numeric: tabular-nums; }
.wl-figures strong.is-bumped { animation: hfk-bounce-in .5s var(--hfk-ease) both; }
.wl-figures span { display: block; font-size: .82rem; color: var(--hfk-muted); }
.wl-figures .is-total strong { color: var(--hfk-flame-dark); }
.wl-figures span b { color: var(--hfk-forest-dark); }
.wl-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.wl-actions form { margin: 0; }
.wl-actions .btn i { transition: transform .35s var(--hfk-ease); }
.wl-actions .btn:hover .fa-cart-plus { transform: translateX(3px) rotate(-8deg); }
.wl-actions .btn:hover .fa-trash-can { transform: rotate(-12deg); }
.wl-actions .btn:disabled { opacity: .5; pointer-events: none; }
.wl-note { grid-column: 1 / -1; margin: 0; padding-top: .8rem; border-top: 1px solid var(--hfk-border); font-size: .82rem; color: var(--hfk-muted); }
.wl-note i { color: var(--hfk-sky); margin-right: .25rem; }

/* ---------------------------------------------------------------------
 * 3. Grille et retrait animé
 * ------------------------------------------------------------------- */
.wl-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.wl-grid .product-card { transition: opacity .4s var(--hfk-ease), transform .45s var(--hfk-ease), box-shadow .35s var(--hfk-ease); }
.wl-grid .product-card.is-leaving { opacity: 0 !important; transform: scale(.85) translateY(20px) !important; pointer-events: none; }
.wl-grid .product-card.is-arriving { animation: wl-arrive .6s var(--hfk-ease) both; }
@keyframes wl-arrive { from { opacity: 0; transform: scale(.9) translateY(-14px); } to { opacity: 1; transform: none; } }
.wl-grid .pc-wish.is-active { animation: hfk-heart 1.8s ease-in-out infinite; }
.wl-section .wl-grid, .page-konto .wl-grid { min-width: 0; }

/* ---------------------------------------------------------------------
 * 4. État vide et suggestions
 * ------------------------------------------------------------------- */
.wl-empty { padding: clamp(2rem, 5vw, 3.2rem) 1.2rem; background: #fff; text-align: center; box-shadow: var(--hfk-shadow-sm); }
.wl-empty:not([hidden]) { animation: hfk-fade-up .5s var(--hfk-ease) both; }
.wl-empty-icon { width: 92px; height: 92px; display: inline-grid; place-items: center; margin-bottom: 1rem; background: var(--hfk-flame-light); color: var(--hfk-flame); font-size: 2.2rem; animation: hfk-float 3.5s ease-in-out infinite; }
.wl-empty h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.wl-empty p { max-width: 560px; margin: 0 auto 1.3rem; color: var(--hfk-muted); }
.wl-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }

.wl-suggest { padding-top: .5rem; }
.wl-suggest-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1.1rem; }
.wl-suggest-head h2 { margin: .4rem 0 0; font-size: clamp(1.25rem, 2.4vw, 1.65rem); }
.wl-suggest-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wl-suggest-grid .product-card.is-leaving { opacity: 0; transform: scale(.9); transition: opacity .35s, transform .35s; }

/* ---------------------------------------------------------------------
 * 5. Adaptation aux écrans
 * ------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .wl-suggest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wl-suggest-grid .product-card:nth-child(4) { display: none; }
}
@media (max-width: 991.98px) {
    .wl-summary { grid-template-columns: minmax(0, 1fr); }
    .wl-actions { justify-content: flex-start; }
}
@media (max-width: 767.98px) {
    .wl-suggest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wl-suggest-grid .product-card:nth-child(4) { display: flex; }
}
@media (max-width: 575.98px) {
    .wl-hero-row { gap: .8rem; }
    .wl-hero-icon { width: 50px; height: 50px; flex-basis: 50px; font-size: 1.2rem; }
    .wl-summary { padding: 1rem; }
    .wl-figures { gap: .8rem 1.4rem; }
    .wl-actions, .wl-actions form, .wl-actions .btn, .wl-login-actions, .wl-login-actions .btn, .wl-empty-actions .btn { width: 100%; }
    /* Deux cartes par ligne ; écart fluide commun défini dans main.css */
    .wl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.5rem, 2.6vw, .875rem); }
}
@media (prefers-reduced-motion: reduce) {
    .wl-hero-icon, .wl-empty-icon, .wl-grid .pc-wish.is-active, .wl-empty:not([hidden]) { animation: none; }
    .wl-grid .product-card { transition: none; }
}