/**
 * CSS chung của theme Nam Việt Hưng: header, footer, nút tư vấn nổi,
 * và các thành phần dùng lại (nút, tiêu đề khối, thẻ sản phẩm, chip, bộ lọc).
 * Màu, font, cỡ chữ, khoảng cách lấy từ theme.json (biến --wp--preset--*).
 */

/* ------------------------------------------------------------------ Nền tảng */
/*
 * Thang chữ và lề lấy đúng theo web cũ (namviethung.com.vn), đổi theo các mốc
 * 1600 / 1200 / 992 / 768 / 480. theme.json đọc các biến này cho body, h1–h6 và nút.
 */
:root {
	--nvh-header-h: 123px;
	--nvh-radius: var(--wp--preset--border-radius--md, 12px);
	--nvh-gutter: 100px;
	--nvh-body-size: 16px;
	--nvh-body-ls: -0.5px;
	--nvh-btn-size: 16px;
	--nvh-btn-px: 40px;
	--nvh-h1: 56px;
	--nvh-h1-lh: 1.3;
	--nvh-h1-ls: -3px;
	--nvh-h2: 48px;
	--nvh-h2-lh: 1.3;
	--nvh-h2-ls: -1.5px;
	--nvh-h3: 36px;
	--nvh-h3-lh: 1.3;
	--nvh-h3-ls: -1px;
	--nvh-h4: 36px;
	--nvh-h4-lh: 1.25;
	--nvh-h4-ls: -2px;
	--nvh-h5: 32px;
	--nvh-h5-lh: 1.25;
	--nvh-h5-ls: -1.7px;
	--nvh-h6: 24px;
	--nvh-h6-lh: 1.45;
	--nvh-h6-ls: -1.7px;
	--nvh-section-py: 80px;
}

@media (min-width: 1200px) and (max-width: 1599px) {
	:root { --nvh-h2: 40px; --nvh-h2-lh: 52px; --nvh-h3: 30px; --nvh-section-py: 64px; }
}

@media (max-width: 1199px) {
	:root { --nvh-gutter: 60px; --nvh-h2: 36px; --nvh-h2-lh: 48px; --nvh-h3: 28px; --nvh-section-py: 60px; }
}

@media (max-width: 991.98px) {
	:root {
		--nvh-gutter: 40px;
		--nvh-body-size: 15px;
		--nvh-btn-size: 14px;
		--nvh-btn-px: 20px;
		--nvh-h1: 48px;
		--nvh-h1-ls: -1.2px;
		--nvh-h2: 30px;
		--nvh-h2-lh: 40px;
		--nvh-h3: 24px;
		--nvh-h4: 32px;
		--nvh-h4-ls: -0.2px;
		--nvh-h5: 24px;
		--nvh-h5-ls: -0.1px;
		--nvh-h6: 20px;
		--nvh-h6-ls: -0.1px;
		--nvh-section-py: 48px;
	}
}

@media (max-width: 767px) {
	:root {
		--nvh-gutter: 20px;
		--nvh-body-size: 14px;
		--nvh-h1: 44px;
		--nvh-h2: 24px;
		--nvh-h2-lh: 32px;
		--nvh-h3: 20px;
		--nvh-h4: 24px;
		--nvh-h5: 20px;
		--nvh-h6: 18px;
	}
}

@media (max-width: 575px) {
	:root { --nvh-section-py: 40px; }
}

@media (max-width: 480px) {
	:root {
		--nvh-body-ls: -0.1px;
		--nvh-h1: 36px;
		--nvh-h4: 22px;
		--nvh-h4-ls: -0.5px;
		--nvh-h5-ls: -0.5px;
		--nvh-h6-ls: -0.5px;
	}
}

/* Khung nội dung như .container của web cũ: tối đa 1600px gồm lề, nên phần chữ rộng tối đa 1400px. */
.nvh-container {
	width: 100%;
	max-width: 1600px;
	margin-inline: auto;
	padding-inline: var(--nvh-gutter);
}

/* Lề trên/dưới chung của các section trang chủ (section của web cũ). */
.nvh-section { padding-block: var(--nvh-section-py); }

