/* ==========================================================================
   OneStopMart by SRJ - Animations & Transitions
   Subtle micro-interactions, floating elements & scroll reveals
   ========================================================================== */

/* Keyframe Animations */
@keyframes floatSlow {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes floatReverse {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(8px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulseGreen {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 111, 107, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(79, 111, 107, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 111, 107, 0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating Utility Classes */
.animate-float {
  animation: floatSlow 5s ease-in-out infinite;
}

.animate-float-delay {
  animation: floatReverse 6s ease-in-out infinite 1s;
}

.animate-float-fast {
  animation: floatSlow 4s ease-in-out infinite 0.5s;
}

/* Scroll Reveal Classes */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays for child cards */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Subtle pulse dot */
.pulse-online {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 0 rgba(79, 111, 107, 0.4);
  animation: pulseGreen 2s infinite;
}

/* Accessibility: Respect Reduced Motion Preferences */
@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;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}
