/* ==========================================================================
   WISHLIST BUTTON
   ========================================================================== */

.wpo_wishlist_button {
    cursor: pointer;
    border: 0;
    padding: 0;
    line-height: 0;
}

.wpo_wishlist_loading {
    cursor: wait;
    opacity: 0.6;
}

.wpo_wishlist_icon {
    display: block;
    transition: transform 0.2s ease;
}

.wpo_wishlist_icon path {
    fill: #BBBBBB;
    transition: fill 0.2s ease;
}

.wpo_wishlist_button.is-active .wpo_wishlist_icon path {
    fill: #C41D34;
}

/* ==========================================================================
   WISHLIST LIST (page / shortcode)
   ========================================================================== */

.wpo-wishlist-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.wpo-wishlist-list--empty {
    display: block;
    text-align: center;
    padding: 48px 16px;
    color: #555;
    font-size: 16px;
}

.wpo-wishlist-item {
    position: relative;
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.wpo-wishlist-item:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.wpo-wishlist-item__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.wpo-wishlist-item__image-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f7f7f7;
}

.wpo-wishlist-item__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wpo-wishlist-item__body {
    padding: 16px;
    text-align: center;
}

.wpo-wishlist-item__title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #222;
    line-height: 1.3;
}

.wpo-wishlist-item__price {
    font-size: 14px;
    color: #444;
}

.wpo-wishlist-item__price del {
    color: #999;
    margin-right: 6px;
}

.wpo-wishlist-item__remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.wpo-wishlist-item__remove .wpo_wishlist_icon {
    width: 20px;
    height: 18px;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */

.wpo-wishlist-toast {
    position: fixed;
    top: 50px;
    right: 24px;
    z-index: 10000;
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 340px;
    max-width: calc(100vw - 40px);
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    overflow: hidden;
    font-family: inherit;
}

.wpo-wishlist-toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.wpo-wishlist-toast.is-hiding {
    transform: translateX(calc(100% + 40px));
    opacity: 0;
}

.wpo-wishlist-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #C41D34;
}

.wpo-wishlist-toast--error::before {
    background: #c0392b;
}

.wpo-wishlist-toast__content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px 14px 16px;
}

.wpo-wishlist-toast__image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f3f3;
}

.wpo-wishlist-toast__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.wpo-wishlist-toast__product {
    font-size: 14px;
    font-weight: 500;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.wpo-wishlist-toast__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #C41D34;
    line-height: 1.3;
}

.wpo-wishlist-toast--error .wpo-wishlist-toast__label {
    color: #c0392b;
    text-transform: none;
    font-size: 13px;
    font-weight: 500;
}

.wpo-wishlist-toast__icon {
    flex-shrink: 0;
}

.wpo-wishlist-toast__close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    line-height: 0;
    transition: color 0.2s ease;
}

.wpo-wishlist-toast__close:hover {
    color: #222;
}

.wpo-wishlist-toast__btn {
    display: block;
    text-align: center;
    padding: 11px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #ffffff;
    background: #C41D34;
    text-decoration: none;
    transition: background 0.2s ease;
}

.wpo-wishlist-toast__btn:hover,
.wpo-wishlist-toast__btn:focus {
    background: #A50D24;
    color: #ffffff;
}

@media (max-width: 768px) {
    .wpo-wishlist-toast {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        transform: translateY(calc(100% + 40px));
    }

    .wpo-wishlist-toast.is-visible {
        transform: translateY(0);
    }

    .wpo-wishlist-toast.is-hiding {
        transform: translateY(calc(100% + 40px));
    }
}
