/*
 * Spare Parts page: starter styles.
 * Scoped to .sp-page and prefixed sp- so it never touches Current Stock (tl-/tr-), Product Pages (pp-/pr-), Events (ev-) or the Elementor pages.
 * Loaded only by page-spare-parts.php. Fonts are inherited from the theme. Colours are estimates: swap for the theme's exact values.
 */

.sp-page {
	--sp-navy: #1f2247;
	--sp-gold: #c2a97f;
	--sp-price: #8f7a52; /* darker gold so the price is easy to read on white */
	--sp-sand: #e3d9c5;
	--sp-text: #4a4a4a;
	--sp-on-navy: #ffffff;
	--sp-header-h: 100px; /* height of the site header that overlays the banner: match it to your header */
	color: var(--sp-text);
}
.sp-page .sp-wrap { max-width: 1200px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.sp-page img { display: block; max-width: 100%; height: auto; }

/* Banner + breadcrumb */
.sp-banner { background: var(--sp-navy); color: var(--sp-on-navy); padding: calc(var(--sp-header-h) + 50px) 0 40px; }
.sp-title {
	margin: 0 0 20px;
	padding-bottom: 20px;
	color: var(--sp-on-navy);
	font-size: 2.75rem;
	line-height: 1.15;
	border-bottom: 1px solid rgba(255, 255, 255, .15);
}
.sp-breadcrumb { font-size: 13px; color: var(--sp-on-navy); }
.sp-breadcrumb a { color: var(--sp-on-navy); text-decoration: none; }
.sp-breadcrumb a:hover { text-decoration: underline; }
.sp-breadcrumb .sp-sep { margin: 0 8px; opacity: .6; }
.sp-breadcrumb .sp-current { color: var(--sp-gold); }

/* Optional intro */
.sp-intro { padding-top: 50px; max-width: 900px; text-align: center; }

/* Event rows: image left, text right, a thin line between events */
.sp-listing { padding-top: 40px; padding-bottom: 90px; }
.sp-item {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 40px;
	align-items: center;
	padding: 40px 0;
	border-bottom: 1px solid rgba(31, 34, 71, .15);
}
.sp-item:last-child { border-bottom: 0; }
.sp-item.sp-no-media { grid-template-columns: minmax(0, 1fr); }
.sp-media { overflow: hidden; background: var(--sp-sand); aspect-ratio: 4 / 3; }
.sp-page .sp-media .sp-img { width: 100%; height: 100%; object-fit: cover; }

/* Price: sits under the title */
.sp-price {
	margin: 0 0 16px;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sp-price);
}
.sp-name { margin: 0 0 10px; font-size: 1.9rem; line-height: 1.2; color: var(--sp-navy); }
.sp-desc p { margin: 0 0 1em; }
.sp-desc p:last-child { margin-bottom: 0; }
.sp-link {
	display: inline-block;
	margin-top: 20px;
	padding: 12px 22px;
	background: var(--sp-navy);
	color: var(--sp-on-navy);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background .2s;
}
.sp-link:hover, .sp-link:focus-visible { background: var(--sp-gold); color: var(--sp-navy); }
.sp-empty { padding: 60px 20px; text-align: center; background: var(--sp-sand); }

@media (max-width: 1200px) { .sp-page { --sp-header-h: 150px; } } /* header wraps onto two rows here */
@media (max-width: 960px) {
	.sp-page { --sp-header-h: 80px; }
	.sp-banner { padding: calc(var(--sp-header-h) + 30px) 0 30px; }
	.sp-title { font-size: 2rem; }
	.sp-item { grid-template-columns: 1fr; gap: 24px; padding: 30px 0; }
	.sp-name { font-size: 1.6rem; }
}

/* visually hidden text for screen readers (does not rely on the theme providing this class) */
.sp-page .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}
