/* Favorite and Interactive States */

/* Favorite button states */
.favorite-btn.active {
    background: var(--danger-color) !important;
    color: white !important;
}

.favorite-btn.active:hover {
    background: #dc2626 !important;
    transform: scale(1.1) !important;
}

/* Product card hover states */
.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

/* Loading states for buttons */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    color: inherit;
}

.btn-primary.loading::after {
    border-color: white;
    border-top-color: transparent;
}

/* Form enhancements */
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Notification animations */
.notification {
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.removing {
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ripple effect for buttons */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    pointer-events: none;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Smooth transitions for all interactive elements */
a, button, .card, .form-control, .form-select {
    transition: all 0.2s ease;
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.category-card:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

/* Animation delays for staggered effects */
.animate-on-scroll:nth-child(1) { animation-delay: 0ms; }
.animate-on-scroll:nth-child(2) { animation-delay: 100ms; }
.animate-on-scroll:nth-child(3) { animation-delay: 200ms; }
.animate-on-scroll:nth-child(4) { animation-delay: 300ms; }
.animate-on-scroll:nth-child(5) { animation-delay: 400ms; }

/* Enhanced mobile interactions */
@media (max-width: 768px) {
    .btn {
        min-height: 44px; /* Better touch targets */
    }
    
    .product-actions {
        opacity: 1; /* Always visible on mobile */
        transform: translateX(0);
        position: relative;
        top: auto;
        right: auto;
        flex-direction: row;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .action-btn {
        position: static;
        margin: 0 0.25rem;
    }
}