/* ---------------------------------------------------------------------------
   Ace Glove — Section 05: Products

   Top: heading/description, a single dummy icon+title, and a tagline, over a
   full-bleed section background. Bottom: an infinite one-card-at-a-time
   carousel of full-bleed photographic cards, draggable and swipeable.
--------------------------------------------------------------------------- */

.ags-products {
	--ags-product-radius: 14px;
	--ags-products-gap: 20px;
	--ags-products-per-view: 3;

	position: relative;
	z-index: 2;
	margin-top: -20px;
	width: 100%;
	background-color: var(--ags-white);
	background-image: var(--ags-products-bg);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.ags-products__inner {
	width: 100%;
	max-width: var(--ags-max);
	margin: 0 auto;
	padding: var(--ags-pad-y) var(--ags-pad-x);
}

/* --- Top container: heading and icon points --------------------------------- */

/* Grid, not flex: the heading sits in its own row above, while the
   description and the icon points share the row below so they line up. */
.ags-products__head {
	display: grid;
	grid-template-columns: 1fr auto;
	column-gap: 36px;
	row-gap: 20px;
	align-items: center;
}

.ags-products__intro {
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
}

.ags-products .ags-products__eyebrow {
	margin: 0 0 16px;
	font-size: var(--ags-eyebrow-size);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ags-primary);
}

.ags-products .ags-products__heading {
	margin: 0;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: var(--ags-secondary);
}

.ags-products .ags-products__lede {
	grid-column: 1;
	grid-row: 2;
	margin: 0;
	max-width: 56ch;
	font-size: var(--ags-text-size);
	font-weight: 400;
	line-height: 1.8;
	color: rgba(19, 31, 40, 0.68);
}

/* --- Top container: icon points ---------------------------------------------- */

.ags-products__icons {
	grid-column: 2;
	grid-row: 2;
	align-self: center;
	display: flex;
	align-items: center;
}

.ags-products__icon-item {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 0 18px;
	text-align: center;
	border-right: 1px solid rgba(19, 31, 40, 0.14);
}

.ags-products__icon-item:last-child {
	border-right: none;
}

.ags-products__icon-badge {
	display: grid;
	place-items: center;
	flex: none;
	color: var(--ags-primary);
}

.ags-products__icon-glyph {
	width: 34px;
	height: 34px;
}

.ags-products .ags-products__icon-label {
	max-width: 14ch;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--ags-secondary);
}

/* --- Bottom container: the slider ------------------------------------------ */

.ags-products__body {
	margin-top: 52px;
}

/* --- Slider ------------------------------------------------------------- */

.ags-products__viewport {
	overflow: hidden;
	touch-action: pan-y;
	cursor: grab;
}

.ags-products__slider.is-dragging .ags-products__viewport {
	cursor: grabbing;
}

.ags-products__slider.is-dragging a {
	pointer-events: none;
}

.ags-products__track {
	display: flex;
	gap: var(--ags-products-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	will-change: transform;
}

.ags-products__item {
	flex: 0 0 calc(
		(100% - (var(--ags-products-per-view) - 1) * var(--ags-products-gap))
		/ var(--ags-products-per-view)
	);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* --- Card ---------------------------------------------------------------- */

/*
 * Full-bleed photograph with a dark diagonal wash so white copy stays legible
 * regardless of how bright the photo itself is.
 */
.ags-product {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 100%;
	min-height: 460px;
	padding: 26px;
	border-radius: var(--ags-product-radius);
	overflow: hidden;
	background-color: var(--ags-white);
	background-image: var(--ags-product-bg);
	background-size: cover;
	background-position: center;
	border: 1px solid rgba(19, 31, 40, 0.08);
	transition: box-shadow var(--ags-speed) var(--ags-ease);
}

.ags-product:hover {
	box-shadow: 0 14px 34px rgba(19, 31, 40, 0.12);
}

/* A white wash over the left ~2/3 of the card, easing to fully transparent
   on the right, so the copy always reads clearly and the photograph still
   shows through untouched on its own side. */
.ags-product::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(
		to right,
		rgba(255, 255, 255, 0.96) 0%,
		rgba(255, 255, 255, 0.85) 35%,
		rgba(255, 255, 255, 0) 58%
	);
	pointer-events: none;
}

/* Same card and same white wash as every other slide; only the photo moves.
   The photo sits on its own layer behind the wash, slid right just far enough
   that the subject (which starts --ags-product-f of the way across the photo)
   lands past the text column. The photo is cover-scaled, so its width is
   whichever is larger of the card width and the card height. */
.ags-product--window {
	--ags-product-h: 460px;
	--ags-product-shift: max(0px, calc(52% - var(--ags-product-f, 0.4) * max(100%, var(--ags-product-h))));
	isolation: isolate;
	background-image: none;
}

.ags-product--window::after {
	content: "";
	position: absolute;
	z-index: -1;
	top: 0;
	bottom: 0;
	left: var(--ags-product-shift);
	right: calc(-1 * var(--ags-product-shift));
	background-image: var(--ags-product-bg);
	background-size: cover;
	background-position: left center;
	pointer-events: none;
}

.ags-product__num,
.ags-product__content,
.ags-product__foot {
	position: relative;
	z-index: 1;
}

.ags-product__num {
	max-width: 68%;
}

/* Keeps the copy off the photograph's own side of the card, whatever the
   description length does. */
.ags-product__content {
	width: 50%;
}

.ags-product__num {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 32px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--ags-secondary);
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}

