/* Animations CSS - All Animation Effects for Ziyorate */

/* Core Animation Keyframes */

/* Fade Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

@keyframes bounceScale {
    0% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.15); 
    }
    100% { 
        transform: scale(1); 
    }
}

/* Jewelry-Specific Animations */
@keyframes sparkle {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    25% { 
        opacity: 0.8; 
        transform: scale(1.1) rotate(5deg);
        filter: brightness(1.2);
    }
    50% { 
        opacity: 0.9; 
        transform: scale(1.15) rotate(-3deg);
        filter: brightness(1.3);
    }
    75% { 
        opacity: 0.85; 
        transform: scale(1.05) rotate(2deg);
        filter: brightness(1.1);
    }
}

@keyframes shimmer {
    0% { 
        background-position: -200% center; 
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    100% { 
        background-position: 200% center; 
        opacity: 0.8;
    }
}

@keyframes glint {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
        transform: scale(1);
    }
    25% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.5),
                    0 0 25px rgba(212, 175, 55, 0.3);
        transform: scale(1.02);
    }
    50% { 
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.6),
                    0 0 35px rgba(212, 175, 55, 0.4),
                    0 0 45px rgba(212, 175, 55, 0.2);
        transform: scale(1.03);
    }
    75% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.5),
                    0 0 25px rgba(212, 175, 55, 0.3);
        transform: scale(1.02);
    }
}

@keyframes sway {
    0%, 100% { 
        transform: rotate(0deg) translateY(0px); 
    }
    25% { 
        transform: rotate(2deg) translateY(-2px); 
    }
    50% { 
        transform: rotate(0deg) translateY(-4px); 
    }
    75% { 
        transform: rotate(-2deg) translateY(-2px); 
    }
}

@keyframes gentleSwing {
    0%, 100% { 
        transform: rotate(0deg); 
        transform-origin: top center;
    }
    25% { 
        transform: rotate(1deg); 
    }
    75% { 
        transform: rotate(-1deg); 
    }
}

@keyframes dangling {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    33% { 
        transform: translateY(-3px) rotate(1deg); 
    }
    66% { 
        transform: translateY(2px) rotate(-0.5deg); 
    }
}

/* Movement Animations */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-15px); 
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { 
        transform: translateY(0); 
    }
    40% { 
        transform: translateY(-10px); 
    }
    60% { 
        transform: translateY(-5px); 
    }
}

@keyframes softBounce {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-5px); 
    }
}

@keyframes wiggle {
    0%, 100% { 
        transform: rotate(0deg); 
    }
    25% { 
        transform: rotate(-3deg); 
    }
    75% { 
        transform: rotate(3deg); 
    }
}

@keyframes shake {
    0%, 100% { 
        transform: translateX(0); 
    }
    25% { 
        transform: translateX(-3px); 
    }
    75% { 
        transform: translateX(3px); 
    }
}

@keyframes heartbeat {
    0%, 100% { 
        transform: scale(1); 
    }
    25% { 
        transform: scale(1.1); 
    }
    50% { 
        transform: scale(1.2); 
    }
    75% { 
        transform: scale(1.1); 
    }
}

/* Rotation Animations */
@keyframes rotate360 {
    from { 
        transform: rotate(0deg); 
    }
    to { 
        transform: rotate(360deg); 
    }
}

@keyframes slowRotate {
    from { 
        transform: rotate(0deg); 
    }
    to { 
        transform: rotate(360deg); 
    }
}

@keyframes reverseRotate {
    from { 
        transform: rotate(360deg); 
    }
    to { 
        transform: rotate(0deg); 
    }
}

/* Slide Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Price and Badge Animations */
@keyframes priceGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
        color: var(--accent-gold);
    }
    50% {
        text-shadow: 0 0 15px rgba(212, 175, 55, 0.8),
                     0 0 25px rgba(212, 175, 55, 0.6);
        color: #FFD700;
    }
}

@keyframes badgePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    }
}

@keyframes savingsHighlight {
    0% {
        background: #e74c3c;
        transform: scale(1);
    }
    50% {
        background: #c0392b;
        transform: scale(1.1);
    }
    100% {
        background: #e74c3c;
        transform: scale(1);
    }
}

/* Loading and Processing Animations */
@keyframes loading {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.5; 
    }
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow: .25em 0 0 rgba(0,0,0,0),
                     .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: var(--accent-gold);
        text-shadow: .25em 0 0 rgba(0,0,0,0),
                     .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow: .25em 0 0 var(--accent-gold),
                     .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow: .25em 0 0 var(--accent-gold),
                     .5em 0 0 var(--accent-gold);
    }
}

