/* happyhomevin.com · trang check căn 3D
   Màu lấy từ toà nhà thật (khối đế xám than, tháp trắng) + cam logo Happy Home cho căn còn.
   Bảng màu khai đủ ở :root; khối tối chỉ ghi đè. */

@font-face { font-family: "BVP"; src: url("../assets/font/bvp-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "BVP"; src: url("../assets/font/bvp-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "BVP"; src: url("../assets/font/bvp-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "BVP"; src: url("../assets/font/bvp-black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  color-scheme: light dark;
  --nen: #f1f1f4;        /* nền trang: xám lạnh, lệch nhẹ về tím logo */
  --mat: #ffffff;        /* thẻ, bảng điều khiển */
  --mat-2: #e7e6ec;      /* chip, ô phụ */
  --muc: #1f1b2b;        /* chữ chính */
  --muc-2: #4d4a5c;      /* chữ phụ (7,6:1 trên nền) */
  --ke: #d6d5de;         /* đường kẻ trang trí */
  --vien: #858398;       /* viền ô nhập, nút viền (≥3:1) */
  --cam: #f05822;        /* cam logo: căn còn, mảng nhấn lớn */
  --cam-nut: #c2410c;    /* nền nút chính (chữ trắng 5,2:1) */
  --cam-nut-chu: #ffffff;
  --cam-nhat: #fde6dc;
  --tim: #6a52a1;        /* căn đang xác nhận */
  --xam-ban: #8b899a;    /* căn đã giao dịch (3,3:1 trên nền trắng) */
  --than: #474b57;       /* xám than của khối đế thật */
  --bong: 0 1px 2px rgb(31 27 43 / 6%), 0 8px 24px -12px rgb(31 27 43 / 18%);
  --bo: 14px;
  --bo-nho: 9px;
  --rong: 1240px;
  --le: clamp(16px, 4vw, 40px);
  --nav-cao: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --nen: #121019; --mat: #1c1926; --mat-2: #262233; --muc: #eeedf3; --muc-2: #b5b2c4; --ke: #2f2b3c;
    --vien: #7c7891; --cam: #f26a3a; --cam-nut: #f26a3a; --cam-nut-chu: #1a0e08; --cam-nhat: #3a2219;
    --tim: #a08bdb; --xam-ban: #5d5a6c; --than: #2b2e38;
    --bong: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px -14px rgb(0 0 0 / 60%);
  }
}
:root[data-theme="dark"] {
  --nen: #121019; --mat: #1c1926; --mat-2: #262233; --muc: #eeedf3; --muc-2: #b5b2c4; --ke: #2f2b3c;
  --vien: #7c7891; --cam: #f26a3a; --cam-nut: #f26a3a; --cam-nut-chu: #1a0e08; --cam-nhat: #3a2219;
  --tim: #a08bdb; --xam-ban: #5d5a6c; --than: #2b2e38;
  --bong: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px -14px rgb(0 0 0 / 60%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-cao) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; } }
body {
  margin: 0; background: var(--nen); color: var(--muc);
  font: 400 16px/1.6 "BVP", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cam); outline-offset: 2px; border-radius: 4px; }
.so { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.an { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.khung { width: 100%; max-width: var(--rong); margin-inline: auto; padding-inline: var(--le); }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); font-weight: 900; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }

