/**
 * ShoppingNarso - Micro-Interactions & Animations
 */

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

@keyframes floatBlob {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  50% {
    transform: translate(24px, -30px) scale(1.08);
  }
  100% {
    transform: translate(-18px, 20px) scale(0.96);
  }
}

@keyframes heartPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shimmerSweep {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes modalPop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes textRevealUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered word animation in hero headline */
.reveal-word {
  display: inline-block;
  opacity: 0;
  animation: textRevealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-word:nth-child(1) {
  animation-delay: 0.1s;
}

.reveal-word:nth-child(2) {
  animation-delay: 0.25s;
}

.reveal-word:nth-child(3) {
  animation-delay: 0.4s;
}

/* Wishlist heart pop animation class */
.pop-anim {
  animation: heartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Shimmer CTA effect on hover */
.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 20%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 80%
  );
  transform: rotate(30deg);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn-shimmer:hover::after {
  opacity: 1;
  animation: shimmerSweep 1.2s infinite;
}

/* Fallback placeholder styling when images are loading or missing */
.has-placeholder-fallback {
  background: linear-gradient(135deg, #3b1f4a 0%, #572d6d 50%, #251230 100%) !important;
}

/* Accessibility: Reduced Motion */
@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;
  }

  .rotating-badge-wrap,
  .hero-blob {
    animation: none !important;
  }

  .arch-card {
    transition: none !important;
  }

  .reveal-word {
    opacity: 1 !important;
    transform: none !important;
  }
}
