/* ==========================================================================
   Apollo Custom Manufacturing
   Builds (projects). Loads after products.css, which supplies the shared
   record layout, sidebar and highlight patterns.
   ========================================================================== */

/* --- Gallery hero ------------------------------------------------------ */

header.buildsHero {
	width: 100vw;
	position: relative;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	background-color: var(--navy-deep);
	color: var(--white);
	padding: 3.5rem var(--gutter);
}

div.buildsHeroInner {
	max-width: var(--shell);
	margin-inline: auto;
}

header.buildsHero h1 {
	color: var(--white);
	margin-bottom: 0.9rem;
}

p.buildsHeroSub {
	max-width: 52rem;
	color: #c7c8d6;
	font-size: 1rem;
	line-height: 1.75;
	margin-bottom: 0;
}

/* --- Type filters ------------------------------------------------------ */

nav.buildFilters {
	padding-block: 2rem 2.5rem;
	border-bottom: 1px solid var(--line);
	margin-bottom: 2.5rem;
}

span.bfLabel {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--faint);
	margin-bottom: 0.9rem;
}

nav.buildFilters ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

a.chip {
	display: inline-block;
	padding: 0.55em 1.1em;
	border: 1px solid var(--line);
	background-color: var(--white);
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--body);
	white-space: nowrap;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.chip:hover,
li.selected a.chip {
	background-color: var(--navy);
	border-color: var(--navy);
	color: var(--white);
}

/* --- Builds index, grouped by category --------------------------------- */

section.buildsCategory {
	margin-bottom: 3.5rem;
	/* The header is fixed, so a chip jump needs clearance above the heading */
	scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

section.buildsCategory .sectionHead {
	align-items: baseline;
	padding-bottom: 0.8rem;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid var(--navy);
}

/* Title and count share a row, the description sits under both */
section.buildsCategory .sectionHead > div {
	display: block;
}

p.buildsCategoryLead {
	max-width: 62ch;
	margin-bottom: 0.5rem;
	font-size: 1.02rem;
	line-height: 1.65;
	color: var(--body);
}

div.buildsCategoryIntro {
	max-width: 62ch;
	margin-bottom: 2rem;
	font-size: 0.95rem;
	line-height: 1.75;
	color: var(--muted);
}

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

/* --- Category view ----------------------------------------------------- */

div.buildsCategoryLayout {
	padding-top: 0;
}

header.buildsCategoryHeader {
	padding: 2.5rem 0 1.5rem;
	border-bottom: 2px solid var(--navy);
	margin-bottom: 2rem;
}

header.buildsCategoryHeader h1 {
	margin-bottom: 0.6rem;
}

header.buildsCategoryHeader p {
	max-width: 46rem;
	color: var(--muted);
	margin-bottom: 0;
}

/* Sidebar list of every build type */
ul.otherProductsList.big li a {
	display: block;
	padding: 0.5rem 0;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--body);
	border-bottom: 1px solid var(--line);
}

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

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

ul.otherProductsList.big li.selected a {
	color: var(--navy);
	border-left: 3px solid var(--gold);
	padding-left: 0.6rem;
}

/* --- Single build ------------------------------------------------------ */

header.buildHeader div.productImageContainer {
	background-color: var(--navy-deep);
	border: 0;
}

span.buildTypeBadge {
	display: inline-block;
	margin-bottom: 0.7rem;
	padding: 0.35em 0.75em;
	background-color: var(--navy);
	color: var(--white);
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

header.buildHeader h1.productTitle {
	margin-bottom: 0.9rem;
}

header.buildHeader p.features {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--muted);
	margin-bottom: 1.5rem;
}

/* Category and vehicle cross-links under the facts table */
div.projectStats p.productVendor {
	margin-bottom: 0;
	font-size: 0.7rem;
}

div.projectStats a {
	font-weight: 700;
}

table.buildFactsTable {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5rem;
	font-size: 0.88rem;
}

table.buildFactsTable tr {
	border-bottom: 1px solid var(--line);
}

table.buildFactsTable tr:first-child {
	border-top: 1px solid var(--line);
}

table.buildFactsTable th,
table.buildFactsTable td {
	padding: 0.7rem 0;
	text-align: left;
	vertical-align: top;
}

table.buildFactsTable th {
	width: 9rem;
	font-family: var(--font-body);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--faint);
}

table.buildFactsTable td {
	color: var(--ink);
	font-weight: 500;
}

div.projectStats {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
}

/* "Check Out These Builds" strip sits outside the record layout */
div#mainContent > h2 {
	margin-top: 3rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--line);
}
