/* ============================================================
   SILVI SAREE HOUSE — ANIMATIONS & TRANSITIONS
   ============================================================ */

/* ─── KEYFRAMES ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes heroScale {
  0%   { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes wishlistPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

@keyframes cartBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.4); }
  60%  { transform: scale(0.85); }
  100% { transform: scale(1); }
}

@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-30px); }
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── HERO ANIMATIONS ─── */
.hero__bg-image {
  animation: heroScale 1.5s var(--ease-elegant) forwards;
}

.hero__eyebrow {
  animation: heroReveal 0.8s var(--ease-elegant) 0.2s both;
}

.hero__headline {
  animation: heroReveal 0.9s var(--ease-elegant) 0.4s both;
}

.hero__subtext {
  animation: heroReveal 0.9s var(--ease-elegant) 0.6s both;
}

.hero__actions {
  animation: heroReveal 0.9s var(--ease-elegant) 0.8s both;
}

/* ─── PAGE TRANSITION ─── */
.page-enter {
  animation: fadeIn 0.4s var(--ease-elegant) both;
}

/* ─── WISHLIST POP ─── */
.wishlist-pop {
  animation: wishlistPop 0.4s var(--ease-spring);
}

/* ─── CART BOUNCE ─── */
.cart-bounce {
  animation: cartBounce 0.4s var(--ease-spring);
}

/* ─── FLOAT UP NOTIFICATION ─── */
.float-notification {
  position: fixed;
  pointer-events: none;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  z-index: var(--z-toast);
  animation: floatUp 0.8s var(--ease-elegant) forwards;
}

/* ─── MARQUEE ─── */
.marquee-track {
  display: flex;
  overflow: hidden;
  user-select: none;
}

.marquee-content {
  display: flex;
  animation: marquee 30s linear infinite;
  flex-shrink: 0;
}

.marquee-content:nth-child(2) {
  flex-shrink: 0;
}

/* ─── PARALLAX EFFECT ─── */
.parallax {
  will-change: transform;
}

/* ─── IMAGE REVEAL ─── */
.img-reveal {
  overflow: hidden;
}

.img-reveal img {
  transform: scale(1.1);
  transition: transform var(--duration-reveal) var(--ease-elegant);
}

.img-reveal.revealed img {
  transform: scale(1);
}

/* ─── STAGGER ─── */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-elegant),
              transform var(--duration-slow) var(--ease-elegant);
}

.stagger-children.revealed > *:nth-child(1) { opacity:1; transform:none; transition-delay: 0ms; }
.stagger-children.revealed > *:nth-child(2) { opacity:1; transform:none; transition-delay: 80ms; }
.stagger-children.revealed > *:nth-child(3) { opacity:1; transform:none; transition-delay: 160ms; }
.stagger-children.revealed > *:nth-child(4) { opacity:1; transform:none; transition-delay: 240ms; }
.stagger-children.revealed > *:nth-child(5) { opacity:1; transform:none; transition-delay: 320ms; }
.stagger-children.revealed > *:nth-child(6) { opacity:1; transform:none; transition-delay: 400ms; }
.stagger-children.revealed > *:nth-child(7) { opacity:1; transform:none; transition-delay: 480ms; }
.stagger-children.revealed > *:nth-child(8) { opacity:1; transform:none; transition-delay: 560ms; }

/* ─── HOVER LIFT ─── */
.hover-lift {
  transition: transform var(--duration-base) var(--ease-elegant),
              box-shadow var(--duration-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ─── TEXT SHIMMER ─── */
.text-shimmer {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ─── LOADING SPINNER ─── */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}

/* ─── REDUCED MOTION FALLBACKS ─── */
@media (prefers-reduced-motion: reduce) {
  .hero__bg-image,
  .hero__eyebrow,
  .hero__headline,
  .hero__subtext,
  .hero__actions {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .marquee-content {
    animation: none;
  }

  .stagger-children > *,
  .stagger-children.revealed > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal,
  .reveal.revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
