/* Trang bán hàng tunhomkinh.com — hướng "ảnh treo so le", màu thương hiệu Hiệp Phát.
   Mọi màu là biến: sửa ở :root là đổi cả trang (sáng + tối). */
:root {
  --bg: #f2f1ed;        /* nền xám nhôm */
  --surface: #e5e3dd;   /* bậc tối hơn một nấc */
  --surface-2: #d8d5cd;
  --ink: #151917;
  --muted: #545b58;
  --accent: #0f6b52;    /* xanh Hiệp Phát: nút chính */
  --accent-press: #0b5642;
  --on-accent: #ffffff;
  --tag: #c4202a;       /* đỏ nhãn kích thước, như nhãn cửa hàng dán lên ảnh */
  --on-tag: #ffffff;
  --zalo: #0068ff;
  --field: #18201c;     /* khối nền tối (Xếp thử 3D) */
  --on-field: #eef0ee;
  --field-muted: #b4bcb8;
  --danger: #b3261e;
  --scrim: rgba(10, 14, 12, .5);
  --m: clamp(20px, 5vw, 88px);          /* lề trang hai bên */
  --gap: clamp(16px, 2vw, 28px);
  --sec: clamp(96px, 12vw, 200px);      /* khoảng cách giữa các khối */
  --t-display: clamp(40px, 4.5vw, 72px);
  --t-h2: clamp(30px, 3.5vw, 52px);
  --t-lead: clamp(19px, 1.45vw, 22px);
  --t-body: 17px;
  --t-small: 14px;
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
/* Trang luôn ở giao diện sáng (chủ cửa hàng chọn), kể cả khi máy khách bật chế độ tối. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--t-body); line-height: 1.55; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* tiêu đề nhận tiêu điểm bằng mã (để trình đọc màn hình đọc từ đầu) không cần viền */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
::selection { background: var(--accent); color: var(--on-accent); }
.an { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bo-qua { position: absolute; left: var(--m); top: -60px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 12px 16px; text-decoration: none; }
.bo-qua:focus { top: 8px; }

h1, .h1 { font-size: var(--t-display); font-weight: 700; line-height: 1.0; letter-spacing: -0.035em; text-wrap: balance; }
h2, .h2 { font-size: var(--t-h2); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
h3 { font-size: var(--t-lead); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.lead { font-size: var(--t-lead); line-height: 1.5; max-width: 40ch; }
.nho { font-size: var(--t-small); color: var(--muted); }
.so { font-variant-numeric: tabular-nums; }

/* ---------- Nút: góc vuông, một màu đặc ---------- */
.nut { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 0;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: var(--t-body); text-decoration: none; cursor: pointer;
  transition: background .18s var(--ease), transform .12s var(--ease); }
.nut:hover { background: var(--accent-press); }
.nut:active { transform: scale(.97); }
.nut[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.nut svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.nut.phu { background: var(--surface); color: var(--ink); }
.nut.phu:hover { background: var(--surface-2); }
.nut.zalo { background: var(--zalo); color: #fff; }
.nut.zalo:hover { background: #0052cc; }
.lk { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; transition: color .18s; }
.lk:hover { color: var(--accent); }
.lk svg { width: 18px; height: 18px; fill: currentColor; transition: transform .2s var(--ease); }
.lk:hover svg { transform: translateX(4px); }

/* ---------- Thẻ kích thước đỏ (nhãn cửa hàng) ---------- */
.the-kt { display: inline-block; background: var(--tag); color: var(--on-tag); font-weight: 600; font-size: var(--t-small); line-height: 1.3; padding: 5px 10px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.the-kt.lon { font-size: var(--t-lead); padding: 10px 16px 11px; border-radius: 10px; white-space: normal; }

/* ---------- Thanh trên ---------- */
.thanh-tren { position: sticky; top: 0; z-index: 30; background: var(--bg); display: flex; align-items: center; gap: 24px; padding: 0 var(--m); height: 68px; transition: background .2s; }
.thanh-tren.cuon { background: var(--surface); }
.ten-hieu { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; margin-right: auto; min-height: 44px; justify-content: center; }
.ten-hieu b { font-size: 21px; letter-spacing: -0.02em; }
.ten-hieu span { font-size: var(--t-small); color: var(--muted); }
.menu-tren { display: flex; gap: 28px; }
.menu-tren a { text-decoration: none; font-weight: 500; font-size: 16px; min-height: 44px; display: inline-flex; align-items: center; position: relative; }
.menu-tren a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.menu-tren a:hover::after { transform: scaleX(1); }
.nut-gio { min-height: 46px; padding: 0 18px; font-size: 16px; }
.nut-gio .dem { background: var(--on-accent); color: var(--accent); min-width: 24px; height: 24px; border-radius: 12px; font-size: 13px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 6px; }
.goi-tren { display: none; }

/* ---------- Màn hình đầu ---------- */
.dau { display: grid; grid-template-columns: 1fr 1fr; min-height: min(calc(100svh - 68px), 900px); }
.dau-chu { padding: clamp(32px, 6vh, 72px) var(--m) clamp(32px, 6vh, 64px); display: flex; flex-direction: column; gap: 28px; }
.dau-chu h1 { max-width: 11em; }
.dau-chu .lead { margin-top: -4px; }
.dau-hanh-dong { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: auto; }
.dau-dia-chi { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: var(--t-small); max-width: 34ch; }
.dau-dia-chi svg { width: 18px; height: 18px; fill: var(--tag); flex: none; margin-top: 2px; }
/* Ô ảnh: khung lớn nằm gọn trong lề trang, các ô nhỏ lấp kín khung, khe giữa các ô và viền khung bằng nhau (--khe) */
.dau-anh { --khe: 12px; background: var(--surface); position: relative; padding: var(--khe); margin: clamp(16px, 2.5vh, 32px) var(--m) clamp(16px, 2.5vh, 32px) 0; display: flex; }
.kham { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 1fr 1fr .85fr; gap: var(--khe); min-height: 0; }
.o { position: relative; background: var(--surface-2); overflow: hidden; margin: 0; min-height: 0; }
.o img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 1.6s ease; }
.o img.sau { opacity: 0; }
/* 7 ô phủ kín lưới 4 cột × 3 hàng */
.o1 { grid-column: 1; grid-row: 1 / 3; } .o2 { grid-column: 2 / 4; grid-row: 1 / 3; } .o3 { grid-column: 4; grid-row: 1; }
.o4 { grid-column: 4; grid-row: 2; } .o5 { grid-column: 1; grid-row: 3; } .o6 { grid-column: 2; grid-row: 3; } .o7 { grid-column: 3 / 5; grid-row: 3; }

/* ---------- Khối chung ---------- */
.khoi { padding: var(--sec) var(--m) 0; }
.luoi { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ---------- Tường tiệm (thứ khách tự làm) ---------- */
.tuong-dau { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; row-gap: 24px; }
.tuong-dau h2 { grid-column: 1 / 7; }
.tuong-dau p { grid-column: 8 / 13; }
.tuong-dieu-khien { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 48px; }
.tuong-dieu-khien label { font-weight: 600; }
.o-so { display: inline-flex; align-items: center; background: var(--surface); height: 56px; }
.o-so input { width: 5.2ch; border: 0; background: transparent; font-size: 26px; font-weight: 700; text-align: right; padding: 0 4px 0 14px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.o-so input::-webkit-inner-spin-button, .o-so input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.o-so input:focus { outline: none; }
.o-so:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.o-so span { padding: 0 14px 0 4px; font-weight: 600; color: var(--muted); }
.thanh-keo { flex: 1 1 280px; max-width: 520px; accent-color: var(--accent); height: 44px; cursor: pointer; }
.tuong-hinh { margin-top: 36px; background: var(--surface); padding: clamp(24px, 4vw, 56px) clamp(16px, 3vw, 48px) 0; }
.tuong-hinh svg { display: block; width: 100%; height: auto; overflow: visible; }
.tuong-ket { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 28px 0 32px; }
.tuong-ket p { font-size: var(--t-lead); max-width: 46ch; }
.tuong-ket b { font-weight: 700; }

/* ---------- Các mẫu tủ: băng chuyền vòng ---------- */
.mau-dau { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; }
.loc { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.loc button { border: 0; background: none; cursor: pointer; padding: 0; min-height: 44px; font-size: var(--t-lead); font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; transition: color .18s; }
.loc button:hover { color: var(--ink); }
.loc button[aria-pressed="true"] { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 7px; }
.loc .sl { font-size: var(--t-small); color: var(--muted); font-weight: 500; }
.vong { position: relative; margin-top: 56px; }
.san { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.the-vong { position: absolute; left: 50%; bottom: 0; aspect-ratio: 3 / 4; display: block; background: var(--surface); overflow: hidden; transform-origin: 50% 100%;
  transition: transform .55s var(--ease), opacity .4s; cursor: pointer; }
.the-vong img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.the-vong:not(.giua)::after { content: ''; position: absolute; inset: 0; background: var(--bg); opacity: .35; transition: opacity .3s; }
.the-vong:not(.giua):hover::after { opacity: .1; }
.the-vong.giua { box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .35); cursor: zoom-in; }
.vong-nut { position: absolute; top: 50%; z-index: 20; width: 56px; height: 56px; margin-top: -28px; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; cursor: pointer; transition: background .18s, transform .12s; }
.vong-nut:hover { background: var(--accent); color: var(--on-accent); }
.vong-nut:active { transform: scale(.92); }
.vong-nut svg { width: 26px; height: 26px; fill: currentColor; }
.vong-nut.truoc { left: 0; } .vong-nut.sau { right: 0; }
.vong-tt { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin-top: 28px; }
.vong-so { font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.vong-tt h3 { font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -0.02em; }
.vong-mo { color: var(--muted); max-width: 56ch; }
.vong-hd { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 8px; }
.nut.vien { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.nut.vien:hover { background: var(--ink); color: var(--bg); }
/* nhãn "Xem chi tiết" trên ảnh tủ đang ở giữa băng chuyền */
.the-vong .xem-ct { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-weight: 600; font-size: 15px; padding: 10px 16px; display: none; align-items: center; gap: 8px; white-space: nowrap; }
.the-vong .xem-ct svg { width: 18px; height: 18px; fill: currentColor; }
.the-vong.giua .xem-ct { display: inline-flex; }
.the-vong.giua:hover .xem-ct { background: var(--accent); color: var(--on-accent); }
/* Thẻ ảnh "Mẫu khác" ở trang chi tiết */
.chay { display: flex; align-items: flex-end; gap: 10px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; }
.khung { flex: none; scroll-snap-align: start; text-decoration: none; display: flex; flex-direction: column; gap: 10px; width: calc(clamp(220px, 31vh, 300px) * .75); }
.khung .anh { aspect-ratio: 3 / 4; background: var(--surface); overflow: hidden; }
.khung img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.khung:hover img { transform: scale(1.04); }
.khung .dong { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.khung .dong b { font-size: 16px; font-weight: 600; }
.khung[hidden] { display: none; }

/* ---------- Bảng kích thước + 3D ---------- */
.bang-dau { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 20px; align-items: end; }
.bang-dau h2 { grid-column: 1 / 7; }
.bang-dau p { grid-column: 8 / 13; }
.bang-than { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); margin-top: 56px; align-items: start; }
.bang-cot { grid-column: 1 / 7; }
.bang-3d { grid-column: 7 / 13; position: sticky; top: 88px; }
table.kt { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--bg); box-shadow: 0 0 0 1px var(--surface-2); }
table.kt thead th { background: var(--ink); color: var(--bg); font-size: var(--t-small); font-weight: 600; text-align: left; padding: 12px 14px; letter-spacing: .01em; }
table.kt thead th.so { text-align: right; }
table.kt tr.nhom th { background: var(--surface); text-align: left; font-size: var(--t-small); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 14px; }
table.kt tbody tr[data-chon-tu] { cursor: pointer; transition: background .15s; box-shadow: inset 0 -1px 0 var(--surface-2); }
table.kt tbody tr[data-chon-tu]:hover { background: var(--surface); }
table.kt tbody tr.chon { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); box-shadow: inset 4px 0 0 var(--accent), inset 0 -1px 0 var(--surface-2); }
table.kt th.ten { text-align: left; padding: 0; font-weight: 400; }
.chon-tu { width: 100%; min-height: 52px; border: 0; background: none; text-align: left; padding: 0 14px; font-weight: 600; font-size: 16px; cursor: pointer; }
table.kt tr.chon .chon-tu { color: var(--accent); }
table.kt td.so { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 14px; width: 4.6em; }
table.kt td.them { width: 60px; text-align: right; padding: 4px 8px 4px 0; }
.bang-ghi { margin-top: 12px; }
.xem3d { position: relative; aspect-ratio: 4 / 5; max-height: calc(100svh - 160px); width: 100%; background: var(--surface); overflow: hidden; }
.xem3d canvas { display: block; width: 100% !important; height: 100% !important; }
.lop-nhan { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.xem3d img.tam { width: 100%; height: 100%; object-fit: cover; opacity: .6; }
.xem3d .goi-y { position: absolute; left: 14px; bottom: 12px; font-size: var(--t-small); color: var(--muted); background: var(--bg); padding: 4px 10px; }
.xem3d .cho { position: absolute; inset: auto 0 40% 0; text-align: center; color: var(--muted); }
.tuong-ghi { padding: 8px 0 0; }
/* thanh chọn tủ cho điện thoại (máy tính dùng bảng) */
.chon-dt, .chon-dt-kt, .chon-dt-them { display: none !important; }
.xem3d canvas { touch-action: none; }
.bang-3d-chan { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; margin-top: 10px; }
.bang-3d-chan b { font-size: 16px; }
.bang-3d-chan .nut { min-height: 48px; }
/* nhãn kích thước trên mô hình 3D (giống mục Xem từng tủ) */
.vo-kt { pointer-events: none; }
.nhan-kt { font-size: 12px; font-weight: 700; color: #fff; background: var(--accent); padding: 2px 8px 3px; border-radius: 999px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.2); font-variant-numeric: tabular-nums; line-height: 1.3; font-family: var(--font); }
.nhan-kt.nho { font-size: 10.5px; font-weight: 600; background: #fff; color: var(--accent); border: 1px solid var(--accent); padding: 0 6px 1px; box-shadow: none; transform: translateX(calc(-50% - 5px)); }
.nut-cong { width: 44px; height: 44px; border: 0; background: var(--surface); cursor: pointer; display: inline-grid; place-items: center; transition: background .18s, transform .12s; border-radius: 0; }
.nut-cong:hover { background: var(--accent); color: var(--on-accent); }
.nut-cong:active { transform: scale(.92); }
.nut-cong svg { width: 20px; height: 20px; fill: currentColor; }
.nut-cong.da { background: var(--accent); color: var(--on-accent); }

/* ---------- Cách mua: dải kéo ngang ---------- */
.buoc-dau { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.buoc-nut { display: flex; gap: 8px; }
.buoc-nut button { width: 48px; height: 48px; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; display: grid; place-items: center; transition: opacity .18s, transform .12s; }
.buoc-nut button:active { transform: scale(.93); }
.buoc-nut button[disabled] { opacity: .3; cursor: default; }
.buoc-nut svg { width: 22px; height: 22px; fill: currentColor; }
.tien-do { height: 6px; background: var(--surface-2); margin-top: 24px; position: relative; }
.tien-do i { position: absolute; left: 0; top: 0; bottom: 0; width: 30%; background: var(--ink); transition: width .15s linear, left .15s linear; }
.hang-buoc { display: flex; gap: 32px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scroll-snap-type: x mandatory;  margin: 40px 0 0; padding: 0 0 8px; scrollbar-width: none; }
.hang-buoc::-webkit-scrollbar { display: none; }
.buoc { flex: none; width: 300px; scroll-snap-align: start; display: flex; flex-direction: column; }
.buoc h3 { font-size: 20px; }
.buoc p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.buoc img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface); margin-top: var(--cach, 96px); }

/* ---------- Xếp thử 3D (khối nền tối) ---------- */
.xep { margin-top: var(--sec); background: var(--field); color: var(--on-field); padding: clamp(72px, 9vw, 140px) 0 clamp(72px, 9vw, 140px) var(--m); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; overflow: hidden; }
.xep-chu { grid-column: 1 / 5; display: flex; flex-direction: column; gap: 24px; padding-right: 12px; }
.xep-chu p { color: var(--field-muted); }
.xep-chu .nut { align-self: flex-start; }
.xep-chu .lk { color: var(--on-field); align-self: flex-start; }
.xep figure { grid-column: 5 / 13; padding-right: var(--m); }
.xep video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; object-fit: contain; }
.xep figcaption { color: var(--field-muted); font-size: var(--t-small); margin-top: 12px; }

/* ---------- Hỏi đáp ---------- */
.hoi h2 { font-size: clamp(36px, 5.5vw, 84px); max-width: 12em; }
.hoi-ds { margin: 80px 0 0 calc((100% - 11 * var(--gap)) / 12 * 4 + 4 * var(--gap)); }
.hoi details { margin: 0 -24px 14px; padding: 0 24px; transition: background .2s; }
.hoi details[open] { background: var(--surface); padding-bottom: 24px; }
.hoi summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: clamp(19px, 1.7vw, 24px); padding: 18px 0; min-height: 44px; }
.hoi summary::-webkit-details-marker { display: none; }
.hoi summary i { flex: none; width: 14px; height: 14px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-3px, -3px); transition: transform .25s var(--ease); }
.hoi details[open] summary i { transform: rotate(-135deg) translate(-3px, -3px); }
.hoi details p { font-size: 17px; max-width: 54ch; }

/* ---------- Liên hệ ---------- */
.lien-he { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; padding-bottom: clamp(96px, 9vw, 140px); }
.lh-chu { grid-column: 1 / 6; display: flex; flex-direction: column; gap: 20px; }
.lh-chu p { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.2; letter-spacing: -0.015em; }
.lh-anh { grid-column: 7 / 9; width: 100%; aspect-ratio: 1; object-fit: cover; }
.lh-lk { grid-column: 9 / 13; display: flex; flex-direction: column; gap: 4px; }
.lh-lk h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.lh-lk .nho { margin-top: 12px; }

/* ---------- Chân trang ---------- */
.chan { display: grid; grid-template-columns: 1fr 1fr; min-height: 92svh; background: var(--surface); }
.chan-anh { position: relative; overflow: hidden; }
.chan-anh img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.chan-chu { padding: 72px var(--m) 32px clamp(32px, 6vw, 96px); display: flex; flex-direction: column; }
.chan-chu .ten-hieu { margin: 0 0 40px; }
.chan-menu { display: flex; flex-direction: column; gap: 8px; }
.chan-menu a { font-size: clamp(26px, 2.6vw, 40px); font-weight: 700; letter-spacing: -0.02em; text-decoration: none; display: inline-block; min-height: 44px; transition: transform .25s var(--ease), color .2s; }
.chan-menu:hover a { color: var(--muted); }
.chan-menu a:hover { color: var(--ink); transform: translateX(12px); }
.chan-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 64px; font-size: 15px; }
.chan-2 h3 { font-size: 15px; margin-bottom: 6px; }
.chan-2 a { display: block; min-height: 32px; }
.chan-luat { margin-top: auto; padding-top: 48px; font-size: var(--t-small); color: var(--muted); }

/* ---------- Thanh liên hệ đáy (điện thoại) ---------- */
.thanh-day { display: none; }

/* ---------- Danh sách báo giá (hộp bên) ---------- */
dialog.gio { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(460px, 100vw); max-width: 100vw; border: 0; padding: 0; background: var(--bg); color: var(--ink); box-shadow: -24px 0 60px rgba(0,0,0,.25); }
dialog.gio::backdrop { background: var(--scrim); }
dialog.gio[open] { animation: vao-phai .32s var(--ease); }
@keyframes vao-phai { from { transform: translateX(40px); opacity: 0; } }
.gio-vo { display: flex; flex-direction: column; height: 100%; }
.gio-dau { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; background: var(--surface); }
.gio-dau h2 { font-size: 24px; letter-spacing: -0.02em; }
.nut-dong { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.nut-dong:hover { background: var(--surface-2); }
.nut-dong svg { width: 22px; height: 22px; fill: currentColor; }
.gio-than { overflow-y: auto; padding: 8px 24px 24px; flex: 1; }
.gio-ds li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; }
.gio-ds li + li { box-shadow: 0 -10px 0 -9px var(--surface-2); }
.gio-ds img { width: 64px; height: 80px; object-fit: cover; background: var(--surface); }
.gio-ds .ten b { display: block; font-size: 16px; }
.gio-ds .ten span { font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.gio-ds .xoa { border: 0; background: none; color: var(--muted); font-size: var(--t-small); text-decoration: underline; cursor: pointer; padding: 0; min-height: 32px; }
.gio-ds .xoa:hover { color: var(--danger); }
.so-luong { display: inline-flex; align-items: center; background: var(--surface); }
.so-luong button { width: 40px; height: 44px; border: 0; background: transparent; cursor: pointer; font-size: 20px; font-weight: 600; }
.so-luong button:hover { background: var(--surface-2); }
.so-luong input { width: 2.6ch; border: 0; background: transparent; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.so-luong input::-webkit-inner-spin-button { -webkit-appearance: none; }
.gio-trong { padding: 32px 0; color: var(--muted); }
.gio-tong { display: flex; justify-content: space-between; padding: 16px 0; font-weight: 600; }
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.form label { font-weight: 600; font-size: 15px; display: block; margin-bottom: 6px; }
.form label small { font-weight: 400; color: var(--muted); }
.form input, .form textarea { width: 100%; min-height: 50px; border: 2px solid var(--surface-2); background: var(--bg); padding: 10px 14px; font-size: 17px; border-radius: 0; transition: border-color .18s; }
.form textarea { min-height: 86px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--accent); outline: none; }
.form input[aria-invalid="true"] { border-color: var(--danger); }
.loi { color: var(--danger); font-size: var(--t-small); margin-top: 6px; min-height: 0; }
.loi:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gio-chan { padding: 16px 24px calc(16px + env(safe-area-inset-bottom)); background: var(--surface); }
.gio-chan .nut { width: 100%; }
.gio-chan .nho { margin-top: 10px; text-align: center; }
.gio-xong { padding: 40px 0; display: flex; flex-direction: column; gap: 16px; }
.gio-xong h3 { font-size: 26px; }

/* Thông báo ngắn */
.bao { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 60; background: var(--ink); color: var(--bg); padding: 12px 12px 12px 18px; display: flex; gap: 16px; align-items: center; transition: opacity .22s, transform .22s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.bao.hien { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.bao button { border: 0; background: var(--bg); color: var(--ink); font-weight: 600; min-height: 40px; padding: 0 14px; cursor: pointer; white-space: nowrap; }

/* ---------- Trang chi tiết ---------- */
.ct { padding: 24px var(--m) 0; }
.ct-ve { margin-bottom: 16px; }
.ct-ve svg { transform: rotate(180deg); }
.ct-ve:hover svg { transform: rotate(180deg) translateX(4px); }
.ct-luoi { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(24px, 4vw, 72px); align-items: start; }
.ct-anh { position: sticky; top: 84px; }
.truot { display: flex; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scroll-snap-type: x mandatory; background: var(--surface); scrollbar-width: none; aspect-ratio: 4 / 5; max-height: calc(100svh - 120px); }
.truot::-webkit-scrollbar { display: none; }
.truot button { flex: 0 0 100%; scroll-snap-align: start; border: 0; padding: 0; background: none; cursor: zoom-in; }
.truot img { width: 100%; height: 100%; object-fit: contain; }
.ct-3d { aspect-ratio: 1 / 1; max-height: min(72svh, 640px); width: 100%; margin: 0 auto; background: var(--surface); position: relative; overflow: hidden; }
.ct-3d canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.ct-3d .goc { position: absolute; left: 16px; top: 16px; display: flex; gap: 6px; }
.ct-3d .goc button { min-height: 40px; padding: 0 14px; border: 0; background: var(--bg); cursor: pointer; font-weight: 600; font-size: 15px; }
.ct-3d .goc button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.ct-3d .goi-y { position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; font-size: var(--t-small); color: var(--muted); background: var(--bg); padding: 4px 10px; white-space: nowrap; }
.ct-3d .cho { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.ct-nho { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ct-nho button { width: 64px; height: 80px; border: 0; padding: 0; background: var(--surface); cursor: pointer; opacity: .55; transition: opacity .18s; }
.ct-nho button[aria-current="true"], .ct-nho button:hover { opacity: 1; box-shadow: inset 0 -4px 0 var(--ink); }
.ct-nho img { width: 100%; height: 100%; object-fit: cover; }
.ct-nho .n3d { display: grid; place-items: center; font-weight: 700; font-size: 15px; opacity: 1; background: var(--ink); color: var(--bg); }
.ct-nho .n3d[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.ct-chu { display: flex; flex-direction: column; gap: 22px; padding-top: 8px; }
.ct-chu h1 { font-size: clamp(36px, 4vw, 60px); }
.ct-gia { font-size: var(--t-lead); }
.ct-gia b { color: var(--accent); }
.ct-mua { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ct-mua .so-luong { height: 52px; }
.ct-mua .so-luong button { height: 52px; width: 44px; }
.ct-mua .nut { flex: 1 1 220px; }
.ct-lien { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.ct-lien button.lk { border: 0; background: none; padding: 0; cursor: pointer; }
dl.ts { display: grid; grid-template-columns: minmax(84px, auto) 1fr; gap: 12px 24px; font-size: 16px; margin-top: 8px; }
dl.ts dt { color: var(--muted); }
.ct-ghi { background: var(--surface); padding: 16px 18px; font-size: 15px; }
.ct-khac { padding-top: var(--sec); }
.ct-khac h2 { margin-bottom: 36px; }

/* Xem ảnh toàn màn hình */
dialog.xa { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border: 0; padding: 0; background: #0b0d0c; color: #eee; }
dialog.xa::backdrop { background: #0b0d0c; }
.xa-vo { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.xa-vo img { max-width: 100%; max-height: calc(100% - 96px); object-fit: contain; }
.xa-vo p { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font-size: 15px; padding: 0 72px; }
.xa-vo button { position: absolute; width: 52px; height: 52px; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.xa-vo button:hover { background: rgba(255,255,255,.24); }
.xa-vo button svg { width: 24px; height: 24px; fill: currentColor; }
.xa-dong { right: 16px; top: 16px; } .xa-truoc { left: 16px; top: 50%; } .xa-sau { right: 16px; top: 50%; }
.xa-truoc svg { transform: rotate(180deg); }

/* ---------- Chuyển động: hiện dần khi cuộn ---------- */
/* chỉ ẩn khi script đã chạy (lớp .dong) → script lỗi thì nội dung vẫn hiện đủ */
.hien-dan { transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--tre, 0ms); }
.dong .hien-dan:not(.da-hien) { opacity: 0; transform: translateY(24px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .dong .hien-dan:not(.da-hien) { opacity: 1; transform: none; }
}

/* ---------- Máy tính bảng ---------- */
@media (max-width: 1080px) {
  .menu-tren { gap: 18px; }
  .menu-tren a:nth-child(2) { display: none; }
  .xep-chu { grid-column: 1 / 6; } .xep figure { grid-column: 6 / 13; }
  .bang-cot { grid-column: 1 / 8; } .bang-3d { grid-column: 8 / 13; }
}

/* ---------- Điện thoại ---------- */
@media (max-width: 860px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  html { scroll-padding-top: 64px; }
  .thanh-tren { height: 60px; gap: 12px; }
  .menu-tren, .thanh-tren .nut-gio { display: none; }
  .goi-tren { display: inline-flex; }
  .ten-hieu b { font-size: 19px; }
  .dau { grid-template-columns: 1fr; min-height: 0; }
  .dau-chu { padding: 28px var(--m) 36px; gap: 20px; }
  .dau-chu h1 { font-size: clamp(38px, 10.5vw, 56px); }
  .dau-hanh-dong { margin-top: 8px; }
  .dau-anh { --khe: 8px; margin: 0 var(--m); height: 118vw; max-height: 640px; }
  /* điện thoại: 5 ô phủ kín lưới 2 cột × 3 hàng */
  .kham { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr 1fr 1fr; }
  .o1 { grid-column: 1; grid-row: 1; } .o2 { grid-column: 2; grid-row: 1 / 3; } .o3 { grid-column: 1; grid-row: 2; }
  .o4 { grid-column: 1; grid-row: 3; } .o5 { grid-column: 2; grid-row: 3; }
  .kham .o6, .kham .o7 { display: none; }
  .tuong-dau h2, .tuong-dau p { grid-column: 1 / -1; }
  .tuong-dieu-khien { margin-top: 28px; }
  .thanh-keo { flex-basis: 100%; max-width: none; }
  .tuong-hinh { margin: 28px calc(-1 * var(--m)) 0; padding: 24px var(--m) 0; }
  .tuong-ket .nut { width: 100%; }
  .loc { gap: 4px 20px; }
  .loc button { font-size: 17px; }
  .vong { margin: 32px calc(-1 * var(--m)) 0; }
  .vong-nut { width: 44px; height: 44px; margin-top: -22px; }
  .vong-nut.truoc { left: 8px; } .vong-nut.sau { right: 8px; }
  .vong-hd { flex-direction: column; gap: 4px; width: 100%; }
  .vong-hd .nut { width: 100%; }
  .chay { gap: 6px; }
  .khung { width: calc(46vw * .75 + 20px); }
  .bang-dau h2, .bang-dau p { grid-column: 1 / -1; }
  .bang-than { display: block; margin-top: 28px; }
  /* điện thoại: bỏ bảng, chỉ còn khung 3D + thanh chọn tủ */
  .bang-cot { display: none; }
  .bang-3d { position: static; margin: 0 calc(-1 * var(--m)); background: var(--surface); padding-bottom: 20px; }
  .xem3d { aspect-ratio: auto; height: min(62svh, 118vw); max-height: none; }
  .xem3d .goi-y { left: 50%; transform: translateX(-50%); bottom: 10px; white-space: nowrap; }
  .chon-dt { display: grid !important; grid-template-columns: 52px 1fr 52px; gap: 8px; padding: 14px var(--m) 0; }
  .chon-dt-nut { height: 52px; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; cursor: pointer; }
  .chon-dt-nut:active { transform: scale(.94); }
  .chon-dt-nut svg { width: 26px; height: 26px; fill: currentColor; }
  .chon-dt select { height: 52px; min-width: 0; border: 2px solid var(--ink); border-radius: 0; background: var(--bg); color: var(--ink); font-size: 17px; font-weight: 700; padding: 0 36px 0 14px; text-align: center; text-align-last: center;
    -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23151917'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 24px; }
  .chon-dt-kt { display: block !important; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; padding: 12px var(--m) 0; }
  .chon-dt-them { display: flex !important; width: calc(100% - 2 * var(--m)); margin: 12px var(--m) 0; }
  .bang-3d-chan { justify-content: center; padding: 4px var(--m) 0; margin-top: 4px; }
  .bang-3d-chan b { display: none; }
  table.kt { box-shadow: none; }
  .chon-tu { padding: 0 6px 0 var(--m); font-size: 15px; }
  table.kt thead th:first-child, table.kt tr.nhom th { padding-left: var(--m); }
  table.kt td.so { font-size: 15px; padding: 0 6px; width: auto; }
  table.kt td.them { padding-right: var(--m); width: auto; }
  .bang-ghi { padding: 0 var(--m); }
  .buoc-nut { display: none; }
  .hang-buoc { gap: 16px; }
  .buoc { width: 74vw; }
  .buoc img { margin-top: calc(var(--cach, 96px) * .45); }
  .xep { grid-template-columns: 1fr; padding: 72px 0; row-gap: 40px; }
  .xep-chu { grid-column: 1; padding: 0 var(--m); }
  .xep figure { grid-column: 1; padding: 0 var(--m); }
  .xep video { aspect-ratio: 9 / 16; width: min(100%, 360px); max-height: 78svh; margin: 0 auto; }
  .xep figcaption { padding-right: var(--m); }
  .hoi h2 { font-size: clamp(34px, 10vw, 52px); }
  .hoi-ds { margin: 40px 0 0; }
  .hoi details { margin: 0 calc(-1 * var(--m)) 8px; padding: 0 var(--m); }
  .hoi details[open] { padding-bottom: 20px; }
  .hoi details p { font-size: 16px; }
  .lien-he { grid-template-columns: 96px 1fr; column-gap: 18px; row-gap: 32px; }
  .lh-chu { grid-column: 1 / -1; }
  .lh-anh { grid-column: 1; width: 96px; }
  .lh-lk { grid-column: 2; }
  .chan { grid-template-columns: 1fr; min-height: 0; }
  .chan-anh { height: 50svh; }
  .chan-chu { padding: 48px var(--m) 32px; }
  .chan-menu a { font-size: 8vw; }
  .chan-2 { grid-template-columns: 1fr; margin-top: 40px; }
  .thanh-day { display: grid; grid-template-columns: 1fr 1fr 1.25fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ink); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  .thanh-day a, .thanh-day button { min-height: 52px; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; text-decoration: none; color: #fff; cursor: pointer; }
  .thanh-day svg { width: 20px; height: 20px; fill: currentColor; }
  .thanh-day .goi { background: var(--accent); color: var(--on-accent); }
  .thanh-day .zalo { background: var(--zalo); }
  .thanh-day .bg { background: var(--bg); color: var(--ink); }
  .thanh-day .dem { background: var(--tag); color: #fff; min-width: 22px; height: 22px; border-radius: 11px; font-size: 13px; display: inline-grid; place-items: center; padding: 0 6px; }
  .bao { bottom: calc(84px + env(safe-area-inset-bottom)); }
  dialog.gio { margin: auto 0 0; width: 100vw; height: auto; max-height: 92dvh; box-shadow: 0 -20px 50px rgba(0,0,0,.25); }
  dialog.gio[open] { animation: vao-duoi .32s var(--ease); }
  @keyframes vao-duoi { from { transform: translateY(40px); opacity: 0; } }
  .gio-vo { max-height: 92dvh; }
  .ct { padding-top: 12px; }
  .ct-luoi { grid-template-columns: 1fr; row-gap: 28px; }
  .ct-anh { position: static; margin: 0 calc(-1 * var(--m)); }
  .ct-nho { padding: 0 var(--m); }
  .truot { max-height: 76svh; }
  .ct-3d { aspect-ratio: auto; height: min(62svh, 104vw); max-height: none; }
  .ct-chu h1 { font-size: clamp(32px, 9vw, 44px); }
  .xa-vo p { padding: 0 16px; bottom: 84px; }
  .xa-truoc, .xa-sau { top: auto !important; bottom: 16px; }
}
