/**
 * Front page product slider.
 *
 * Overrides the static `.block-rice` flex row with a sliding track. The track
 * keeps the same three-across desktop / stacked mobile proportions the static
 * layout had, so the section is visually unchanged when there is nothing to
 * scroll.
 */

.rice-carousel {
	position: relative;
	width: 100%;
}

.rice-carousel-viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.rice-carousel .block-rice.rice-carousel-track {
	flex-direction: row;
	flex-wrap: nowrap;
	will-change: transform;
}

.rice-carousel.is-animated .block-rice.rice-carousel-track {
	transition: transform 700ms cubic-bezier( 0.65, 0, 0.35, 1 );
}

/* Items are sized against the viewport, so three fit and the rest overflow. */
.rice-carousel .block-rice.rice-carousel-track > .rice-column {
	flex: 0 0 33.3333%;
	max-width: 33.3333%;
}

.rice-carousel .rice-dots {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 26px 0;
	background-color: #fff;
}

.rice-carousel .rice-dots > li {
	display: block;
	margin: 0 7px;
	padding: 0;
}

.rice-carousel .rice-dot {
	display: block;
	width: 10px;
	height: 10px;
	padding: 0;
	border: 1px solid #0a132f;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background-color 300ms ease, transform 300ms ease;
}

.rice-carousel .rice-dot:hover,
.rice-carousel .rice-dot:focus-visible {
	background-color: rgba( 10, 19, 47, 0.4 );
}

.rice-carousel .rice-dot.active {
	background-color: #0a132f;
	transform: scale( 1.3 );
}

@media (max-width: 991px) {
	.rice-carousel .block-rice.rice-carousel-track {
		flex-direction: row;
	}

	.rice-carousel .block-rice.rice-carousel-track > .rice-column {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rice-carousel.is-animated .block-rice.rice-carousel-track {
		transition: none;
	}
}