/* Thang chữ dùng lại cho các tiêu đề không phải thẻ h2/h3 (giống class .h2/.h3 của web cũ). */
.nvh-h2 { font-size: var(--nvh-h2); line-height: var(--nvh-h2-lh); letter-spacing: var(--nvh-h2-ls); font-weight: 600; }
.nvh-h3 { font-size: var(--nvh-h3); line-height: var(--nvh-h3-lh); letter-spacing: var(--nvh-h3-ls); font-weight: 600; }
.nvh-h4 { font-size: var(--nvh-h4); line-height: var(--nvh-h4-lh); letter-spacing: var(--nvh-h4-ls); font-weight: 600; }

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--nvh-header-h) + 1rem); }
/* Không ép -webkit-font-smoothing: web cũ để mặc định nên chữ trên macOS đậm hơn một chút. */
body { text-rendering: optimizeLegibility; }
img { height: auto; }
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	clip-path: none;
	z-index: 1000;
}

/* ------------------------------------------------------------------ Tiêu đề khối */
.nvh-eyebrow {
	margin: 0 0 .5rem;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.nvh-eyebrow--light { color: var(--wp--preset--color--on-primary); }

.nvh-section-head {
	max-width: 760px;
	margin-bottom: var(--wp--preset--spacing--50);
}

.nvh-section-head--center {
	margin-inline: auto;
	text-align: center;
}

.nvh-section-head__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--xxl);
	text-wrap: balance;
}

.nvh-section-head__text {
	margin: .75rem 0 0;
	color: var(--wp--preset--color--muted);
}

/* ------------------------------------------------------------------ Nút */
/*
 * Nút như .btn của web cũ: nền xanh, rê chuột thì dải gradient chạy từ trái sang
 * (0.45s, cubic-bezier .785,.135,.15,.86). Dùng background-size thay cho ::before
 * nên không cần bọc chữ trong <span>.
 */
.wp-element-button,
.wp-block-button__link {
	background-image: var(--wp--preset--gradient--brand);
	background-repeat: no-repeat;
	background-position: left center;
	background-size: 0% 100%;
	transition: background-size .45s cubic-bezier(.785, .135, .15, .86), color .3s ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover { background-size: 100% 100%; }

.nvh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	text-align: center;
	text-decoration: none;
}

.wp-element-button.nvh-btn--outline,
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--primary);
	box-shadow: inset 0 0 0 2px currentColor;
}

.wp-element-button.nvh-btn--outline:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--primary);
}

/* .btn-white của web cũ: nền trắng, chữ xanh, rê chuột không đổi màu. */
.wp-element-button.nvh-btn--light,
.wp-element-button.nvh-btn--light:hover {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
}

