/* ==========================================================================
   Product Loop Module
   ========================================================================== */

.product-loop {
	position: relative;
}

/* Swiper layout */
.product-loop--swiper {
	position: relative;
	padding: 0 2.5rem;
}

@media (max-width: 767px) {
	.product-loop--swiper {
		padding: 0;
	}
}

.product-loop__swiper {
	overflow: hidden;
}

/* Navigation arrows */
.product-loop__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 50%;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}

.product-loop__nav:hover {
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
}

.product-loop__nav.swiper-button-disabled {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

.product-loop__nav--prev {
	left: 0;
}

.product-loop__nav--next {
	right: 0;
}

@media (max-width: 767px) {
	.product-loop__nav {
		display: none;
	}
}

/* Swiper slide sizing — match grid columns */
.product-loop--swiper .swiper-slide {
	height: auto;
}

/* Pagination (grid mode) */
.product-loop__pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.375rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--wp--preset--color--border);
}

.product-loop__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0.25rem 0.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--wp--preset--color--text);
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
	cursor: pointer;
}

.product-loop__pagination .page-numbers:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.product-loop__pagination .page-numbers.current {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--primary);
}

.product-loop__pagination .page-numbers.dots {
	border-color: transparent;
	cursor: default;
}

.product-loop__pagination .prev svg,
.product-loop__pagination .next svg {
	display: block;
}

/* Ensure cards in swiper fill slide height */
.product-loop--swiper .product-card {
	height: 100%;
}
