/**
 * VC Sale Products Infinite Scroll — styles
 */

/* ---- Wrapper ------------------------------------------------------------- */
.vc-sale-infinite-wrap {
	position: relative;
}

/* ---- Footer (sentinel / button / spinner / end-of-list message) ---------- */
.vc-sale-infinite-footer {
	text-align: center;
	padding: 24px 0 8px;
}

/* ---- Sentinel (invisible marker for IntersectionObserver) ---------------- */
.vc-sale-infinite-sentinel {
	display: block;
	height: 1px;
	visibility: hidden;
	pointer-events: none;
}

/* ---- "Load More" button -------------------------------------------------- */
.vc-sale-infinite-btn {
	display: inline-block;
	padding: 12px 32px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;
	cursor: pointer;
	border: 2px solid currentColor;
	border-radius: 4px;
	background: transparent;
	transition: background-color .2s ease, color .2s ease;
}

.vc-sale-infinite-btn:hover:not(:disabled) {
	background-color: #222;
	color: #fff;
}

.vc-sale-infinite-btn:disabled {
	opacity: .5;
	cursor: wait;
}

/* Button loading state — shows inline spinner next to swapped label */
.vc-sale-infinite-btn.is-loading {
	pointer-events: none;
	position: relative;
	padding-left: 44px;
}

.vc-sale-infinite-btn.is-loading::before {
	content: '';
	position: absolute;
	left: 16px;
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: vciSpin .7s linear infinite;
}

/* ---- Spinner ------------------------------------------------------------- */
.vc-sale-infinite-spinner {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #777;
	font-size: 14px;
}

.vc-sale-infinite-spinner__icon {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid rgba(0, 0, 0, .15);
	border-top-color: #333;
	border-radius: 50%;
	animation: vciSpin .8s linear infinite;
}

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

/* ---- "No more products" message ------------------------------------------ */
.vc-sale-infinite-no-more {
	margin: 0;
	color: #aaa;
	font-size: 13px;
	letter-spacing: .04em;
}

/* ---- Fade-in animation for AJAX-loaded products only --------------------- */
/* Initial products are visible immediately; only newly appended items animate.
   The .is-loading class is toggled by JS during AJAX append. */
.vc-sale-infinite-products .product.vc-sale-fadeIn {
	animation: vciFadeIn .35s ease both;
}

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