/**
 * Enhanced Animations & Modern Effects
 * BangHotDeals Premium Theme
 * Version: 2.0
 */

/* ================================
   ADVANCED ANIMATIONS
   ================================ */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Scale */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

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

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.8);
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Skeleton Loading */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* ================================
   SCROLL REVEAL ANIMATIONS
   ================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ================================
   GLASSMORPHISM EFFECTS
   ================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ================================
   MODERN CARD EFFECTS
   ================================ */
.card-3d-hover {
    perspective: 1000px;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-3d-hover:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.6s;
}

.card-shine:hover::before {
    left: 100%;
}

/* ================================
   GRADIENT BACKGROUNDS
   ================================ */
.gradient-purple-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

.gradient-sunset {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

.gradient-ocean {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

.gradient-forest {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* ================================
   BUTTON ENHANCEMENTS
   ================================ */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-modern::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;
}

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

.btn-glow {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.btn-glow:hover {
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.8);
    transform: scale(1.05);
}

/* ================================
   LOADING STATES
   ================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0px,
        #e0e0e0 40px,
        #f0f0f0 80px
    );
    background-size: 200px;
    animation: skeleton-loading 1.5s infinite;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: rotate360 1s linear infinite;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: pulseGlow 2s ease infinite;
}

/* ================================
   PRODUCT CARD ENHANCEMENTS
   ================================ */
.product-card-enhanced {
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0);
    transition: box-shadow 0.4s;
    pointer-events: none;
}

.product-card-enhanced:hover::after {
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.product-card-enhanced:hover {
    transform: translateY(-12px) scale(1.02);
}

/* ================================
   HERO SECTION EFFECTS
   ================================ */
.hero-section-modern {
    position: relative;
    overflow: hidden;
}

.hero-floating-element {
    animation: float 6s ease-in-out infinite;
}

.hero-floating-element:nth-child(2) {
    animation-delay: 1s;
    animation-duration: 8s;
}

.hero-floating-element:nth-child(3) {
    animation-delay: 2s;
    animation-duration: 10s;
}

/* ================================
   TEXT EFFECTS
   ================================ */
.text-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shimmer {
    background: linear-gradient(
        90deg,
        #667eea 0%,
        #ffffff 50%,
        #667eea 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

.text-glow {
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
}

/* ================================
   BADGE & TAG EFFECTS
   ================================ */
.badge-animated {
    position: relative;
    animation: bounceIn 0.6s ease;
}

.badge-pulse {
    animation: pulseGlow 2s ease infinite;
}

.tag-modern {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s;
}

.tag-modern:hover {
    transform: scale(1.1);
}

/* ================================
   PARALLAX EFFECTS
   ================================ */
.parallax-slow {
    transform: translateZ(-1px) scale(2);
}

.parallax-medium {
    transform: translateZ(-2px) scale(3);
}

.parallax-fast {
    transform: translateZ(-3px) scale(4);
}

/* ================================
   MICRO-INTERACTIONS
   ================================ */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-brighten {
    transition: filter 0.3s;
}

.hover-brighten:hover {
    filter: brightness(1.1);
}

/* ================================
   RESPONSIVE ANIMATIONS
   ================================ */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .card-3d-hover:hover {
        transform: scale(1.02);
    }

    .product-card-enhanced:hover {
        transform: translateY(-5px);
    }

    /* Disable parallax on mobile for better performance */
    .parallax-slow,
    .parallax-medium,
    .parallax-fast {
        transform: none;
    }

    /* Simplify gradient animations */
    .gradient-purple-blue,
    .gradient-sunset,
    .gradient-ocean,
    .gradient-forest {
        animation: none;
    }
}

/* ================================
   ACCESSIBILITY
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================
   UTILITY CLASSES
   ================================ */
.fade-in {
    animation: fadeInUp 0.6s ease;
}

.fade-in-delayed {
    animation: fadeInUp 0.6s ease 0.2s both;
}

.bounce-in {
    animation: bounceIn 0.8s ease;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease;
}

.slide-in-right {
    animation: slideInRight 0.6s ease;
}

.z-depth-1 {
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.z-depth-2 {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.z-depth-3 {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.z-depth-4 {
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

.z-depth-5 {
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
