/*
 * The brand logo strip [wc_brand_carousel] (inc/brands/strip.php, assets/js/slider.js).
 * The placement of 2026: grey logos in a row inside the page width, 7 from 1024 px, 6 from 768, 5 from
 * 480 and 3 below, colour on hover, the arrows just outside the row (kept on screen on phones).
 */
.wc-brand-carousel {
	--nx-per: 3;
	--nx-step: 1;
	position: relative;
	margin: 10px 0;
}
@media (min-width: 480px) {
	.wc-brand-carousel { --nx-per: 5; }
}
@media (min-width: 768px) {
	.wc-brand-carousel { --nx-per: 6; --nx-step: 2; }
}
@media (min-width: 1024px) {
	.wc-brand-carousel { --nx-per: 7; }
}

.wc-brand-carousel .nx-track {
	position: relative;
	display: flex;
	align-items: flex-start;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.wc-brand-carousel .nx-track::-webkit-scrollbar { display: none; }
.wc-brand-carousel.nx-still .nx-clone { display: none; }

.wc-brand-item {
	flex: 0 0 calc(100% / var(--nx-per));
	min-width: 0;
	box-sizing: border-box;
	padding: 10px;
	text-align: center;
	scroll-snap-align: start;
}
.wc-brand-item a { display: block; }
.wc-brand-item img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 80px;
	margin: 0 auto;
	filter: grayscale(100%);
	opacity: 0.7;
	transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}
.wc-brand-item a:hover img,
.wc-brand-item a:focus-visible img {
	filter: none;
	opacity: 1;
	transform: scale(1.05);
}
.wc-brand-item a:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

.wc-prev,
.wc-next {
	position: absolute;
	top: 50%;
	z-index: 7; /* Below the sticky nav. */
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #444;
	font: inherit;
	font-size: 20px;
	line-height: 38px;
	text-align: center;
	cursor: pointer;
	transform: translateY(-50%);
}
/* 20 px outside the row, or up to the screen's edge where the page margin is narrower. */
.wc-prev { left: max(-20px, (100% - 100vw) / 2); }
.wc-next { right: max(-20px, (100% - 100vw) / 2); }
.wc-prev[hidden],
.wc-next[hidden] { display: none; }
.wc-prev:focus-visible,
.wc-next:focus-visible { outline: 2px solid #000; outline-offset: -2px; }
@media (hover: hover) and (min-width: 1024px) {
	.wc-prev:hover,
	.wc-next:hover { background: #000; color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
	.wc-brand-item img { transition: none; }
}
