/* Layout: một cột trên điện thoại, lưới thẻ căn trên máy tính. Màu thương hiệu Thành 88: navy + vàng đồng. */
:root {
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --ink: #142A48;
  --ink-soft: #4A5A70;
  --line: #DCD6C8;
  --gold: #B8913A;
  --gold-bright: #D3AE5D;
  --navy: #142A48;
  --on-navy: #F5F2EB;
  --font-display: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 10px;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1E33; --surface: #16294A; --ink: #EEF1F5; --ink-soft: #A9B6C8;
    --line: #2A4064; --gold: #D3AE5D; --gold-bright: #E2C27A; --navy: #0B1628; --on-navy: #F5F2EB;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1E33; --surface: #16294A; --ink: #EEF1F5; --ink-soft: #A9B6C8;
  --line: #2A4064; --gold: #D3AE5D; --gold-bright: #E2C27A; --navy: #0B1628; --on-navy: #F5F2EB;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; line-height: 1.2; margin: 0; }
.num { font-variant-numeric: tabular-nums; }

/* Thanh trên cùng */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--navy); color: var(--on-navy);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; }
.brand b { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: 0.06em; color: var(--gold-bright); }
.brand small { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.top-call { font-weight: 700; text-decoration: none; white-space: nowrap; color: var(--on-navy); border: 1px solid var(--gold-bright); border-radius: 999px; padding: 6px 14px; font-size: 14px; }

/* Phần mở đầu */
.intro { padding-block: 36px 28px; display: grid; gap: 14px; }
.eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.intro h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 800; max-width: 22ch; }
.intro p { margin: 0; color: var(--ink-soft); max-width: 60ch; }
.wards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  font: inherit; font-size: 14px; cursor: pointer; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 14px;
}
.chip[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }

/* Lưới căn */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 22px; font-weight: 700; }
.section-head span { color: var(--ink-soft); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; padding-bottom: 40px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
}
.card-photo { position: relative; aspect-ratio: 4 / 3; background: var(--line); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.tag {
  position: absolute; left: 12px; top: 12px; background: var(--navy); color: var(--gold-bright);
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 6px;
}
.card-body { padding: 14px 16px 16px; display: grid; gap: 8px; min-width: 0; }
.card-body h3 { font-size: 17px; font-weight: 700; }
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price strong { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--gold); }
.price span { color: var(--ink-soft); font-size: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-soft); }
.note-card {
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px;
  display: grid; align-content: center; gap: 8px; color: var(--ink-soft);
}
.note-card b { color: var(--ink); font-size: 17px; }

/* Khối liên hệ */
.contact-band { background: var(--navy); color: var(--on-navy); }
.contact-band .wrap { padding-block: 32px; display: grid; gap: 16px; }
.contact-band h2 { font-size: 22px; }
.contact-band p { margin: 0; opacity: 0.9; max-width: 60ch; }
.phone-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.phone-big { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: 0.02em; color: var(--gold-bright); user-select: all; }
.btn {
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; text-align: center;
  border-radius: 8px; padding: 10px 18px; border: 1px solid transparent; display: inline-block;
}
.btn-gold { background: var(--gold-bright); color: #142A48; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-navy { background: var(--navy); color: var(--on-navy); }
footer { padding-block: 22px; font-size: 13px; color: var(--ink-soft); }

/* Trang chi tiết */
.back { display: inline-block; margin-top: 16px; font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.detail { display: grid; gap: 24px; padding-block: 16px 40px; }
@media (min-width: 900px) { .detail { grid-template-columns: 1.35fr 1fr; align-items: start; } .side { position: sticky; top: 76px; } }
.gallery { display: grid; gap: 10px; min-width: 0; }
.main-photo { position: relative; aspect-ratio: 3 / 4; max-height: 78vh; background: var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 900px) { .main-photo { aspect-ratio: 4 / 4.2; } }
.main-photo img { width: 100%; height: 100%; object-fit: cover; }
.caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; color: #fff; font-size: 14px; background: linear-gradient(transparent, rgba(10, 20, 36, 0.75)); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: 0 0 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--line); }
.thumbs button[aria-current="true"] { border-color: var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.side { display: grid; gap: 18px; min-width: 0; }
.side h1 { font-size: clamp(24px, 4.5vw, 32px); font-weight: 800; }
.code { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--gold); }
.price-block { display: grid; gap: 2px; padding-block: 12px; border-block: 1px solid var(--line); }
.price-block strong { font-family: var(--font-display); font-size: 40px; font-weight: 800; color: var(--gold); line-height: 1.1; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 15px; }
.specs dt { color: var(--ink-soft); }
.specs dd { margin: 0; font-weight: 600; }
.highlights { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.form h2 { font-size: 18px; }
.form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); width: 100%;
}
.form input[aria-invalid="true"] { border-color: #C0392B; outline-color: #C0392B; }
.thanks { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #2E8B57; border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; justify-items: start; }
.thanks h2 { font-size: 20px; }
.thanks p { margin: 0; }
.form-note { font-size: 13px; color: var(--ink-soft); margin: 0; }
.ok { font-size: 14px; background: var(--bg); border-left: 3px solid var(--gold); padding: 10px 12px; margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform 0.15s ease, border-color 0.15s ease; }
  .card:hover { transform: translateY(-2px); border-color: var(--gold); }
}
.lead { margin: 0; color: var(--ink-soft); font-size: 15px; }
.back a { color: inherit; }
footer a { color: inherit; }
.card[hidden] { display: none; }
.card-photo img { position: absolute; inset: 0; }
/* Ảnh căn: vuốt trái phải (cuộn ngang có nấc), nút mũi tên cho máy tính */
.track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; scroll-snap-stop: always; }
.nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 30px; line-height: 1; padding: 0 0 4px;
  background: rgba(10, 20, 36, 0.55); color: #fff;
}
.nav.prev { left: 10px; }
.nav.next { right: 10px; }
.nav[hidden] { display: none; }
@media (hover: none) { .nav { width: 36px; height: 36px; font-size: 24px; background: rgba(10, 20, 36, 0.4); } }
@media (prefers-reduced-motion: no-preference) { .track { scroll-behavior: smooth; } }
