/* أنميشن وتأثيرات مخصصة */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulseSlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}
@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  80% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes flyToCart {
  to { transform: translate(var(--fly-x), var(--fly-y)) scale(0.1); opacity: 0; }
}

.animate-fade-up { animation: fadeUp 0.6s ease both; }
.animate-fade-in { animation: fadeIn 0.5s ease both; }
.animate-bounce-slow { animation: bounceSlow 2.5s ease-in-out infinite; }
.animate-pulse-slow { animation: pulseSlow 2s ease-in-out infinite; }
.animate-pop { animation: popIn 0.35s ease both; }

.stagger > * { opacity: 0; animation: fadeUp 0.6s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }

.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px -10px rgba(109, 40, 217, 0.25);
}
.product-card img {
  transition: transform 0.4s ease;
}
.product-card:hover img {
  transform: scale(1.06);
}

.fly-img {
  position: fixed;
  z-index: 100;
  width: 70px;
  height: 70px;
  border-radius: 12px;
  object-fit: cover;
  pointer-events: none;
  animation: flyToCart 0.7s cubic-bezier(0.5, -0.2, 0.8, 0.6) forwards;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 8px);
}

html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: #c4b5fd; border-radius: 8px; }
