/* ==========================================================
   UFRAM WISHLIST STYLES
   ========================================================== */

/* Wishlist Icon Button */
.ufram-wishlist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    color: #6b7280;
}

.ufram-wishlist-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.1);
}

.ufram-wishlist-btn.active {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.ufram-wishlist-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.ufram-wishlist-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.ufram-wishlist-btn:hover i {
    transform: scale(1.2);
}

/* Header Wishlist Icon */
.header-wishlist-icon {
    position: relative;
    display: inline-block;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-wishlist-icon:hover {
    color: #ef4444;
}

.header-wishlist-icon i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.header-wishlist-icon:hover i {
    transform: scale(1.1);
}

.wishlist-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.wishlist-count-badge.hidden {
    opacity: 0;
    transform: scale(0);
}

/* Action buttons in product cards */
.action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: white;
    color: #ef4444;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn.ufram-wishlist-btn.active {
    background: linear-gradient(135deg, #1b5a7a 0%, #6ac8c6 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4), 
                0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-btn.ufram-wishlist-btn.active:hover {
    background: linear-gradient(135deg, #6ac8c6 0%, #1b5a7a 100%);
    color: white;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5), 
                0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Wishlist Page */
.wishlist-page {
    padding: 1.5rem 0;
    min-height: 50vh;
}

.wishlist-header {
    text-align: center;
    margin-bottom: 2rem;
}

.wishlist-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.wishlist-title i {
    color: #ef4444;
    font-size: 1.5rem;
}

.wishlist-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

/* Empty Wishlist */
.wishlist-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

.wishlist-empty h3 {
    font-size: 1.5rem;
    color: #374151;
    margin-bottom: 1rem;
}

.wishlist-empty p {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Wishlist Grid - Using Archive Product Styles */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Product Card Styles - Same as Archive */
.product-card {
    position: relative;
    background: var(--white, #ffffff);
    border-radius: 16px;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
    border: 1px solid var(--gray-200, #e5e7eb);
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
    margin: auto;
}

.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image-link img {
    transform: scale(1.05);
}

.wishlist-toggle-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ef4444;
}

.wishlist-toggle-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Product Info Styles - Same as Archive */
.product-info {
    padding: 20px;
}

.product-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.product-title a {
    color: var(--gray-900, #111827);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: var(--primary, #0e2954);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #d1d5db;
    font-size: 14px;
}

.star.filled {
    color: #fbbf24;
}

.star.half {
    color: #fbbf24;
    position: relative;
}

.star.half::after {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #d1d5db;
}

.rating-count {
    font-size: 12px;
    color: var(--gray-500, #6b7280);
    font-weight: 500;
}

.product-price {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary, #0e2954);
}

/* Product Actions - Same as Archive */
.product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    pointer-events: none;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.product-actions .action-btn {
    pointer-events: auto;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--gray-700, #374151);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 
                0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
}

.action-btn:hover {
    background: linear-gradient(135deg, #1b5a7a 0%, #6ac8c6 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(27, 90, 122, 0.3), 
                0 3px 8px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.action-btn svg {
    width: 18px;
    height: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    flex-shrink: 0;
}

.action-btn:hover svg {
    transform: scale(1.15);
}

.action-btn i {
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.action-btn:hover i {
    transform: scale(1.15);
}

.action-btn.ufram-wishlist-btn.active {
    background: linear-gradient(135deg, #1b5a7a 0%, #6ac8c6 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4), 
                0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-btn.ufram-wishlist-btn.active:hover {
    background: linear-gradient(135deg, #6ac8c6 0%, #1b5a7a 100%);
    color: white;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5), 
                0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Bottom Actions */
.product-actions-bottom {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    min-height: 40px;
    flex: 1;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    letter-spacing: 0.025em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover::before {
    left: 100%;
}

.btn i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: scale(1.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3), 
                0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4), 
                0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 2px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
}

.btn-outline:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    border-color: transparent;
}

.btn-danger {
    background: linear-gradient(135deg, #1b5a7a 0%, #6ac8c6 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3), 
                0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #6ac8c6 0%, #1b5a7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4), 
                0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-disabled {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    border: 1px solid #dee2e6;
    cursor: not-allowed;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-disabled:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Wishlist Actions */
.wishlist-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1.5rem 0;
    border-top: 1px solid #e5e7eb;
}

.add-all-to-cart-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    min-height: 40px;
}

.add-all-to-cart-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
}

.clear-wishlist-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    min-height: 40px;
}

.clear-wishlist-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

/* ====== WISHLIST BUTTON STYLES ====== */
/* Add to Cart Button - Remove borders */
.add-to-cart-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(27, 90, 122, 0.3) !important;
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #0f4a6b 0%, #5ab8b6 100%) !important;
    color: white !important;
    border: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(27, 90, 122, 0.4) !important;
}

.add-to-cart-btn:focus {
    border: none !important;
    outline: 2px solid rgba(27, 90, 122, 0.3) !important;
    outline-offset: 2px !important;
}

/* Remove from Wishlist Button - Red background, no borders */
.remove-from-wishlist-btn {
    background: #ef4444 !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3) !important;
}

.remove-from-wishlist-btn:hover {
    background: #dc2626 !important;
    color: white !important;
    border: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4) !important;
}

.remove-from-wishlist-btn:focus {
    border: none !important;
    outline: 2px solid rgba(239, 68, 68, 0.3) !important;
    outline-offset: 2px !important;
}

/* Loading states */
.add-to-cart-btn.loading,
.remove-from-wishlist-btn.loading {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.add-to-cart-btn.loading:hover,
.remove-from-wishlist-btn.loading:hover {
    transform: none !important;
}

/* Loading States */
.wishlist-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.wishlist-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wishlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .wishlist-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .wishlist-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .wishlist-actions .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .wishlist-page {
        padding: 1rem 0;
    }
    
    .wishlist-header {
        margin-bottom: 1.5rem;
    }
    
    .wishlist-title {
        font-size: 1.4rem;
    }
    
    .wishlist-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-info {
        padding: 0.75rem;
    }
}
