/* ============================================================
   Fast wishlist — icona nell'header + popup overlay.
   Prefisso .wl-* per evitare collisioni col resto del sito.
   ============================================================ */

/* --- Trigger (icona cuoricino accanto ad "Accedi") --- */
.wl-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-right: 0.25rem;
    padding: 0;
    background: none;
    border: 0;
    color: var(--mainBlue);
    cursor: pointer;
    border-radius: 50%;
    overflow: visible;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.wl-trigger__badge {
    position: absolute;
    top: -0.3rem;
    right: -0.3rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.2rem;
    background: var(--mainBlue);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    z-index: 1;
    animation: wl-badge-in 0.2s ease;
}

.wl-trigger__badge[hidden] {
    display: none;
}

@keyframes wl-badge-in {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}

.wl-trigger:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

.wl-trigger:active {
    transform: scale(0.92);
}

.wl-trigger__icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
    pointer-events: none;
}

/* Nel drawer mobile il login è un bottone full-width: lì il trigger è ridondante. */
.site-header__panel-login .wl-trigger {
    display: none;
}

/* --- Popup overlay --- */
.wl-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.wl-popup--open {
    display: block;
}

.wl-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.wl-popup__panel {
    position: fixed;
    top: 5.25rem;
    right: 1rem;
    width: min(23rem, calc(100vw - 2rem));
    max-height: min(75vh, 34rem);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    animation: wl-popup-in 0.15s ease;
}

@keyframes wl-popup-in {
    from { opacity: 0; transform: translateY(-0.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

.wl-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eceae8;
}

.wl-popup__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #44403c;
}

.wl-popup__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: none;
    border: 0;
    font-size: 1.6rem;
    line-height: 1;
    color: #78716c;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.15s ease;
}

.wl-popup__close:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

.wl-popup__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.5rem;
}

.wl-popup__empty,
.wl-popup__loading {
    margin: 0;
    padding: 1.75rem 1rem;
    text-align: center;
    color: #78716c;
    font-size: 0.95rem;
}

.wl-popup__loading {
    font-size: 1.5rem;
    letter-spacing: 0.2rem;
}

.wl-popup__row {
    position: relative;
}

.wl-popup__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem;
    padding-right: 2.25rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
}

.wl-popup__remove {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 50%;
    font-size: 1.35rem;
    line-height: 1;
    color: #a8a29e;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.wl-popup__remove:hover {
    background: #f5f5f4;
    color: #e11d48;
}

.wl-popup__item:hover {
    background-color: #f5f5f4;
}

.wl-popup__item-image {
    flex: 0 0 4rem;
    width: 4rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 0.5rem;
    background: #e7e5e4;
}

.wl-popup__item-image--empty {
    display: block;
}

.wl-popup__item-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.wl-popup__item-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #44403c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wl-popup__item-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--mainBlue);
}

.wl-popup__footer {
    flex: 0 0 auto;
    padding: 0.75rem 1rem;
    border-top: 1px solid #eceae8;
}

.wl-popup__upsell {
    margin: 0.75rem 0 0.25rem;
    padding: 0.75rem;
    background: #f0f6ff;
    border-radius: 0.625rem;
}

.wl-popup__upsell-text {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #44403c;
}

.wl-popup__see-all,
.wl-popup__login,
.wl-popup__register {
    display: block;
    text-align: center;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.wl-popup__see-all {
    color: var(--mainBlue);
}

.wl-popup__login {
    padding: 0.7rem 1rem;
    background: var(--mainBlue);
    color: #fff;
    border-radius: var(--radius-control, 0.75rem);
}

.wl-popup__register {
    padding: 0.7rem 1rem;
    background: var(--mainBlue);
    color: #fff;
    border-radius: var(--radius-control, 0.75rem);
}

body.wl-popup-open {
    overflow: hidden;
}
