/* ==========================================================================
   KAYAN LUXURY FASHION — ANIMATIONS & KEYFRAMES
   ========================================================================== */

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

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-secondary) 25%,
    var(--color-surface-hover) 37%,
    var(--color-bg-secondary) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-xs);
}

/* Marquee Animations */
@keyframes marqueeLeft {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes marqueeRight {
  0% { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
  animation: marqueeLeft 32s linear infinite;
}

.marquee-track.reverse {
  animation: marqueeRight 32s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* Badge Pulsing */
@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(201, 138, 76, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(201, 138, 76, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(201, 138, 76, 0); }
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent);
  border-radius: 50%;
  display: inline-block;
  animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Heart Particle Burst */
@keyframes heartBurstEffect {
  0% { transform: scale(0.8); }
  45% { transform: scale(1.35); }
  75% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.heart-burst {
  animation: heartBurstEffect 480ms var(--ease-spring) forwards;
}

/* Cart Badge Pop */
@keyframes badgePop {
  0% { transform: scale(0.6); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.badge-pop {
  animation: badgePop 350ms var(--ease-spring) forwards;
}

/* Button Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleEffect 600ms linear;
  background-color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Floating animation */
@keyframes subtleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

/* Spin animation */
@keyframes spinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spinClockwise 12s linear infinite;
}

/* Page Transition Curtain Wipe */
.transition-curtain {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-transition-wipe);
  background: var(--brand-obsidian-ink);
  transform: translateY(100%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-md);
  color: var(--brand-raw-alabaster);
}

.transition-curtain .curtain-logo {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: 0.35em;
  opacity: 0;
  transform: translateY(20px);
}

/* Theme Toggle Circular Reveal */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
