/* ================================================
   KEFA STUDIO - PRODUCT HOVER EFFECTS
   Advanced Hover Animations & Interactions
   ================================================ */

/* ===== PRODUCT CARD HOVER EFFECTS ===== */

/* Main Card Lift */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform, box-shadow;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(156, 132, 204, 0.25);
}

/* Image Zoom Effect */
.product-image {
    position: relative;
    overflow: hidden;
}

.product-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(156, 132, 204, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover .product-image::after {
    opacity: 1;
}

.product-image img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.product-card:hover .product-image img {
    transform: scale(1.1) rotate(1deg);
}

/* Favorite Button Animation */
.product-favorite {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.product-card:hover .product-favorite {
    transform: scale(1.15) rotate(10deg);
}

.product-favorite.active {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {

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

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.1);
    }

    75% {
        transform: scale(1.25);
    }
}

.product-favorite i {
    transition: all 0.3s ease;
}

.product-favorite.active i {
    color: #e74c3c;
    animation: pulse 0.8s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Badge Entrance */
.product-badge {
    transition: all 0.3s ease;
    transform-origin: top right;
}

.product-card:hover .product-badge {
    transform: scale(1.1) rotate(-5deg);
}

/* Title Hover Effect */
.product-title {
    position: relative;
    transition: color 0.3s ease;
}

.product-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.product-title:hover::after {
    width: 100%;
}

/* Price Animation */
.product-price {
    transition: all 0.3s ease;
}

.product-card:hover .product-price {
    transform: scale(1.05);
    color: var(--primary-dark);
}

/* Old Price Strikethrough Animation */
.old-price {
    position: relative;
    transition: opacity 0.3s ease;
}

.old-price::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.4s ease;
}

.product-card:hover .old-price::before {
    width: 100%;
}

/* Button Hover Effects */
.btn-add-cart {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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



/* Product Actions Slide Up */
.product-actions {
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Stagger Animation for Buttons */
.product-actions>* {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions>*:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

/* Shimmer Effect on Image */
.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

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

/* Category Badge Pulse */
.category-badge {
    animation: subtlePulse 2s ease-in-out infinite;
}

@keyframes subtlePulse {

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

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

/* Focus States for Accessibility */
.product-card:focus-within {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
}

/* Loading State */
.product-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

.product-card.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--white);
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add to Cart Success Animation */
@keyframes addedToCart {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        background: var(--success);
    }

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

.btn-add-cart.success {
    animation: addedToCart 0.6s ease;
}

/* Gradient Border Glow */
.product-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    filter: blur(10px);
}

.product-card:hover::after {
    opacity: 0.3;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {

    .product-card,
    .product-card *,
    .product-card::before,
    .product-card::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}