/* =============================================
   ANIMATION SYSTEM
   ============================================= */

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

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

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

@keyframes floatLeaf {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-15px) rotate(10deg);
    opacity: 1;
  }
}

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

@keyframes lidBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-3deg); }
}

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

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
    transform: translateY(80vh) translateX(10px) scale(1);
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-10vh) translateX(-20px) scale(0.5);
    opacity: 0;
  }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
  50% { box-shadow: 0 0 20px 5px rgba(76, 175, 80, 0.15); }
}

/* Fade-in classes (activated by JS) */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Particle styles */
.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-secondary);
  opacity: 0;
  pointer-events: none;
  animation: particleFloat linear infinite;
}

.particle:nth-child(odd) {
  background: var(--color-accent-highlight);
  width: 4px;
  height: 4px;
}

/* Add to cart animation */
.add-to-cart.added {
  animation: pulseGlow 0.6s ease;
}

/* Tray lights animation */
.tray-light {
  animation: pulseGlow 3s ease-in-out infinite;
}

.tray-1 .tray-light { animation-delay: 0s; }
.tray-2 .tray-light { animation-delay: 0.5s; }
.tray-3 .tray-light { animation-delay: 1s; }
.tray-4 .tray-light { animation-delay: 1.5s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .fade-in-up,
  .fade-in-right {
    opacity: 1;
    transform: none;
  }
  
  html {
    scroll-behavior: auto;
  }
}