/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

@keyframes warranty-glow {
    0% {
        box-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
    }
    100% {
        box-shadow: 0 0 20px rgba(46, 204, 113, 0.8);
    }
}

@keyframes zoomIn {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.slide-up {
    animation: slideUp 0.8s ease forwards;
}

.fade-in-left {
    animation: slideInLeft 0.8s ease forwards;
}

.fade-in-right {
    animation: slideInRight 0.8s ease forwards;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.zoom-on-hover {
    transition: transform 0.3s ease;
}

.zoom-on-hover:hover {
    animation: zoomIn 0.3s ease forwards;
}

/* Staggered Animation Delays */
.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }
.fade-in:nth-child(6) { animation-delay: 0.6s; }

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Loading Animation */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Additional Animations for Home Page */

/* Hero Title Animation */
@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    animation: titleReveal 1s ease forwards;
}

.hero-subtitle {
    animation: titleReveal 1s ease forwards 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Staggered Card Animation */
@keyframes cardStagger {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.intro-card:nth-child(1) {
    animation: cardStagger 0.6s ease forwards 0.2s;
    opacity: 0;
}

.intro-card:nth-child(2) {
    animation: cardStagger 0.6s ease forwards 0.4s;
    opacity: 0;
}

.intro-card:nth-child(3) {
    animation: cardStagger 0.6s ease forwards 0.6s;
    opacity: 0;
}

/* Product Card Hover Effect */
@keyframes cardHover {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(-5px);
    }
}

.product-card:hover {
    animation: cardHover 0.3s ease forwards;
}

/* Custom Section Glow */
@keyframes sectionGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.5);
    }
}

.custom-section {
    animation: sectionGlow 4s ease-in-out infinite;
}

/* Button Hover Animation */
@keyframes buttonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(230, 126, 34, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0);
    }
}

.btn-primary:hover {
    animation: buttonPulse 1s infinite;
}

/* Testimonial Slide Animation */
@keyframes testimonialSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.testimonial-card {
    animation: testimonialSlide 0.8s ease forwards;
    opacity: 0;
}

.testimonial-card:nth-child(1) {
    animation-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Scroll Reveal Animation */
.section-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.intro-section,
.featured-section,
.custom-section,
.testimonials-section,
.cta-section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}