.wp-element-button.nvh-btn--accent { background: var(--wp--preset--color--accent); }
.wp-element-button.nvh-btn--accent:hover { background: #b80404; }

.nvh-quote-btn.is-full .nvh-btn { width: 100%; }

/* ------------------------------------------------------------------ Chip và bộ lọc */
.nvh-chip {
	display: inline-flex;
	align-items: center;
	padding: .2rem .6rem;
	border-radius: 999px;
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
}

.nvh-filter {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.nvh-filter__btn {
	min-height: 40px;
	padding: .45rem 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.nvh-filter__btn:hover { border-color: var(--wp--preset--color--primary); color: var(--wp--preset--color--primary); }

.nvh-filter__btn[aria-pressed="true"],
.nvh-filter__btn[aria-current="true"] {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* ------------------------------------------------------------------ Tiêu đề khối, băng chuyền (theo web cũ) */
.nvh-title {
	color: var(--wp--preset--color--primary);
	font-size: var(--nvh-h2);
	font-weight: 600;
	line-height: var(--nvh-h2-lh);
	letter-spacing: var(--nvh-h2-ls);
}

.nvh-carousel__track {
	display: grid;
	grid-auto-flow: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	list-style: none;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.nvh-carousel__track::-webkit-scrollbar { display: none; }
.nvh-carousel__track > * { min-width: 0; scroll-snap-align: start; }

.nvh-arrow {
	position: absolute;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 50px;
	height: 50px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: 4px;
	background: #fff;
	color: var(--wp--preset--color--primary);
	box-shadow: 0 4px 8px -2px rgba(16, 24, 40, .1), 0 2px 4px -2px rgba(16, 24, 40, .06);
	cursor: pointer;
}
.nvh-arrow::before {
	content: "";
	width: 24px;
	height: 24px;
	background: currentColor;
	-webkit-mask: var(--nvh-icon-arrow) center / contain no-repeat;
	mask: var(--nvh-icon-arrow) center / contain no-repeat;
}
.nvh-arrow--prev::before { transform: scaleX(-1); }
.nvh-arrow--next { background: var(--wp--preset--color--primary); color: #fff; }
.nvh-arrow:hover { background: var(--wp--preset--color--primary-dark); border-color: var(--wp--preset--color--primary-dark); color: #fff; }
.nvh-arrow--round { border-color: #fff; border-radius: 50%; background: transparent; color: #fff; box-shadow: none; }
.nvh-arrow--round:hover { background: #fff; color: var(--wp--preset--color--primary); }
@media (max-width: 991.98px) {
	.nvh-arrow { width: 40px; height: 40px; }
	/* Nút vuông 40px của web cũ giữ padding 12px nên mũi tên chỉ còn 16px. */
	.nvh-arrow:not(.nvh-arrow--round)::before { width: 16px; height: 16px; }
}

/* ------------------------------------------------------------------ Thẻ sản phẩm (theo web cũ) */
.nvh-product-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (min-width: 768px) { .nvh-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .nvh-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.nvh-product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--card);
	border-radius: 4px;
	transition: box-shadow .25s ease;
}
.nvh-product-card:hover { box-shadow: 0 8px 24px rgba(3, 78, 162, .12); }

.nvh-product-card__media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--wp--preset--color--card); }
.nvh-product-card__media img,
.nvh-product-card__placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform .5s ease, opacity .4s ease;
}
.nvh-product-card:hover .nvh-product-card__media img { transform: scale(1.04); }
.nvh-product-card__img--hover { display: none; }
@media (min-width: 992px) {
	.nvh-product-card__img--hover { display: block; opacity: 0; }
	.nvh-product-card:hover .nvh-product-card__img--hover { opacity: 1; }
	.nvh-product-card:hover .nvh-product-card__media:has(.nvh-product-card__img--hover) > img:first-child { opacity: 0; }
}

.nvh-product-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 12px 0 16px;
	background: var(--wp--preset--color--base);
	border-radius: 0 0 2px 2px;
}
.nvh-product-card__top { flex: 1; padding: 0 12px 12px; }
.nvh-product-card__title {
	display: -webkit-box;
	min-height: 40px;
	margin: 0 0 4px;
	overflow: hidden;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: -0.5px;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.nvh-product-card__title a { color: inherit; text-decoration: none; }
.nvh-product-card__title a:hover { color: var(--wp--preset--color--primary); }
.nvh-product-card__price { margin: 0; color: var(--wp--preset--color--primary); font-size: 20px; font-weight: 600; line-height: 30px; letter-spacing: -0.7px; }
.nvh-product-card__tags { display: flex; flex-wrap: wrap; gap: 2px; padding: 12px 12px 0; border-top: 1px solid #f5f5f5; }
.nvh-product-card__tag { display: flex; flex: 0 0 calc(50% - 1px); flex-direction: column; gap: 8px; max-width: calc(50% - 1px); text-align: left; }
.nvh-product-card__tag span,
.nvh-product-card__tag strong { font-size: 13px; line-height: 13px; letter-spacing: -0.2px; color: var(--wp--preset--color--contrast); }
.nvh-product-card__tag strong { font-weight: 600; }

@media (min-width: 992px) and (max-width: 1199px) {
	.nvh-product-card__body { padding: 5px 7px; }
}

@media (max-width: 767px) {
	.nvh-product-card__body { padding: 5px 7px; text-align: center; }
	.nvh-product-card__title { font-size: 14px; }
	.nvh-product-card__price { font-size: 14px; }
}

/* ------------------------------------------------------------------ Header (theo web cũ: logo trái; phải: tìm kiếm + hotline, dưới là menu) */
.nvh-header {
	position: relative;
	z-index: 50;
	width: 100%;
	transition: box-shadow .3s ease-in-out;
}

/*
 * Header dính như web cũ: cuộn xuống quá chiều cao header + 250px thì header ẩn lên trên,
 * cuộn ngược lên thì trượt xuống (0.4s). Lớp do assets/js/header.js gắn.
 */
.nvh-header.is-sticky {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 999;
	visibility: hidden;
	opacity: 0;
	box-shadow: 0 0 10px rgba(0, 0, 0, .2);
	transform: translateY(-100%);
	transition: all .4s ease;
}
.nvh-header.is-sticky.is-shown { visibility: visible; opacity: 1; transform: translateY(0); }
.admin-bar .nvh-header.is-sticky { top: var(--wp-admin--admin-bar--height, 32px); }
@media (min-width: 992px) { .nvh-header.is-sticky .nvh-header__logo img { height: 50px; } }

.nvh-header__bar { align-items: center !important; }
.nvh-header__logo { flex-shrink: 0; width: 143px; padding: 5px 0 15px; }
.nvh-header__logo a { display: block; }
/* Chiều cao cố định theo mốc (logo 128×80): khung ảnh giữ chỗ ngay cả khi ảnh chưa tải, không xô trang. */
.nvh-header__logo img { width: auto !important; max-width: 210px; height: 80px; aspect-ratio: 128 / 80; }

.nvh-header__right { flex: 1 1 0; gap: 12px !important; align-items: flex-end !important; min-width: 0; }
.nvh-header__actions { align-items: center !important; gap: 16px !important; }
.nvh-header__buttons { gap: 0; }

/* Nút hotline (.header-phone-btn của web cũ). */
.nvh-header__hotline .wp-block-button__link {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	padding: 10px 20px;
	font-size: 16px;
	letter-spacing: -0.2px;
	line-height: 16px;
	text-align: left;
	white-space: nowrap;
}

.nvh-header__hotline .wp-block-button__link::before {
	content: "";
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	background: currentColor;
	-webkit-mask: var(--nvh-icon-phone) center / contain no-repeat;
	mask: var(--nvh-icon-phone) center / contain no-repeat;
}

:root {
	--nvh-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.97 18.33c0 .36-.08.73-.25 1.09-.17.36-.39.7-.68 1.02-.49.54-1.03.93-1.64 1.18-.6.25-1.25.38-1.95.38-1.02 0-2.11-.24-3.26-.73s-2.3-1.15-3.44-1.98a28.75 28.75 0 0 1-3.28-2.8 28.42 28.42 0 0 1-2.79-3.27c-.82-1.14-1.48-2.28-1.96-3.41C2.24 8.67 2 7.58 2 6.54c0-.68.12-1.33.36-1.93.24-.61.62-1.17 1.15-1.67C4.15 2.31 4.85 2 5.59 2c.28 0 .56.06.81.18.26.12.49.3.67.56l2.32 3.27c.18.25.31.48.4.7.09.21.14.42.14.61 0 .24-.07.48-.21.71-.13.23-.32.47-.56.71l-.76.79c-.11.11-.16.24-.16.4 0 .08.01.15.03.23.03.08.06.14.08.2.18.33.49.76.93 1.28.45.52.93 1.05 1.45 1.58.54.53 1.06 1.02 1.59 1.47.52.44.95.74 1.29.92.05.02.11.05.18.08.08.03.16.04.25.04.17 0 .3-.06.41-.17l.76-.75c.25-.25.49-.44.72-.56.23-.14.46-.21.71-.21.19 0 .39.04.61.13.22.09.45.22.7.39l3.31 2.35c.26.18.44.39.55.64.1.25.16.5.16.78Z'/%3E%3C/svg%3E");
	--nvh-icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='3'/%3E%3Cpath d='m3 6.5 9 6.5 9-6.5'/%3E%3C/svg%3E");
	--nvh-icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16m-6-6 6 6-6 6'/%3E%3C/svg%3E");
	--nvh-icon-arrow-up-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E");
}

/* Ô tìm kiếm dạng icon, bấm để mở. */
.nvh-header__search .wp-block-search__button {
	width: 24px;
	min-width: 24px;
	height: 40px;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--contrast);
}
.nvh-header__search .wp-block-search__button svg { display: none; }
.nvh-header__search .wp-block-search__button::before {
	content: "";
	display: block;
	width: 24px;
	height: 24px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z' stroke='%230A0A0A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nvh-header__search.wp-block-search__searchfield-hidden .wp-block-search__input { width: 0; padding: 0; border: 0; }
.nvh-header__search .wp-block-search__inside-wrapper { align-items: center; }
.nvh-header__search:not(.wp-block-search__searchfield-hidden) .wp-block-search__input {
	width: 260px;
	height: 40px;
	padding: 0 12px;
	border: 0;
	border-radius: 4px;
	background: var(--wp--preset--color--card);
}

/* Menu: chữ in hoa, đậm 600 (.menuList-main của web cũ). */
.nvh-header__nav { width: 100%; font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: -0.5px; }
.nvh-header__nav .wp-block-navigation-item__content { padding: 16px; line-height: 23px; color: var(--wp--preset--color--contrast); transition: color .3s ease; }
.nvh-header__nav .wp-block-navigation__container > .wp-block-navigation-item:last-child > .wp-block-navigation-item__content { padding-right: 0; }
.nvh-header__nav .wp-block-navigation-item__label { white-space: nowrap; }
/* Core đặt color: inherit với độ ưu tiên (0,3,0) nên cần lặp class để thắng. */
.nvh-header__nav .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.nvh-header__nav .current-menu-item > .wp-block-navigation-item__content.wp-block-navigation-item__content,
.nvh-header__nav .wp-block-navigation-item__content.wp-block-navigation-item__content[aria-current="page"] { color: var(--wp--preset--color--primary); }
.nvh-header__nav .wp-block-navigation__submenu-icon { display: none; }
.nvh-header__nav .wp-block-navigation__submenu-container {
	min-width: 230px !important;
	padding: 12px 0;
	border: 0 !important;
	box-shadow: 0 0 3px rgba(0, 0, 0, .15);
	text-transform: none;
	font-weight: 500;
}
.nvh-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 5px 22px; opacity: .85; }
.nvh-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { opacity: 1; }

/* 992–1365px: logo, menu và hotline thu nhỏ. */
@media (min-width: 992px) and (max-width: 1365px) {
	.nvh-header__logo { width: auto; padding: 0; }
	.nvh-header__logo img { max-width: 160px; height: 60px; }
	.nvh-header__nav { font-size: 13px; letter-spacing: -0.3px; }
	.nvh-header__nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { padding: 12px 10px; }
	.nvh-header__actions { gap: 10px !important; }
	.nvh-header__hotline .wp-block-button__link { padding: 8px 14px; font-size: 14px; }
}

/* Dưới 992px: ẩn menu ngang, hiện nút MENU (viền xanh nhạt) cạnh hotline. */
@media (max-width: 991.98px) {
	:root { --nvh-header-h: 102px; }
	.nvh-header { padding-top: 16px !important; padding-bottom: 16px !important; }
	.nvh-header__logo { width: auto; padding: 0; }
	.nvh-header__logo img { max-width: 120px; height: 70px; }
	.nvh-header__right { flex-direction: row-reverse !important; align-items: center !important; gap: 12px !important; }
	.nvh-header__actions { gap: 12px !important; }
	.nvh-header__search { display: none; }
	.nvh-header__hotline .wp-block-button__link { padding: 12px 20px; font-size: 16px; }
	.nvh-header__nav { width: auto; }
	.nvh-header__nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.nvh-header__nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	.nvh-header__nav .wp-block-navigation__responsive-container-open {
		gap: 8px;
		align-items: center;
		padding: 8px 12px;
		border: 1px solid #def3ff;
		border-radius: 4px;
		background: #fff;
		color: var(--wp--preset--color--primary);
		font-size: 16px;
		font-weight: 700;
		line-height: 16px;
		letter-spacing: -0.2px;
		text-transform: uppercase;
	}
	.nvh-header__nav .wp-block-navigation__responsive-container-open:hover { background: #f0f9ff; }
	.nvh-header__nav .wp-block-navigation__responsive-container-open::after { content: "Menu"; }
	.nvh-header__nav .wp-block-navigation__responsive-container-open svg { display: none; }
	.nvh-header__nav .wp-block-navigation__responsive-container-open::before {
		content: "";
		width: 24px;
		height: 24px;
		background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3 12H21M3 6H21M3 18H21' stroke='%23034EA2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	}
	.nvh-header__nav .wp-block-navigation__responsive-container.is-menu-open { padding: 24px; text-transform: none; }
	.nvh-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { padding: 10px 0; font-size: 18px; }
}

@media (max-width: 767px) {
	:root { --nvh-header-h: 79px; }
	.nvh-header { padding-top: 12px !important; padding-bottom: 12px !important; }
	.nvh-header__logo img { max-width: 100px; height: 55px; }
	.nvh-header__right,
	.nvh-header__actions { gap: 8px !important; }
	.nvh-header__hotline .wp-block-button__link { padding: 10px 12px; }
	.nvh-header__nav .wp-block-navigation__responsive-container-open { padding: 8px 10px; }
	.nvh-header__nav .wp-block-navigation__responsive-container-open::after { content: none; }
}

/* ------------------------------------------------------------------ Breadcrumb */
.nvh-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--muted);
}

.nvh-breadcrumb li:not(:last-child)::after {
	content: "›";
	margin-left: .35rem;
	color: #9aa4b2;
}

.nvh-breadcrumb a { color: inherit; text-decoration: none; }
.nvh-breadcrumb a:hover { color: var(--wp--preset--color--primary); text-decoration: underline; }
.nvh-breadcrumb [aria-current="page"] { color: var(--wp--preset--color--contrast); }

/* Breadcrumb dấu ">" của trang sản phẩm web cũ (danh sách, chi tiết). */
.nvh-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}
.nvh-crumbs li { display: flex; gap: 8px; align-items: center; min-width: 0; }
.nvh-crumbs a,
.nvh-crumbs span { color: var(--wp--preset--color--contrast); font-size: 16px; line-height: 23px; letter-spacing: -0.5px; text-decoration: none; }
.nvh-crumbs a:hover { color: var(--wp--preset--color--primary); }
.nvh-crumbs [aria-current="page"] { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.nvh-crumbs li:last-child { flex: 0 1 auto; }
.nvh-crumbs__sep { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 20px; height: 20px; }

/* ------------------------------------------------------------------ Phần đầu trang con */
.nvh-page-head {
	background:
		radial-gradient(1200px 300px at 85% -20%, rgba(3, 78, 162, .14), transparent 70%),
		var(--wp--preset--color--surface);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.nvh-page-head .wp-block-post-title,
.nvh-page-head .wp-block-query-title { text-wrap: balance; }

/* ------------------------------------------------------------------ Nội dung bài viết */
/* Nhảy tới tiêu đề từ mục lục: chừa chỗ cho header dính, cuộn mượt nếu người xem không tắt chuyển động. */
.nvh-prose :is(h2, h3)[id] { scroll-margin-top: calc(var(--nvh-header-h, 123px) + 16px); }
@media (prefers-reduced-motion: no-preference) { html:focus-within { scroll-behavior: smooth; } }
.nvh-prose > * + * { margin-block-start: 1.1em; }
.nvh-prose :where(h2, h3) { margin-block-start: 1.8em; }
.nvh-prose img { border-radius: var(--wp--preset--border-radius--sm); }
.nvh-prose table { width: 100%; border-collapse: collapse; }
.nvh-prose :where(td, th) { padding: .6rem .8rem; border: 1px solid var(--wp--preset--color--border); }

/* Thông tin nhanh (dự án, tuyển dụng). */
.nvh-facts {
	display: grid;
	gap: 0;
	margin: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--nvh-radius);
	overflow: hidden;
}

.nvh-facts > div {
	display: grid;
	grid-template-columns: 9.5rem 1fr;
	gap: 1rem;
	padding: .8rem 1rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.nvh-facts > div:last-child { border-bottom: 0; }
.nvh-facts dt { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--sm); }
.nvh-facts dd { margin: 0; font-weight: 600; }

/* ------------------------------------------------------------------ Thẻ trong vòng lặp (tin tức, tuyển dụng) */
.nvh-card {
	height: 100%;
	overflow: hidden;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--nvh-radius);
	transition: box-shadow .25s ease;
}

.nvh-card:hover { box-shadow: var(--wp--preset--shadow--card); }
.nvh-card .wp-block-post-title a { color: inherit; text-decoration: none; }
.nvh-card .wp-block-post-title a:hover { color: var(--wp--preset--color--primary); }
.nvh-card .wp-block-post-featured-image { margin: 0; }

/* ------------------------------------------------------------------ WooCommerce (chế độ catalog) */
.nvh-product-summary .wp-block-post-title { margin-top: 0; }
.nvh-product-summary .nvh-product-model { color: var(--wp--preset--color--muted); }

.wc-block-product-template .wp-block-post-title a { color: inherit; text-decoration: none; }
.wc-block-product-template .wp-block-post-title a:hover { color: var(--wp--preset--color--primary); }

.wp-block-woocommerce-product-collection .wc-block-product {
	padding-bottom: var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--nvh-radius);
	overflow: hidden;
}

.wp-block-woocommerce-product-collection .wc-block-components-product-image {
	margin-bottom: var(--wp--preset--spacing--20);
	background: var(--wp--preset--color--surface);
}

.wp-block-woocommerce-product-collection .wc-block-components-product-image img {
	aspect-ratio: 1;
	object-fit: contain;
}

.wp-block-woocommerce-product-collection .wc-block-product > :not(.wc-block-components-product-image) {
	padding-inline: var(--wp--preset--spacing--30);
}

/* ------------------------------------------------------------------ Footer (theo web cũ) */
.nvh-footer { padding-block: 90px; font-size: inherit; }
.nvh-footer a { color: inherit; text-decoration: none; }
.nvh-footer a:hover { color: inherit; }
.nvh-footer p { margin: 0; }

.nvh-footer__wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.nvh-footer__wrap > * { margin-block: 0 !important; }
.nvh-footer__left { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.nvh-footer__left > * { margin-block: 0 !important; }
.nvh-footer__logo img { width: auto !important; height: 127px; aspect-ratio: 128 / 80; filter: brightness(0) invert(1); }
.nvh-footer__info { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.nvh-footer__info > * { margin-block: 0 !important; }
.nvh-footer__company { font-size: 24px; font-weight: 600; }
.nvh-footer__phone,
.nvh-footer__mail { display: flex; gap: 8px; align-items: center; }
.nvh-footer__phone::before,
.nvh-footer__mail::before {
	content: "";
	flex: none;
	width: 24px;
	height: 24px;
	background: currentColor;
	-webkit-mask: var(--nvh-icon-phone) center / contain no-repeat;
	mask: var(--nvh-icon-phone) center / contain no-repeat;
}
.nvh-footer__mail::before { -webkit-mask-image: var(--nvh-icon-mail); mask-image: var(--nvh-icon-mail); }
.nvh-footer__line:empty { display: none; }
.nvh-footer__bct img { display: block; width: auto !important; height: 50px !important; }

.nvh-footer__right { display: flex; flex-direction: column; justify-content: space-between; }
.nvh-footer__right > * { margin-block: 0 !important; }
.nvh-footer__menus,
.nvh-footer__bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.nvh-footer__menus { margin-bottom: 16px !important; }
/* Cột link rộng như lưới Bootstrap của web cũ (290px ở khung 1240px). */
@media (min-width: 992px) { .nvh-footer__menus, .nvh-footer__bottom { margin-right: 16px !important; } }
.nvh-footer__bottom { align-items: end; }
.nvh-footer__menus > *,
.nvh-footer__bottom > *,
.nvh-footer__widget > *,
.nvh-footer__social > * { margin-block: 0 !important; }
.nvh-footer__title { margin-bottom: 10px !important; font-size: 20px; font-weight: 600; letter-spacing: -0.7px; }
.nvh-footer__list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.nvh-footer__social-links.wp-block-social-links { gap: 10px; margin: 0; font-size: 24px; }
.nvh-footer__social-links .wp-social-link { color: #fff; fill: #fff; font-size: 24px; }
.nvh-footer__social-links .wp-social-link a { padding: 0; }

@media (max-width: 991.98px) {
	.nvh-footer { padding-block: 64px; font-size: 14px; }
	.nvh-footer__wrap { grid-template-columns: minmax(0, 1fr); }
	.nvh-footer__left { margin-bottom: 1.5rem !important; }
	.nvh-footer__logo img { height: 95px; }
	.nvh-footer__company { font-size: 18px; }
	.nvh-footer__info { flex-direction: row; flex-wrap: wrap; }
	.nvh-footer__menus { grid-template-columns: minmax(0, 1fr); }
	.nvh-footer__bottom { gap: 0; }
	.nvh-footer__title { display: flex; align-items: center; justify-content: space-between; font-size: 18px; }
	.nvh-footer__widget .nvh-footer__title { cursor: pointer; }
	/* Hai danh sách link thu lại như web cũ, bấm tiêu đề để mở (assets/js/header.js). */
	.nvh-footer__widget:not(.is-open) .nvh-footer__list { display: none; }
	.nvh-footer__widget .nvh-footer__list { padding: 10px 15px 20px; }
}

/* Nút tư vấn nổi (.addthis-new của web cũ): tròn 56px, nền gradient, icon nhấp nháy. */
.nvh-fab { position: fixed; right: 16px; bottom: 15%; z-index: 999; margin: 0 !important; }
.nvh-fab .wp-block-button__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border-radius: 100px;
	background: linear-gradient(270deg, #00aeef .08%, #034ea2 99.97%);
	box-shadow: 0 24px 48px -12px rgba(16, 24, 40, .18);
	font-size: 0;
}
.nvh-fab .wp-block-button__link::before {
	content: "";
	width: 32px;
	height: 32px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='white' d='M9.71094 9.13946C11.6284 6.82831 14.5591 5.68027 17.542 6.07793C20.552 6.46934 23.1661 8.51836 24.3535 11.3377H25.75C26.8525 11.3377 27.749 12.2342 27.749 13.3367V16.0027C27.749 17.1052 26.8525 18.0018 25.75 18.0018H24.3447C23.2703 20.5823 21.0353 22.4688 18.374 23.1014V24.0008C18.3739 25.1031 17.4773 25.9997 16.375 25.9998C15.2725 25.9998 14.3751 25.1032 14.375 24.0008C14.375 22.8983 15.278 22.0008 16.3877 22.0008C19.4792 22.0008 22.2473 20.0379 23.2764 17.116L23.2793 17.1082C23.6938 15.9647 23.8072 14.7012 23.6074 13.4549C23.5476 13.0378 23.4433 12.6324 23.2949 12.2381L23.29 12.2234C22.3694 9.64107 20.0451 7.74793 17.3682 7.39922C14.8371 7.06743 12.3598 8.03525 10.7373 9.99102C9.08617 11.9806 8.61654 14.5816 9.4502 17.1277L9.73633 18.0018H6.99902C5.8967 18.0015 5.00004 17.1051 5 16.0027V13.3367C5 12.2343 5.89668 11.3379 6.99902 11.3377H8.37207C8.69945 10.558 9.14727 9.81896 9.71094 9.13946ZM16.375 8.67168C19.6825 8.67183 22.3729 11.3622 22.373 14.6697C22.373 17.9773 19.6826 20.6686 16.375 20.6688H10.376V19.3357C10.9831 19.3357 11.4963 18.9372 11.6572 18.3758C10.8293 17.322 10.376 16.0183 10.376 14.6697C10.3761 11.3621 13.0674 8.67168 16.375 8.67168ZM13.042 14.0037V15.3367H14.375V14.0037H13.042ZM15.708 14.0037V15.3367H17.041V14.0037H15.708ZM18.374 14.0037V15.3367H19.707V14.0037H18.374Z'/%3E%3C/svg%3E") center / contain no-repeat;
	animation: nvh-zoom-in-out 1.5s ease-in-out infinite;
}
@keyframes nvh-zoom-in-out {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.2); }
}

/* ------------------------------------------------------------------ Giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

/* ------------------------------------------------------------------ Thông tin nhanh sản phẩm */
.nvh-facts--inline { margin-block: var(--wp--preset--spacing--30); }
.nvh-facts--inline > div { grid-template-columns: 7rem 1fr; padding: .55rem .9rem; }

.nvh-trust {
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--wp--preset--color--muted);
}

.nvh-trust li {
	position: relative;
	padding-left: 1.6rem;
}

.nvh-trust li + li { margin-top: .4rem; }

.nvh-trust li::before {
	content: "";
	position: absolute;
	top: .45em;
	left: 0;
	width: .9rem;
	height: .5rem;
	border-bottom: 2px solid var(--wp--preset--color--primary);
	border-left: 2px solid var(--wp--preset--color--primary);
	transform: rotate(-45deg);
}

/* ------------------------------------------------------------------ Dự án */
.nvh-project-facts__title,
.nvh-gallery__title {
	margin: 0 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--xl);
}

.nvh-gallery { margin-top: var(--wp--preset--spacing--50); }

.nvh-gallery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
	gap: .5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nvh-gallery__grid a { display: block; overflow: hidden; border-radius: var(--wp--preset--border-radius--sm); }
.nvh-gallery__grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.nvh-gallery__grid a:hover img { transform: scale(1.04); }

/* ------------------------------------------------------------------ Tuyển dụng */
.nvh-job-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nvh-job-meta li {
	padding: .25rem .7rem;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	font-size: var(--wp--preset--font-size--xs);
}

.nvh-job-card .nvh-facts > div { grid-template-columns: 8rem 1fr; }
.nvh-job-card__apply { margin: var(--wp--preset--spacing--30) 0 .5rem; }
.nvh-job-card__apply .nvh-btn { width: 100%; }
.nvh-job-card__note { margin: 0; font-size: var(--wp--preset--font-size--xs); color: var(--wp--preset--color--muted); }

.nvh-brand {
	margin: 0;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

/* Breadcrumb dạng thanh mỏng trên landing page (không hiện ở trang chủ). */
.nvh-breadcrumb--bar { padding-block: .75rem; }
.nvh-breadcrumb--bar + .wp-block-post-content > .wp-block-nvh-hero:first-child { margin-top: 0; }

/* Các section dựng sẵn (block nvh) nằm liền nhau như web cũ, không có khe giữa. */
.wp-block-post-content > [class*="wp-block-nvh-"].alignfull,
.wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }

/* Footer và header nằm sát nội dung, không có khe như mặc định của theme block. */
.wp-site-blocks > footer,
.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group:has(> main) { margin-block-start: 0; }
