/* Vehicle detail — gallery + specs top row; calculator below on desktop */

.leocar-vehicle-detail-layout .leocar-vehicle-detail-main {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.leocar-vehicle-detail-layout .leocar-vehicle-detail-grid {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.leocar-vehicle-detail-layout .leocar-vehicle-detail-below {
	margin-top: 2rem;
	width: 100%;
	max-width: 400px;
}

.leocar-vehicle-detail-layout .leocar-vehicle-col {
	min-width: 0;
}

.leocar-vehicle-card {
	background: rgba(33, 33, 33, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 15px;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	padding: 1.25rem;
}

.leocar-vehicle-card__title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 1rem;
	line-height: 1.3;
}

/* Calculator */
.leocar-vehicle-calculator__form {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.leocar-vehicle-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.leocar-vehicle-field__label {
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.65);
}

.leocar-vehicle-field__input {
	width: 100%;
	box-sizing: border-box;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(0, 0, 0, 0.35);
	color: #fafafa;
	padding: 0.6rem 0.75rem;
	font-size: 0.875rem;
}

.leocar-vehicle-field__input:focus {
	outline: 2px solid rgba(39, 172, 91, 0.45);
	outline-offset: 1px;
}

.leocar-vehicle-calculator__error {
	font-size: 0.75rem;
	color: #f8b132;
	margin: 0;
}

.leocar-vehicle-calculator__error.hidden,
.leocar-vehicle-calculator__result.hidden {
	display: none;
}

.leocar-vehicle-calculator__result {
	font-size: 0.875rem;
	margin: 0;
	color: rgba(255, 255, 255, 0.85);
}

.leocar-vehicle-calculator__result strong {
	color: #27ac5b;
	font-size: 1.125rem;
	margin-left: 0.25rem;
}

.leocar-vehicle-calculator__primary {
	width: 100%;
	max-width: none !important;
	margin-top: 0.25rem;
	background: #27ac5b !important;
	border-color: #27ac5b !important;
}

.leocar-vehicle-calculator__actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.leocar-vehicle-btn-outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: none !important;
	background: transparent !important;
	border: 1px solid rgba(255, 255, 255, 0.22) !important;
	color: #fafafa !important;
	font-size: 0.8125rem;
	padding: 0.55rem 0.75rem;
	text-align: center;
	text-decoration: none;
	border-radius: 15px;
	cursor: pointer;
}

.leocar-vehicle-btn-outline:hover {
	border-color: rgba(39, 172, 91, 0.55) !important;
	color: #27ac5b !important;
}

.leocar-vehicle-calculator__disclaimer {
	font-size: 0.625rem;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.45);
	margin: 0.75rem 0 0;
}

/* Gallery column */
.leocar-vehicle-detail-layout .leocar-vehicle-col--gallery {
	position: relative;
}

.leocar-vehicle-detail-layout .leocar-vehicle-gallery-wrap {
	position: relative;
}

.leocar-vehicle-gallery-count {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	z-index: 6;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.75rem;
	height: 1.75rem;
	padding: 0 0.4rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.65);
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.85);
	pointer-events: none;
}

/* Specs panel */
.leocar-vehicle-specs-panel__title {
	font-size: 1.125rem !important;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 0.75rem;
	padding: 0;
}

.leocar-vehicle-specs-panel__price {
	display: flex;
	flex-wrap: nowrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.leocar-vehicle-specs-panel__price-label {
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.65);
}

.leocar-vehicle-specs-panel__price-value {
	font-size: 1.75rem;
	font-weight: 400;
	line-height: 1.2;
	margin-left: auto;
	text-align: right;
	flex-shrink: 0;
}

.leocar-vehicle-specs-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.8125rem;
}

.leocar-vehicle-specs-table tr + tr {
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.leocar-vehicle-specs-table th,
.leocar-vehicle-specs-table td {
	padding: 0.55rem 0;
	vertical-align: top;
	text-align: left;
}

.leocar-vehicle-specs-table th {
	width: 42%;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.55);
	padding-right: 0.75rem;
}

