/* Wishlist button on product pages */
.wcw-add-to-wishlist {
    margin-top: 10px;
    position: relative;
}

.wcw-add-to-wishlist.in-wishlist {
    background-color: #c9356c;
    border-color: #c9356c;
}

.wcw-add-to-wishlist.in-wishlist:hover {
    background-color: #a82a58;
}

/* Wishlist page container */
.wcw-wishlist-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* Header with "Add all to cart" */
.wcw-wishlist-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 0 16px;
    border-bottom: 2px solid #eee;
    margin-bottom: 16px;
}

.wcw-add-all-to-cart {
    white-space: nowrap;
    font-weight: 600;
}

/* Items grid */
.wcw-wishlist-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Single wishlist item — desktop row */
.wcw-wishlist-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.wcw-wishlist-item:last-child {
    border-bottom: none;
}

/* Image */
.wcw-item-image {
    width: 100px;
    flex-shrink: 0;
}

.wcw-item-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Details */
.wcw-item-details h3 {
    margin: 0 0 6px;
    font-size: 1.05em;
    line-height: 1.3;
}

.wcw-item-details a {
    text-decoration: none;
    color: #333;
}

.wcw-item-details a:hover {
    color: #14191a;
}

.wcw-item-price {
    display: block;
    font-size: 1.05em;
    font-weight: 700;
    color: #050f10;
    margin-bottom: 4px;
}

.wcw-stock {
    display: inline-block;
    font-size: 0.85em;
    font-weight: 600;
}

.wcw-stock.in-stock {
    color: #46a046;
}

.wcw-stock.out-of-stock {
    color: #dc3232;
}

/* Actions */
.wcw-item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    min-width: 140px;
}

.wcw-item-actions .wcw-add-to-cart {
    text-align: center;
    white-space: nowrap;
    font-size: 0.92em;
    padding: 8px 16px;
}

.wcw-remove-item {
    background: none;
    color: #999;
    border: 1px solid #ddd;
    padding: 6px 16px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85em;
    transition: all 0.2s;
}

.wcw-remove-item:hover {
    background: #dc3232;
    border-color: #dc3232;
    color: #fff;
}

/* Toast messages */
.wcw-message {
    position: fixed;
    top: 20px;
    right: 20px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 7px 20px;
    border-radius: 4px;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.wcw-success {
    background: #212323;
    color: white;
}

.wcw-error {
    background: #dc3232;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Empty state */
.wcw-empty-wishlist {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1.05em;
}

/* Wishlist count badge */
.wishlist-count:empty {
    display: none;
}

.wishlist-count {
    position: absolute;
    background: #435454;
    color: white;
    line-height: 19px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    text-align: center;
}

/* ========= Mobile ========= */
@media (max-width: 768px) {
    .wcw-wishlist-container {
        padding: 10px 10px;
    }

    .wcw-wishlist-header {
        justify-content: center;
    }

    .wcw-add-all-to-cart {
        width: 100%;
        text-align: center;
    }

    .wcw-wishlist-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        gap: 10px 12px;
        padding: 14px 0;
    }

    .wcw-item-image {
        width: 80px;
        grid-row: 1;
        grid-column: 1;
    }

    .wcw-item-details {
        grid-row: 1;
        grid-column: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .wcw-item-details h3 {
        font-size: 0.95em;
        margin-bottom: 4px;
    }

    .wcw-item-actions {
        grid-row: 2;
        grid-column: 1 / -1;
        flex-direction: row;
        min-width: unset;
    }

    .wcw-item-actions .wcw-add-to-cart {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.9em;
    }

    .wcw-remove-item {
        padding: 10px 14px;
        font-size: 0.9em;
    }
}
