/* Product range block. Shared buttons, title rule and tokens come from ags-tokens.css. */

.ags-prod {
	--ags-prod-radius: 14px;
	position: relative;
	overflow: hidden;
	padding: var(--ags-pad-y) 0;
	color: var(--ags-secondary);
	/* A light wash lets the photo read across the section; a solid white
	   patch behind the watermark number keeps that corner clean. */
	background:
		radial-gradient(ellipse 34% 48% at 88% 0, #fff 0, rgba(255, 255, 255, .96) 55%, rgba(255, 255, 255, 0) 100%),
		linear-gradient(rgba(255, 255, 255, var(--ags-prod-wash, .3)), rgba(255, 255, 255, var(--ags-prod-wash, .3))),
		#fff var(--ags-prod-bg, none) center / cover no-repeat;
}

.ags-prod--dark {
	color: var(--ags-white);
	/* Demo values: a flat 74% tint so the photo reads, plus a denser patch
	   behind the watermark number so that corner stays clean. */
	--ags-prod-wm-x: 90%;
	background:
		radial-gradient(ellipse 30% 55% at var(--ags-prod-wm-x) 14%, color-mix(in srgb, var(--ags-prod-overlay, #131f28) 95%, transparent) 0, color-mix(in srgb, var(--ags-prod-overlay, #131f28) 85%, transparent) 45%, transparent 100%),
		linear-gradient(color-mix(in srgb, var(--ags-prod-overlay, #131f28) calc(var(--ags-prod-wash, .74) * 100%), transparent), color-mix(in srgb, var(--ags-prod-overlay, #131f28) calc(var(--ags-prod-wash, .74) * 100%), transparent)),
		var(--ags-prod-overlay, #131f28) var(--ags-prod-bg, none) center / cover no-repeat;
}

.ags-prod--dark.ags-prod--img-right {
	--ags-prod-wm-x: 10%;
}

/* All main text white on the dark theme. */
.ags-prod--dark .ags-prod__eyebrow,
.ags-prod--dark .ags-prod__title,
.ags-prod--dark .ags-prod__desc,
.ags-prod--dark .ags-prod__features li,
.ags-prod--dark .ags-prod__specs td {
	color: var(--ags-white);
}

.ags-prod--dark .ags-prod__eyebrow {
	opacity: .85;
}

/* Shown in place of the details table while it is left blank. */
.ags-prod .ags-prod__specs-note {
	margin: 0 0 30px;
	padding: 12px 18px;
	border: 1px solid rgba(19, 31, 40, .12);
	border-radius: 12px;
	background: #fff;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.6;
}

/* Same look as the dark details table: white rule, faint white tint like its odd rows. */
.ags-prod--dark .ags-prod__specs-note {
	border-color: rgba(255, 255, 255, .2);
	background: rgba(255, 255, 255, .07);
	color: var(--ags-white);
	font-weight: 600;
}

/* Large watermark number, top right (top left when the card sits on the right). */
.ags-prod::before {
	content: attr(data-n);
	position: absolute;
	top: -30px;
	right: var(--ags-pad-x);
	font-size: clamp(160px, 22vw, 320px);
	font-weight: 700;
	line-height: 1;
	color: var(--ags-primary);
	opacity: .09;
	pointer-events: none;
	z-index: 0;
}

.ags-prod--img-right::before {
	right: auto;
	left: var(--ags-pad-x);
}

.ags-prod--dark::before {
	opacity: .3;
}

/* The in-copy watermark is only for stacked layouts (see the 1024px query). */
.ags-prod__wm {
	display: none;
}

/* Dot pattern, bottom right (bottom left when the card sits on the right). */
.ags-prod--pattern::after {
	content: "";
	position: absolute;
	bottom: 24px;
	right: var(--ags-pad-x);
	width: 180px;
	height: 110px;
	background: radial-gradient(var(--ags-primary) 1.6px, transparent 2px) 0 0 / 18px 18px;
	opacity: .28;
	pointer-events: none;
	z-index: 0;
}

.ags-prod--pattern.ags-prod--img-right::after {
	right: auto;
	left: var(--ags-pad-x);
}

/* Card on the right puts the copy, and so its buttons, over the bottom-left
   corner where this pattern lives. Give the section room below the buttons and
   tuck the dots into it so they are not hidden behind them. */
.ags-prod--pattern.ags-prod--img-right {
	padding-bottom: max(var(--ags-pad-y), 110px);
}

.ags-prod--pattern.ags-prod--img-right::after {
	bottom: 18px;
	height: 66px;
}

/* Green dots at 28% vanish on a dark ground: bigger, solid. */
.ags-prod--dark.ags-prod--pattern::after {
	background-image: radial-gradient(var(--ags-primary) 2.2px, transparent 2.8px);
	opacity: .9;
}

.ags-prod__inner {
	position: relative;
	z-index: 1;
	max-width: var(--ags-max);
	margin-inline: auto;
	padding-inline: var(--ags-pad-x);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 64px;
	align-items: center;
}

.ags-prod--img-right .ags-prod__media {
	order: 2;
}

/* ---- Photo card ---- */
.ags-prod__media {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--ags-prod-radius);
	overflow: hidden;
	box-shadow: 0 24px 50px -28px rgba(19, 31, 40, .35);
}

.ags-prod__media::after {
	content: "";
	height: 5px;
	background: var(--ags-primary);
}

.ags-prod__num {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 18px 20px 14px;
	font-weight: 600;
	color: var(--ags-primary);
}

.ags-prod__num i {
	width: 34px;
	height: 2px;
	background: var(--ags-primary);
}

.ags-prod__photo {
	aspect-ratio: 1.45;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}

/* ---- Copy ---- */
.ags-prod__eyebrow {
	margin: 0 0 14px;
	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-prod__title {
	margin: 0;
	font-weight: 700;
	line-height: 1.15;
	color: inherit;
}

.ags-prod__desc {
	max-width: 520px;
	margin: 24px 0 22px;
	font-size: var(--ags-text-size);
	line-height: 1.6;
}

.ags-prod__features {
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
	display: grid;
	gap: 10px;
}

.ags-prod__features li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: var(--ags-text-size);
	font-weight: 500;
}

.ags-prod__features li::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border-radius: 50%;
	background: var(--ags-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.ags-prod .ags-prod__specs {
	width: 100%;
	margin: 0 0 30px;
	border: 1px solid rgba(19, 31, 40, .12);
	border-radius: 12px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	font-size: 13.5px;
}

.ags-prod .ags-prod__specs th,
.ags-prod .ags-prod__specs td {
	padding: 12px 18px;
	border: 0;
	border-bottom: 1px solid rgba(19, 31, 40, .12);
	text-align: left;
	vertical-align: top;
}

.ags-prod .ags-prod__specs tr:last-child th,
.ags-prod .ags-prod__specs tr:last-child td {
	border-bottom: 0;
}

/* Even rows solid white; odd rows keep the theme's grey stripe. */
.ags-prod--light .ags-prod__specs tr:nth-child(even) th,
.ags-prod--light .ags-prod__specs tr:nth-child(even) td {
	background-color: #fff;
}

.ags-prod .ags-prod__specs th {
	width: 42%;
	font-weight: 500;
	color: rgba(19, 31, 40, .65);
}

.ags-prod .ags-prod__specs td {
	font-weight: 600;
}

.ags-prod--dark .ags-prod__specs {
	border-color: rgba(255, 255, 255, .2);
}

.ags-prod--dark .ags-prod__specs th {
	color: rgba(255, 255, 255, .65);
}

.ags-prod--dark .ags-prod__specs th,
.ags-prod--dark .ags-prod__specs td {
	border-bottom-color: rgba(255, 255, 255, .2);
}

/* Dark ground: the theme's light zebra stripes would swallow the white text, so
   rows are clear with a faint white tint on alternate ones. */
.ags-prod.ags-prod--dark .ags-prod__specs tr,
.ags-prod.ags-prod--dark .ags-prod__specs tr > th,
.ags-prod.ags-prod--dark .ags-prod__specs tr > td {
	background-color: transparent;
}

.ags-prod.ags-prod--dark .ags-prod__specs tr:nth-child(odd) > th,
.ags-prod.ags-prod--dark .ags-prod__specs tr:nth-child(odd) > td {
	background-color: rgba(255, 255, 255, .07);
}

.ags-prod__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Base .ags-btn--outline lives in ags-tokens.css (shared). */
.ags-prod--dark .ags-btn--outline {
	border-color: rgba(255, 255, 255, .55);
	color: var(--ags-white);
}

.ags-prod--dark .ags-btn--outline:hover,
.ags-prod--dark .ags-btn--outline:focus-visible {
	background-color: var(--ags-white);
	border-color: var(--ags-white);
	color: var(--ags-secondary);
}

/* ---- Stacked layouts ---- */
@media (max-width: 1024px) {
	/* Stacked: the section-level watermark gives way to one beside the title. */
	.ags-prod::before {
		display: none;
	}

	.ags-prod__copy {
		position: relative;
		isolation: isolate;
	}

	.ags-prod__wm {
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		z-index: -1;
		font-size: 150px;
		font-weight: 700;
		line-height: 1;
		color: var(--ags-primary);
		opacity: .09;
		pointer-events: none;
	}

	.ags-prod--dark .ags-prod__wm {
		opacity: .3;
	}

	.ags-prod__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
	}

	.ags-prod--img-right .ags-prod__media {
		order: 0;
	}

	.ags-prod__desc {
		max-width: none;
	}
}

/* Tablet only: the big number's glyph top lines up with the "01 / RANGE" text
   (measured offset 15px at 150px size; the box has line-height 1 leading). */
@media (min-width: 768px) and (max-width: 1024px) {
	.ags-prod__wm {
		top: -15px;
	}
}

@media (max-width: 767px) {
	.ags-prod__wm {
		top: -10px;
		font-size: 110px;
	}

	.ags-prod__num {
		padding: 10px 16px 8px;
	}
}

@media (max-width: 480px) {
	.ags-prod__specs th {
		width: 46%;
	}

	.ags-prod__actions .ags-btn {
		flex: 1 1 100%;
		justify-content: center;
	}
}