/* Attention-Grabbing Animations */
@keyframes attention {
    0% {
        transform: scale(1);
    }
    10%, 20% {
        transform: scale(0.9) rotate(-3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale(1.1) rotate(3deg);
    }
    40%, 60%, 80% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

@keyframes notification {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    15% {
        transform: translateX(0);
        opacity: 1;
    }
    85% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Background Pattern Animations */
@keyframes patternMove {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 100%;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animation Classes */

/* Basic Animations */
.animate-fade-in { animation: fadeIn 0.8s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out forwards; }
.animate-fade-in-down { animation: fadeInDown 0.8s ease-out forwards; }
.animate-fade-in-left { animation: fadeInLeft 0.8s ease-out forwards; }
.animate-fade-in-right { animation: fadeInRight 0.8s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.6s ease-out forwards; }

/* Jewelry Animations */
.animate-sparkle { animation: sparkle 2.5s ease-in-out infinite; }
.animate-shimmer { 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}
.animate-glint { animation: glint 3s ease-in-out infinite; }
.animate-sway { animation: sway 4s ease-in-out infinite; }
.animate-swing { animation: gentleSwing 3s ease-in-out infinite; }
.animate-dangle { animation: dangling 3.5s ease-in-out infinite; }

/* Movement Animations */
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-bounce { animation: bounce 2s infinite; }
.animate-soft-bounce { animation: softBounce 2s ease-in-out infinite; }
.animate-wiggle { animation: wiggle 0.5s ease-in-out; }
.animate-shake { animation: shake 0.6s ease-in-out infinite; }
.animate-heartbeat { animation: heartbeat 1.5s ease-in-out infinite; }

/* Rotation Animations */
.animate-rotate { animation: rotate360 10s linear infinite; }
.animate-slow-rotate { animation: slowRotate 20s linear infinite; }
.animate-reverse-rotate { animation: reverseRotate 15s linear infinite; }

/* Slide Animations */
.animate-slide-in-left { animation: slideInLeft 0.8s ease-out forwards; }
.animate-slide-in-right { animation: slideInRight 0.8s ease-out forwards; }
.animate-slide-up { animation: slideUp 0.6s ease-out forwards; }
.animate-slide-down { animation: slideDown 0.6s ease-out forwards; }

/* Price and Badge Animations */
.animate-price-glow { animation: priceGlow 2s ease-in-out infinite; }
.animate-badge-pulse { animation: badgePulse 2s ease-in-out infinite; }
.animate-savings { animation: savingsHighlight 1.5s ease-in-out infinite; }

/* Utility Animations */
.animate-loading { animation: loading 1.5s ease-in-out infinite; }
.animate-dots::after { 
    content: "...";
    animation: dots 1.5s steps(5, end) infinite;
}
.animate-attention { animation: attention 2s ease-in-out; }

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.hover-glow {
    transition: all 0.3s ease;
}
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
    transform: scale(1.02);
}

.hover-scale {
    transition: transform 0.3s ease;
}
.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}
.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-sparkle:hover {
    animation: sparkle 0.8s ease-in-out;
}

/* Stagger Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* Duration Modifiers */
.duration-fast { animation-duration: 0.3s; }
.duration-normal { animation-duration: 0.8s; }
.duration-slow { animation-duration: 1.5s; }
.duration-slower { animation-duration: 3s; }

/* Animation States */
.animate-paused { animation-play-state: paused; }
.animate-running { animation-play-state: running; }

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Performance Optimizations */
.will-change-transform { will-change: transform; }
.will-change-opacity { will-change: opacity; }
.will-change-auto { will-change: auto; }

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-sparkle,
    .animate-float,
    .animate-bounce,
    .animate-sway,
    .animate-rotate {
        animation: none !important;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Reduce animation intensity on mobile */
    .animate-float { animation: softBounce 4s ease-in-out infinite; }
    .animate-sparkle { animation-duration: 3s; }
    .animate-sway { animation-duration: 5s; }
    
    /* Faster animations for better mobile experience */
    .animate-fade-in-up,
    .animate-slide-in-left,
    .animate-slide-in-right {
        animation-duration: 0.6s;
    }
}

/* High-performance mode */
@media (max-width: 480px) {
    .animate-rotate,
    .animate-slow-rotate,
    .animate-shimmer {
        animation: none;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    .animate-glint {
        animation: glint 3s ease-in-out infinite;
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    }
}