/* ==========================================================================
   Apollo Custom Manufacturing
   Products. Also loaded by the Builds pages, so shared record/sidebar
   patterns live here.
   ========================================================================== */

/* --- Page header ------------------------------------------------------- */

header.productsPageHeader {
	padding: 3rem 0 2rem;
	border-bottom: 1px solid var(--line);
	margin-bottom: 2.5rem;
}

header.productsPageHeader h1 {
	margin-bottom: 0.75rem;
}

p.productsIntro {
	max-width: 46rem;
	color: var(--muted);
	font-size: 1.02rem;
	margin-bottom: 1.5rem;
}

/* --- Trust strip ------------------------------------------------------- */

div.trustStrip {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	background-color: var(--line);
	border: 1px solid var(--line);
	margin-bottom: 3.5rem;
}

div.trustItem {
	background-color: var(--white);
	text-align: center;
	padding: 1.5rem 1rem;
}

span.trustNum {
	display: block;
	font-family: var(--font-display);
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--navy);
}

span.trustLabel {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

@media (max-width: 47rem) {
	div.trustStrip {
		grid-template-columns: 1fr;
	}
}

/* --- Category block ---------------------------------------------------- */

div.categoryBox {
	margin-bottom: 3.5rem;
}

a.categoryBoxHeader {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding-bottom: 0.9rem;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid var(--navy);
}

span.categoryBoxImage {
	flex: 0 0 auto;
	width: 5rem;
	height: 3.25rem;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

span.categoryBoxHeaderText {
	display: flex;
	align-items: baseline;
	gap: 0.9rem;
	flex-wrap: wrap;
}

a.categoryBoxHeader h3 {
	color: var(--ink);
	transition: color 0.15s ease;
}

a.categoryBoxHeader:hover h3 {
	color: var(--navy);
}

span.categoryBoxCount {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--faint);
}

/* --- Product grid ------------------------------------------------------ */

div.productList {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
}

div.productItem {
	border: 1px solid var(--line);
	background-color: var(--white);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

div.productItem:hover {
	box-shadow: 0 10px 24px rgba(17, 18, 37, 0.1);
	transform: translateY(-3px);
}

div.productItem > a {
	display: block;
	height: 100%;
	color: inherit;
}

div.productItemImage {
	height: 11rem;
	overflow: hidden;
}

div.productItemImage figure {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

div.productItemText {
	padding: 1rem 1.1rem 1.25rem;
}

p.pITitle {
	font-family: var(--font-body);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--ink);
	margin-bottom: 0.4rem;
}

p.pIDesc {
	font-size: 0.85rem;
	line-height: 1.6;
	color: var(--muted);
	margin-bottom: 0.5rem;
}

p.pIVendor {
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--faint);
	margin-bottom: 0;
}

p.pIVendor b {
	font-weight: 600;
}

div.moreProducts {
	margin-top: 1.75rem;
	text-align: center;
}

@media (max-width: 74rem) {
	div.productList {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 59.9rem) {
	div.productList {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
	}

	div.productItemImage {
		height: 8.5rem;
	}
}

/* --- Category hero ----------------------------------------------------- */

/* Category page title sits above the full-bleed hero */
div#mainContent > h1:first-child {
	padding-top: 2.5rem;
	margin-bottom: 1.5rem;
}

div.categoryHeroImage {
	width: 100vw;
	position: relative;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
}

div.categoryHeroImage > header {
	display: flex;
	align-items: center;
	min-height: 24rem;
	padding: 3rem var(--gutter);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	position: relative;
}

div.categoryHeroImage > header::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(17, 18, 37, 0.9) 0%, rgba(17, 18, 37, 0.6) 55%, rgba(17, 18, 37, 0.3) 100%);
}

div.cHIContent {
	position: relative;
	width: 100%;
	max-width: var(--shell);
	margin-inline: auto;
	color: var(--white);
}

div.cHIContent h2 {
	color: var(--white);
	max-width: 20ch;
	margin-bottom: 1.5rem;
}

/* Subcategory quick links, where a category uses them */
div.cHISubCats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 1.5rem;
}

div.cHISubCats a,
a.cHISCItem {
	display: inline-block;
	padding: 0.5em 1em;
	border: 1px solid rgba(255, 255, 255, 0.45);
	color: var(--white);
	font-size: 0.8rem;
	font-weight: 600;
}

