/* Used Car Directory Listings - front end styles */

.ucdl-directory {
	--ucdl-red: #d01f3c;
	--ucdl-red-dark: #b8102f;
	max-width: 1200px;
	margin: 0 auto;
}

.ucdl-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
}

@media (max-width: 900px) {
	.ucdl-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.ucdl-grid {
		grid-template-columns: 1fr;
	}
	.ucdl-card-directory-body {
    flex-wrap: wrap;
	}
	.ucdl-enquire-btn {
    margin-top: 20px;
	}
}

.ucdl-card {
	border: 1px solid var(--ucdl-red);
	display: flex;
	flex-direction: column;
	background: #fff;
}

.ucdl-card-image {
	display: block;
	background: var(--ucdl-red);
	aspect-ratio: 4 / 3;
	overflow: hidden;
	padding: 30px;
}

.ucdl-card-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.ucdl-card-body {
	position: relative;
	padding: 25px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	overflow: hidden;
	background-color: #f4f4f4;
}

.ucdl-card-body::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: url('https://www.bus4x4.com.au/wp-content/uploads/2024/11/bus-logo-red-transparent.png');
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	opacity: 0.3;
}

.ucdl-card-body > * {
	position: relative;
}

.ucdl-card-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
}

.ucdl-card-title {
	margin: 0;
	font-size: 28px !IMPORTANT;
	font-weight: 700;
}

.ucdl-card-title a {
	color: var(--ucdl-red);
	text-decoration: none;
}

.ucdl-card-price {
	color: var(--ucdl-red);
	font-weight: 700 !important;
	font-size: 24px !important;
	white-space: nowrap;
}

.ucdl-card-subtitle {
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.2em !important;
	margin-bottom: 10px !important;
	color: #000000 !important;
}

.ucdl-card-directory-body {
	display: flex;
}

.ucdl-card-features {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
}

.ucdl-card-features li {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	margin-bottom: 4px;
	font-weight: 600;
	color: #000000;
}

.ucdl-card-features .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.ucdl-feature-icon {
	width: 23px;
	height: 23px;
	object-fit: contain;
	flex-shrink: 0;
}

.ucdl-enquire-btn {
	display: inline-block;
	background: #d01f3c;
	background: linear-gradient(135deg, #d01f3c 0%, #971a2d 100%);
	color: #fff;
	text-decoration: none;
	text-align: center;
	padding: 10px 20px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	font-size: 13px;
	align-self: flex-end;
	transition: background 0.15s ease;
}

.ucdl-enquire-btn:hover {
	background: var(--ucdl-red-dark);
	color: #fff;
}

/* Search filter: [used-car-search-filter] */
.ucdl-search {
	--ucdl-red: #d01f3c;
	--ucdl-red-dark: #b8102f;
	max-width: 1200px;
	margin: 0 auto 40px;
	padding: 24px;
	background: #f3f3f3;
	border: 1px solid var(--ucdl-red);
	display: grid;
	grid-template-columns: repeat(3, 1fr) auto;
	gap: 20px;
	align-items: end;
	box-sizing: border-box;
}

.ucdl-search-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ucdl-red);
}

.ucdl-search-field select {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-radius: 0;
	background-color: #fff;
	font-size: 15px;
	color: #222;
	box-sizing: border-box;
}

.ucdl-search-field select:focus {
	outline: 2px solid var(--ucdl-red);
	outline-offset: -1px;
}

.ucdl-search-actions {
	display: flex;
	gap: 10px;
}

