/* ============================================
   PIMBA AÍ — Micro-animations
   ============================================ */

/* ---- Card entrance ---- */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-card {
  animation: cardFadeIn 0.4s ease both;
}
.product-card:nth-child(1) { animation-delay: 0.03s; }
.product-card:nth-child(2) { animation-delay: 0.06s; }
.product-card:nth-child(3) { animation-delay: 0.09s; }
.product-card:nth-child(4) { animation-delay: 0.12s; }
.product-card:nth-child(5) { animation-delay: 0.15s; }
.product-card:nth-child(6) { animation-delay: 0.18s; }
.product-card:nth-child(7) { animation-delay: 0.21s; }
.product-card:nth-child(8) { animation-delay: 0.24s; }

/* ---- Slide up (modals, drawers) ---- */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ---- Fade in ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- Scale pop (badges, toasts) ---- */
@keyframes scalePop {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---- Pulse (attention) ---- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ---- Badge bounce ---- */
@keyframes badgeBounce {
  0% { transform: scale(0.5) rotate(-8deg); opacity: 0; }
  60% { transform: scale(1.1) rotate(2deg); }
  100% { transform: scale(1) rotate(-3deg); opacity: 1; }
}

.badge-discount {
  animation: badgeBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.2s;
}

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

.skeleton {
  background: linear-gradient(90deg,
    var(--gray-100) 25%,
    var(--gray-50) 50%,
    var(--gray-100) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-md);
}

.skeleton--text {
  height: 14px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-sm);
}
.skeleton--text:last-child { width: 60%; }

.skeleton--card {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
}

.skeleton--price {
  height: 24px;
  width: 120px;
}

.skeleton--btn {
  height: 42px;
  border-radius: var(--radius-md);
}

/* ---- Coupon copy feedback ---- */
@keyframes copiedCheck {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ---- Hero entrance ---- */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__tagline { animation: heroFadeUp 0.6s ease both; animation-delay: 0.1s; }
.hero__title { animation: heroFadeUp 0.6s ease both; animation-delay: 0.2s; }
.hero__subtitle { animation: heroFadeUp 0.6s ease both; animation-delay: 0.3s; }
.hero__search { animation: heroFadeUp 0.6s ease both; animation-delay: 0.4s; }

/* ---- Section entrance (triggered by IntersectionObserver) ---- */
.section[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.section[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Floating button pulse ---- */
.channel-float {
  animation: channelPulse 3s ease-in-out infinite;
}

@keyframes channelPulse {
  0%, 100% { box-shadow: var(--shadow-lg); }
  50% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), var(--shadow-lg); }
}

.channel-float.telegram {
  animation-name: channelPulseTelegram;
}

@keyframes channelPulseTelegram {
  0%, 100% { box-shadow: var(--shadow-lg); }
  50% { box-shadow: 0 8px 24px rgba(34, 158, 217, 0.4), var(--shadow-lg); }
}
