/* =========================================================================
   Factorize Catalog - Infinite Scroll Enhancements
   =========================================================================
   Added: 2026-09-24
   
   Smooth fade-in for new cards, content-visibility for off-screen skipping,
   and image preloading from AJAX responses.
   ========================================================================= */

/* Grid gets content-visibility:auto so off-screen cards don't render */
.woocommerce ul.products,
ul.products {
	content-visibility: auto;
	contain-intrinsic-size: 1px 340px;
}

/* Fade in newly appended cards */
ul.products li.product.is-new-card a img {
	opacity: 0;
}
ul.products li.product.is-new-card {
	animation: wc-card-fade-in .4s ease forwards;
}

@keyframes wc-card-fade-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Scroll sentinel styling */
.et-scroll-sentinel {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 24px 0;
}
.et-scroll-spinner {
	width: 20px;
	height: 20px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: wc-scroll-spin 0.8s linear infinite;
}
.et-scroll-label {
	font-family: inherit;
	font-size: 13px;
	color: #666;
}
@keyframes wc-scroll-spin {
	to { transform: rotate(360deg); }
}
.et-scroll-end {
	font-family: inherit;
	font-size: 16px;
	color: #888;
	text-align: center;
	padding: 24px 0;
}
