/* ============================================
   AMA - Animation Styles
   ============================================ */

/* === Page Transition === */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--color-black);
  z-index: 9999;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

.page-transition.active {
  transform: scaleY(1);
  transform-origin: bottom;
}

/* === Stagger Children === */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerIn 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.8s; }

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Float Animation === */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.float {
  animation: float 6s ease-in-out infinite;
}

.float-delay-1 { animation-delay: 1s; }
.float-delay-2 { animation-delay: 2s; }
.float-delay-3 { animation-delay: 3s; }

/* === Shimmer === */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, 
    var(--surface-secondary) 25%, 
    var(--surface-glass) 50%, 
    var(--surface-secondary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* === Pulse Glow === */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(201,168,78,0.1); }
  50% { box-shadow: 0 0 40px rgba(201,168,78,0.25); }
}

.pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

/* === Heart Beat === */
@keyframes heartBeat {
  0% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.2); }
  60% { transform: scale(1); }
}

.heart-beat {
  animation: heartBeat 0.6s ease-in-out;
}

/* === Slide Up === */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* === Slide In Right === */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
  animation: slideInRight 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* === Fade In === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* === Scale In === */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.scale-in {
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* === Cart Item Added === */
@keyframes cartBounce {
  0% { transform: scale(1); }
  25% { transform: scale(0.95); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.cart-bounce {
  animation: cartBounce 0.3s ease;
}

/* === Skeleton Loading === */
@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.skeleton {
  background: var(--color-gray-200);
  border-radius: var(--radius-sm);
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

/* === Text Reveal === */
@keyframes textReveal {
  from { 
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }
  to { 
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

.text-reveal {
  animation: textReveal 0.8s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

/* === Smooth Scroll Offset === */
html {
  scroll-padding-top: 80px;
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
