/*
 * washington-mills/product-carousel. Every value is measured on the live source's Slick slider
 * (/products/bauxite-spinel, 1440x900, 2026-09-21) unless it says otherwise.
 *
 * Slider 470 wide; slides 470 wide; the dot list is 470x28. Source Slick renders it
 * `position: relative; bottom: -25px` -- a paint-only shift that does not enlarge the slider's
 * own flow box, so on the source page the dots visually overlap the 25px of whitespace below the
 * slider that the FOLLOWING row's own layout happens to leave there (measured 2026-09-27,
 * bauxite-spinel: slider flow-bottom 555.09, dots painted 580.09-608.09, next content 613.09 --
 * a real 5px gap after the dots, not an overlap of content).
 *
 * THIS THEME'S TEMPLATE HAS NO SUCH BUFFER: the image column and the title column are the same
 * row, and post-content starts immediately at that row's flow-bottom with blockGap 0
 * (units/product-detail.yml). Reproducing Slick's paint-only trick here made the dots overlap the
 * next heading by the full 25px at every viewport (reported 2026-09-27, 390: dots 701-729,
 * "Applications" h2 top 704 -- fixed here, not a spec/template change). Fixed by making the same
 * 25px gap real: `margin-top: 25px` on the dots list instead of `position: relative; bottom:
 * -25px`, so the slider's own box grows to include it and nothing after it moves up to overlap.
 * Same visual gap above the dots as the source; the mechanism differs because this template
 * gives the dots no free-standing buffer to paint into. `margin-bottom` adds the source's own
 * gap after the dots (measured 5px, snapped to the nearest spacing preset per
 * reference/sources/spacing-standard.md).
 *
 * Dots: `li` 20x20 with 5px side margins (30px pitch), a 15x15 border-box square with a 2px
 * #db240b (the `primary` slug) border, filled when current. Transition: Slick's default 500ms ease.
 */
.wm-product-carousel {
	position: relative;
	width: 100%;
}

.wm-product-carousel__viewport {
	overflow: hidden;
	touch-action: pan-y;
}

.wm-product-carousel__track {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	width: 100%;
	transition: transform 500ms ease;
	will-change: transform;
}

.wm-product-carousel__slide {
	flex: 0 0 100%;
	min-width: 0;
}

.wm-product-carousel__image {
	display: block;
	width: 100%;
	height: auto;
	user-select: none;
}

.wm-product-carousel__dots {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	/* Real flow spacing, not the source's paint-only `bottom: -25px` -- see the file header. */
	margin: 25px 0 var( --wp--preset--spacing--20 );
	/* Was 8px 0 0: snapped to spacing|20 (10px), 2026-09-25 (spacing-standard.md §1 item 3). */
	padding: var( --wp--preset--spacing--20 ) 0 0;
	height: 28px;
	list-style: none;
}

.wm-product-carousel__dot-item {
	position: relative;
	width: 20px;
	height: 20px;
	/* Was 0 5px: snapped to spacing|20 (10px a side), 2026-09-25 (spacing-standard.md §1 item 3,
	   "standard wins") -- a visible change to this carousel control, same fix as
	   text-image-carousel's own pagination dots. */
	margin: 0 var( --wp--preset--spacing--20 );
	padding: 0;
	list-style: none;
}

.wm-product-carousel__dot {
	position: static;
	display: block;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 5px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	appearance: none;
}

.wm-product-carousel__dot::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	box-sizing: border-box;
	width: 15px;
	height: 15px;
	border: 2px solid var(--wp--preset--color--primary);
	background-color: transparent;
}

.wm-product-carousel__dot.is-current::before {
	background-color: var(--wp--preset--color--primary);
}

/* Not in the source (WCAG 2.2 AA 2.4.7 binds markup we author): a visible focus ring. */
.wm-product-carousel__dot:focus-visible {
	outline: 2px solid var(--wp--preset--color--secondary);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {

	.wm-product-carousel__track {
		transition: none;
	}
}
