/*
 * Escale Nature — Wishlist CSS
 */

/* ─── Bouton coeur (archive + single) ────────────────────────────── */
.enbc-prod-wishlist {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: var(--uicore-white-color);
    border: 1px solid var(--ui-border-color);
    border-radius: var(--ui-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background .15s, border-color .15s, transform .15s;
    padding: 0;
}
.enbc-prod-wishlist svg {
    width: 14px;
    height: 14px;
    stroke: var(--uicore-body-color);
    fill: none;
    transition: stroke .15s, fill .15s;
    flex-shrink: 0;
}
.enbc-prod-wishlist:hover svg {
    stroke: var(--e-global-color-uicore_secondary, var(--uicore-secondary-color));
}
.enbc-prod-wishlist.active {
    border-color: var(--e-global-color-uicore_secondary, var(--uicore-secondary-color));
}
.enbc-prod-wishlist.active svg {
    stroke: var(--e-global-color-uicore_secondary, var(--uicore-secondary-color));
    fill: var(--e-global-color-uicore_secondary, var(--uicore-secondary-color));
}

/* Animation pulse */
@keyframes en-heart-pulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.3); }
    70%  { transform: scale(.9); }
    100% { transform: scale(1); }
}
.enbc-prod-wishlist.pulse svg {
    animation: en-heart-pulse .4s ease;
}

/* ─── Bouton header ───────────────────────────────────────────────── */
.en-wishlist-header-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--uicore-headline-color);
    font-family: var(--uicore-text-font-family);
    transition: opacity .15s;
}
.en-wishlist-header-btn:hover { opacity: .7; }
.en-wishlist-header-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}
.en-wishlist-header-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
}
.en-wishlist-count {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    background: var(--uicore-primary-color);
    color: var(--uicore-white-color);
    font-size: 10px;
    font-family: var(--uicore-text-font-family);
    font-weight: 500;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}
.en-wishlist-count[hidden] { display: none; }

/* ─── Page wishlist ───────────────────────────────────────────────── */
.en-wishlist-page {
    min-height: 300px;
    padding: 2rem 0;
}

/* Loading — affiché par défaut, masqué par JS */
.en-wishlist-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}
.en-wishlist-spinner {
    animation: en-spin 1s linear infinite;
}
@keyframes en-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* État vide — masqué par défaut, affiché par JS */
.en-wishlist-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 1rem;
    text-align: center;
    color: var(--uicore-body-color);
    font-family: var(--uicore-text-font-family);
}
.en-wishlist-empty p {
    font-size: 15px;
    margin: 0;
}
.en-wishlist-shop-link {
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--uicore-headline-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-family: var(--uicore-text-font-family);
}

/* Grille — masquée par défaut, affichée par JS */
.en-wishlist-grid {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 900px) {
    .en-wishlist-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .en-wishlist-grid { grid-template-columns: 1fr 1fr; }
}

/* Card wishlist — coeur toujours visible */
.en-wishlist-card .enbc-prod-wishlist {
    opacity: 1 !important;
}
.en-wishlist-card .enbc-prod-wishlist.active {
    border-color: var(--e-global-color-uicore_secondary, var(--uicore-secondary-color));
}
.en-wishlist-card .enbc-prod-wishlist.active svg {
    stroke: var(--e-global-color-uicore_secondary, var(--uicore-secondary-color));
    fill: var(--e-global-color-uicore_secondary, var(--uicore-secondary-color));
}
