/* ==========================================================================
   ANIMATIONS.CSS - Keyframes, Micro-interactions & GSAP States
   ========================================================================== */

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Subtle Floating Animation for Hero Elements */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }
}

.animate-float {
  animation: floatSlow 5s ease-in-out infinite;
}

/* Pulse Badge Animation */
@keyframes pulseDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(166, 28, 36, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(166, 28, 36, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(166, 28, 36, 0);
  }
}

.pulse-badge::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
  margin-right: 6px;
}

/* Badge Bounce on Cart Add */
@keyframes cartBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35) rotate(-5deg); }
}

.badge-bump {
  animation: cartBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Magnetic Button Hover State */
.btn-magnetic {
  display: inline-flex;
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* GSAP Pre-animation Hidden State (ensures clean ScrollTrigger reveal) */
.gsap-reveal {
  opacity: 0;
  transform: translateY(30px);
  will-change: transform, opacity;
}

.gsap-stagger-item {
  opacity: 1;
  transform: none;
}

/* Glow Border Effect for Special Offers */
@keyframes glowBorder {
  0%, 100% { border-color: rgba(166, 28, 36, 0.3); }
  50% { border-color: rgba(166, 28, 36, 0.8); }
}

.deal-card-highlight {
  animation: glowBorder 3s infinite ease-in-out;
}

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