/* Vehicle Detail Page - Desktop */

.vehicle-detail {
	padding: 3rem 0 6rem;
	background: linear-gradient(180deg, #F8F9FA 0%, #FFFFFF 100%);
	min-height: calc(100vh - var(--nav-offset));
}

/* Breadcrumb */
.breadcrumb {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 2.5rem;
	font-size: 0.875rem;
}

.breadcrumb a {
	color: var(--primary);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s;
}

.breadcrumb a:hover {
	color: var(--primary-dark);
}

.breadcrumb span {
	color: var(--gray-400);
}

/* Main Layout */
.vehicle-layout {
	display: grid;
	grid-template-columns: 1fr 420px;
	gap: 2.5rem;
	align-items: start;
	max-width: 100%;
	overflow: hidden;
}

.vehicle-layout > * {
	min-width: 0;
	max-width: 100%;
}

/* Gallery Section */
.vehicle-gallery {
	background: white;
	border-radius: 16px;
	padding: 2rem;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	margin-bottom: 2rem;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
}

.gallery-view-toggle {
	display: inline-flex;
	gap: 0.5rem;
	margin-bottom: 1rem;
	padding: 0.25rem;
	background: var(--gray-100, #F3F4F6);
	border-radius: 10px;
}

.gallery-view-toggle.is-hidden {
	display: none;
}

.gallery-view-btn {
	border: none;
	background: transparent;
	color: var(--gray-700, #374151);
	padding: 0.5rem 0.9rem;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
}

.gallery-view-btn.is-active {
	background: var(--primary, #0B2D5B);
	color: #fff;
}

.gallery-view.is-hidden {
	display: none;
}

.main-image-spin cc-webplayer {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 420px;
	background: #F8F9FA;
}

.main-image-spin [data-carcutter-mount] {
	width: 100%;
	height: 100%;
}

.spin-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	color: var(--gray-600, #4B5563);
	background: #F8F9FA;
}

.main-image {
	width: 100%;
	max-width: 100%;
	height: 500px;
	background: #F8F9FA;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 1rem;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.main-image img {
	width: 100% !important;
	height: 100% !important;
	max-height: 100% !important;
	object-fit: contain;
	display: block;
}

.gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	background: rgba(255, 255, 255, 0.95);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	z-index: 10;
}

.gallery-arrow:hover {
	background: white;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	transform: translateY(-50%) scale(1.05);
}

.gallery-arrow svg {
	width: 24px;
	height: 24px;
	color: #0B2D5B;
}

.gallery-arrow-prev {
	left: 1rem;
}

.gallery-arrow-next {
	right: 1rem;
}

.thumbnail-container {
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 0.5rem 0;
	-webkit-overflow-scrolling: touch;
	position: relative;
}

.thumbnails {
	display: flex;
	gap: 0.75rem;
	width: fit-content;
}

.thumbnail {
	flex-shrink: 0;
	width: 100px;
	height: 70px;
	border: 2px solid transparent;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	background: #F8F9FA;
	padding: 0;
	transition: all 0.2s;
}

.thumbnail:hover {
	border-color: var(--primary);
}

.thumbnail.active {
	border-color: var(--primary);
	box-shadow: 0 0 0 2px rgba(11, 45, 91, 0.1);
}

.thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Vehicle Overview */
.vehicle-overview,
.vehicle-description {
	background: white;
	border-radius: 16px;
	padding: 2rem;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	margin-bottom: 2rem;
}

.vehicle-overview h2,
.vehicle-description h2 {
	font-family: var(--font-display);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--gray-900);
	margin-bottom: 1.5rem;
}

.overview-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}

.overview-item {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 1rem;
	background: #F8F9FA;
	border-radius: 8px;
}

.overview-item .label {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--gray-600);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.overview-item .value {
	font-size: 1rem;
	font-weight: 600;
	color: var(--gray-900);
}

.description-content {
	color: var(--gray-700);
	line-height: 1.7;
	font-size: 1rem;
}

/* Sidebar */
.vehicle-sidebar {
	position: sticky;
	top: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.price-card,
.contact-form-card,
.financing-cta {
	background: white;
	border-radius: 16px;
	padding: 2rem;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Price Card */
.price-header {
	margin-bottom: 1.5rem;
}

.vehicle-title {
	font-family: var(--font-display);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--gray-900);
	margin-bottom: 0.25rem;
}

.vehicle-trim {
	color: var(--gray-600);
	font-size: 1rem;
	margin-bottom: 0.75rem;
}

.certified-badge {
	display: inline-block;
	padding: 0.375rem 0.75rem;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: white;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.price-display {
	padding: 1.5rem 0;
	border-top: 2px solid #F8F9FA;
	border-bottom: 2px solid #F8F9FA;
	margin-bottom: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.price-breakdown {
	padding: 1.5rem 0;
	border-top: 2px solid #F8F9FA;
	border-bottom: 2px solid #F8F9FA;
	margin-bottom: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.price-breakdown .price-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75rem;
}

.price-breakdown .price-row-label {
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: var(--gray-700);
	text-transform: uppercase;
}

.price-breakdown .price-row-amount {
	font-family: var(--font-display);
	font-size: 1.125rem;
	font-weight: 800;
	color: var(--primary);
	white-space: nowrap;
}

.price-breakdown .price-row-rebate .price-row-amount {
	color: #059669;
}

.price-breakdown .price-row-final {
	padding-top: 0.5rem;
	border-top: 1px solid var(--gray-200);
}

.price-breakdown .price-row-final .price-row-label {
	color: var(--primary);
}

.price-breakdown .price-row-final .price-row-amount {
	font-size: 1.75rem;
	color: #059669;
}

.price {
	display: block;
	font-family: var(--font-display);
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--primary);
	line-height: 1;
	margin-bottom: 0.5rem;
}

.mileage {
	display: block;
	color: var(--gray-600);
	font-size: 1rem;
	font-weight: 600;
}

/* Vehicle Location Info */
.vehicle-location-info {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem 0;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid #F8F9FA;
}

.location-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.location-item svg {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	color: var(--primary);
	margin-top: 0.125rem;
}

.location-item > div {
	flex: 1;
}

.location-item strong {
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--gray-900);
	margin-bottom: 0.25rem;
	text-transform: uppercase;
	letter-spacing: 0.025em;
}

.location-item p {
	font-size: 0.875rem;
	color: var(--gray-600);
	line-height: 1.5;
	margin: 0;
}

.location-phone-link {
	display: inline-block;
	color: var(--primary);
	text-decoration: none;
	font-size: 1rem;
	font-weight: 600;
	transition: color 0.2s;
}

.location-phone-link:hover {
	color: var(--primary-dark);
	text-decoration: underline;
}

/* Contact Actions */
.contact-actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.btn-primary,
.btn-secondary,
.btn-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 1rem 1.5rem;
	border-radius: 8px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s;
	border: none;
	cursor: pointer;
	font-size: 1rem;
}

.btn-primary {
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: white;
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(11, 45, 91, 0.3);
}

.btn-secondary {
	background: white;
	color: var(--primary);
	border: 2px solid var(--primary);
}

.btn-secondary:hover {
	background: var(--primary);
	color: white;
}

.btn-link {
	background: transparent;
	color: var(--primary);
	padding: 0.75rem 1rem;
	justify-content: flex-start;
}

.btn-link:hover {
	background: rgba(11, 45, 91, 0.05);
}

/* Contact Form */
.contact-form-card h3 {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--gray-900);
	margin-bottom: 1.5rem;
}

