/**
 * Animation Styles
 * Smooth animations and transitions
 */

/* ==========================================
   MOBILE TOUCH ANIMATIONS
   ========================================== */

/* Ripple Effect Animation */
@keyframes ripple-animation {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Touch Active State */
.touch-active {
    transform: scale(0.98);
    opacity: 0.9;
    transition: all 0.1s ease;
}

.touch-hold {
    transform: scale(0.96);
    opacity: 0.85;
}

/* Touch Highlight for Cards */
.product-card.touch-active {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Button Touch States */
.btn.touch-active {
    transform: scale(0.97);
}

.header-action-btn.touch-active {
    background: rgba(44, 95, 45, 0.1);
}

/* Badge Pulse Animation */
@keyframes badge-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        background: #ff0000;
    }
    100% {
        transform: scale(1);
    }
}

.badge-pulse {
    animation: badge-pulse 0.6s ease;
}

/* ==========================================
   FADE ANIMATIONS
   ========================================== */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

@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
   ========================================== */
.scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-up {
    animation: scaleUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.95);
    }
    to {
        transform: scale(1);
    }
}

/* ==========================================
   SLIDE ANIMATIONS
   ========================================== */
.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ==========================================
   BOUNCE ANIMATIONS
   ========================================== */
.bounce {
    animation: bounce 1s infinite;
}

.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@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);
    }
}

/* ==========================================
   ROTATE ANIMATIONS
   ========================================== */
.rotate {
    animation: rotate 2s linear infinite;
}

.rotate-slow {
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   PULSE ANIMATIONS
   ========================================== */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.pulse-fast {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ==========================================
   SHAKE ANIMATIONS
   ========================================== */
.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

/* ==========================================
   GLOW ANIMATIONS
   ========================================== */
.glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(44, 95, 45, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(44, 95, 45, 0.8), 0 0 30px rgba(44, 95, 45, 0.6);
    }
}

/* ==========================================
   SHIMMER EFFECT
   ========================================== */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ==========================================
   FLOAT ANIMATION
   ========================================== */
.float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* ==========================================
   WAVE ANIMATION
   ========================================== */
.wave {
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-10px);
    }
    75% {
        transform: translateY(10px);
    }
}

/* ==========================================
   FLIP ANIMATIONS
   ========================================== */
.flip-x {
    animation: flipX 0.6s ease;
}

.flip-y {
    animation: flipY 0.6s ease;
}

@keyframes flipX {
    0% {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    100% {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

@keyframes flipY {
    0% {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }
    100% {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

/* ==========================================
   ZOOM ANIMATIONS
   ========================================== */
.zoom-in {
    animation: zoomIn 0.5s ease;
}

.zoom-out {
    animation: zoomOut 0.5s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    50% {
        opacity: 1;
    }
}

@keyframes zoomOut {
    from {
        opacity: 1;
    }
    50% {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    to {
        opacity: 0;
    }
}

/* ==========================================
   HEARTBEAT ANIMATION
   ========================================== */
.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(0.9);
    }
    20%, 40% {
        transform: scale(1.1);
    }
}

/* ==========================================
   TYPING ANIMATION
   ========================================== */
.typing {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: 
        typing 3.5s steps(40) 1s both,
        blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ==========================================
   GRADIENT ANIMATION
   ========================================== */
.gradient-animate {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ==========================================
   RIPPLE EFFECT
   ========================================== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* ==========================================
   HOVER ANIMATIONS
   ========================================== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.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-tilt {
    transition: transform 0.3s ease;
}

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(10deg);
}

/* ==========================================
   LOADING ANIMATIONS
   ========================================== */
.spinner {
    animation: rotate 1s linear infinite;
}

.dots::after {
    content: '.';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60% {
        content: '...';
    }
    80%, 100% {
        content: '';
    }
}

/* ==========================================
   SCROLL REVEAL ANIMATIONS
   ========================================== */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* ==========================================
   PAGE TRANSITION
   ========================================== */
.page-transition {
    animation: pageTransition 0.5s ease-in-out;
}

@keyframes pageTransition {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   DELAY CLASSES
   ========================================== */
.delay-1 {animation-delay: 0.1s;}
.delay-2 {animation-delay: 0.2s;}
.delay-3 {animation-delay: 0.3s;}
.delay-4 {animation-delay: 0.4s;}
.delay-5 {animation-delay: 0.5s;}

/* ==========================================
   DURATION CLASSES
   ========================================== */
.duration-fast {animation-duration: 0.3s;}
.duration-normal {animation-duration: 0.6s;}
.duration-slow {animation-duration: 1s;}

/* ==========================================
   ECOMMERCE ICON ANIMATIONS
   ========================================== */
.ecommerce-icon-float {
    animation: ecommerceFloat 4s ease-in-out infinite;
}

.ecommerce-icon-float-delayed {
    animation: ecommerceFloat 4s ease-in-out infinite 2s;
}

@keyframes ecommerceFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-10px) rotate(0deg);
    }
    75% {
        transform: translateY(-25px) rotate(-5deg);
    }
}

.ecommerce-icon-glow {
    animation: ecommerceGlow 3s ease-in-out infinite;
}

@keyframes ecommerceGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(44, 95, 45, 0.3),
                    0 0 40px rgba(44, 95, 45, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(44, 95, 45, 0.5),
                    0 0 60px rgba(44, 95, 45, 0.3),
                    0 0 80px rgba(44, 95, 45, 0.2);
    }
}
