/*
 * Trailer listing (Current Stock): starter styles, navy / gold / sand branding.
 * Self-contained and scoped to .tl-page, with its own colour variables, so it works
 * whether or not the single-trailer CSS is loaded. Fonts and heading styles come from the theme.
 * The three colours below are estimates from a screenshot: swap them for the theme's exact values.
 */

.tl-page {
	--tl-navy: #1f2247;
	--tl-gold: #c2a97f;
	--tl-sand: #e3d9c5;
	--tl-text: #4a4a4a;
	--tl-muted: #7a7a7a;
	--tl-border: #e2ddd2;
	--tl-on-navy: #ffffff;
	--tl-radius: 3px;
	--tl-header-h: 100px; /* height of the site header that overlays the top of the banner: match it to your header */
	color: var(--tl-text);
}

.tl-page .tl-wrap {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

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

/* Intro */
.tl-intro {
	padding-top: 50px;
	padding-bottom: 10px;
	max-width: 900px;
	text-align: center;
}
.tl-intro h2 { margin: 0 0 14px; }
.tl-intro p  { margin: 0; }

/* Condition tabs */
.tl-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 30px 0 24px;
}
.tl-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 22px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--tl-navy);
	border: 1px solid var(--tl-navy);
	border-radius: var(--tl-radius);
	transition: background .2s, color .2s;
}
.tl-tab:hover { background: var(--tl-sand); }
.tl-tab.is-active {
	background: var(--tl-navy);
	color: var(--tl-on-navy);
}
.tl-count {
	display: inline-block;
	min-width: 22px;
	padding: 1px 6px;
	font-size: 11px;
	text-align: center;
	background: rgba(0, 0, 0, .08);
	border-radius: 999px;
}
.tl-tab.is-active .tl-count { background: rgba(255, 255, 255, .2); }

/* Filter bar */
.tl-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 14px 18px;
	padding: 18px 20px;
	background: var(--tl-sand);
	border-radius: var(--tl-radius);
}
.tl-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 170px;
}
.tl-field-search { flex: 1 1 220px; }
.tl-field > span {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tl-navy);
}
.tl-field input,
.tl-field select {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	font: inherit;
	color: var(--tl-text);
	background: #fff;
	border: 1px solid var(--tl-border);
	border-radius: var(--tl-radius);
}
.tl-check {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	font-size: 14px;
	cursor: pointer;
}
.tl-check input { width: 18px; height: 18px; margin: 0; }
.tl-filter-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-left: auto;
}
.tl-reset {
	font-size: 13px;
	color: var(--tl-navy);
	text-decoration: underline;
}

.tl-results {
	margin: 22px 0 16px;
	font-size: 14px;
	color: var(--tl-muted);
}

/* Buttons */
.tl-btn {
	display: inline-block;
	padding: 12px 26px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	border: 1px solid var(--tl-navy);
	border-radius: var(--tl-radius);
	transition: opacity .2s;
}
.tl-btn:hover { opacity: .85; }
.tl-btn-primary   { background: var(--tl-navy); color: var(--tl-on-navy); }
.tl-btn-secondary { background: transparent; color: var(--tl-navy); }

/* Grid + cards */
.tl-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}
.tl-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--tl-border);
	border-radius: var(--tl-radius);
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
.tl-card:hover {
	box-shadow: 0 8px 24px rgba(31, 34, 71, .12);
	transform: translateY(-2px);
}
.tl-card-media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--tl-sand);
	overflow: hidden;
}
.tl-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.tl-noimg { display: block; width: 100%; height: 100%; }
.tl-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 12px;
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tl-on-navy);
	background: var(--tl-navy);
	border-radius: var(--tl-radius);
}
.tl-ribbon {
	position: absolute;
	right: 0;
	bottom: 0;
	padding: 6px 18px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #fff;
}
.tl-ribbon-reserved { background: #ef6c00; }
.tl-ribbon-sold     { background: #c62828; }
.tl-status-sold .tl-card-media img { filter: grayscale(.7); }

.tl-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px 22px 24px;
}
.tl-card-body p { margin: 0; }
.tl-card-year {
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--tl-gold);
}
.tl-card-title {
	margin: 4px 0 10px;
	font-size: 1.2rem;
	line-height: 1.25;
}
.tl-card-title a { color: var(--tl-navy); text-decoration: none; }
.tl-card-title a:hover { text-decoration: underline; }
.tl-card-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
}
.tl-price-main {
	font-size: 1.6rem;
	line-height: 1.2;
	color: var(--tl-navy);
}
.tl-price-vat { font-size: 13px; color: var(--tl-muted); }
.tl-card-note {
	margin-top: 6px !important;
	font-size: 14px;
	font-weight: 600;
	color: var(--tl-gold);
}
.tl-card-finance { margin-top: 6px !important; font-size: 14px; }
.tl-card-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}
.tl-card-chips li {
	margin: 0;
	padding: 3px 10px;
	font-size: 11px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--tl-navy);
	border: 1px solid var(--tl-border);
	border-radius: 999px;
}
.tl-card-chips li::before { display: none; }
.tl-card-body .tl-btn { margin-top: auto; align-self: flex-start; }
.tl-card-chips + .tl-btn,
.tl-card-finance + .tl-btn,
.tl-card-note + .tl-btn,
.tl-card-price + .tl-btn { margin-top: 20px; }

/* Pagination */
.tl-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 40px 0 10px;
}
.tl-pagination .page-numbers {
	min-width: 42px;
	padding: 10px 14px;
	text-align: center;
	text-decoration: none;
	color: var(--tl-navy);
	border: 1px solid var(--tl-border);
	border-radius: var(--tl-radius);
}
.tl-pagination a.page-numbers:hover { background: var(--tl-sand); }
.tl-pagination .page-numbers.current {
	color: var(--tl-on-navy);
	background: var(--tl-navy);
	border-color: var(--tl-navy);
}
.tl-pagination .page-numbers.dots { border: 0; }

.tl-empty {
	padding: 60px 20px;
	text-align: center;
	background: var(--tl-sand);
	border-radius: var(--tl-radius);
}
.tl-empty p { margin: 0 0 20px; }

.tl-page > section:last-of-type { padding-bottom: 70px; }

/* Tablet and mobile */
@media (max-width: 960px) {
	.tl-page { --tl-header-h: 80px; }
	.tl-banner { padding: calc(var(--tl-header-h) + 30px) 0 30px; }
	.tl-title  { font-size: 2rem; }
	.tl-grid   { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 640px) {
	.tl-grid { grid-template-columns: 1fr; }
	.tl-tabs { justify-content: flex-start; }
	.tl-tab  { padding: 9px 14px; }
	.tl-filters { padding: 16px; }
	.tl-field { flex: 1 1 100%; }
	.tl-filter-actions { width: 100%; margin-left: 0; }
	.tl-filter-actions .tl-btn { flex: 1; }
}
