/* ==========================================================================
   Electro Daraz — Animations (lightweight, GPU-friendly transforms/opacity only)
   ========================================================================== */

@keyframes edFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes edFadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes edSlideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes edPulse {
	0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
	70%  { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
	100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
@keyframes edSkeletonShine {
	0% { background-position: -300px 0; }
	100% { background-position: 300px 0; }
}
@keyframes edSpin { to { transform: rotate(360deg); } }
@keyframes edRipple {
	from { transform: scale(0); opacity: .5; }
	to   { transform: scale(3); opacity: 0; }
}

/* Scroll-reveal utility: sections start slightly faded/lowered, then animate
   in once the .is-visible class is toggled by IntersectionObserver in main.js */
.fade-in-up { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.fade-in-up.is-visible { opacity: 1; transform: translateY(0); }

/* Button ripple effect */
.ed-btn, .ed-qa-btn, .woocommerce div.product form.cart .button, ul.products li.product .button {
	position: relative; overflow: hidden;
}
.ed-ripple {
	position: absolute; border-radius: 50%; background: rgba(255,255,255,.55);
	transform: scale(0); animation: edRipple .5s ease-out;
	pointer-events: none;
}

/* Loading skeleton (used while AJAX search / quick view content loads) */
.ed-skeleton {
	background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 37%, #eef0f3 63%);
	background-size: 400px 100%;
	animation: edSkeletonShine 1.4s ease infinite;
	border-radius: 6px;
}

.ed-spinner {
	width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
	border-radius: 50%; display: inline-block; animation: edSpin .6s linear infinite;
}

/* Add-to-cart success pulse on the cart icon */
.ed-cart-icon.ed-cart-bump { animation: edCartBump .4s ease; }
@keyframes edCartBump {
	0% { transform: scale(1); }
	40% { transform: scale(1.25); }
	100% { transform: scale(1); }
}

/* Wishlist heart fill animation */
.ed-add-wishlist.is-active { animation: edHeartPop .3s ease; }
@keyframes edHeartPop {
	0% { transform: scale(1); }
	50% { transform: scale(1.3); }
	100% { transform: scale(1); }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
