/**
 * Desktop-to-mobile collapse uses max-width because the desktop layout is the source and small screens simplify it. Queries are rem; 782px is the admin-bar exception only.
 *
 * Related Products section — same-category product carousel.
 *
 * Cards come from assets/css/components/product-card.css.
 */

.related-products {
	width: var(--content-shell);
	margin-inline: auto;
	padding-block: var(--section-pad-block);
}

.related-products__inner {
	display: flex;
	flex-direction: column;
	gap: var(--space-xl);
}

.related-products__heading {
	margin: 0;
	color: var(--color-neutral-950);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: var(--font-weight-bold);
	line-height: 0.9;
}

.related-products__carousel-wrap {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--space-md);
}

.related-products__slider {
	flex: 1 1 0%;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
}

.related-products__slider.is-swipeable {
	touch-action: pan-y pinch-zoom;
	cursor: grab;
}

.related-products__slider.is-swipeable img,
.related-products__slider a {
	-webkit-user-drag: none;
	user-select: none;
}

.related-products__slide {
	height: auto;
}

.related-products__slide .product-card {
	height: 100%;
}

.related-products__nav {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 0.75rem;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.related-products__nav img {
	display: block;
	width: 0.75rem;
	height: 2.625rem;
	object-fit: contain;
}

.related-products__nav:hover,
.related-products__nav:focus-visible {
	opacity: 0.7;
	outline: none;
}

.related-products__nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.related-products__pagination {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
}

.related-products__pagination .swiper-pagination-bullet {
	width: 0.5rem;
	height: 0.5rem;
	margin: 0;
	background: var(--color-neutral-950);
	opacity: 0.25;
}

.related-products__pagination .swiper-pagination-bullet-active {
	opacity: 1;
	background: var(--color-brand-primary);
}

@media (max-width: 40rem) {
	.related-products {
		width: var(--content-shell);
	}

	.related-products__carousel-wrap {
		flex-direction: column;
	}

	.related-products__nav {
		display: none;
	}
}
