/**
 * Animated Price Display
 * Dynamic flash/lightning effect with rotation and glow animations
 */

.your-price {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 2.5rem 3rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    border-radius: 8px;
    box-shadow:
        0 8px 32px rgba(16, 185, 129, 0.4),
        0 0 60px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: visible;
    width: 100%;
    transform: rotate(-2deg);
    animation: price-float 3s ease-in-out infinite;
    clip-path: polygon(
        0% 10%,
        5% 0%,
        95% 0%,
        100% 10%,
        100% 90%,
        95% 100%,
        5% 100%,
        0% 90%
    );
}

/* Floating animation */
@keyframes price-float {
    0%, 100% {
        transform: rotate(-2deg) translateY(0px);
    }
    50% {
        transform: rotate(-2deg) translateY(-8px);
    }
}

/* Animated gradient background */
.your-price::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 70%
    );
    animation: shimmer-sweep 2.5s infinite;
}

@keyframes shimmer-sweep {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Pulsing glow ring */
.your-price::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #10b981, #059669, #047857);
    border-radius: 8px;
    z-index: -1;
    opacity: 0.5;
    animation: pulse-ring 2s ease-in-out infinite;
    clip-path: polygon(
        0% 10%,
        5% 0%,
        95% 0%,
        100% 10%,
        100% 90%,
        95% 100%,
        5% 100%,
        0% 90%
    );
}

@keyframes pulse-ring {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Price label styling */
.your-price-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: label-pulse 2s ease-in-out infinite;
}

@keyframes label-pulse {
    0%, 100% {
        opacity: 0.95;
    }
    50% {
        opacity: 1;
        letter-spacing: 2.5px;
    }
}

/* Price value - BIGGER and more dynamic */
.your-price-value {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(255, 255, 255, 0.6),
        0 0 60px rgba(16, 185, 129, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.3);
    animation:
        price-glow 2s ease-in-out infinite,
        price-scale 3s ease-in-out infinite;
    transform-origin: center;
}

@keyframes price-glow {
    0%, 100% {
        text-shadow:
            0 0 20px rgba(255, 255, 255, 0.8),
            0 0 40px rgba(255, 255, 255, 0.6),
            0 0 60px rgba(16, 185, 129, 0.8),
            0 4px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow:
            0 0 30px rgba(255, 255, 255, 1),
            0 0 60px rgba(255, 255, 255, 0.8),
            0 0 90px rgba(16, 185, 129, 1),
            0 0 120px rgba(16, 185, 129, 0.6),
            0 4px 8px rgba(0, 0, 0, 0.3);
    }
}

@keyframes price-scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Sparkle effects */
.your-price-value::before,
.your-price-value::after {
    content: '✨';
    position: absolute;
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

.your-price-value::before {
    top: -10px;
    left: -25px;
    animation-delay: 0s;
}

.your-price-value::after {
    bottom: -10px;
    right: -25px;
    animation-delay: 1s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

/* Lightning flash effect overlay */
.product-price-wrapper {
    position: relative;
}

.product-price-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: ambient-glow 3s ease-in-out infinite;
    border-radius: 12px;
}

@keyframes ambient-glow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* Responsive adjustments */
@media (max-width: 968px) {
    .your-price {
        padding: 2rem 2.5rem;
        transform: rotate(-1.5deg);
    }

    .your-price-value {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .your-price {
        padding: 1.75rem 2rem;
        transform: rotate(-1deg);
    }

    .your-price-value {
        font-size: 2.5rem;
    }

    .your-price-label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .your-price {
        padding: 1.5rem 1.75rem;
        transform: rotate(-0.5deg);
    }

    .your-price-value {
        font-size: 2rem;
    }

    .your-price-value::before,
    .your-price-value::after {
        font-size: 1rem;
    }
}

/* Hover effects for interactive feel */
@media (hover: hover) {
    .your-price:hover {
        animation: price-float 3s ease-in-out infinite, price-shake 0.5s ease;
    }

    @keyframes price-shake {
        0%, 100% {
            transform: rotate(-2deg) translateX(0);
        }
        25% {
            transform: rotate(-2deg) translateX(-5px);
        }
        75% {
            transform: rotate(-2deg) translateX(5px);
        }
    }
}