.ags-product__num-rule {
	display: block;
	width: 28px;
	height: 2px;
	border-radius: 1px;
	background-color: var(--ags-primary);
}

.ags-products .ags-product__title {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--ags-secondary);
}

.ags-products .ags-product__text {
	margin: 0 0 18px;
	font-size: var(--ags-text-size);
	font-weight: 400;
	line-height: 1.6;
	color: var(--ags-secondary);
}

.ags-product__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ags-product__list li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13.5px;
	font-weight: 400;
	color: var(--ags-secondary);
}

.ags-product__check {
	flex: none;
	width: 17px;
	height: 17px;
	color: var(--ags-primary);
}

.ags-product__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

/* Otherwise plain .ags-btn.ags-btn--primary — the site's standard button,
   just sized down to fit the card footer. */
.ags-product__btn {
	flex: none;
	padding: 11px 20px;
	font-size: 12px;
}

.ags-products .ags-product__tag {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: right;
	color: var(--ags-secondary);
}

/* --- Navigation ---------------------------------------------------------- */

.ags-products__nav {
	display: flex;
	align-items: center;
	gap: 28px;
	margin-top: 32px;
}

.ags-products__arrows {
	display: flex;
	flex: none;
	gap: 10px;
}

.ags-products__arrow-btn {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(19, 31, 40, 0.18);
	border-radius: 10px;
	background-color: transparent;
	color: var(--ags-secondary);
	cursor: pointer;
	transition: background-color var(--ags-speed) var(--ags-ease),
	            border-color var(--ags-speed) var(--ags-ease),
	            color var(--ags-speed) var(--ags-ease);
}

.ags-products__arrow-btn:hover,
.ags-products__arrow-btn:focus-visible {
	background-color: var(--ags-primary);
	border-color: var(--ags-primary);
	color: var(--ags-white);
}

.ags-products__arrow-btn .ags-icon {
	width: 19px;
	height: 13px;
}

.ags-products__arrow-btn--prev .ags-icon {
	transform: scaleX(-1);
}

.ags-products__bar {
	position: relative;
	flex: 1 1 auto;
	height: 3px;
	border-radius: 2px;
	background-color: rgba(19, 31, 40, 0.12);
	overflow: hidden;
}

.ags-products__bar-fill {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 2px;
	background-color: var(--ags-primary);
}

.ags-products .ags-products__count {
	flex: none;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1;
	color: rgba(19, 31, 40, 0.42);
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}

.ags-products__count-now {
	font-size: 19px;
	color: var(--ags-primary);
}

.ags-products__count-sep {
	margin: 0 3px;
}

/* --- Breakpoints ---------------------------------------------------------- */

@media (max-width: 1024px) {
	.ags-products {
		--ags-products-per-view: 1;
		--ags-products-gap: 16px;
	}

	.ags-products__head {
		grid-template-columns: 1fr;
		row-gap: 20px;
	}

	.ags-products__intro {
		grid-column: 1;
		grid-row: 1;
	}

	.ags-products .ags-products__lede {
		grid-column: 1;
		grid-row: 2;
	}

	.ags-products__icons {
		grid-column: 1;
		grid-row: 3;
	}


	.ags-products__body {
		margin-top: 36px;
	}

	.ags-products__nav {
		gap: 20px;
		margin-top: 26px;
	}

	.ags-products__arrow-btn {
		width: 42px;
		height: 42px;
	}
}

@media (max-width: 600px) {
	.ags-products {
		--ags-products-per-view: 1;
		--ags-products-gap: 14px;
	}

	.ags-products__nav {
		gap: 14px;
	}

	.ags-products__arrow-btn {
		width: 38px;
		height: 38px;
	}

	.ags-products__count-now {
		font-size: 17px;
	}

	.ags-product {
		min-height: 420px;
		padding: 22px;
	}

	.ags-product--window {
		--ags-product-h: 420px;
	}

	/* Button on top, supporting text underneath instead of beside it. */
	/* margin-top keeps the button clear of the list above it when the copy is
	   tall enough that the card's own spacing runs out. */
	.ags-product__foot {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		margin-top: 28px;
	}

	.ags-products .ags-product__tag {
		text-align: left;
	}


	.ags-products__icons {
		flex-wrap: wrap;
		row-gap: 16px;
	}

	.ags-products__icon-item {
		flex: 1 1 50%;
		padding: 0 12px 16px;
		border-right: 1px solid rgba(19, 31, 40, 0.14);
		border-bottom: 1px solid rgba(19, 31, 40, 0.14);
	}

	.ags-products__icon-item:nth-child(2n) {
		border-right: none;
	}

	.ags-products__icon-item:nth-last-child(-n+2) {
		border-bottom: none;
	}
}

/* --- Scroll-in animation -------------------------------------------------- */

.ags-products--animate.is-armed .ags-products__eyebrow,
.ags-products--animate.is-armed .ags-products__heading,
.ags-products--animate.is-armed .ags-products__lede,
.ags-products--animate.is-armed .ags-products__icon-item,
.ags-products--animate.is-armed .ags-products__item {
	opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
	.ags-products--animate.is-armed .ags-products__eyebrow,
	.ags-products--animate.is-armed .ags-products__heading,
	.ags-products--animate.is-armed .ags-products__lede,
	.ags-products--animate.is-armed .ags-products__icon-item,
	.ags-products--animate.is-armed .ags-products__item {
		opacity: 1;
	}

	.ags-products__track {
		scroll-behavior: auto;
	}
}
