/* Lớp dùng chung cho bản demo Hoàng Tuấn Kiệt (bổ sung cho Tailwind CDN). Giao diện nền tối. */
:root {
  --c-page: 27 29 34;
  --c-panel: 38 41 49;
  --c-kem: 20 22 26;
  --c-muc: 241 241 238;
  --c-phu: 164 168 177;
  --c-sand: 236 205 164;
  --c-go: 205 164 122;
  --nhan: #C8742B;
  --line: rgba(255, 255, 255, .16);
}
/* Khối mô phỏng giao diện nền sáng (Zalo, bản đồ) đặt lại bảng màu. */
.light-mock {
  --c-panel: 255 255 255;
  --c-kem: 244 241 235;
  --c-muc: 28 28 28;
  --c-phu: 107 107 107;
  --c-sand: 31 61 43;
  --c-go: 139 94 60;
  color: rgb(28 28 28);
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { overflow-x: hidden; }
:focus-visible { outline: 2px solid var(--nhan); outline-offset: 3px; }
::selection { background: var(--nhan); color: #fff; }

.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 56px); }
.font-display { font-weight: 300; letter-spacing: -.01em; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: rgb(var(--c-go)); }

/* Nút dạng viên thuốc, viền mảnh, có mũi tên */
.btn-nhan, .btn-reu, .btn-line, .btn-white {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 24px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 12.5px; letter-spacing: .08em;
  text-transform: uppercase; cursor: pointer; transition: background .3s, color .3s, border-color .3s, gap .3s;
}
.btn-nhan { background: var(--nhan); color: #fff; }
.btn-nhan:hover { background: #dd8a3f; }
.btn-reu { background: rgb(var(--c-muc)); color: rgb(var(--c-page)); }
.btn-reu:hover { background: rgb(var(--c-sand)); }
.btn-line, .btn-white { border-color: rgb(var(--c-muc) / .55); color: rgb(var(--c-muc)); background: transparent; }
.btn-line:hover, .btn-white:hover { background: rgb(var(--c-muc)); color: rgb(var(--c-page)); gap: 16px; }
.btn-white { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-white:hover { background: #fff; color: #14161a; }
.arrow::after { content: "→"; font-size: 15px; line-height: 1; }

.field { width: 100%; min-height: 48px; padding: 10px 2px; border: 0; border-bottom: 1px solid rgb(var(--c-muc) / .3); border-radius: 0; background: transparent; color: rgb(var(--c-muc)); font-size: 16px; }
.field::placeholder { color: rgb(var(--c-phu) / .7); }
.field:focus { outline: none; border-color: var(--nhan); }
select.field option { color: #1c1c1c; background: #fff; }
.label { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgb(var(--c-phu)); }

.chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px; border: 1px solid rgb(var(--c-muc) / .3); border-radius: 999px; background: transparent; color: rgb(var(--c-muc)); font-size: 12.5px; font-weight: 500; letter-spacing: .04em; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.chip:hover { border-color: rgb(var(--c-muc)); }
.chip.is-on, .chip[aria-pressed="true"], .chip[aria-selected="true"] { background: rgb(var(--c-muc)); border-color: rgb(var(--c-muc)); color: rgb(var(--c-page)); }

/* Hiện dần khi cuộn */
[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
[data-reveal].is-shown { opacity: 1; transform: none; }

/* Header: trong suốt trên hero trang chủ, đặc lại khi cuộn hoặc ở trang trong */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .4s, backdrop-filter .4s, border-color .4s; border-bottom: 1px solid transparent; }
.site-header.is-solid { background: rgba(20, 22, 26, .92); backdrop-filter: blur(14px); border-color: var(--line); }
.site-header .utility { max-height: 34px; overflow: hidden; transition: max-height .35s, opacity .35s; }
.site-header.is-compact .utility { max-height: 0; opacity: 0; }
.nav-link { position: relative; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #fff; padding: 22px 0; white-space: nowrap; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 14px; height: 1px; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform .35s; }
.nav-link:hover::after, .nav-link.is-current::after { transform: scaleX(1); }
body:not(.is-home) #app { padding-top: 98px; }

.mega { position: absolute; left: 0; right: 0; top: 100%; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .3s, visibility 0s .3s; }
.mega.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .3s, transform .3s; }

/* Hero: slide chuyển mờ, ảnh phóng chậm, thanh tiến trình */
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-slide.is-on { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); transition: transform 8s ease-out; }
.hero-slide.is-on img { transform: scale(1); }
.hero-text { position: absolute; inset: auto 0 0 0; opacity: 0; transform: translateY(24px); transition: opacity .8s .2s, transform .9s .2s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.hero-text.is-on { opacity: 1; transform: none; pointer-events: auto; }
.hero-bar { height: 1px; background: rgba(255, 255, 255, .3); position: relative; overflow: hidden; }
.hero-bar i { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.hero-dot.is-on .hero-bar i { animation: fill 6s linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

/* Dải chữ chạy */
.marquee { overflow: hidden; border-block: 1px solid var(--line); }
.marquee ul { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; animation: marquee 38s linear infinite; }
.marquee li { padding: 22px 44px; font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; white-space: nowrap; color: rgb(var(--c-phu)); }
.marquee li:nth-child(odd) { color: rgb(var(--c-muc)); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Danh mục đánh số, đổi ảnh khi rê chuột */
.cat-row { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 18px 4px; border-bottom: 1px solid var(--line); color: rgb(var(--c-phu)); transition: color .3s, padding .4s cubic-bezier(.2, .8, .2, 1); }
.cat-row:hover, .cat-row.is-on { color: #fff; padding-left: 16px; }
.cat-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .7s, transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.cat-photo.is-on { opacity: 1; transform: none; }

/* Ngăn kéo điện thoại và bộ lọc */
.drawer { position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(86vw, 360px); transform: translateX(-102%); transition: transform .4s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; }
.drawer.is-open { transform: none; }
.scrim { position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .6); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.scrim.is-open { opacity: 1; visibility: visible; transition: opacity .3s; }

.rail { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-color: rgba(255, 255, 255, .4) transparent; }
.rail > * { scroll-snap-align: start; flex: 0 0 auto; }

.masonry { columns: 3; column-gap: 20px; }
.masonry > * { break-inside: avoid; margin-bottom: 20px; }
@media (max-width: 1023px) { .masonry { columns: 2; } }
@media (max-width: 639px) { .masonry { columns: 1; } }

/* Khung chat và mô phỏng điện thoại */
.chat-box { position: fixed; right: 16px; bottom: 96px; z-index: 75; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 150px)); transform: translateY(20px) scale(.98); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility 0s .25s; }
.chat-box.is-open { transform: none; opacity: 1; visibility: visible; transition: opacity .25s, transform .25s; }
.typing i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: #9aa0a6; animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.phone { width: min(100%, 340px); border: 10px solid #0b0c0e; border-radius: 38px; background: #e8eef7; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }

table.price th, table.price td { padding: 15px 18px; text-align: right; white-space: nowrap; }
table.price th:first-child, table.price td:first-child, table.price th:nth-child(2), table.price td:nth-child(2) { text-align: left; }
table.price thead th { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
table.price tbody tr { border-top: 1px solid var(--line); }
table.price tbody tr:hover { background: rgba(255, 255, 255, .05); }
.price-flash { animation: flash .8s ease; }
@keyframes flash { from { background: rgba(200, 116, 43, .35); } }

@media (max-width: 1023px) { body:not(.is-home) #app { padding-top: 64px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], .hero-slide, .hero-slide img, .hero-text, .drawer, .chat-box, .cat-photo { transition: none; }
  .typing i, .price-flash, .hero-dot.is-on .hero-bar i { animation: none; }
  .marquee ul { animation: none; flex-wrap: wrap; width: auto; }
}
