/**
 * Vehicle Directory — Frontend styles
 *
 * All public classes use the `vd-` prefix.
 */

.vd-grid {
	--vd-columns: 7;
	--vd-gap: 1.25rem;
	display: grid;
	grid-template-columns: repeat(var(--vd-columns), minmax(0, 1fr));
	gap: var(--vd-gap);
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vd-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e6e8ec;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.vd-card:hover {
	transform: translateY(-3px);
	border-color: #d0d5dd;
	box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
}

.vd-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.vd-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
	overflow: hidden;
}

.vd-card__image,
.vd-card__media img,
.vd-single__image,
.vd-brand-archive__logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 0.75rem;
}

.vd-card__image--placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 45%),
		repeating-linear-gradient(
			-45deg,
			#e8edf3,
			#e8edf3 8px,
			#f3f6fa 8px,
			#f3f6fa 16px
		);
}

.vd-card__title,
.vd-title {
	margin: 0;
	padding: 0.9rem 1rem 0.9rem;
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.35;
	color: #101828;
	text-align: center;
}

.vd-card__meta {
	display: block;
	padding: 0 1rem 1rem;
	font-size: 0.875rem;
	line-height: 1.4;
	color: #667085;
	text-align: center;
}

.vd-card--brand {
	border-radius: 10px;
	box-shadow: none;
}

.vd-card--brand:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(16, 24, 40, 0.06);
}

.vd-brands {
	--vd-gap: 0.75rem;
}

.vd-card--brand .vd-card__media {
	aspect-ratio: 1 / 1;
	padding: 0.35rem;
	background: #f8fafc;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vd-card--brand .vd-card__image,
.vd-card--brand .vd-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	padding: 0.35rem;
}

.vd-card--brand .vd-card__title {
	padding: 0.35rem 0.25rem 0.45rem;
	font-size: 0.7rem;
	font-weight: 600;
	line-height: 1.25;
}

.vd-empty {
	margin: 0;
	padding: 1.5rem;
	border: 1px dashed #d0d5dd;
	border-radius: 12px;
	color: #667085;
	text-align: center;
	background: #f9fafb;
}

.vd-single,
.vd-brand-archive,
.vd-model-category,
.vd-car-reviews-archive {
	width: min(1100px, calc(100% - 2rem));
	margin: 2rem auto 3rem;
}

.vd-single__header {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 2rem;
	align-items: center;
	margin-bottom: 2rem;
}

.vd-single__media {
	border-radius: 18px;
	overflow: hidden;
	background: #f3f6fa;
	border: 1px solid #e6e8ec;
	aspect-ratio: 16 / 10;
}

.vd-single__title {
	padding: 0;
	margin: 0 0 0.75rem;
	font-size: clamp(1.75rem, 2.5vw, 2.4rem);
	text-align: start;
}

.vd-single__brand {
	margin: 0 0 0.75rem;
	color: #475467;
}

.vd-single__brand-label {
	font-weight: 600;
	margin-inline-end: 0.35rem;
}

.vd-single__brand-link {
	color: #175cd3;
	text-decoration: none;
}

.vd-single__brand-link:hover {
	text-decoration: underline;
}

.vd-single__excerpt {
	margin: 0;
	color: #344054;
	line-height: 1.6;
}

.vd-single__content {
	margin: 0 0 2.5rem;
	line-height: 1.7;
	color: #1d2939;
}

.vd-single__section-title,
.vd-related__title {
	padding: 0;
	margin: 0 0 1.25rem;
	font-size: 1.35rem;
	text-align: start;
}

.vd-single__children,
.vd-related {
	margin-top: 2.5rem;
}

/* —— Brand archive header —— */
.vd-brand-archive__header {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 1.5rem 2rem;
	margin-bottom: 2.5rem;
	padding: 1.5rem 1.75rem;
	text-align: start;
	background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
	border: 1px solid #e6e8ec;
	border-radius: 18px;
}

.vd-brand-archive__logo {
	flex: 0 0 auto;
	width: 120px;
	height: 120px;
	aspect-ratio: 1 / 1;
	margin: 0;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e6e8ec;
	box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06);
	display: flex;
	align-items: center;
	justify-content: center;
}

.vd-brand-archive__logo img,
.vd-brand-archive__logo .vd-card__image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 0.75rem;
}

.vd-brand-archive__content {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.65rem;
}

/* —— Breadcrumb —— */
.vd-breadcrumb {
	margin: 0 0 0.35rem;
	padding: 0;
	width: 100%;
	direction: rtl;
	text-align: start;
}

.vd-breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vd-breadcrumb__item {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: #667085;
}

.vd-breadcrumb__item:not(:last-child)::after {
	content: "/";
	margin-inline-start: 0.35rem;
	color: #98a2b3;
	font-weight: 400;
}

.vd-breadcrumb__link {
	color: #667085;
	text-decoration: none;
}

.vd-breadcrumb__link:hover {
	color: #175cd3;
	text-decoration: underline;
}

.vd-breadcrumb__current {
	color: #98a2b3;
}

.vd-model-category .vd-breadcrumb,
.vd-model-single .vd-breadcrumb {
	margin-bottom: 0.35rem;
}

.vd-brand-archive__title {
	padding: 0;
	margin: 0;
	font-size: clamp(1.85rem, 3vw, 1.2rem);
	font-weight: 750;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: #101828;
	text-align: start;
}

.vd-brand-archive__description {
	max-width: 56rem;
	margin: 0;
	padding: 0;
	font-size: 0.8rem;
	line-height: 1.75;
	color: #667085;
	text-align: start;
}

.vd-brand-archive__description p {
	margin: 0 0 0.5rem;
}

