/* =================================================================
   ZYROX — Product Listing Page: Premium Zoom + Swing Entry Flow
   Scope: .product-page-animation ONLY
   ================================================================= */

/* 1. Base State: VISIBLE BY DEFAULT (Ensures products are seen if JS fails) */
.product-page-animation .product-card {
    opacity: 1;
    transform: scale(1);
    will-change: transform, opacity;
}

/* 2. Animation Entry State: Triggered by JS */
.product-page-animation .product-card.animate-in {
    animation: 
        pzxZoomIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
        pzxSubtleSwing 1s ease-in-out 0.6s 1;
}

@keyframes pzxZoomIn {
    from {
        opacity: 0;
        transform: scale(0) translateY(40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 3. Subtle Swing Animation */
@keyframes pzxSubtleSwing {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1) rotate(3deg); }
    50% { transform: scale(1) rotate(-2deg); }
    75% { transform: scale(1) rotate(1deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* 4. Hover Interactions (Premium Feel) */
.product-page-animation .product-card:hover {
    transform: translateY(-8px) scale(1.04) !important;
    z-index: 10;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(79, 110, 247, 0.2) !important;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s ease !important;
}

/* Image Zoom on Hover */
.product-page-animation .product-card:hover .card-img-wrap img {
    transform: scale(1.1) rotate(1deg);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-page-animation .product-card .card-img-wrap img {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Button Shine Effect */
.product-page-animation .product-card:hover .btn-view {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px rgba(79, 110, 247, 0.4);
    overflow: hidden;
    position: relative;
}

.product-page-animation .product-card:hover .btn-view::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    animation: pzxButtonShine 1s infinite;
}

@keyframes pzxButtonShine {
    to { left: 150%; }
}

/* 5. Mobile Adjustments */
@media (max-width: 768px) {
    .product-page-animation .product-card.animate-in {
        animation: pzxZoomInMobile 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }

    @keyframes pzxZoomInMobile {
        from { opacity: 0; transform: scale(0.9) translateY(20px); }
        to { opacity: 1; transform: scale(1) translateY(0); }
    }
}
