/* ==========================================================================
   Đất Gốc – giao diện
   ========================================================================== */

:root {
	--gold: #C8963E;
	--gold-2: #E6B864;
	--gold-dark: #9A6B22;
	--gold-grad: linear-gradient(135deg, #B9842F 0%, #E6B864 55%, #C8963E 100%);
	--ink: #1C2230;
	--ink-2: #2B3344;
	--muted: #667085;
	--line: #E8E2D6;
	--bg: #FAF8F4;
	--card: #FFFFFF;
	--zalo: #0068FF;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(28, 34, 48, .06), 0 8px 24px rgba(28, 34, 48, .06);
	--shadow-lg: 0 12px 40px rgba(28, 34, 48, .14);
	--container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
.icon { flex: none; vertical-align: middle; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 760px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 9999; background: #fff; padding: 8px 14px; border-radius: 8px; }

/* ---------- Nút ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
	font-weight: 600; font-size: 15px; line-height: 1.2; cursor: pointer;
	transition: transform .15s, box-shadow .15s, background .15s;
	white-space: nowrap;
}
@media (hover: hover) { .btn:hover { transform: translateY(-1px); } }
.btn:active { transform: scale(.98); }
.btn-gold { background: var(--gold-grad); color: #fff; box-shadow: 0 6px 16px rgba(200, 150, 62, .35); }
.btn-gold:hover { color: #fff; box-shadow: 0 8px 22px rgba(200, 150, 62, .45); }
.btn-zalo { background: var(--zalo); color: #fff; }
.btn-zalo:hover { color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-dark); }
.btn-light { background: #fff; color: var(--gold-dark); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-block { display: flex; width: 100%; margin-top: 10px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand img, .custom-logo { height: 56px; width: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav li { position: relative; }
.site-nav a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--gold-dark); background: #F6EFE2; }
.site-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; flex-direction: column; }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: flex; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
	position: relative; color: #fff; padding: 96px 0 72px;
	background:
		linear-gradient(180deg, rgba(20, 24, 34, .55) 0%, rgba(20, 24, 34, .75) 100%),
		var(--hero-bg, radial-gradient(1200px 500px at 80% 0%, #3A4358 0%, #1C2230 60%));
	background-size: cover; background-position: center;
}
.hero h1 { color: #fff; max-width: 760px; }
.hero-sub { font-size: 18px; max-width: 640px; opacity: .92; margin: 0 0 28px; }
.hero-count { margin: 16px 0 0; opacity: .85; font-size: 14px; }
.hero-count b { color: var(--gold-2); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--gold); margin: 0 0 8px; }
.hero .eyebrow { color: var(--gold-2); }

/* ---------- Bộ lọc ---------- */
.filter-form { display: grid; gap: 10px; align-items: end; background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); color: var(--ink); }
.filter-hero { grid-template-columns: 1.6fr repeat(4, 1fr) auto; box-shadow: var(--shadow-lg); }
.filter-bar { grid-template-columns: 1.4fr repeat(5, 1fr) auto; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea, .sort-form select {
	width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .sort-form select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 150, 62, .18); }
.filter-form .btn { height: 44px; }

/* ---------- Khối nội dung ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 28px 0 64px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.section-dark { background: var(--ink); color: #D4D8E0; }
.section-dark h2, .section-dark h3 { color: #fff; }
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 32px 0 24px; }
.page-head h1 { margin: 0; }
.page-desc { color: var(--muted); max-width: 760px; margin-top: 8px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.breadcrumb a { color: var(--muted); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Thẻ tin ---------- */
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
@media (hover: hover) { .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } }
.card-media { position: relative; display: block; aspect-ratio: 3 / 2; background: #EFE9DD; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
@media (hover: hover) { .card:hover .card-media img { transform: scale(1.04); } }
.card-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--gold); }
.card-placeholder .icon { width: 44px; height: 44px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; line-height: 1.3; }
.card-media .badge { position: absolute; top: 12px; left: 12px; }
.card-media .badge-hot { left: auto; right: 12px; background: var(--gold-grad); }
.card-media .badge-hot .icon { width: 12px; height: 12px; }
.card-media .badge-360 { top: auto; bottom: 12px; background: rgba(28, 34, 48, .8); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-price { font-size: 22px; font-weight: 800; color: var(--gold-dark); line-height: 1.2; }
.card-price small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.card-title { font-size: 16px; margin: 0; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--gold-dark); }
.card-addr { display: flex; gap: 6px; align-items: flex-start; color: var(--muted); font-size: 14px; margin: 0; }
.card-addr .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--gold); }
.card-facts { list-style: none; padding: 10px 0 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-2); }
.card-facts li { display: inline-flex; align-items: center; gap: 5px; }
.card-facts .icon { width: 15px; height: 15px; color: var(--gold); }
.listing-card.status-sold .card-media img { filter: grayscale(.6); }
.card-meta { font-size: 13px; color: var(--muted); margin: 0; }
.card-excerpt { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- Bản đồ ---------- */
.dg-map { height: 520px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #E5E1D8; z-index: 1; }
.dg-map-single { height: 440px; }
.dg-map:fullscreen { border-radius: 0; }
.dg-map-fake-fs { position: fixed !important; inset: 0; height: 100% !important; z-index: 2000; border-radius: 0; }
.dg-fs-btn { display: block; width: 34px; height: 34px; line-height: 32px; text-align: center; background: #fff; color: var(--ink) !important; font-size: 18px; }
.leaflet-tooltip.dg-edge { background: rgba(28, 34, 48, .85); color: #fff; border: 0; border-radius: 6px; padding: 2px 6px; font: 600 11px "Be Vietnam Pro", sans-serif; box-shadow: none; }
.leaflet-tooltip.dg-edge::before { display: none; }
.leaflet-tooltip.dg-landmark { font: 600 12px "Be Vietnam Pro", sans-serif; }
.map-popup { display: block; width: 220px; color: var(--ink); }
.map-popup img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.map-popup b { display: block; font-size: 14px; line-height: 1.3; }
.map-popup span { color: var(--gold-dark); font-weight: 600; font-size: 13px; }
.leaflet-container a.map-popup { color: var(--ink); }
.poi-pin { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--c, #64748B); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); display: flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; }
.leaflet-tooltip.dg-front { background: #DC2626; color: #fff; border: 0; font: 600 12px "Be Vietnam Pro", sans-serif; }
.leaflet-tooltip.dg-front::before { border-top-color: #DC2626; }
.leaflet-tooltip.dg-route-tip { font: 500 12px "Be Vietnam Pro", sans-serif; text-align: center; border-color: #2563EB; }
.leaflet-control-layers-expanded { max-height: 60vh; overflow-y: auto; font: 13px "Be Vietnam Pro", sans-serif; }
.leaflet-control-layers-separator { margin: 6px -10px 6px -6px; }
.qh-slider { background: #fff; padding: 6px 10px; font: 12px "Be Vietnam Pro", sans-serif; }
.qh-slider input { vertical-align: middle; width: 120px; }
.poi-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.poi-group h3 { font-size: 15px; margin: 8px 0 4px; }
.poi-group ul { list-style: none; margin: 0; padding: 0; }
.poi-group li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.poi-name { min-width: 0; }
.poi-dist { color: var(--gold-dark); font-weight: 600; font-size: 13px; text-align: right; }
.poi-route { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.poi-route .icon { width: 13px; height: 13px; }
.poi-route:hover, .poi-route.active { border-color: #2563EB; color: #2563EB; }
.poi-route.loading { opacity: .6; cursor: wait; }
.so-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.so-images img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.so-locked { display: flex; gap: 14px; align-items: flex-start; background: #FFF8E8; border: 1px dashed var(--gold); border-radius: 12px; padding: 16px; }
.so-locked > .icon { width: 36px; height: 36px; color: var(--gold); }
.so-locked p { margin: 4px 0 10px; color: var(--muted); font-size: 14px; }
.seo-links { display: flex; flex-wrap: wrap; gap: 8px; }
.seo-links a { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); font-size: 13px; }
.seo-text { color: var(--ink-2); max-width: 900px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }
.legend { list-style: none; display: flex; gap: 14px; margin: 0; padding: 0; font-size: 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* ---------- Khu vực + lý do ---------- */
.area-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.area-tile { display: flex; flex-direction: column; gap: 2px; padding: 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--ink); transition: border-color .15s, transform .15s; }
.area-tile:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.area-tile b { font-size: 17px; }
.area-tile span { color: var(--gold-dark); font-weight: 600; font-size: 14px; }
.area-tile small { color: var(--muted); }
.why { padding: 24px; border-radius: var(--radius); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.why .icon { width: 36px; height: 36px; color: var(--gold-2); margin-bottom: 12px; }
.why p { margin: 0; font-size: 15px; }

.cta { background: var(--gold-grad); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin-bottom: 6px; }
.cta p { margin: 0; max-width: 640px; }

/* ---------- Trang danh sách ---------- */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.list-toolbar p { margin: 0; color: var(--muted); }
.list-toolbar b { color: var(--ink); }
.list-tools { display: flex; gap: 10px; align-items: center; }
.sort-form select { width: auto; padding: 8px 12px; }
.view-toggle { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.view-toggle button { border: 0; background: none; padding: 6px 10px; border-radius: 8px; cursor: pointer; color: var(--muted); display: inline-flex; }
.view-toggle button.active { background: var(--gold-grad); color: #fff; }
.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.pagination .page-numbers.current { background: var(--gold-grad); color: #fff; border-color: transparent; }

/* ---------- Trang chi tiết ---------- */
.listing-head { background: #fff; border-bottom: 1px solid var(--line); padding: 24px 0 20px; }
.listing-head h1 { margin: 10px 0 6px; font-size: clamp(24px, 3.4vw, 34px); }
.listing-addr { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; color: var(--ink-2); margin: 0; }
.listing-addr .icon { color: var(--gold); }
.addr-old { color: var(--muted); font-size: 14px; }
.listing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; padding-top: 28px; padding-bottom: 32px; align-items: start; }
.listing-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
.side-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.price-card .price, .mobile-price .price { font-size: 30px; font-weight: 800; color: var(--gold-dark); line-height: 1.1; }
.price-card .unit, .mobile-price .unit { color: var(--muted); margin-top: 4px; }
.agent { display: flex; gap: 12px; align-items: center; margin: 18px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.agent img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-2); }
.agent b { display: block; }
.agent span { font-size: 13px; color: var(--muted); }
.mobile-price { display: none; }

.gallery { margin-bottom: 24px; }
.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; background: #111; aspect-ratio: 3 / 2; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-count { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; padding: 3px 10px; border-radius: 99px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.gallery-thumbs button { flex: none; width: 96px; height: 68px; border: 2px solid transparent; border-radius: 8px; overflow: hidden; padding: 0; cursor: pointer; opacity: .7; background: none; }
.gallery-thumbs button.active { border-color: var(--gold); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.block { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.block h2 { font-size: 20px; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.block-head h2 { margin: 0; }
.block-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.facts li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.facts .icon { color: var(--gold); }
.facts span { color: var(--muted); }
.facts b { margin-left: auto; text-align: right; }
.distances { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.distances li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.distances b { color: var(--gold-dark); }
.note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.dg-pano { height: 420px; border-radius: var(--radius); overflow: hidden; background: #222; }
.video-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--radius); }
.entry-content { font-size: 16px; }
.entry-content img { border-radius: 10px; }
.entry-content > *:last-child { margin-bottom: 0; }

.mobile-cta { display: none; }

/* ---------- Form ---------- */
.lead-form h3 { margin-bottom: 12px; }
.lead-form .field { margin-bottom: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lead-form .hp { position: absolute; left: -9999px; }
.form-privacy { font-size: 12px; color: var(--muted); text-align: center; margin: 8px 0 0; }
.form-notice { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.form-notice-success { background: #E8F7EE; color: #12663A; }
.form-notice-error { background: #FDECEC; color: #A61B1B; }

/* ---------- Bài viết, trang ---------- */
.article { max-width: 820px; padding-top: 32px; padding-bottom: 32px; }
.article-head h1 { margin-bottom: 8px; }
.article-cover { margin: 20px 0; border-radius: var(--radius); overflow: hidden; }
.ky-gui { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.steps li { background: #fff; border-left: 4px solid var(--gold); border-radius: 10px; padding: 14px 18px; box-shadow: var(--shadow); }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: #151A25; color: #A9B0BE; padding: 56px 0 0; font-size: 15px; }
.site-footer h3 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.site-footer a { color: #D4D8E0; }
.site-footer a:hover { color: var(--gold-2); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr 1fr; gap: 32px; }
.footer-brand .custom-logo { height: 80px; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-contact li { display: flex; gap: 8px; align-items: flex-start; }
.footer-contact .icon { width: 16px; height: 16px; margin-top: 4px; color: var(--gold-2); }
.footer-social { display: flex; gap: 14px; margin-top: 14px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 40px; padding: 18px 16px; font-size: 13px; }

/* ---------- Nút liên hệ nổi ---------- */
.float-contact { position: fixed; right: calc(16px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 900; display: flex; flex-direction: column; gap: 10px; }
.float-btn { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); font-weight: 800; font-size: 13px; }
.float-btn:hover { color: #fff; transform: scale(1.06); }
.float-zalo { background: var(--zalo); }
.float-mess { background: #A033FF; }
.float-call { background: var(--gold-grad); animation: dg-pulse 2s infinite; }
@keyframes dg-pulse { 0% { box-shadow: 0 0 0 0 rgba(200, 150, 62, .6); } 70% { box-shadow: 0 0 0 14px rgba(200, 150, 62, 0); } 100% { box-shadow: 0 0 0 0 rgba(200, 150, 62, 0); } }
@media (prefers-reduced-motion: reduce) { .float-call { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.filter-hero, .filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.filter-form .field-q { grid-column: 1 / -1; }
	.grid-4, .area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.listing-layout, .ky-gui { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
	.nav-toggle { display: inline-flex; }
	.site-nav { position: fixed; inset: 72px 0 auto 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 10px 16px 16px; display: none; margin: 0; }
	.admin-bar .site-nav { top: 118px; }
	.nav-open .site-nav { display: block; }
	.site-nav ul { flex-direction: column; }
	.site-nav .sub-menu { position: static; display: flex; box-shadow: none; padding-left: 12px; }
	.header-hotline span { display: none; }
	.header-hotline { padding: 10px; }
	.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.listing-layout, .ky-gui { grid-template-columns: 1fr; }
	.listing-side { position: static; }
	.listing-side .price-card { display: none; }
	.mobile-price { display: flex; align-items: baseline; gap: 12px; margin: 0 0 20px; }
	.mobile-cta {
		display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
		background: #fff; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px rgba(0, 0, 0, .1);
	}
	.mobile-cta .btn { padding: 11px 8px; }
	.single-bat_dong_san .float-contact { display: none; }
	.single-bat_dong_san .site-footer { padding-bottom: 72px; }
}

@media (max-width: 600px) {
	body { font-size: 15px; }
	.header-inner { min-height: 64px; gap: 12px; }
	.brand img, .custom-logo { height: 46px; }
	.site-nav { inset: 64px 0 auto 0; }
	.hero { padding: 56px 0 44px; }
	.hero-sub { font-size: 16px; }
	.filter-hero, .filter-bar { grid-template-columns: 1fr 1fr; padding: 12px; }
	.filter-form .btn { grid-column: 1 / -1; }
	.grid-3, .grid-4, .area-grid { grid-template-columns: 1fr; }
	.section { padding: 44px 0; }
	.dg-map { height: 420px; }
	.dg-map-single, .dg-pano { height: 340px; }
	.facts, .distances, .poi-groups { grid-template-columns: 1fr; }
	.so-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.block, .side-card { padding: 18px; }
	.form-row { grid-template-columns: 1fr; gap: 0; }
	.footer-grid { grid-template-columns: 1fr; gap: 24px; }
	.legend { flex-wrap: wrap; }
	.float-contact { right: calc(12px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); }
	.float-btn { width: 48px; height: 48px; }
}

@media screen and (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
@media screen and (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}

.footer-keywords { margin-top: 32px; }
.footer-keywords h3 { margin-bottom: 10px; }

/* ---------- Bản đồ quy hoạch nhúng ---------- */
.embed-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.embed-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; }
.embed-tabs button.active { background: var(--gold-grad); color: #fff; border-color: transparent; }
.embed-map { margin: 0; }
.embed-map h2 { font-size: 20px; }
.embed-frame { position: relative; height: 75vh; min-height: 460px; max-height: 820px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #E5E1D8; }
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-map figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.embed-note { background: #FFF8E8; border: 1px dashed var(--gold); border-radius: 10px; padding: 10px 14px; margin-top: 14px; }
.page-intro { max-width: 860px; margin-bottom: 20px; }
.qh-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 600; }
.qh-link .icon { width: 18px; height: 18px; }
.cta-inline { display: grid; grid-template-columns: 1fr minmax(0, 420px); gap: 24px; align-items: start; }
@media (max-width: 860px) { .cta-inline { grid-template-columns: 1fr; } .embed-frame { height: 70vh; min-height: 380px; } }
.embed-fallback { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px dashed var(--gold); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.embed-fallback > .icon { width: 40px; height: 40px; color: var(--gold); flex: none; }
.embed-fallback p { margin: 0 0 12px; }


/* ==========================================================================
   Tối ưu điện thoại iOS / Android
   ========================================================================== */
html { -webkit-tap-highlight-color: rgba(200, 150, 62, .15); }
button, a, input, select, textarea, label { touch-action: manipulation; }
.container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.field input, .field select, .field textarea, .sort-form select { min-height: 44px; -webkit-appearance: none; appearance: none; }
.field select, .sort-form select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239A6B22' stroke-width='2'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.field input[type=date] { display: block; line-height: 22px; }
.field input[type=date]::-webkit-date-and-time-value { text-align: left; }
.field textarea { min-height: 88px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--gold); }

/* Bản đồ trên màn hình cảm ứng: chạm mới kéo được, để vuốt cuộn trang không bị "kẹt". */
.dg-map { position: relative; }
.map-touch-hint { position: absolute; inset: 0; z-index: 800; display: flex; align-items: center; justify-content: center; background: rgba(28, 34, 48, .28); color: #fff; font-weight: 600; font-size: 15px; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); pointer-events: none; transition: opacity .25s; }
.map-touch-hint span { background: rgba(28, 34, 48, .75); padding: 8px 16px; border-radius: 999px; }
.dg-map.is-active .map-touch-hint { opacity: 0; }

@media (max-width: 860px) {
	/* iOS tự phóng to khi chữ trong ô nhập < 16px. */
	input, select, textarea, .field input, .field select, .field textarea { font-size: 16px; }
	.poi-route { padding: 8px 14px; font-size: 13px; }
	.view-toggle button { padding: 10px 12px; }
	.gallery-nav { width: 40px; height: 40px; }
	.site-nav { max-height: calc(100vh - 72px); overflow-y: auto; overscroll-behavior: contain; }
	.site-nav a { padding: 14px 12px; font-size: 16px; }
	.leaflet-control-layers-toggle { width: 40px !important; height: 40px !important; }
	.leaflet-touch .leaflet-bar a { width: 36px; height: 36px; line-height: 36px; }
}
.card-media .badge-owner { top: auto; left: auto; bottom: 12px; right: 12px; background: #0D9488; }

/* ==========================================================================
   Tài khoản, Tin của tôi, Đăng tin
   ========================================================================== */
.header-post { padding: 9px 14px; font-size: 14px; }
.site-nav .menu-post { display: none; }
.site-nav .menu-account a { color: var(--gold-dark); font-weight: 600; }
.btn-danger { background: #fff; color: #B91C1C; border-color: #FCA5A5; }
.btn-danger:hover { background: #FEF2F2; color: #B91C1C; }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 6px; }
.hint-text { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }

.auth-box { max-width: 480px; margin: 0 auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 24px 24px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); margin: 0 -24px 18px; }
.auth-tabs a { flex: 1; text-align: center; padding: 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.auth-tabs a.active { color: var(--gold-dark); border-bottom-color: var(--gold); }
.auth-form .field { margin-bottom: 14px; }
.auth-form.resend { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 14px; font-size: 14px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { flex: none; margin-top: 2px; }
.check.agree { margin: 4px 0 14px; color: var(--ink-2); line-height: 1.5; }
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 48px; }
.pass-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; cursor: pointer; font-size: 16px; opacity: .6; }
.auth-form .hp, .lead-form .hp { position: absolute; left: -9999px; }
.profile-form { max-width: 640px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.pass-change { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 16px 0; margin: 8px 0 18px; }
.pass-change legend { font-size: 14px; font-weight: 600; padding: 0 6px; color: var(--muted); }

.account-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 18px; }
.account-nav > a:not(.btn) { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); font-weight: 500; font-size: 14px; }
.account-nav > a.active { border-color: var(--gold); color: var(--gold-dark); background: #FFF8E8; }
.account-nav .icon { width: 16px; height: 16px; }
.account-nav .btn { margin-left: auto; }
.my-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.my-stats div { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 14px; text-align: center; }
.my-stats b { display: block; font-size: 26px; color: var(--gold-dark); line-height: 1.1; }
.my-stats span { font-size: 13px; color: var(--muted); }
.my-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.my-item { display: grid; grid-template-columns: 120px 1fr; gap: 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.my-thumb { width: 120px; height: 96px; border-radius: 10px; overflow: hidden; background: #EFE9DD; }
.my-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-body h3 { font-size: 16px; margin: 6px 0 4px; }
.my-body h3 a { color: var(--ink); }
.my-badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.my-badges small { color: var(--muted); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-ok { background: #E8F7EE; color: #12663A; }
.pill-pending { background: #FEF3C7; color: #92400E; }
.pill-draft { background: #F1F5F9; color: #475569; }
.pill-fix { background: #FDECEC; color: #A61B1B; }
.pill-sold { background: #1C2230; color: #fff; }
.my-meta { font-size: 13px; color: var(--muted); margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.my-meta b { color: var(--gold-dark); }
.my-meta .icon { width: 13px; height: 13px; }
.my-note { background: #FDECEC; color: #7F1D1D; border-radius: 8px; padding: 8px 10px; font-size: 14px; margin: 0 0 8px; }
.my-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.post-form-wrap { max-width: 920px; }
.form-steps { position: sticky; top: 72px; z-index: 50; display: flex; gap: 6px; overflow-x: auto; background: var(--bg); padding: 10px 0; margin-bottom: 8px; scrollbar-width: none; }
.admin-bar .form-steps { top: 104px; }
.form-steps a { flex: none; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.form-block { background: #fff; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin: 0 0 18px; min-width: 0; scroll-margin-top: 130px; }
.form-block legend { float: left; width: 100%; font-size: 18px; font-weight: 700; margin-bottom: 14px; padding: 0; }
.form-block .field { margin-bottom: 14px; clear: both; }
.form-block > .form-row, .form-block > p, .form-block > .dg-loc, .form-block > ul { clear: both; }
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.choice { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; background: #fff; font-weight: 400; color: var(--ink); }
.choice:has(input:checked) { border-color: var(--gold); background: #FFF8E8; }
.post-form .dg-loc-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.post-form .dg-loc-toolbar input { flex: 1 1 220px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.post-form #dg-admin-map { height: 420px; border-radius: 12px; }
.post-form .dg-loc-stats { font-size: 14px; }
.post-form .dg-hint { font-size: 14px; }

.photo-grid { list-style: none; margin: 10px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-grid li { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #EFE9DD; }
.photo-grid li img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid li.is-cover { outline: 3px solid var(--gold); outline-offset: -3px; }
.cover-badge { display: none; position: absolute; top: 6px; left: 6px; background: var(--gold-grad); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.photo-grid li.is-cover .cover-badge { display: block; }
.photo-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); padding: 16px 4px 4px; }
.photo-tools button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.photo-tools button[data-p="del"] { background: #DC2626; color: #fff; }
.photo-spin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); animation: dg-blink 1.2s infinite; }
@keyframes dg-blink { 50% { opacity: .4; } }
.photo-add label { display: flex; align-items: center; justify-content: center; text-align: center; height: 100%; border: 2px dashed var(--gold); border-radius: 10px; cursor: pointer; color: var(--gold-dark); font-weight: 600; background: #FFFCF4; }
.photo-add span { line-height: 1.4; font-size: 14px; }
.pano-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.pano-preview img { width: 220px; height: 110px; object-fit: cover; border-radius: 8px; }
.pano-preview:empty { display: none; }

.form-submit-bar { position: sticky; bottom: 0; z-index: 60; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; background: rgba(250, 248, 244, .96); backdrop-filter: blur(6px); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.upload-status { margin-right: auto; font-size: 14px; color: var(--gold-dark); font-weight: 600; }

@media (max-width: 1080px) {
	.header-post { display: none; }
}
@media (max-width: 860px) {
	.site-nav .menu-post { display: block; }
	.page-template-dang-tin .float-contact { display: none; }
	.form-steps { top: 64px; }
}
@media (max-width: 600px) {
	.auth-box { padding: 4px 16px 20px; }
	.auth-tabs { margin: 0 -16px 16px; }
	.my-item { grid-template-columns: 84px 1fr; gap: 12px; padding: 12px; }
	.my-thumb { width: 84px; height: 84px; }
	.my-stats b { font-size: 22px; }
	.account-nav .btn { margin-left: 0; width: 100%; }
	.form-block { padding: 16px; }
	.form-row-3 { grid-template-columns: 1fr 1fr; }
	.post-form #dg-admin-map { height: 360px; }
	.photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.photo-tools button { width: 26px; height: 26px; font-size: 13px; }
	.form-submit-bar .btn { flex: 1; }
	.upload-status:empty { display: none; }
	.upload-status { flex-basis: 100%; }
}

[hidden] { display: none !important; }
#dg-admin-map { position: relative; z-index: 1; }

.posting-closed { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px dashed var(--gold); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.posting-closed > .icon { width: 40px; height: 40px; color: var(--gold); flex: none; }
.posting-closed h2 { font-size: 20px; }

.type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.type-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; position: relative; }
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-card b { font-size: 15px; color: var(--ink); }
.type-card small { font-size: 12px; color: var(--muted); }
.type-card:has(input:checked) { border-color: var(--gold); background: #FFF8E8; }
.form-notice-pending { background: #FEF3C7; color: #92400E; }