div.cHISubCats a:hover,
a.cHISCItem:hover {
	background-color: var(--white);
	color: var(--navy);
}

/* --- Category description band ----------------------------------------- */

div.categoryDescriptionBand {
	width: 100vw;
	position: relative;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	background-color: var(--navy-deep);
	color: #c7c8d6;
	padding: 3rem var(--gutter);
	margin-bottom: 3.5rem;
}

div.afterHero {
	max-width: 52rem;
	margin-inline: auto;
	text-align: center;
	font-size: 0.98rem;
	line-height: 1.75;
}

div.afterHero p {
	margin-bottom: 1em;
}

/* --- Category highlights ----------------------------------------------- */
/* Text highlights render as navy feature cards. A photo banner may span
   the full row above or below them. */

div.categoryHighlights {
	margin-block: 3.5rem;
}

div.categoryHighlights > header.fullWidthItem {
	position: relative;
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 18rem;
	padding: 1.75rem;
	text-align: center;
	color: var(--white);
	background-color: var(--navy);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
}

div.categoryHighlights > header.fullWidthItem::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: rgba(17, 18, 37, 0.72);
}

div.categoryHighlights div.subText {
	position: relative;
	max-width: 40rem;
}

div.categoryHighlights div.subText h4 {
	color: var(--gold);
	font-size: 1.05rem;
	letter-spacing: 0.06em;
	margin-bottom: 0.6rem;
}

div.categoryHighlights div.subText p {
	color: #dcdde8;
	font-size: 0.9rem;
	line-height: 1.7;
	margin-bottom: 0;
}

/* --- Video block ------------------------------------------------------- */

div.videoBlock {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
	margin-block: 3rem;
}

div.vbItem {
	position: relative;
	aspect-ratio: 16 / 9;
	background-color: var(--navy-deep);
}

div.vbItem iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (max-width: 59.9rem) {
	div.videoBlock {
		grid-template-columns: 1fr;
	}
}

/* --- Record layout: main column plus sidebar --------------------------- */

div.displaySidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 19rem;
	gap: 2.5rem;
	align-items: start;
	padding-top: 2.5rem;
}

@media (max-width: 74rem) {
	div.displaySidebar {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

/* --- Record header ----------------------------------------------------- */

header.productHeader {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;
	margin-bottom: 2.5rem;
}

div.productImageContainer {
	background-color: var(--panel);
	border: 1px solid var(--line);
}

/* Keep the photo in view while the specs are read */
@media (min-width: 60rem) {
	header.productHeader div.productImageContainer {
		position: sticky;
		top: calc(var(--header-h) + 1.5rem);
	}
}

div.productImageContainer img.productImage {
	width: 100%;
	height: auto;
}

/* Facts column sits in a panel, matching the services page treatment */
div.productInfo {
	padding: 1.75rem;
	background-color: var(--white);
	border: 1px solid var(--line);
	border-top: 3px solid var(--navy);
}

h1.productTitle {
	margin-bottom: 0.4rem;
}

p.productVendor {
	font-size: 0.75rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--faint);
	margin-bottom: 1.5rem;
}

@media (max-width: 59.9rem) {
	header.productHeader {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

/* --- Price and quote box ----------------------------------------------- */

aside.facts {
	margin-top: 1.75rem;
}

aside.facts p.features {
	font-size: 0.92rem;
	line-height: 1.7;
	color: var(--muted);
	margin-bottom: 1.25rem;
}

aside.facts div.priceBox {
	background-color: var(--panel);
	border-top: 3px solid var(--gold);
	padding: 1.5rem;
	margin-inline: -1.75rem -1.75rem;
	margin-bottom: -1.75rem;
}

aside.facts div.priceBox > p:first-child {
	font-family: var(--font-display);
	font-size: 1.4rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--ink);
	margin-bottom: 1rem;
}

p.leaseInfo {
	margin-top: 1.1rem;
	margin-bottom: 0;
	font-size: 0.8rem;
	line-height: 1.65;
	color: var(--muted);
}

/* --- Record body ------------------------------------------------------- */

div.productBody {
	margin-block: 2.5rem;
}

div.productBody h2,
div.productBody h4 {
	margin-bottom: 0.9rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--line);
}

div.productBody h2:not(:first-child),
div.productBody h4:not(:first-child) {
	margin-top: 2.25rem;
}

div.productBody ul {
	list-style: disc;
	padding-left: 1.25rem;
	margin-bottom: 1em;
}

div.productBody li {
	margin-bottom: 0.35rem;
}

div.downloadButtons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* --- Sidebar ----------------------------------------------------------- */

div.displaySidebar > aside {
	background-color: var(--panel);
	border: 1px solid var(--line);
	padding: 1.5rem;
}

div.displaySidebar > aside h4 {
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	color: var(--navy);
	padding-bottom: 0.6rem;
	margin-bottom: 0.75rem;
	border-bottom: 1px solid var(--line);
}

div.displaySidebar > aside h4:not(:first-child) {
	margin-top: 2rem;
}

ul.otherProductsList {
	display: flex;
	flex-direction: column;
}

ul.otherProductsList li a {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--line);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--body);
}