/* ---------- Nút ---------- */
.nut {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.nut:active { transform: translateY(1px); }
.nut-chinh { background: var(--cam-nut); color: var(--cam-nut-chu); }
.nut-chinh:hover { filter: brightness(1.06); }
.nut-vien { background: transparent; color: var(--muc); border: 1.5px solid var(--vien); }
.nut-vien:hover { border-color: var(--muc); }
.nut-nho { min-height: 36px; padding: 0 14px; font-size: 14px; }
.lien-ket { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }

/* ---------- Điều hướng ---------- */
.nav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-cao);
  background: color-mix(in oklab, var(--nen) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--ke);
}
.nav .khung { height: 100%; display: flex; align-items: center; gap: 24px; }
.thuong-hieu { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; }
.thuong-hieu small { display: block; font-weight: 500; font-size: 12px; color: var(--muc-2); letter-spacing: 0; }
.dau-khoi { width: 28px; height: 28px; flex: none; border-radius: 7px; background: var(--than); position: relative; overflow: hidden; }
.dau-khoi::after { content: ""; position: absolute; left: 5px; right: 5px; bottom: 5px; height: 7px; border-radius: 2px; background: var(--cam); }
.nav-ds { display: flex; gap: 22px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav-ds a { text-decoration: none; color: var(--muc-2); padding: 6px 0; }
.nav-ds a:hover { color: var(--muc); }
@media (max-width: 899px) { .nav-ds { display: none; } .nav .nut { display: none; } }
@media (max-width: 480px) { .thuong-hieu small { display: none; } .thuong-hieu { font-size: 15px; } }

/* ---------- Mở đầu ---------- */
.mo-dau { padding-block: clamp(28px, 5vw, 64px) clamp(32px, 5vw, 56px); }
.mo-dau .khung { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 960px) { .mo-dau .khung { grid-template-columns: 6fr 5fr; gap: 56px; } }
.mo-dau h1 { font-size: clamp(2.1rem, 1.2rem + 2.6vw, 3.3rem); font-weight: 900; letter-spacing: -0.035em; line-height: 1.04; }
.mo-dau h1 em { font-style: normal; color: var(--cam); }
.mo-dau .tom { margin-top: 18px; font-size: clamp(1.02rem, .95rem + .3vw, 1.18rem); color: var(--muc-2); max-width: 34ch; }
.mo-dau .hanh-dong { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.anh-mo-dau { margin: 0; position: relative; }
.anh-mo-dau img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--bo); box-shadow: var(--bong); }
.anh-mo-dau figcaption { margin-top: 10px; font-size: 13px; color: var(--muc-2); }

/* ---------- Sa bàn ---------- */
.sa-ban { padding-block: clamp(32px, 5vw, 64px); background: var(--mat); border-block: 1px solid var(--ke); }
.sa-ban-dau { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 20px; }
.sa-ban-dau p { color: var(--muc-2); font-size: 14px; margin-top: 8px; }
.chu-giai { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muc-2); list-style: none; padding: 0; margin: 0; }
.chu-giai li { display: inline-flex; align-items: center; gap: 8px; }
.cham { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.cham-con { background: var(--cam); } .cham-cho { background: var(--tim); } .cham-ban { background: var(--xam-ban); }

.the-lo { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.the-lo::-webkit-scrollbar { display: none; }
.the-lo button {
  flex: none; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--ke); background: var(--nen);
  cursor: pointer; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px;
}
.the-lo button span { font-weight: 500; color: var(--muc-2); }
.the-lo button[aria-selected="true"] { background: var(--muc); border-color: var(--muc); color: var(--nen); }
.the-lo button[aria-selected="true"] span { color: color-mix(in oklab, var(--nen) 75%, transparent); }

.ban-lam-viec { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 14px; }
.ban-lam-viec > * { min-width: 0; }
@media (min-width: 1100px) { .ban-lam-viec { grid-template-columns: 292px 1fr; } }

/* Bộ lọc */
.bo-loc { display: grid; gap: 18px; align-content: start; }
.bo-loc fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.bo-loc legend, .bo-loc label.nhan, .nhan { font-size: 13px; font-weight: 700; color: var(--muc); padding: 0; margin-bottom: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  background: var(--nen); border: 1.5px solid var(--ke); color: var(--muc); white-space: nowrap; pointer-events: none;
}
.chip input:checked + span { background: var(--cam-nhat); border-color: var(--cam); color: var(--muc); font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--cam); outline-offset: 2px; }
.thanh-truot { display: grid; gap: 6px; }
.thanh-truot output { font-weight: 700; font-size: 15px; }
input[type="range"] { width: 100%; accent-color: var(--cam-nut); height: 28px; }
.o-nhap {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--bo-nho); border: 1.5px solid var(--vien);
  background: var(--mat); color: var(--muc); font-size: 16px;
}
.o-nhap:focus { outline: none; border-color: var(--cam); box-shadow: 0 0 0 3px color-mix(in oklab, var(--cam) 30%, transparent); }
.hop-chon { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.hop-chon input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--cam-nut); flex: none; }
.dem-khop { font-size: 14px; color: var(--muc-2); }
.dem-khop b { color: var(--muc); font-size: 16px; }
.bo-loc-mo { display: none; }
@media (max-width: 1099px) {
  .bo-loc { display: none; }
  .bo-loc.dang-mo {
    display: grid; position: fixed; inset: auto 0 0 0; z-index: 70; max-height: 82svh; overflow: auto;
    background: var(--mat); padding: 20px var(--le) calc(20px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgb(0 0 0 / 25%);
  }
  .bo-loc-mo { display: inline-flex; }
}
.loc-dau { display: none; align-items: center; justify-content: space-between; }
.bo-loc.dang-mo .loc-dau { display: flex; }

/* Khung xem */
.khung-xem {
  position: relative; border-radius: var(--bo); overflow: hidden; background: var(--nen); border: 1px solid var(--ke);
  height: clamp(440px, 74vh, 780px);
}
@media (max-width: 699px) { .khung-xem { height: 64svh; min-height: 420px; } }
.thanh-cong-cu {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none;
}
.thanh-cong-cu > * { pointer-events: auto; }
.cong-tac { display: inline-flex; background: var(--mat); border: 1px solid var(--ke); border-radius: 999px; padding: 3px; box-shadow: var(--bong); }
.cong-tac button { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--muc-2); }
.cong-tac button[aria-pressed="true"] { background: var(--muc); color: var(--nen); }
.nut-tron {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--ke); background: var(--mat); box-shadow: var(--bong);
  display: inline-grid; place-items: center; cursor: pointer; font-weight: 900; font-size: 15px; color: var(--muc);
}
.nut-tron svg { width: 18px; height: 18px; }
.nut-tron[aria-pressed="true"] { background: var(--muc); color: var(--nen); }
.day-phai { margin-left: auto; display: inline-flex; gap: 6px; }
.lop { position: absolute; inset: 0; }
.lop[hidden] { display: none; }
.lop canvas { display: block; width: 100%; height: 100%; outline: none; }
.cho-nap { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muc-2); font-size: 14px; z-index: 1; }
.cho-nap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .35; filter: grayscale(1); }
.cho-nap span { position: relative; background: var(--mat); padding: 8px 14px; border-radius: 999px; box-shadow: var(--bong); }
.mien-tru-3d {
  position: absolute; left: 12px; bottom: 12px; z-index: 4; max-width: min(460px, calc(100% - 24px)); font-size: 12px; line-height: 1.45;
  background: color-mix(in oklab, var(--mat) 90%, transparent); color: var(--muc-2); padding: 8px 10px; border-radius: 8px;
}
.mo-xoay {
  position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%); z-index: 6; display: none;
}
@media (pointer: coarse) { .mo-xoay { display: inline-flex; bottom: 96px; } }
@media (max-width: 699px) { .mien-tru-3d { font-size: 11px; } }