.ucdl-search-submit,
.ucdl-search-reset {
	height: 44px;
	padding: 0 24px;
	border: 1px solid var(--ucdl-red);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.ucdl-search-submit {
	background: linear-gradient(135deg, #d01f3c 0%, #971a2d 100%);
	color: #fff;
}

.ucdl-search-submit:hover {
	background: var(--ucdl-red-dark);
}

.ucdl-search-reset {
	background: #fff;
	color: var(--ucdl-red);
}

.ucdl-search-reset:hover {
	background: var(--ucdl-red);
	color: #fff;
}

@media (max-width: 900px) {
	.ucdl-search {
		grid-template-columns: repeat(3, 1fr);
	}
	.ucdl-search-actions {
		grid-column: 1 / -1;
	}
	.ucdl-search-submit,
	.ucdl-search-reset {
		flex: 1;
	}
}

@media (max-width: 600px) {
	.ucdl-search {
		grid-template-columns: 1fr;
		padding: 16px;
		gap: 14px;
	}
}

.ucdl-nav {
	display: flex;
	justify-content: space-between;
	margin-top: 24px;
}

.ucdl-nav button {
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #bbb;
	padding: 8px 16px;
}

.ucdl-nav button:hover {
	color: var(--ucdl-red);
}

.ucdl-nav button:disabled {
	opacity: 0.3;
	cursor: default;
}

.ucdl-no-cars {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 0;
}

/* Single car page */

.ucdl-single-wrap {
	--ucdl-red: #d31c3f;
	--ucdl-red-dark: #b8102f;
	max-width: 1300px;
	margin: 0 auto;
	padding: 20px 0 60px;
}

.ucdl-single-wrap *,
.ucdl-single-wrap *::before,
.ucdl-single-wrap *::after {
	box-sizing: border-box;
}

.ucdl-single-wrap img {
	max-width: 100%;
	height: auto;
}

.ucdl-single-left,
.ucdl-single-right {
	min-width: 0;
}

.ucdl-single-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
}

@media (max-width: 900px) {
	.ucdl-single-columns {
		grid-template-columns: 1fr;
	}
}

.ucdl-single-featured {
	background: var(--ucdl-red);
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	padding: 30px;
}

.ucdl-single-featured img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ucdl-single-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	margin-top: 16px;
}

.ucdl-single-gallery-item {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.ucdl-single-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ucdl-single-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
}

.ucdl-single-title {
	color: var(--ucdl-red) !important;
	margin: 0;
	padding: 0;
	line-height: 1.2;
	font-size: 30px !important;
	font-weight: 700 !important;
}

.ucdl-single-price {
	color: var(--ucdl-red);
	font-weight: 700;
	font-size: 24px;
	white-space: nowrap;
}

.ucdl-single-description {
	margin-top: 16px;
	line-height: 1.6;
}

.ucdl-specs-heading {
	color: var(--ucdl-red);
	margin-top: 32px;
}

.ucdl-accordion {
	border-top: 1px solid #ddd;
}

.ucdl-accordion-item {
	border-bottom: 1px solid #ffffff;
}

.ucdl-accordion-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	background: #cdcdcd;
	border: none;
	border-radius: 0;
	box-shadow: none;
	color: #8a8a8a;
	font-family: "Squad One Regular", "Squad One", sans-serif;
	line-height: 1.1;
	text-align: left;
	text-transform: none;
	padding: 0 16px;
	font-weight: 400;
	letter-spacing: 0.02em;
	cursor: pointer;
	font-size: 28px;
	transition: color 0.15s ease, background 0.15s ease;
}

.ucdl-accordion-trigger:hover,
.ucdl-accordion-trigger:focus,
.ucdl-accordion-trigger[aria-expanded="true"] {
	background: #d9d9d9;
	color: var(--ucdl-red);
}

.ucdl-accordion-title {
	flex: 1;
	min-width: 0;
}

.ucdl-accordion-icon {
	width: 70px;
	height: 60px;
	object-fit: contain;
	flex-shrink: 0;
}

.ucdl-accordion-trigger .dashicons {
	width: 70px;
	height: 60px;
	font-size: 40px;
	line-height: 60px;
	flex-shrink: 0;
}

.ucdl-accordion-trigger .ucdl-accordion-arrow {
	width: 26px;
	height: 38px;
	object-fit: contain;
	flex-shrink: 0;
	opacity: 0.6;
	transition: opacity 0.15s ease;
}

.ucdl-accordion-trigger:hover .ucdl-accordion-arrow,
.ucdl-accordion-trigger[aria-expanded="true"] .ucdl-accordion-arrow {
	opacity: 1;
}

.ucdl-accordion-panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.3s ease;
}

.ucdl-accordion-item.is-open .ucdl-accordion-panel {
	grid-template-rows: 1fr;
}

.ucdl-accordion-panel-inner {
	overflow: hidden;
	min-height: 0;
}

.ucdl-accordion-panel-inner .ucdl-specs-table {
	margin: 0 0 16px;
}

.ucdl-specs-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid #dcdcdc;
}

.ucdl-specs-table tr {
	border-bottom: 1px solid #858585;
}

.ucdl-specs-table td {
	padding: 5px 10px;
	font-size: 14px;
}

.ucdl-spec-label {
	color: #777;
	width: 40%;
}

.ucdl-single-enquire {
	margin-top: 24px;
	display: block;
	width: 100%;
	text-align: center;
}
