/* nh-bds item: trang tin, anh, 3 nhom thong tin, tab neo, nha tuong tu, thanh dinh. */
.nh-item > .nh-crumbs, .nh-item > .nh-anchors, .nh-item__more { grid-column: 1 / -1; }
.nh-item__main { background: var(--nh-bg); border: 1px solid var(--nh-line); border-radius: var(--r-lg); padding: 4px 24px 24px; }
.nh-anchors { display: none; }
.nh-item__h1 { font-size: var(--fs-3xl); line-height: var(--lh-tight); margin: 14px 0 6px; }
.nh-item__addr { display: flex; gap: 6px; align-items: center; color: var(--nh-text-2); margin: 0; }
.nh-item__meta { font-size: var(--fs-sm); margin: 6px 0 0; }
.nh-item__price { margin: 10px 0 0; }
.nh-removed { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--r-md); background: var(--nh-surface); }
.nh-item__price strong { font-size: var(--fs-3xl); color: var(--nh-price); font-variant-numeric: tabular-nums; }
.nh-noimg { margin: 16px 0 8px; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-md); background: var(--nh-surface); color: var(--nh-text-3); }
.nh-noimg p { margin: 0; }
.nh-facts3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.nh-facts3 section { border: 1px solid var(--nh-line); border-radius: var(--r-md); padding: 0 12px; }
.nh-facts3 h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--nh-text-2); margin: 10px 0 2px; }
.nh-facts3 .nh-facts { grid-template-columns: minmax(0, 1fr); border-top: 0; }
.nh-facts3 .nh-facts div { padding: 8px 0; align-items: baseline; }
.nh-facts3 .nh-facts div:last-child { border-bottom: 0; }
.nh-facts3 dd { min-width: 0; overflow-wrap: break-word; }
.nh-gallery { margin: 16px 0 8px; }
.nh-gallery__main { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; cursor: zoom-in; background: var(--nh-surface-2); aspect-ratio: 3 / 2; }
.nh-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.nh-gallery__count { position: absolute; right: 12px; bottom: 12px; background: var(--nh-overlay); color: var(--nh-bg); padding: 4px 10px; border-radius: var(--r-pill); font-size: var(--fs-sm); }
.nh-gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: thin; }
.nh-gallery__thumbs button { flex: none; padding: 0; border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden; cursor: pointer; background: none; }
.nh-gallery__thumbs button[aria-current="true"] { border-color: var(--nh-primary); }
.nh-gallery__thumbs img { width: 96px; height: 72px; object-fit: cover; }
.nh-gallery__tile { display: none; padding: 0; border: 0; overflow: hidden; cursor: zoom-in; background: var(--nh-surface-2); }
.nh-gallery__tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.nh-gallery__tile:hover img, .nh-gallery__main:hover img { opacity: .9; }
@media (min-width: 961px) {
	.nh-gallery--grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 6px; aspect-ratio: 2 / 1; border-radius: var(--r-md); overflow: hidden; }
	.nh-gallery--grid .nh-gallery__main { grid-row: 1 / 3; aspect-ratio: auto; height: 100%; border-radius: 0; }
	.nh-gallery--grid .nh-gallery__tile { display: block; }
	.nh-gallery--grid .nh-gallery__thumbs { display: none; }
}
.nh-lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: rgb(0 0 0 / .92); }
.nh-lightbox img { width: 100%; height: 100%; object-fit: contain; }
.nh-lightbox button { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgb(255 255 255 / .15); color: var(--nh-bg); font-size: 32px; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.nh-lightbox [data-nh-prev] { left: 16px; }
.nh-lightbox [data-nh-next] { right: 16px; }
.nh-lightbox [data-nh-close] { top: 36px; right: 16px; transform: none; }
.nh-section { margin: 28px 0 0; }
.nh-desc { font-size: var(--fs-md); line-height: var(--lh-read); }
.nh-desc ul { padding-left: 24px; margin: 8px 0; }
.nh-desc p { margin: 8px 0; }
.nh-map, .nh-map-mask { width: 100%; border: 0; border-radius: var(--r-md); background: var(--nh-surface-2); }
.nh-map { height: 320px; }
.nh-map-mask { display: grid; place-items: center; height: 120px; }
.nh-item__side { padding-top: 22px; }
.nh-contact { border: 1px solid var(--nh-line); border-radius: var(--r-lg); padding: 18px; background: var(--nh-bg); }
/* Nút nổi "Hẹn xem nhà": góc dưới phải trên màn rộng; ≤ 960px ẩn, nút nằm trong thanh dính đáy. */
.nh-fab { position: fixed; right: 24px; bottom: 24px; z-index: 45; height: 52px; padding: 0 24px; border-radius: 999px; box-shadow: var(--sh-3); }
.nh-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 4px; }
.nh-strip .nh-card { flex: 0 0 180px; scroll-snap-align: start; }
.nh-contact > p { margin: 6px 0 0; }
.nh-contact__title { font-size: var(--fs-lg); line-height: var(--lh-head); }
.nh-contact > .nh-contact__actions { display: grid; gap: 8px; margin-top: 12px; }
.nh-contact__hint { font-size: var(--fs-sm); }
.nh-sheet .nh-lead__about { display: none; }
.nh-sheet .nh-lead__submit { background: var(--nh-cta); border-color: transparent; color: var(--nh-on-cta); }
.nh-sheet .nh-lead__submit:hover { background: var(--nh-cta-hover); }
.nh-item__more .nh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nh-similar .nh-chips { margin: 0 0 12px; }
.nh-card__diff { margin: 2px 0 0; font-size: var(--fs-sm); font-weight: 700; color: var(--nh-text-2); font-variant-numeric: tabular-nums; }
.nh-sticky { display: none; }
@media (min-width: 961px) { [data-nh-seen-list] { display: none; } } /* Màn rộng: "đã xem" nằm ở cột phải. */
@media (max-width: 960px) {
	.nh-anchors { display: flex; position: sticky; top: var(--nh-stick, 0px); z-index: 20; gap: 4px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; background: var(--nh-bg); border-bottom: 1px solid var(--nh-line); }
	.nh-anchors a { display: flex; align-items: center; min-height: 44px; padding: 3px 10px 0; border-bottom: 3px solid transparent; color: var(--nh-text-2); white-space: nowrap; }
	.nh-anchors a[aria-current] { color: var(--nh-primary); border-bottom-color: var(--nh-primary); }
	:root:has(.nh-anchors) { scroll-padding-top: calc(var(--nh-stick, 0px) + 56px); } /* Header + tab neo. */
	.nh-facts3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nh-item__side { padding-top: 0; }
	.nh-contact { margin-top: 28px; }
	.nh-side-box { display: none; }
	.nh-fab { display: none; } /* ≤ 960px: "Hẹn xem nhà" nằm trong thanh dính, không nổi đè ảnh. */
	.nh-item__more .nh-grid { display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
	.nh-item__more .nh-grid .nh-card { flex: 0 0 160px; scroll-snap-align: start; }
	.nh-sticky { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; gap: 8px; align-items: center; padding: 8px 12px; background: var(--nh-bg); box-shadow: var(--sh-1); }
	.nh-sticky__price { font-weight: 700; color: var(--nh-price); margin-right: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
	.nh-sticky .nh-btn { padding: 0 14px; white-space: nowrap; }
	.nh-sticky .nh-btn:not(.nh-btn--primary, .nh-btn--zalo) { border-color: var(--nh-line); } /* "Gọi" hết trông như bị khóa. */
	/* Mép phải mờ báo còn tab "Tương tự" (không dùng mask: sẽ làm nền dính trong suốt). */
	.nh-anchors::after { content: ""; position: sticky; right: 0; flex: none; width: 32px; margin-left: -32px; align-self: stretch; background: linear-gradient(to right, transparent, var(--nh-bg)); pointer-events: none; }
	/* Link trong bảng / Vị trí / dòng nguồn: vùng chạm 44px, không đổi chiều cao hàng. */
	.nh-facts3 dd a, .nh-item__src a, .nh-item__ask a { display: inline-block; padding: 10px 0; margin: -10px 0; }
	.nh-item__src { margin-top: 20px; }
	/* Trang tin: hàng tab danh mục không có việc (đã có tab neo + breadcrumb), header không dính → mỗi màn cuộn thêm ~100px nội dung. */
	body.single-bds .nh-tabs { display: none; }
	body.single-bds .nh-top__in { grid-template-rows: 56px 48px; grid-template-areas: "logo cta" "search search"; }
	body.single-bds .nh-top--search { position: static; }
	:root:has(body.single-bds) { --nh-stick: 0px; }
	.nh-sticky .nh-btn--primary { flex: 1; }
	body.single-bds { padding-bottom: 60px; }
}
@media (prefers-reduced-motion: no-preference) { html:has(.nh-anchors) { scroll-behavior: smooth; } }
@media (max-width: 640px) {
	.nh-sticky { gap: 6px; padding: 8px; }
	/* Breadcrumb 1 hàng cuộn ngang, bỏ crumb "Mã X" (đã có ở dòng mã) → tiết kiệm 1 dòng 44px. */
	.nh-crumbs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 8px 0 0; }
	.nh-crumbs > * { flex: none; }
	.nh-crumbs [aria-current], .nh-crumbs .nh-crumbs__sep:nth-last-of-type(2) { display: none; }
	/* Bảng thông tin: bỏ khung từng nhóm, mỗi nhóm 2 cột nhãn trên – giá trị dưới (12 hàng ≈ 620px → ≈ 320px). */
	.nh-facts3 section { border: 0; padding: 0; }
	.nh-facts3 h3 { margin: 14px 0 0; }
	.nh-facts3 .nh-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
	.nh-facts3 .nh-facts div { flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 0; }
	.nh-facts3 .nh-facts div:last-child { border-bottom: 1px solid var(--nh-line); }
	.nh-facts3 .nh-facts dt { font-size: var(--fs-sm); }
	.nh-facts3 dd { text-align: left; }
	.nh-item__main { margin: 0 -16px; padding: 4px 16px 20px; border-width: 1px 0; border-radius: 0; }
	.nh-facts3 { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.nh-item__h1 { font-size: var(--fs-2xl); }
	.nh-item__price strong { font-size: var(--fs-2xl); }
	.nh-sticky .nh-btn { padding: 0 10px; }
}
@media (max-width: 399px) {
	.nh-sticky__price { display: none; }
	.nh-sticky .nh-btn { flex: 1; }
}
.nh-item__dist { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 8px 0 0; font-size: var(--fs-sm); color: var(--nh-text-2); }
.nh-item__dist [data-nh-dist-text]:empty { display: none; }
.nh-item__dist [hidden] { display: none; } /* .nh-btn đặt display → thuộc tính hidden thua, phải ép. */