.form-group {
	margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 2px solid #E5E7EB;
	border-radius: 8px;
	font-size: 1rem;
	font-family: var(--font-sans);
	transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--primary);
}

.form-group textarea {
	resize: vertical;
	min-height: 100px;
}

.btn-submit {
	width: 100%;
	padding: 1rem;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: white;
	border: none;
	border-radius: 8px;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(11, 45, 91, 0.3);
}

/* Financing CTA */
.financing-cta h4 {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--gray-900);
	margin-bottom: 0.5rem;
}

.financing-cta p {
	color: var(--gray-600);
	margin-bottom: 1rem;
}

.btn-financing {
	display: block;
	width: 100%;
	padding: 1rem;
	background: linear-gradient(135deg, var(--accent), var(--accent));
	color: white;
	text-align: center;
	border-radius: 8px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.2s;
}

.btn-financing:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(200, 29, 37, 0.3);
}

/* Similar Vehicles */
.similar-vehicles {
	margin-top: 4rem;
}

.similar-vehicles h2 {
	font-family: var(--font-display);
	font-size: 2rem;
	font-weight: 700;
	color: var(--gray-900);
	margin-bottom: 2rem;
}

.similar-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
}

.similar-card {
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	text-decoration: none;
	transition: all 0.2s;
}

.similar-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.similar-image {
	width: 100%;
	height: 180px;
	overflow: hidden;
	background: #F8F9FA;
}

.similar-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.similar-info {
	padding: 1.25rem;
}

.similar-price {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--primary);
	margin-bottom: 0.5rem;
}

.similar-info h3 {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--gray-900);
	margin-bottom: 0.5rem;
}

.similar-specs {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--gray-600);
}

/* Responsive */
@media (max-width: 1200px) {
	.similar-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 1024px) {
	.vehicle-layout {
		grid-template-columns: 1fr 360px;
	}
}

@media (max-width: 860px) {
	.vehicle-detail {
		display: none;
	}
}

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

@media (max-width: 560px) {
	.similar-grid {
		grid-template-columns: 1fr;
	}
}
