/* =====================================================================
 * [vehicle_list] – danh sách xe: album ảnh + nội dung, so le trái / phải
 * Màu: chỉ dùng biến :root (--hg-primary, --hg-text, --hg-button, --green-natural)
 * ===================================================================== */
.vl-list { display: flex; flex-direction: column; gap: 32px; }

.vl-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 0 40px;
	padding: 12px;
	scroll-margin-top: 120px; /* link #xe-… không bị header dính che */
	border: 1px solid color-mix(in srgb, var(--hg-text) 10%, transparent);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 6px 24px color-mix(in srgb, var(--hg-text) 7%, transparent);
}
.vl-item.is-reverse .vl-media { order: 2; }
.vl-item.is-reverse .vl-body { order: 1; padding: 20px 0 20px 28px; }

/* ---------- Album ---------- */
.vl-media { display: flex; flex-direction: column; justify-content: center; gap: 8px; align-self: stretch; }
.vl-list .vl-main,
.vl-list .vl-thumb {
	position: relative;
	display: block;
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 12px;
	background: color-mix(in srgb, var(--hg-text) 8%, #fff) !important;
	box-shadow: none;
	overflow: hidden;
	cursor: pointer;
}
.vl-list .vl-main { aspect-ratio: 16 / 10; }
.vl-list .vl-thumb { aspect-ratio: 16 / 11; }
.vl-main img, .vl-thumb img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	margin: 0;
	object-fit: cover;
	transition: transform .5s;
}
.vl-main:hover img, .vl-thumb:hover img { transform: scale(1.05); }
.vl-list .vl-main:focus-visible, .vl-list .vl-thumb:focus-visible { outline: 2px solid var(--hg-primary); outline-offset: 2px; }
.vl-noimg { background: linear-gradient(150deg, var(--hg-primary), var(--hg-text)) !important; cursor: default; }
.vl-media.is-single { justify-content: center; }
.vl-media.is-single .vl-main { aspect-ratio: 4 / 3; }

