/* ========================================
   PRODUCT CARD ANIMATIONS
   ======================================== */

.product-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for product cards */
.product-card:nth-child(1) {
    transition-delay: 0s;
}

.product-card:nth-child(2) {
    transition-delay: 0.05s;
}

.product-card:nth-child(3) {
    transition-delay: 0.1s;
}

.product-card:nth-child(4) {
    transition-delay: 0.15s;
}

.product-card:nth-child(5) {
    transition-delay: 0.2s;
}

.product-card:nth-child(6) {
    transition-delay: 0.25s;
}

.product-card:nth-child(7) {
    transition-delay: 0.3s;
}

.product-card:nth-child(8) {
    transition-delay: 0.35s;
}

/* ========================================
   WISHLIST BUTTON ANIMATIONS
   ======================================== */

.wishlist-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wishlist-btn i {
    transition: all 0.3s ease;
}

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

.wishlist-btn:active {
    transform: scale(0.95);
}

/* Heart animation when added to wishlist */
@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.1);
    }

    75% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.wishlist-btn.animate-heart {
    animation: heartBeat 0.6s ease;
}

/* ========================================
   CART BUTTON ANIMATIONS
   ======================================== */

.add-to-cart-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.add-to-cart-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.6s, height 0.6s;
}

.add-to-cart-btn:active::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   LOADING SPINNER
   ======================================== */

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

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* ========================================
   CAROUSEL TRANSITIONS
   ======================================== */

#screens-carousel {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item {
    transition: all 0.3s ease;
}

.carousel-item:hover {
    transform: scale(1.02);
}

/* ========================================
   LIGHTBOX ANIMATIONS
   ======================================== */

#lightbox-modal {
    animation: fadeIn 0.3s ease;
}

#lightbox-image {
    animation: zoomIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   NOTIFICATION ANIMATIONS
   ======================================== */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification {
    animation: slideInRight 0.3s ease;
}

/* ========================================
   BADGE PULSE ANIMATION
   ======================================== */

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

#cart-count.updated,
#wishlist-count.updated {
    animation: pulse 0.5s ease;
}

/* ========================================
   HOVER EFFECTS
   ======================================== */

.product-image-wrapper {
    position: relative;
    overflow: hidden;
}

.product-image-wrapper img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-image-wrapper:hover img {
    transform: scale(1.1);
}

/* Button hover effects */
button:not(:disabled):hover,
a:hover {
    transition: all 0.3s ease;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* ========================================
   LOADING INDICATOR
   ======================================== */

#loading-indicator {
    transition: opacity 0.3s ease;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .product-card {
        transform: translateY(10px);
    }

    .carousel-item:hover {
        transform: scale(1.01);
    }
}

/* ========================================
   UTILITY ANIMATIONS
   ======================================== */

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth transitions for all interactive elements */
* {
    -webkit-tap-highlight-color: transparent;
}

button,
a,
input,
select,
textarea {
    transition: all 0.2s ease;
}

/* Focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}