/* Nhãn nổi trên sa bàn */
.nhan-noi {
  position: absolute; z-index: 6; pointer-events: none; transform: translate(-50%, calc(-100% - 12px));
  background: var(--muc); color: var(--nen); border-radius: 10px; padding: 8px 11px; font-size: 13px; line-height: 1.35; white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 50%); opacity: 0; transition: opacity .12s ease;
}
.nhan-noi.hien { opacity: 1; }
.nhan-noi b { font-size: 14px; }
.nhan-noi::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: var(--muc); transform: translateX(-50%) rotate(45deg); }

/* Mặt bằng 2D */
.mb2d { overflow: hidden; touch-action: none; cursor: grab; background: var(--mat); }
.mb2d.keo { cursor: grabbing; }
.mb2d-trong { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.mb2d-trong img { width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
:root[data-theme="dark"] .mb2d-trong img { filter: grayscale(1) invert(.88) contrast(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mb2d-trong img { filter: grayscale(1) invert(.88) contrast(.9); } }
.mb2d-trong svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mb2d polygon { cursor: pointer; stroke-width: 2.5; vector-effect: non-scaling-stroke; transition: fill-opacity .2s ease; }
.mb2d polygon.st-con { fill: var(--cam); stroke: var(--cam-nut); fill-opacity: .55; }
.mb2d polygon.st-cho { fill: var(--tim); stroke: var(--tim); fill-opacity: .5; }
.mb2d polygon.st-ban { fill: var(--xam-ban); stroke: var(--than); fill-opacity: .7; }
.mb2d polygon.lech { fill-opacity: .08; stroke-opacity: .35; }
.mb2d polygon.xx { stroke-dasharray: 5 4; }
.mb2d polygon:hover { fill-opacity: .8; }
.mb2d polygon.dang-chon { fill-opacity: .9; stroke: var(--muc); stroke-width: 4; }

/* Hồ sơ căn */
.ho-so {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 8; width: min(400px, 100%); background: var(--mat);
  border-left: 1px solid var(--ke); box-shadow: -18px 0 40px -24px rgb(0 0 0 / 35%); overflow: auto;
  transform: translateX(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); visibility: hidden;
}
.ho-so.mo { transform: none; visibility: visible; }
@media (max-width: 699px) {
  .ho-so {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 80svh; border-radius: 18px 18px 0 0; border-left: 0;
    transform: translateY(105%); z-index: 75; box-shadow: 0 -16px 40px rgb(0 0 0 / 30%);
  }
}
.ho-so-trong { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 18px; }
.ho-so-dau { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.ho-so-dau h3 { font-size: 1.7rem; font-weight: 900; letter-spacing: -0.03em; }
.ho-so-dau p { font-size: 14px; color: var(--muc-2); margin-top: 4px; }
.nhan-tt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.nhan-tt.st-con { background: var(--cam-nhat); color: var(--muc); }
.nhan-tt.st-cho { background: color-mix(in oklab, var(--tim) 18%, var(--mat)); color: var(--muc); }
.nhan-tt.st-ban { background: var(--mat-2); color: var(--muc-2); }
.gia-lon { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--bo-nho); background: var(--nen); }
.gia-lon b { font-size: 1.9rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.gia-lon small { font-size: 12.5px; color: var(--muc-2); }
.thong-so { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--ke); border-radius: var(--bo-nho); overflow: hidden; margin: 0; }
.thong-so div { background: var(--mat); padding: 10px 12px; }
.thong-so dt { font-size: 12px; color: var(--muc-2); }
.thong-so dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; }
.ghi-tt { font-size: 13.5px; color: var(--muc-2); }
.ho-so-nut { display: grid; gap: 8px; }
.ho-so-nut .phu { display: flex; gap: 8px; flex-wrap: wrap; }
.ho-so-nut .phu .nut { flex: 1; }
.lop-phu { position: fixed; inset: 0; z-index: 65; background: rgb(10 8 16 / 45%); display: none; }
.lop-phu.hien { display: block; }

/* Danh sách căn */
.danh-sach { margin-top: 18px; }
.ds-dau { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 10px; }
.ds-dau select { min-height: 40px; border-radius: var(--bo-nho); border: 1.5px solid var(--vien); background: var(--mat); padding: 0 10px; font-size: 14px; }
.bang-cuon { max-height: 420px; overflow: auto; border: 1px solid var(--ke); border-radius: var(--bo); }
table.bang { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.bang th { position: sticky; top: 0; z-index: 1; background: var(--nen); text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muc-2); padding: 10px 12px; border-bottom: 1px solid var(--ke); white-space: nowrap; }
.bang td { padding: 10px 12px; border-bottom: 1px solid var(--ke); white-space: nowrap; }
.bang tr { cursor: pointer; }
.bang tbody tr:hover td { background: var(--nen); }
.bang tr.dang-chon td { background: var(--cam-nhat); }
.bang td.so-phai, .bang th.so-phai { text-align: right; }
.bang .ma-o { font-weight: 700; }
.bang .nut-xem { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--vien); background: transparent; cursor: pointer; font-weight: 700; font-size: 13px; }
@media (max-width: 699px) { .bang .an-nho { display: none; } .bang td, .bang th { padding: 10px 8px; } }

/* Khay so sánh */
.khay-ss {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%); z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--muc); color: var(--nen);
  box-shadow: 0 16px 40px -12px rgb(0 0 0 / 50%); transition: transform .25s ease; max-width: calc(100% - 24px);
}
.khay-ss:not(.hien), .khay-ss.nhuong { visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
.khay-ss.hien { transform: translate(-50%, 0); }
.khay-ss.hien.nhuong { transform: translate(-50%, 140%); }
.khay-ss .ds-ma { display: flex; gap: 6px; overflow-x: auto; font-size: 13px; font-weight: 700; scrollbar-width: none; }
.khay-ss .ds-ma button { flex: none; border: 0; border-radius: 999px; padding: 6px 10px; background: color-mix(in oklab, var(--nen) 16%, transparent); color: inherit; cursor: pointer; font-weight: 700; font-size: 13px; }
@media (max-width: 899px) { .khay-ss { bottom: calc(76px + env(safe-area-inset-bottom)); } }

dialog { border: 0; border-radius: var(--bo); padding: 0; background: var(--mat); color: var(--muc); box-shadow: 0 30px 80px -20px rgb(0 0 0 / 50%); max-width: min(920px, calc(100% - 24px)); width: 100%; }
dialog::backdrop { background: rgb(10 8 16 / 55%); }
.hop-thoai-trong { padding: 22px; display: grid; gap: 16px; }
.hop-thoai-dau { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bang-ss-cuon { overflow-x: auto; }
table.bang-ss { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.bang-ss th, .bang-ss td { padding: 10px 12px; border-bottom: 1px solid var(--ke); text-align: left; vertical-align: top; }
.bang-ss th[scope="row"] { color: var(--muc-2); font-weight: 500; font-size: 13px; width: 150px; }
.bang-ss thead th { font-size: 1.05rem; font-weight: 900; }

/* ---------- Vị trí ---------- */
.vi-tri { padding-block: clamp(40px, 6vw, 88px); }
.vi-tri .khung { display: grid; gap: 22px; }
.vi-tri-tren { display: grid; gap: 14px; max-width: 70ch; }
.vi-tri-tren p { color: var(--muc-2); }
.ban-do { position: relative; height: clamp(380px, 62vh, 620px); border-radius: var(--bo); overflow: hidden; border: 1px solid var(--ke); background: var(--mat-2); }
.ban-do .cho-nap { z-index: 0; }
.ghim { display: grid; justify-items: center; gap: 4px; pointer-events: none; }
.ghim b { background: var(--muc); color: var(--nen); font: 700 13px/1.2 "BVP", system-ui, sans-serif; padding: 7px 11px; border-radius: 9px; white-space: nowrap; box-shadow: 0 8px 20px -8px rgb(0 0 0 / 60%); }
.ghim i { width: 18px; height: 18px; border-radius: 50%; background: var(--cam); border: 3px solid #fff; box-shadow: 0 0 0 6px rgb(240 88 34 / 28%); }
.ghim.phu b { background: var(--mat); color: var(--muc); font-weight: 500; }
.ghim.phu i { width: 12px; height: 12px; background: var(--than); box-shadow: none; }
.vi-tri-duoi { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; font-size: 14px; color: var(--muc-2); }

/* ---------- Chính sách ---------- */
.chinh-sach { padding-block: clamp(40px, 6vw, 88px); background: var(--mat); border-block: 1px solid var(--ke); }
.chinh-sach .khung { display: grid; gap: 32px; }
@media (min-width: 1000px) { .chinh-sach .khung { grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; } }
.cs-noi-dung { display: grid; gap: 22px; }
.cs-muc { display: grid; gap: 8px; padding-top: 18px; border-top: 1px solid var(--ke); }
.cs-muc ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.cs-muc p, .cs-muc li { color: var(--muc-2); }
.cs-muc strong { color: var(--muc); }
.mien-tru { font-size: 13.5px; color: var(--muc-2); background: var(--nen); border-radius: var(--bo-nho); padding: 12px 14px; }
.may-tinh { background: var(--nen); border-radius: var(--bo); padding: 22px; display: grid; gap: 16px; border: 1px solid var(--ke); }
@media (min-width: 1000px) { .may-tinh { position: sticky; top: calc(var(--nav-cao) + 20px); } }
.may-tinh .hang { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
.may-tinh .hang label { font-size: 14px; font-weight: 700; }
.may-tinh .hang output { font-weight: 700; }
.may-tinh .hang input[type="range"] { grid-column: 1 / -1; }
.ket-qua { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--ke); border-radius: var(--bo-nho); overflow: hidden; margin: 0; }
.ket-qua div { background: var(--mat); padding: 12px; }
.ket-qua dt { font-size: 12.5px; color: var(--muc-2); }
.ket-qua dd { margin: 2px 0 0; font-weight: 900; font-size: 1.15rem; }
.may-tinh .ghi { font-size: 12.5px; color: var(--muc-2); }

/* ---------- Ảnh thực tế ---------- */
.thuc-te { padding-block: clamp(40px, 6vw, 88px); }
.thuc-te-dau { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dai-anh { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.dai-anh::-webkit-scrollbar { display: none; }
.dai-anh button { flex: none; scroll-snap-align: start; border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: var(--bo); overflow: hidden; }
.dai-anh img { height: clamp(260px, 42vw, 440px); width: auto; object-fit: cover; }
.dai-anh-nut { display: flex; gap: 8px; }
.anh-lon img { width: 100%; max-height: 82vh; object-fit: contain; background: #000; }

/* ---------- Hỏi đáp ---------- */
.hoi-dap { padding-block: clamp(40px, 6vw, 88px); background: var(--mat); border-block: 1px solid var(--ke); }
.hoi-dap .khung { max-width: 860px; display: grid; gap: 20px; }
.hoi-dap details { border-bottom: 1px solid var(--ke); }
.hoi-dap summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; font-weight: 700; font-size: 1.05rem; position: relative; }
.hoi-dap summary::-webkit-details-marker { display: none; }
.hoi-dap summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; font-weight: 400; color: var(--muc-2); }
.hoi-dap details[open] summary::after { content: "−"; }
.hoi-dap details > div { padding: 0 0 18px; color: var(--muc-2); display: grid; gap: 10px; max-width: 70ch; }

/* ---------- Đăng ký ---------- */
.dang-ky { padding-block: clamp(40px, 6vw, 96px); }
.dang-ky .khung { display: grid; gap: 28px; }
@media (min-width: 960px) { .dang-ky .khung { grid-template-columns: 5fr 6fr; gap: 56px; align-items: start; } }
.dk-trai { display: grid; gap: 16px; }
.dk-trai p { color: var(--muc-2); }
.dk-trai ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.dk-trai li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--muc); }
.dk-trai li::before { content: ""; width: 12px; height: 12px; margin-top: 7px; border-radius: 3px; background: var(--cam); }
.phieu { background: var(--mat); border: 1px solid var(--ke); border-radius: var(--bo); padding: clamp(18px, 3vw, 28px); box-shadow: var(--bong); display: grid; gap: 16px; }
.phieu .hai-cot { display: grid; gap: 16px; }
@media (min-width: 600px) { .phieu .hai-cot { grid-template-columns: 1fr 1fr; } }
.truong { display: grid; gap: 6px; }
.truong label { font-size: 14px; font-weight: 700; }
.truong .goi-y { font-size: 12.5px; color: var(--muc-2); }
.can-quan-tam { display: flex; flex-wrap: wrap; gap: 6px; }
.can-quan-tam button { border: 1.5px solid var(--cam); background: var(--cam-nhat); color: var(--muc); border-radius: 999px; padding: 5px 10px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.loi { color: #b42318; font-size: 14px; font-weight: 700; }
:root[data-theme="dark"] .loi { color: #ff8a80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .loi { color: #ff8a80; } }
.dong-y { display: grid; gap: 10px; padding: 14px; border-radius: var(--bo-nho); background: var(--nen); }
.dong-y .hop-chon { font-size: 13.5px; line-height: 1.5; }
.dong-y p { font-size: 12.5px; color: var(--muc-2); }
.bay { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.da-gui { display: grid; gap: 10px; text-align: left; }
.da-gui h3 { font-size: 1.5rem; font-weight: 900; }

/* ---------- Chân trang ---------- */
.chan { padding-block: 48px calc(48px + 64px); background: var(--than); color: #e9e8ee; }
@media (min-width: 900px) { .chan { padding-bottom: 48px; } }
.chan .khung { display: grid; gap: 28px; }
.chan-tren { display: grid; gap: 24px; }
@media (min-width: 800px) { .chan-tren { grid-template-columns: 2fr 1fr 1fr; } }
.chan h3 { font-size: 14px; margin-bottom: 10px; }
.chan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.chan a, .chan button.lien-ket-chan { color: #e9e8ee; text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer; font-size: 14px; display: inline-block; min-height: 24px; }
.chan a:hover, .chan button.lien-ket-chan:hover { text-decoration: underline; }
.chan p { font-size: 13.5px; color: #c9c7d3; }
.chan-mien-tru { border-top: 1px solid rgb(255 255 255 / 14%); padding-top: 20px; font-size: 13px; color: #c9c7d3; }

/* ---------- Nút nổi ---------- */
.noi { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50; display: grid; gap: 8px; }
.noi a { min-height: 44px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: var(--bong); }
.noi .zalo { background: #0068ff; color: #fff; }
.noi .tai-lieu { background: var(--mat); color: var(--muc); border: 1px solid var(--ke); }
@media (max-width: 899px) { .noi { display: none; } }
.thanh-duoi {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: none; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--mat); border-top: 1px solid var(--ke);
}
.thanh-duoi a { flex: 1; min-height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; text-decoration: none; }
.thanh-duoi .zalo { background: #0068ff; color: #fff; }
.thanh-duoi .tai-lieu { border: 1.5px solid var(--vien); color: var(--muc); }
.thanh-duoi .dk { background: var(--cam-nut); color: var(--cam-nut-chu); }
@media (max-width: 899px) { .thanh-duoi { display: flex; } }

/* Hiện dần khi cuộn tới */
.hien-dan { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.hien-dan.da-hien { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .hien-dan { opacity: 1; transform: none; } }
