/* Wishlist Button Styles */
.iw-wishlist-btn-wrap {
    margin: 1em 0;
    position: relative;
}

.iw-wishlist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.8em 1.5em;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.iw-wishlist-btn:hover {
    background-color: #eee;
}

.iw-wishlist-btn.in-wishlist {
    background-color: #f0e6f6;
    border-color: #7f54b3;
    color: #7f54b3;
}

.iw-wishlist-icon {
    font-size: 1.2em;
    line-height: 1;
}

/* Product Loop Button */
.iw-wishlist-btn-loop {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 90;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.iw-wishlist-btn-loop:hover {
    transform: scale(1.1);
}

/* Wishlist Dropdown */
.iw-wishlist-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 1em;
    margin-top: 0.5em;
    display: none;
}

.iw-wishlist-dropdown:before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #ddd;
    border-top: 1px solid #ddd;
    transform: rotate(45deg);
}

.iw-wishlist-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.iw-wishlist-item {
    padding: 0.5em;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.iw-wishlist-item:hover {
    background-color: #f5f5f5;
}

.iw-create-new {
    margin-top: 0.8em;
    padding-top: 0.8em;
    border-top: 1px solid #eee;
}

.iw-create-new-btn {
    display: block;
    text-align: center;
    padding: 0.8em;
    background-color: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

.iw-create-new-btn:hover {
    background-color: #eee;
}

/* Wishlist Modal */
.iw-wishlist-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    padding: 2em;
}

.iw-modal-content {
    background: #fff;
    max-width: 400px;
    margin: 2em auto;
    padding: 2em;
    border-radius: 8px;
    position: relative;
}

.iw-modal-close {
    position: absolute;
    top: 1em;
    right: 1em;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
}

.iw-modal-close:hover {
    color: #333;
}

/* Login/Register Prompt */
.iw-login-prompt {
    text-align: center;
    padding: 2em;
}

.iw-login-prompt p {
    margin-bottom: 1.5em;
}

/* Loading States */
.iw-loading {
    position: relative;
    pointer-events: none;
}

.iw-loading:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Success Animation */
@keyframes wishlistSuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.iw-success {
    animation: wishlistSuccess 0.3s ease-out;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .iw-wishlist-dropdown {
        width: 100%;
    }
}
/* Modal Base Styles */
.iw-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 1rem;
}

.iw-modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.iw-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

/* Product Info Styles */
.iw-product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.iw-product-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.iw-product-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

/* Wishlist Selection Styles */
.iw-existing-wishlists {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.iw-existing-wishlists h3,
.iw-new-wishlist h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.iw-existing-wishlists label {
    display: block;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.iw-form-row {
    margin-bottom: 1rem;
}

.iw-form-row label {
    display: block;
    margin-bottom: 0.5rem;
}

.iw-form-row input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Action Buttons */
.iw-modal-actions {
    margin-top: 1.5rem;
    text-align: right;
}

.iw-add-to-wishlist-btn {
    padding: 0.8em 1.5em;
    background-color: #7f54b3;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.iw-add-to-wishlist-btn:hover {
    background-color: #673ab7;
}

/* Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.iw-modal-content {
    animation: modalFadeIn 0.3s ease-out;
}