.vd-brand-archive__description p:last-child {
	margin-bottom: 0;
}

.vd-brand-archive__vehicles {
	margin-top: 0.5rem;
}

/* —— Car reviews archive (/car-reviews/) —— */
.vd-car-reviews-archive__header {
	align-items: stretch;
}

.vd-car-reviews-archive__header .vd-brand-archive__content {
	width: 100%;
}

.vd-car-reviews-archive__brands {
	margin-top: 0.5rem;
}

.vd-car-reviews-archive .vd-brands {
	--vd-gap: 0.85rem;
}

/* Vehicle card images */
.vd-card--vehicle .vd-card__media {
	height: auto;
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	overflow: hidden;
	margin: 0.65rem 0.65rem 0;
}

.vd-card--vehicle .vd-card__image,
.vd-card--vehicle .vd-card__media img {
	display: block;
	width: 100%;
	height: 75%;
	border-radius: 12px;
	object-fit: cover;
	object-position: center;
	padding: 0;
}

/* —— Model category page (aligned with brand archive) —— */
.vd-model-category .vd-single__header,
.vd-model-single .vd-single__header {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 1.5rem 2rem;
	margin-bottom: 2.5rem;
	padding: 1.5rem 1.75rem;
	background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
	border: 1px solid #e6e8ec;
	border-radius: 18px;
	grid-template-columns: none;
}

.vd-model-category .vd-single__media,
.vd-model-single .vd-single__media {
	flex: 0 0 auto;
	width: 160px;
	height: 120px;
	aspect-ratio: 4 / 3;
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e6e8ec;
	box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06);
}

.vd-model-category .vd-single__image,
.vd-model-category .vd-single__media img,
.vd-model-single .vd-single__image,
.vd-model-single .vd-single__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	padding: 0;
	border-radius: 12px;
}

.vd-model-category .vd-single__intro,
.vd-model-single .vd-single__intro {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.vd-model-category .vd-single__title,
.vd-model-single .vd-single__title {
	padding: 0;
	margin: 0;
	font-size: clamp(1.85rem, 3vw, 1.2rem);
	font-weight: 750;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: #101828;
	text-align: start;
}

.vd-model-category .vd-single__brand,
.vd-model-single .vd-single__brand {
	margin: 0;
	color: #667085;
	font-size: 0.8rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.vd-model-category .vd-single__brand-link,
.vd-model-single .vd-single__brand-link {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 0.4rem;
	color: #175cd3;
	text-decoration: none;
}

.vd-model-category .vd-single__brand-name,
.vd-model-single .vd-single__brand-name {
	line-height: 1.3;
}

.vd-model-category .vd-single__brand-logo,
.vd-model-single .vd-single__brand-logo {
	display: block;
	width: auto;
	height: 22px;
	max-height: 24px;
	max-width: 72px;
	object-fit: contain;
	padding: 0;
	flex-shrink: 0;
}

.vd-model-category .vd-single__excerpt {
	max-width: 36rem;
	margin: 0;
	color: #667085;
	line-height: 1.75;
	font-size: 1rem;
}

.vd-model-category .vd-single__excerpt p {
	margin: 0 0 0.5rem;
}

.vd-model-category .vd-single__excerpt p:last-child {
	margin-bottom: 0;
}

.vd-model-category .vd-single__children {
	margin-top: 0.5rem;
}

.vd-model-category .vd-single__section-title,
.vd-model-single .vd-related__title {
	margin: 0 0 1.75rem;
	font-size: 1.25rem;
	font-weight: 500;
	color: #101828;
}

.vd-model-category .vd-grid,
.vd-model-single .vd-grid {
	--vd-gap: 0.85rem;
}

.vd-model-category .vd-card--vehicle,
.vd-model-single .vd-card--vehicle {
	border-radius: 12px;
}

.vd-model-category .vd-card--vehicle .vd-card__media,
.vd-model-single .vd-card--vehicle .vd-card__media {
	aspect-ratio: 16 / 10;
	margin: 0.5rem 0.5rem 0;
	border-radius: 12px;
	overflow: hidden;
}

.vd-model-category .vd-card--vehicle .vd-card__title,
.vd-model-single .vd-card--vehicle .vd-card__title {
	padding: 0.9rem 0.65rem 0.9rem;
	font-size: 0.9rem;
}

.vd-model-category .vd-card--vehicle .vd-card__meta,
.vd-model-single .vd-card--vehicle .vd-card__meta {
	padding: 0 0.65rem 0.65rem;
	font-size: 0.8rem;
}
.vd-model-single .vd-single__brand {
	gap: 0.35rem 0.5rem;
}

.vd-model-single .vd-single__content {
	margin: 0 0 2.5rem;
	padding-top: 0.25rem;
	line-height: 1.75;
	color: #344054;
}

.vd-model-single .vd-single__divider {
	width: 100%;
	height: 0;
	margin: 40px 0 32px;
	border: 0;
	border-top: 0.5px solid rgba(208, 213, 221, 0.9);
	background: transparent;
}

.vd-model-single .vd-related {
	margin-top: 0;
}

.vd-model-single .vd-related__title {
	margin: 0 0 1.75rem;
	padding: 0;
	font-size: 1.25rem;
	font-weight: 500;
	color: #101828;
	text-align: start;
}

/*
 * Responsive rules moved to: assets/css/frontend-mobile.css
 * Legacy backup: assets/css/frontend-responsive-legacy.css.bak
 * Full file backup: assets/css/frontend.css.bak
 *
 * To rollback mobile redesign: see class-vehicle-assets.php (vd_use_mobile_css filter)
 * or restore media queries from frontend-responsive-legacy.css.bak into this file.
 */