.leocar-vehicle-specs-table td {
	font-weight: 600;
	color: #fafafa;
	word-break: break-word;
}

.leocar-vehicle-specs-panel__actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 1.25rem;
}

.leocar-vehicle-specs-panel__cta {
	width: 100%;
	max-width: none !important;
	background: #27ac5b !important;
	border-color: #27ac5b !important;
	font-size: 1rem;
}

/* Similar vehicles */
.leocar-vehicle-similar__title {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 1.5rem;
}

.leocar-vehicle-similar__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.leocar-similar-card {
	background: rgba(33, 33, 33, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 15px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.leocar-similar-card__media {
	display: block;
	aspect-ratio: 4 / 3;
	background: rgba(0, 0, 0, 0.35);
	overflow: hidden;
}

.leocar-similar-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.leocar-similar-card__title {
	font-size: 0.9375rem;
	font-weight: 700;
	margin: 0.75rem 1rem 0.25rem;
	line-height: 1.3;
}

.leocar-similar-card__title a {
	color: inherit;
	text-decoration: none;
}

.leocar-similar-card__title a:hover {
	color: #27ac5b;
}

.leocar-similar-card__price {
	margin: 0 1rem 0.75rem;
	font-size: 1.25rem;
}

.leocar-similar-card__cta {
	margin: 0 1rem 1rem;
	max-width: none !important;
	font-size: 0.8125rem;
}

.leocar-vehicle-similar__footer {
	display: flex;
	justify-content: center;
	margin-top: 2rem;
}

.leocar-vehicle-similar__inventory-btn {
	max-width: 280px;
	width: 100%;
	background: #27ac5b !important;
	border-color: #27ac5b !important;
	font-size: 1rem;
}

/* Footer mt-28 leaves empty black gap after similar vehicles on car pages */
body.single-car footer,
body.single-car footer.mt-28 {
	margin-top: 0 !important;
}

.leocar-vehicle-detail-layout .leocar-vehicle-similar {
	padding-bottom: 2rem;
}

/* Desktop: gallery + specs only in top grid; calculator below left */
@media (min-width: 1100px) {
	.leocar-vehicle-detail-layout .leocar-vehicle-detail-grid {
		display: grid;
		grid-template-columns: minmax(360px, 1fr) minmax(260px, 320px);
		grid-template-areas: 'gallery specs';
		align-items: stretch;
		gap: 1.5rem;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-col--gallery {
		grid-area: gallery;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-col--specs {
		grid-area: specs;
		display: flex;
		min-height: 100%;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-specs-panel {
		flex: 1;
		display: flex;
		flex-direction: column;
		min-height: 100%;
		box-sizing: border-box;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-specs-table {
		flex: 1 1 auto;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-specs-panel__actions {
		margin-top: auto;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-detail-below {
		margin-top: 2.5rem;
		max-width: 400px;
		align-self: flex-start;
	}

	.leocar-vehicle-similar__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (min-width: 768px) and (max-width: 1099px) {
	.leocar-vehicle-detail-layout .leocar-vehicle-detail-grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			'gallery gallery'
			'specs specs';
		gap: 1.25rem;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-col--gallery {
		grid-area: gallery;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-col--specs {
		grid-area: specs;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-detail-below {
		margin-top: 1.5rem;
		max-width: 100%;
	}

	.leocar-vehicle-similar__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) and (max-width: 1099px) {
	.leocar-vehicle-similar__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Mobile order: gallery → specs → calculator */
@media (max-width: 767px) {
	.leocar-vehicle-detail-layout .leocar-vehicle-detail-grid {
		display: flex;
		flex-direction: column;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-col--gallery {
		order: 1;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-col--specs {
		order: 2;
	}

	.leocar-vehicle-detail-layout .leocar-vehicle-detail-below {
		order: 3;
		margin-top: 1.25rem;
		max-width: none;
	}
}
