/* Performance Enhancements and Luxury Animations CSS */

/* Cart Recovery Notification */
.cart-recovery-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--rich-white);
    border-radius: 12px;
    box-shadow: 0 8px 32px var(--shadow-color);
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.5s ease-out;
    border-left: 4px solid var(--primary-gold);
}

.recovery-content {
    padding: 1.5rem;
}

.recovery-content h4 {
    font-family: var(--font-primary);
    color: var(--deep-black);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.recovery-content p {
    color: var(--sophisticated-gray);
    margin-bottom: 1rem;
}

.recovery-actions {
    display: flex;
    gap: 0.5rem;
}

.recovery-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.close-recovery {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--sophisticated-gray);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.close-recovery:hover {
    background: var(--light-gray);
    color: var(--deep-black);
}

/* Floating Particles Animation */
#luxury-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-gold);
    border-radius: 50%;
    animation: float 15s infinite linear;
    opacity: 0.7;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Enhanced Product Card Animations */
.product-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

.product-card:hover::before {
    left: 100%;
}

.product-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.product-image-container img {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    width: 100%;
    height: auto;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(212, 175, 55, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: var(--rich-white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--deep-black);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    background: var(--primary-gold);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.action-btn i {
    font-size: 1rem;
}

/* Wishlist Button States */
.wishlist-btn.active {
    background: #e74c3c;
    color: var(--rich-white);
}

.wishlist-btn.active:hover {
    background: #c0392b;
}

/* Ripple Effect Animation */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* Sparkle Effect Animation */
@keyframes sparkle {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(180deg);
        opacity: 0;
    }
}

.sparkle-effect {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-gold);
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle 1s ease-out forwards;
}

/* Slide Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Performance Optimizations */
.lazy-load {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.lazy-load.loaded {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--light-gray);
    border-radius: 50%;
    border-top-color: var(--primary-gold);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Smooth transitions for all interactive elements */
button, a, .clickable {
    transition: transform 0.15s ease-out, box-shadow 0.3s ease-out;
}

input, textarea, select {
    transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

/* Focus states for accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    #luxury-particles {
        display: none;
    }
    
    .floating-particles {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .action-btn {
        border: 2px solid var(--deep-black);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .cart-recovery-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .recovery-actions {
        flex-direction: column;
    }
    
    .recovery-actions .btn {
        width: 100%;
    }
    
    .product-actions {
        gap: 0.25rem;
    }
    
    .action-btn {
        width: 36px;
        height: 36px;
    }
    
    .action-btn i {
        font-size: 0.9rem;
    }
}