ul.otherProductsList li:last-child a {
	border-bottom: 0;
}

ul.otherProductsList li a:hover {
	color: var(--navy);
}

ul.otherProductsList li.selected a {
	color: var(--navy);
	font-weight: 700;
}

ul.otherProductsList figure {
	flex: 0 0 auto;
	width: 4rem;
	height: 3rem;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-color: var(--line);
}

span.opTitle {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ink);
}

span.opSpec {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.7rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--faint);
}

ul.otherProductsList li a:hover span.opTitle {
	color: var(--navy);
}

ul.otherProductsList li.seeMore {
	margin-top: 0.4rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--line);
}

ul.otherProductsList li.seeMore a {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--navy);
}

ul.otherProductsList li.selected a span.opTitle {
	color: var(--navy);
	font-weight: 700;
}

/* --- Mobile quote bar -------------------------------------------------- */

div.mobileQuoteBar {
	display: none;
}

@media (max-width: 59.9rem) {
	div.mobileQuoteBar {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 90;
		background-color: var(--white);
		border-top: 1px solid var(--line);
		box-shadow: 0 -4px 16px rgba(17, 18, 37, 0.12);
		padding: 0.75rem var(--gutter);
	}

	div.mobileQuoteBar a.btn {
		width: 100%;
	}

	body {
		padding-bottom: 4.5rem;
	}
}

/* --- Terms, warranty, shipping and payment ------------------------------ */

section.termsBand {
	margin-top: 4rem;
}

/* Payment blocks use a centre tag and card logos */
div.termsBody center {
	display: block;
	text-align: left;
}

div.smallImageLogos {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin: 1.1rem 0;
}

div.smallImageLogos img {
	height: 2rem;
	width: auto;
	padding: 0.35rem 0.6rem;
	background-color: var(--navy);
	border-radius: 3px;
}

/* --- Brochure band ------------------------------------------------------ */
/* The photo and navy gradient are set inline, because the image is per category */

section.downloadsBand {
	display: flex;
	align-items: center;
	min-height: 20rem;
	padding-block: 4.5rem;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	color: var(--white);
	text-align: center;
}

section.downloadsBand h2 {
	color: var(--white);
	margin-bottom: 0.6rem;
}

section.downloadsBand p {
	max-width: 42rem;
	margin-inline: auto;
	margin-bottom: 1.75rem;
	color: #dcdde8;
	font-size: 0.98rem;
	line-height: 1.7;
}

/* --- Photo gallery ------------------------------------------------------ */
/* Used by both product and build records. */

div.moreImages {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
	gap: 1rem;
	margin: 1.5rem 1em 0;
}

/* Photos past the preview batch stay out of the way until asked for */
div.moreImages a.morePhoto {
	display: none;
}

div.moreImages.showAll a.morePhoto {
	display: block;
}

button.photoToggle {
	display: block;
	margin: 1.25rem 1em 3rem;
	padding: 0.75em 1.5em;
	background-color: transparent;
	border: 2px solid var(--navy);
	color: var(--navy);
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

button.photoToggle:hover {
	background-color: var(--navy);
	color: var(--white);
}

div.moreImages a {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background-color: var(--panel);
}

div.moreImages img,
div.moreImages figure {
	width: 100%;
	height: 100%;
	object-fit: cover;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transition: transform 0.3s ease;
}

div.moreImages a:hover img,
div.moreImages a:hover figure {
	transform: scale(1.05);
}

