/* Wishlist Button Styles */
.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
    opacity: 1;
}

.wishlist-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wishlist-btn i {
    font-size: 16px;
    color: #6b7280;
    transition: all 0.2s ease;
}

.wishlist-btn:hover i {
    color: #e11d48;
}

.wishlist-btn.in-wishlist {
    background: #fef2f2;
    border-color: #e11d48;
}

.wishlist-btn.in-wishlist i {
    color: #e11d48;
    animation: heartBeat 0.4s ease-in-out;
}

.wishlist-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.wishlist-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Wishlist Button with Text */
.wishlist-btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #475569;
    border: 2px solid #e2e8f0;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.wishlist-btn-text:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    color: #334155;
    text-decoration: none;
}

.wishlist-btn-text.in-wishlist {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border-color: #e11d48;
    color: #dc2626;
}

.wishlist-btn-text.in-wishlist:hover {
    background: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);
    color: #b91c1c;
}

/* Header Wishlist Link */
.header-wishlist-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.header-wishlist-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.header-wishlist-link i {
    font-size: 18px;
}

.wishlist-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e11d48;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

/* Product Card Wishlist Integration */
.card {
    position: relative;
}

.card .wishlist-btn {
    opacity: 1;
    transform: scale(1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wishlist-btn {
        width: 32px;
        height: 32px;
        top: 6px;
        right: 6px;
        border-radius: 6px;
    }
    
    .wishlist-btn i {
        font-size: 14px;
    }
    
    .wishlist-btn-text {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Toast Notifications */
.wishlist-toast {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-content i {
    font-size: 16px;
}

/* Wishlist Page Specific Styles */
.wishlist-page .card {
    position: relative;
}

.wishlist-page .wishlist-btn {
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.wishlist-page .wishlist-btn:hover {
    background: #dc2626;
}

/* Loading States */
.wishlist-loading {
    position: relative;
    overflow: hidden;
}

.wishlist-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Accessibility */
.wishlist-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.wishlist-btn-text:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wishlist-btn {
        border: 2px solid currentColor;
    }
    
    .wishlist-btn.in-wishlist {
        background: #e11d48;
        color: white;
    }
}