/* =========================================================================
   dealers.css — the official-dealer logo strip.

   White cards on the page's own tint, a logo centred in each, the row
   scrolling horizontally when there are more than fit. Deliberately the
   quietest band on the page: these are other people's trademarks and the job
   is to show that the shop is authorised, not to advertise them.
   ========================================================================= */

.bedi-dealers {
	margin-block: var(--bedi-space-8);
}

.bedi-dealers__title {
	color: var(--bedi-ink);
	font-family: var(--bedi-font-display);
	font-size: clamp(1.375rem, 2.6vw, 1.875rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 var(--bedi-space-5);
	text-align: center;
}

.bedi-dealers__track {
	display: grid;
	gap: var(--bedi-space-4);
	grid-auto-columns: minmax(180px, 1fr);
	grid-auto-flow: column;
	list-style: none;
	margin: 0;
	overflow-x: auto;
	padding: 0 0 var(--bedi-space-2);
	scroll-snap-type: x mandatory;
	/*
	 * The scrollbar is hidden on the platforms that let it be, because this is
	 * a decorative strip and a permanent grey bar under seven logos is louder
	 * than the logos. The track stays keyboard-scrollable either way — see the
	 * tabindex on it — so nothing is stranded by hiding it.
	 */
	scrollbar-width: none;
}

.bedi-dealers__track::-webkit-scrollbar { display: none; }

.bedi-dealers__track:focus-visible {
	outline: 3px solid var(--bedi-accent);
	outline-offset: 4px;
}

.bedi-dealers__item {
	align-items: center;
	background-color: var(--bedi-surface);
	border: var(--bedi-border-width) solid var(--bedi-rule);
	border-radius: var(--bedi-radius-lg);
	display: flex;
	justify-content: center;
	min-block-size: 120px;
	padding: var(--bedi-space-4) var(--bedi-space-5);
	scroll-snap-align: start;
}

/*
 * CONTAIN, AND A HEIGHT CAP RATHER THAN A WIDTH.
 *
 * These arrive at whatever aspect the client uploaded — a wordmark like
 * "SAMSUNG" is five times as wide as it is tall, a roundel is square. Capping
 * the HEIGHT and letting width follow is what makes a row of both sit on one
 * optical line; capping the width would draw the roundel at a fifth the size
 * of the wordmark.
 */
.bedi-dealers__logo {
	block-size: auto;
	display: block;
	inline-size: auto;
	max-block-size: 56px;
	max-inline-size: 100%;
	object-fit: contain;
}

@media (max-width: 47.9375em) {
	.bedi-dealers {
		margin-block: var(--bedi-space-6);
	}

	.bedi-dealers__track {
		grid-auto-columns: minmax(140px, 1fr);
	}

	.bedi-dealers__item {
		min-block-size: 92px;
		padding: var(--bedi-space-3);
	}

	.bedi-dealers__logo { max-block-size: 40px; }
}