.vl-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* Ô cuối "+N" */
.vl-more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, #000 45%, transparent);
	color: #fff;
	font-size: 22px;
	font-weight: 600;
	line-height: 1;
	transition: background .2s;
}
.vl-thumb:hover .vl-more { background: color-mix(in srgb, #000 60%, transparent); }

/* Nút play trên video */
.vl-play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: color-mix(in srgb, #fff 90%, transparent);
	color: var(--hg-primary);
}
.vl-play svg { width: 26px; height: 26px; margin-left: 3px; }
.vl-thumb .vl-play { width: 34px; height: 34px; }
.vl-thumb .vl-play svg { width: 16px; height: 16px; margin-left: 2px; }

/* ---------- Nội dung ---------- */
.vl-body { padding: 20px 28px 20px 0; }
.vl-list .vl-title {
	margin: 0 0 16px;
	color: var(--hg-primary);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
}
.vl-list .vl-sub { margin: -10px 0 14px; color: var(--hg-text); font-size: 15px; font-weight: 500; line-height: 1.4; }
.vl-item.is-guide .vl-main img { object-position: center 25%; } /* ảnh chân dung: giữ phần mặt */
.vl-content { color: var(--hg-text); font-size: 15px; line-height: 1.6; }
.vl-content > :last-child { margin-bottom: 0; }
.vl-content p { margin: 0 0 10px; }
.vl-content ul, .vl-content ol { margin: 0 0 10px 1.2em; padding: 0; }
.vl-content li { margin: 0 0 2px; }
.vl-content ul li::marker { color: var(--hg-text); }
.vl-content h4, .vl-content h5 { margin: 14px 0 6px; color: var(--hg-text); font-size: 16px; }

/* ---------- Lightbox (tạo bằng JS, gắn vào cuối trang) ---------- */
html.vl-lock { overflow: hidden; }
.vl-lightbox { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 56px 24px 20px; background: color-mix(in srgb, #000 90%, transparent); }
.vl-lightbox[hidden] { display: none; }
.vl-lb-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 940px; max-height: 100%; }
.vl-lb-main { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); border-radius: 4px; background: #000; overflow: hidden; }
.vl-lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.vl-lb-stage img { width: 100%; height: 100%; max-width: none; margin: 0; object-fit: contain; }
.vl-lb-stage video, .vl-lb-stage iframe { width: 100%; height: 100%; border: 0; background: #000; }
.vl-lb-caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 40px 20px 16px; background: linear-gradient(to top, color-mix(in srgb, #000 60%, transparent), transparent); color: #fff; font-size: 16px; font-weight: 500; line-height: 1.4; text-align: center; pointer-events: none; }
.vl-lb-caption[hidden] { display: none; }
.vl-lightbox .vl-lb-prev, .vl-lightbox .vl-lb-next { position: absolute; top: 50%; z-index: 2; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; min-height: 0; margin: 0; padding: 0; border: 0 !important; border-radius: 50%; background: color-mix(in srgb, #000 40%, transparent) !important; color: #fff !important; transform: translateY(-50%); cursor: pointer; transition: background .2s; }
.vl-lightbox .vl-lb-prev:hover, .vl-lightbox .vl-lb-next:hover { background: color-mix(in srgb, #000 65%, transparent) !important; }
.vl-lightbox .vl-lb-prev { left: 16px; }
.vl-lightbox .vl-lb-next { right: 16px; }
.vl-lightbox button:focus { outline: none; }
.vl-lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vl-lb-prev svg, .vl-lb-next svg { width: 22px; height: 22px; }
.vl-lightbox .vl-lb-close { position: absolute; top: 12px; right: 16px; z-index: 3; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0; border: 0 !important; background: none !important; color: #fff !important; cursor: pointer; }
.vl-lb-close svg { width: 30px; height: 30px; }
.vl-lightbox .vl-lb-close:hover { opacity: .75; }
.vl-lb-count { margin: 12px 0 10px; color: #fff; font-size: 14px; font-weight: 500; line-height: 1; }
.vl-lb-thumbs { display: flex; gap: 10px; width: 100%; padding: 2px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.vl-lb-thumbs::-webkit-scrollbar { display: none; }
.vl-lightbox .vl-lb-thumb { position: relative; flex: 0 0 calc((100% - 50px) / 6); aspect-ratio: 16 / 10; min-height: 0; margin: 0; padding: 0; border: 3px solid transparent !important; border-radius: 6px; background: #222 !important; overflow: hidden; opacity: .65; cursor: pointer; transition: opacity .2s, border-color .2s; }
.vl-lightbox .vl-lb-thumb:hover { opacity: 1; }
.vl-lightbox .vl-lb-thumb.is-active { border-color: #fff !important; opacity: 1; }
.vl-lb-thumb img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none; margin: 0; object-fit: cover; }
.vl-lb-thumb .vl-play { width: 28px; height: 28px; }
.vl-lb-thumb .vl-play svg { width: 14px; height: 14px; margin-left: 2px; }

/* ---------- Kính lúp trong lightbox ---------- */
.vl-lb-stage img { cursor: zoom-in; transition: none; will-change: transform; transform-origin: 50% 50%; } /* JS tự làm mượt */
.vl-lightbox.is-zoomed .vl-lb-stage img { cursor: zoom-out; }
.vl-lightbox.is-zoomed .vl-lb-caption,
.vl-lightbox.is-zoomed .vl-lb-prev,
.vl-lightbox.is-zoomed .vl-lb-next { opacity: 0; pointer-events: none; }
.vl-lightbox .vl-lb-zoom {
	position: absolute; top: 12px; right: 64px; z-index: 3;
	display: flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0;
	border: 0 !important; border-radius: 50%;
	background: color-mix(in srgb, #fff 14%, transparent) !important;
	color: #fff !important; cursor: pointer; transition: background .2s;
}
.vl-lightbox .vl-lb-zoom:hover { background: color-mix(in srgb, #fff 26%, transparent) !important; }
.vl-lightbox .vl-lb-zoom[hidden] { display: none; }
.vl-lb-zoom svg { width: 22px; height: 22px; }
.vl-lightbox.is-zoomed .vl-lb-zoom { background: #fff !important; color: var(--hg-text) !important; }
.vl-lightbox.is-zoomed .vl-zoom-plus { display: none; } /* đang phóng to: icon thành dấu trừ */

/* ---------- Responsive ---------- */
/* Laptop nhỏ + máy tính bảng ngang */
@media (min-width: 850px) and (max-width: 1099px) {
	.vl-item { gap: 0 28px; }
	.vl-body { padding: 16px 16px 16px 0; }
	.vl-item.is-reverse .vl-body { padding: 16px 0 16px 16px; }
	.vl-list .vl-title { font-size: 24px; }
	.vl-content { font-size: 14px; }
}
/* Máy tính bảng dọc + điện thoại: ảnh trên, nội dung dưới (không so le) */
@media (max-width: 849px) {
	.vl-list { gap: 24px; }
	.vl-item { grid-template-columns: minmax(0, 1fr); padding: 12px; }
	.vl-item.is-reverse .vl-media { order: 0; }
	.vl-body,
	.vl-item.is-reverse .vl-body { order: 0; padding: 20px 8px 8px; }
	.vl-list .vl-title { margin-bottom: 12px; font-size: 22px; }
}
@media (max-width: 549px) {
	.vl-list { gap: 20px; }
	.vl-item { padding: 10px; border-radius: 12px; }
	.vl-media, .vl-thumbs { gap: 6px; }
	.vl-list .vl-main, .vl-list .vl-thumb { border-radius: 8px; }
	.vl-body, .vl-item.is-reverse .vl-body { padding: 16px 6px 6px; }
	.vl-list .vl-title { font-size: 20px; }
	.vl-content { font-size: 14px; }
	.vl-more { font-size: 18px; }

	.vl-lightbox { padding: 56px 0 16px; }
	.vl-lb-main { aspect-ratio: 4 / 3; border-radius: 0; }
	.vl-lightbox .vl-lb-prev, .vl-lightbox .vl-lb-next { width: 38px; height: 38px; }
	.vl-lightbox .vl-lb-prev { left: 8px; }
	.vl-lightbox .vl-lb-next { right: 8px; }
	.vl-lb-caption { font-size: 14px; padding: 32px 14px 12px; }
	.vl-lb-thumbs { gap: 8px; padding: 2px 12px; }
	.vl-lightbox .vl-lb-thumb { flex-basis: 84px; }
	.vl-lightbox .vl-lb-zoom { right: 58px; }
}
