/* ==========================================================================
   HALLCO® LIVE FLOOR® – Như Tín
   Kế hoạch thiết kế: docs/ke-hoach-thiet-ke.md
   ========================================================================== */

/* ---------- Font tự host (Be Vietnam Pro, Barlow Condensed) ---------- */
/* vietnamese */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/barlow-condensed-600-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/barlow-condensed-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/barlow-condensed-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/barlow-condensed-700-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/barlow-condensed-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/barlow-condensed-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-400-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-500-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-600-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-700-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/be-vietnam-pro-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Màu (lấy từ logo HALLCO) */
  --green: #249B45;        /* xanh HALLCO: thanh sàn đang chạy, icon */
  --green-btn: #1B7A36;    /* nút, liên kết: chữ trắng đạt 5,4:1 */
  --green-btn-dark: #14612A;
  --forest: #0B4D2A;       /* khung gầm, form, footer */
  --forest-deep: #073820;
  --char: #222021;         /* chữ chính */
  --steel: #5F6870;        /* chữ phụ */
  --alu: #ECEFF1;          /* nền phụ, thanh sàn nghỉ */
  --alu-line: #D5DBDF;
  --white: #FFFFFF;
  --zalo: #0068FF;


  /* Chữ */
  --f-display: "Barlow Condensed", "Be Vietnam Pro", "Arial Narrow", sans-serif;
  --f-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Bố cục */
  --gutter: 16px;
  --maxw: 1200px;
  --header-h: 64px;
  --radius: 4px;
  --focus: var(--green-btn);
}

@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1280px) { :root { --gutter: 32px; --header-h: 76px; } }

/* ---------- Nền tảng ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--white);
  color: var(--char);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: clip;
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }

h1, h2, h3 { margin: 0; color: inherit; }
h1, h2 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.005em;
}
h2 { font-size: clamp(2rem, 1.55rem + 1.9vw, 2.875rem); margin-bottom: 12px; }
h3 { font-size: 1.1875rem; font-weight: 600; line-height: 1.35; }
p { margin: 0 0 1em; }

/* Chống chữ mồ côi: tiêu đề chia đều các dòng, đoạn văn tránh để một chữ nằm riêng dòng cuối */
h1, h2, h3, .how-title, .faq summary, .cta-row p { text-wrap: balance; }
p, li, dd, td { text-wrap: pretty; }
/* Cụm không được ngắt dòng: i-Series, i-4000, rơ-moóc, số điện thoại (bọc tự động bởi tools/build.py) */
.nw { white-space: nowrap; }
p:last-child { margin-bottom: 0; }

a { color: var(--green-btn); }
a:hover { color: var(--green-btn-dark); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sprite { display: none; }

.icon {
  width: 20px; height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-lg { width: 32px; height: 32px; stroke-width: 1.6; }
.icon-xl { width: 48px; height: 48px; stroke-width: 2; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--forest);
  color: var(--white);
  border-radius: var(--radius);
}
.skip-link:focus { top: 8px; color: var(--white); }

.text-link { font-weight: 600; text-underline-offset: 3px; }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 600 1rem/1.2 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-lg { min-height: 54px; padding: 12px 24px; font-size: 1.0625rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--green-btn); color: var(--white); }
.btn-primary:hover { background: var(--green-btn-dark); color: var(--white); }

.btn-ghost { border-color: var(--char); color: var(--char); background: transparent; }
.btn-ghost:hover { background: var(--char); color: var(--white); }

.btn-outline { border-color: var(--green-btn); color: var(--green-btn); background: transparent; }
.btn-outline:hover { background: var(--green-btn); color: var(--white); }

.btn-light { background: var(--white); color: var(--forest); }
.btn-light:hover { background: var(--alu); color: var(--forest); }

.btn-zalo { background: var(--zalo); color: var(--white); }
.btn-zalo:hover { background: #0055D4; color: var(--white); }
.btn-line-light { border-color: rgba(255, 255, 255, .7); color: var(--white); background: transparent; }
.btn-line-light:hover { background: var(--white); color: var(--forest); }

.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--alu-line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--steel);
  min-width: 0;
}
.brand-nhutin { width: auto; height: 28px; }
.brand-sep { width: 1px; height: 32px; background: var(--alu-line); }
.brand-dealer { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.brand-dealer-label {
  font-size: .6875rem;
  font-weight: 600;
  line-height: 1;
  color: var(--steel);
  white-space: nowrap;
}
.brand-hallco { width: auto; max-width: none; height: 18px; }

@media (min-width: 1280px) {
  .brand-nhutin { height: 34px; }
  .brand-hallco { height: 22px; }
  .brand-dealer-label { font-size: .75rem; }
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  margin-right: -8px;
  border: 0;
  background: transparent;
  color: var(--char);
  cursor: pointer;
}
.menu-toggle .icon { width: 26px; height: 26px; }

.site-nav {
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0;
  display: none;
  padding: 8px var(--gutter) 24px;
  background: var(--white);
  border-bottom: 1px solid var(--alu-line);
}
.site-nav.is-open { display: block; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.nav-list { list-style: none; margin: 0 0 16px; padding: 0; }
.nav-list a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--alu);
  color: var(--char);
  font-weight: 500;
  text-decoration: none;
}
.nav-list a:hover { color: var(--green-btn); }
.nav-cta { width: 100%; }

@media (min-width: 1200px) {
  .menu-toggle { display: none; }
  .site-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0;
    border: 0;
    background: none;
  }
  .nav-list { display: flex; align-items: center; gap: 20px; margin: 0; }
  .nav-list > li > a { padding: 8px 0; border: 0; font-size: .9375rem; }
  .nav-cta { width: auto; min-height: 44px; }
}

/* Nút chuyển ngôn ngữ VI | EN, góc phải header */
.lang-switch {
  flex: none;
  display: inline-flex;
  margin-left: auto;
  padding: 3px;
  border: 1px solid var(--alu-line);
  border-radius: 999px;
  background: var(--alu);
}
.lang-switch a {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--steel);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.lang-switch a:hover { color: var(--forest); }
.lang-switch a[aria-current] { background: var(--forest); color: var(--white); box-shadow: 0 1px 3px rgba(7, 56, 32, .25); }
.lang-switch a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (min-width: 1200px) {
  .site-nav { margin-left: auto; }
  .lang-switch { margin-left: 0; }
}
/* Màn hình hẹp: thu gọn nút và logo để chữ "Đại lý ủy quyền" không bị che */
@media (max-width: 479px) {
  .header-row { gap: 10px; }
  .brand { gap: 8px; }
  .brand-nhutin { height: 22px; }
  .brand-sep { height: 26px; }
  .brand-hallco { height: 15px; }
  .brand-dealer-label { font-size: .625rem; }
  .lang-switch { padding: 2px; }
  .lang-switch a { min-width: 30px; height: 28px; padding: 0 5px; font-size: .75rem; }
  .menu-toggle { width: 44px; }
}
@media (max-width: 359px) {
  .brand-dealer-label { display: none; }
}

/* Menu con "Sản phẩm" */
.nav-list > li { position: relative; }
.has-sub { display: flex; flex-wrap: wrap; align-items: center; }
.has-sub > a { flex: 1; border-bottom: 0; }
.has-sub { border-bottom: 1px solid var(--alu); }
.sub-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-right: -12px;
  border: 0;
  background: none;
  color: var(--char);
  cursor: pointer;
}
.sub-toggle .icon { width: 18px; height: 18px; transition: transform .2s; }
.sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.sub { display: none; flex-basis: 100%; margin: 0; padding: 0 0 8px 16px; list-style: none; }
.sub.is-open { display: block; }
.sub a { display: block; padding: 10px 0; color: var(--char); font-size: .9375rem; text-decoration: none; }
.sub a:hover { color: var(--green-btn); }
.nav-list a[aria-current="page"], .nav-list .is-active > a { color: var(--green-btn); }
@media (min-width: 1200px) {
  .has-sub { flex-wrap: nowrap; border-bottom: 0; }
  .sub-toggle { width: 28px; height: 36px; margin-right: -6px; }
  .sub {
    position: absolute;
    top: 100%;
    left: -16px;
    z-index: 10;
    min-width: 250px;
    padding: 8px 0;
    background: var(--white);
    border: 1px solid var(--alu-line);
    border-radius: var(--radius);
    box-shadow: 0 10px 24px rgba(34, 32, 33, .1);
  }
  .sub a { padding: 9px 16px; }
  .has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
}

/* ---------- Hero ---------- */
.hero { overflow-x: clip; }

.hero-grid {
  display: grid;
  gap: 24px;
  padding-top: 28px;
}
.hero-copy { max-width: 600px; container-type: inline-size; }
.hero h1 {
  /* cỡ chữ theo bề rộng cột chữ để "HALLCO® LIVE FLOOR®" luôn vừa một dòng */
  font-size: clamp(1.625rem, 1.4rem + 2vw, 2.625rem);
  font-size: clamp(1.625rem, 8cqi, 2.625rem);
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero-sub {
  max-width: 54ch;
  font-size: 1.0625rem;
  color: var(--steel);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.hero-media { margin-inline: calc(-1 * var(--gutter)); }
.hero-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--white);
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 48px;
    padding-top: 40px;
  }
  .hero-media { margin-left: 0; }
}
@media (min-width: 1264px) {
  /* video tràn tới mép phải màn hình */
  .hero-media { margin-right: calc((100vw - var(--maxw)) / -2 + 8px); }
}

/* ---------- Mô phỏng thanh sàn (chữ ký) ---------- */
.floor {
  --s: 40px;            /* quãng chạy mỗi chu kỳ */
  --tile: 480px;        /* bề rộng tile hàng rời, bội số của --s */
  --dur: .65s;
  --slat-h: 6px;
  --gap: 2px;
  position: relative;
  overflow: hidden;
}
.floor-slats {
  display: grid;
  gap: var(--gap);
  padding-block: var(--gap);
  background: #30363B;
}
.slat {
  position: relative;
  display: block;
  height: var(--slat-h);
  overflow: hidden;
  background: #C9D1D6;
  transition: background-color .3s;
}
.slat::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: calc(-2 * var(--s));
  right: calc(-2 * var(--s));
  background: repeating-linear-gradient(90deg,
    transparent 0 calc(2 * var(--s) - 3px),
    rgba(0, 0, 0, .22) 0 calc(2 * var(--s)));
  transform: translateX(calc(var(--x, 0) * var(--s)));
  transition: transform var(--dur) cubic-bezier(.45, 0, .25, 1);
}
.floor-load {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
  /* Mảnh dăm sinh ngẫu nhiên. Lớp rộng hơn khung một tile, chạy bằng transform
     (không vẽ lại) và được JS kéo lùi đúng một tile khi đi hết để nối liền. */
  right: 0;
  left: calc(-1 * var(--tile));
  background: url("../assets/img/hang-roi-dai-san.svg?v=2") repeat-x;
  background-size: var(--tile) 100%;
  transform: translateX(var(--lx, 0px));
  transition: transform var(--dur) cubic-bezier(.45, 0, .25, 1);
  will-change: transform;
}
.floor-load.no-anim { transition: none; }

/* Chu trình: 0 cả sàn tiến; 1-3 lùi từng nhóm; 4 nghỉ */
.floor[data-phase="0"] .slat { --x: 1; background: var(--green); }
.floor[data-phase="1"] .slat { --x: 1; }
.floor[data-phase="1"] .g0 { --x: 0; background: var(--green); }
.floor[data-phase="2"] .slat { --x: 0; }
.floor[data-phase="2"] .g1 { background: var(--green); }
.floor[data-phase="2"] .g2 { --x: 1; }
.floor[data-phase="3"] .slat { --x: 0; }
.floor[data-phase="3"] .g2 { background: var(--green); }
.floor[data-phase="4"] .slat { --x: 0; }

.floor-strip { margin-top: 28px; }
.floor-strip .floor-crate { width: 20px; height: 20px; margin-top: -10px; border-width: 3px; background: #F5C518; }
@media (min-width: 960px) { .floor-strip { margin-top: 8px; } }

/* Mô phỏng lớn ở khối Cách hoạt động */
.floor-sim {
  --s: 48px;
  --slat-h: 16px;
  --gap: 4px;
  border: 6px solid var(--steel);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
.floor-sim { --tile: 576px; }
.floor-sim .floor-load { background-image: url("../assets/img/hang-roi-mo-phong.svg"); }
.floor-crate {
  position: absolute;
  top: 50%;
  left: 0;
  width: 26px; height: 26px;
  margin-top: -13px;
  background: var(--white);
  border: 4px solid var(--char);
  transform: translateX(var(--cx, 24px));
  transition: transform var(--dur) cubic-bezier(.45, 0, .25, 1), opacity .3s;
}
.floor-crate.no-anim { transition: none; }
.floor-door {
  position: absolute;
  top: 6px; right: 0;
  padding: 2px 8px;
  background: var(--char);
  color: var(--white);
  font-size: .75rem;
  font-weight: 600;
}

/* ---------- Khung gầm: thanh niềm tin ---------- */
.chassis {
  background: var(--forest);
  color: var(--white);
  --focus: var(--white);
}
.chassis .wrap { padding-block: 40px 28px; }
@media (min-width: 900px) { .chassis .wrap { padding-block: 28px; } }
/* Màn hình nhỏ: dải thanh sàn 7 thanh thay vì 9 cho đỡ dày */
@media (max-width: 599px) { .floor-strip .slat:nth-child(n+8) { display: none; } }
.chassis-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chassis-stats li {
  padding-inline: 16px;
  border-left: 1px solid rgba(255, 255, 255, .22);
}
.stat-num {
  display: block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  margin-top: 6px;
  max-width: 26ch;
  font-size: .875rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, .82);
}
@media (min-width: 900px) {
  .chassis-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Khối nội dung ---------- */
.section { padding-block: 64px; }
@media (min-width: 960px) { .section { padding-block: 96px; } }

.section-alt { background: var(--alu); }
.section-dark { background: var(--forest); color: var(--white); --focus: var(--white); }
.section-dark a { color: var(--white); }

.section-head { max-width: 68ch; margin-bottom: 40px; }
.lead { font-size: 1.125rem; color: var(--steel); }

/* ---------- Cách hoạt động ---------- */
.how-grid { display: grid; gap: 32px; }
@media (min-width: 960px) {
  .how-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
}
.how-steps { list-style: none; margin: 0; padding: 0; }
.how-step-btn {
  display: flex;
  gap: 18px;
  width: 100%;
  padding: 18px 16px 18px 18px;
  border: 0;
  border-left: 4px solid var(--alu-line);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .25s;
}
.how-num {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--steel);
  transition: color .25s;
}
.how-text { display: grid; gap: 4px; }
.how-title { font-weight: 600; font-size: 1.125rem; line-height: 1.35; }
.how-desc { color: var(--steel); }
.how-step.is-active .how-step-btn { border-left-color: var(--green); }
.how-step.is-active .how-num { color: var(--green-btn); }

.how-sim { margin: 0; }
.how-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 14px;
  font-size: .875rem;
  color: var(--steel);
}
.how-legend span { display: inline-flex; align-items: center; gap: 8px; }
.swatch { display: inline-block; width: 18px; height: 10px; }
.swatch-moving { background: var(--green); }
.swatch-idle { background: #C9D1D6; }
.swatch-crate { width: 12px; height: 12px; background: var(--white); border: 3px solid var(--char); }

.how-video { margin-top: 40px; max-width: 760px; }
.how-video summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--green-btn);
  font-weight: 600;
  cursor: pointer;
}
.how-video video { width: 100%; margin-top: 12px; border-radius: var(--radius); background: #000; }

/* ---------- CTA lặp lại ---------- */
.cta-strip { background: var(--forest); color: var(--white); --focus: var(--white); }
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 24px;
}
.cta-row p { margin: 0; max-width: 62ch; font-size: 1.0625rem; font-weight: 500; }
.cta-strip .btn-primary { background: var(--white); color: var(--forest); }
.cta-strip .btn-primary:hover { background: var(--alu); color: var(--forest); }

/* ---------- Lợi ích ---------- */
.benefits {
  display: grid;
  gap: 0 56px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.benefits li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px 18px;
  padding-block: 24px;
  border-top: 1px solid var(--alu-line);
}
.benefits .icon { grid-row: span 2; color: var(--green); }
.benefits p { color: var(--steel); }

/* ---------- Ứng dụng ---------- */
.apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 150px;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.app { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--alu-line); }
.app-tall { grid-row: span 2; }
.app-wide { grid-column: span 2; }
.app a { display: block; height: 100%; color: inherit; }
.app img { width: 100%; height: 100%; object-fit: cover; }
.app-name {
  position: absolute;
  left: 8px; bottom: 8px;
  padding: 4px 10px;
  background: var(--white);
  color: var(--char);
  font-size: .9375rem;
  font-weight: 600;
  border-radius: 2px;
}
@media (min-width: 900px) {
  .apps { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; gap: 12px; }
  .app-name { left: 12px; bottom: 12px; font-size: 1rem; }
}

/* ---------- Sản phẩm ---------- */
.products {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } }
.product {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--alu-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.product-img { background: var(--alu); }
.product-img img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.product-img--contain { padding: 24px; background: var(--white); }
.product-img--contain img { aspect-ratio: 16 / 8; }
.product-img--contain img { object-fit: contain; }
.product-body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 24px; }
.product-body h3 { font-family: var(--f-display); font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.product-body p { color: var(--steel); flex: 1; }
.product-body .btn { align-self: flex-start; }

/* ---------- Bảo hành ---------- */
.warranty-grid { display: grid; gap: 40px; }
@media (min-width: 900px) {
  .warranty-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 72px; align-items: center; }
}
.warranty-table {
  width: 100%;
  margin: 24px 0 28px;
  border-collapse: collapse;
  background: var(--white);
}
.warranty-table thead th {
  padding: 10px 16px;
  background: var(--forest);
  color: var(--white);
  font-size: .8125rem;
  font-weight: 600;
  text-align: left;
}
.warranty-table tbody th,
.warranty-table td {
  padding: 18px 16px;
  border-top: 1px solid var(--alu-line);
  text-align: left;
  vertical-align: top;
}
.warranty-table tbody th {
  width: 7.5rem;
  font-family: var(--f-display);
  font-size: 1.375rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--forest);
}
.w-years { font-size: 3rem; font-weight: 700; line-height: .9; }
.note { font-size: .9375rem; color: var(--steel); }
/* Logo tròn Như Tín (ảnh gốc 220px, không phóng to hơn để tránh mờ) */
.seal-wrap { justify-self: start; width: min(220px, 70vw); }
@media (min-width: 900px) { .seal-wrap { justify-self: center; } }
.seal { width: 100%; height: auto; }

/* ---------- Về Như Tín ---------- */
.about-grid { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; }
}
.about-img { margin: 0; }
.about-img img { width: 100%; border-radius: var(--radius); }
.about-copy p { color: var(--steel); max-width: 60ch; }
.about-copy .btn { margin-top: 12px; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: 8px; }
@media (min-width: 1000px) {
  .faq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .faq-grid .section-head { position: sticky; top: calc(var(--header-h) + 32px); }
}
.faq details { border-bottom: 1px solid var(--alu-line); }
.faq details:first-child { border-top: 1px solid var(--alu-line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--green-btn); transition: transform .25s; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq-a { padding: 0 40px 22px 0; color: var(--steel); max-width: 68ch; }
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] .faq-a { animation: faq-open .28s ease-out; }
}
@keyframes faq-open {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Form báo giá ---------- */
.quote-grid { display: grid; gap: 32px; }
@media (min-width: 960px) {
  .quote-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: start; }
}
.quote-intro p { color: rgba(255, 255, 255, .85); max-width: 46ch; }
.quote-alt { margin-top: 24px; font-weight: 500; }
.quote-alt a { font-weight: 700; text-underline-offset: 3px; }

.quote-form { display: grid; gap: 18px; }

/* Khối liên hệ Zalo / gọi điện (thay form báo giá) */
.contact-card { display: grid; gap: 14px; padding: 28px 24px; border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius); background: rgba(255, 255, 255, .06); }
@media (min-width: 700px) { .contact-card { padding: 36px; } }
.contact-card-lead { margin: 0 0 6px; font-size: 1.125rem; font-weight: 500; color: var(--white); }
.contact-card .btn { gap: 12px; }
.contact-card .btn-zalo .icon-lg { width: 34px; height: 34px; stroke-width: 1.5; }
.contact-card-note { margin: 4px 0 0; font-size: .875rem; color: rgba(255, 255, 255, .7); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9375rem; }
.optional { font-weight: 400; color: rgba(255, 255, 255, .75); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--char);
  font: 400 1rem/1.4 var(--f-body);
}
.field textarea { resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 3px solid var(--green); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #FF8A7A; }
.field-error { margin: 0; min-height: 0; color: #FFC2B8; font-size: .875rem; font-weight: 500; }
.field-error:empty { display: none; }

.quote-form .btn-primary { background: var(--white); color: var(--forest); }
.quote-form .btn-primary:hover { background: var(--alu); color: var(--forest); }
.form-status { margin: 0; font-weight: 500; color: #FFC2B8; }
.form-status:empty { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.quote-done {
  padding: 32px;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  background: var(--forest-deep);
}
.quote-done .icon { color: var(--green); margin-bottom: 12px; }
.quote-done h3 { font-family: var(--f-display); font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .quote-done.is-shown { animation: done-in .45s cubic-bezier(.2, .8, .2, 1); }
  .quote-done.is-shown .icon { animation: done-check .6s .1s both; }
}
@keyframes done-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes done-check { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-deep);
  color: rgba(255, 255, 255, .85);
  font-size: .9375rem;
  --focus: var(--white);
  padding-bottom: 96px; /* chừa chỗ cho cụm nút nổi */
}
.site-footer a { color: var(--white); }
.footer-grid {
  display: grid;
  gap: 32px;
  padding-block: 56px 32px;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
}
@media (min-width: 1000px) {
  .footer-grid { grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.5fr)); gap: 48px; }
}
.footer-logo {
  /* bản chữ trắng dành cho nền tối, không cần tấm nền */
  width: 180px;
  height: auto;
  margin-bottom: 20px;
}
.footer-h {
  margin-bottom: 14px;
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
}
.footer-contact, .footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { margin-top: 3px; color: var(--green); }
.footer-links a, .footer-contact a { text-underline-offset: 3px; }
.footer-bottom {
  padding-block: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .8125rem;
  color: rgba(255, 255, 255, .7);
}

/* ---------- Cụm nút nổi ---------- */
.float-cta {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40; /* nằm dưới header để menu mobile không bị che */
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Nút tròn chỉ có icon; chữ ẩn cho trình đọc màn hình, tên hiện khi rê chuột (title) */
.float-btn {
  position: relative;
  align-self: flex-end;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(7, 56, 32, .28);
  transition: transform .2s ease;
}
.float-btn:hover { transform: translateY(-2px) scale(1.04); }
.float-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.float-btn .icon { width: 26px; height: 26px; }
.float-zalo .icon { width: 34px; height: 34px; stroke-width: 1.5; }
.float-btn:hover { color: var(--white); }
.float-call { background: var(--green-btn); }
.float-call:hover { background: var(--green-btn-dark); }
.float-zalo { background: var(--zalo); }
.float-zalo:hover { background: #0055D4; }
@media (max-width: 479px) {
  .float-btn { width: 52px; height: 52px; }
  .float-btn .icon { width: 24px; height: 24px; }
  .float-zalo .icon { width: 32px; height: 32px; }
}

/* ---------- Trợ lý Như Tín (chatbot) ---------- */
.chat-launcher {
  position: relative;
  align-self: flex-end;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(7, 56, 32, .32), 0 0 0 3px var(--white), 0 0 0 5px var(--green);
  cursor: pointer;
  transition: transform .2s ease;
}
.chat-launcher:hover { transform: translateY(-2px) scale(1.04); }
.chat-launcher:focus-visible { outline: 3px solid var(--focus); outline-offset: 6px; }
.chat-launcher-avatar { position: relative; display: block; width: 56px; height: 56px; }
.chat-launcher-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.chat-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3DDC6A;
  box-shadow: 0 0 0 2px var(--white);
}
.chat-launcher .chat-dot { position: absolute; right: 1px; bottom: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .chat-launcher::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--green);
    animation: chat-ping 2.8s ease-out infinite;
    pointer-events: none;
  }
}
@keyframes chat-ping {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(1.35); opacity: 0; }
}
.chat-is-open .chat-launcher::before { animation: none; opacity: 0; }

.chat-teaser {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  translate: 0 -50%;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  background: var(--white);
  color: var(--char);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(7, 56, 32, .22);
  animation: chat-pop .3s ease-out both;
}
.chat-teaser[hidden] { display: none; }

.chatbot {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 45; /* trên cụm nút nổi, dưới header */
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(620px, calc(100dvh - var(--header-h) - 32px));
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(7, 56, 32, .28), 0 2px 8px rgba(0, 0, 0, .08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease;
}
.chatbot[hidden] { display: none; }
.chatbot.is-open { opacity: 1; transform: none; }

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 10px 14px 16px;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--white);
  /* gợi hình thanh sàn */
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 22px, transparent 22px 26px),
    linear-gradient(135deg, var(--forest) 0%, var(--forest-deep) 100%);
}
.chat-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}
.chat-avatar img { width: 100%; height: 100%; border-radius: 50%; }
.chat-head-text { flex: 1; min-width: 0; }
.chat-title { margin: 0; font-family: var(--f-display); font-size: 1.375rem; font-weight: 700; line-height: 1.1; letter-spacing: .01em; }
.chat-status { display: flex; align-items: center; gap: 6px; margin: 3px 0 0; font-size: .75rem; color: rgba(255, 255, 255, .78); }
.chat-status .chat-dot { width: 8px; height: 8px; box-shadow: none; }
.chat-icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}
.chat-icon-btn:hover { background: rgba(255, 255, 255, .12); }
.chat-icon-btn:focus-visible { outline: 2px solid var(--white); outline-offset: -2px; }
.chat-icon-btn .icon { width: 20px; height: 20px; }

.chat-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 14px 8px;
  background: #F6F8F9;
  scroll-behavior: smooth;
}
.chat-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px; animation: chat-pop .25s ease-out both; }
@media (prefers-reduced-motion: reduce) { .chat-row, .chat-teaser { animation: none; } }
@keyframes chat-pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.chat-row-avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--white); box-shadow: 0 0 0 1px var(--alu-line); }
.chat-bubble {
  max-width: 86%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: .9375rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chat-bot .chat-bubble {
  border-bottom-left-radius: 4px;
  background: var(--white);
  color: var(--char);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px rgba(213, 219, 223, .7);
}
.chat-user { justify-content: flex-end; }
.chat-user .chat-bubble { border-bottom-right-radius: 4px; background: var(--green-btn); color: var(--white); }
.chat-bubble p { margin: 0 0 .6em; }
.chat-bubble p:last-child, .chat-answer > :last-child { margin-bottom: 0; }
.chat-bubble ul { margin: .4em 0; padding-left: 1.2em; }
.chat-bubble a { color: var(--green-btn); font-weight: 600; }
.chat-more { display: inline-block; margin-top: 10px; font-size: .875rem; text-decoration: none; }
.chat-more:hover { text-decoration: underline; }
.chat-sub { margin: 12px 0 6px !important; font-size: .8125rem; color: var(--steel); }

.chat-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chat-bubble .chat-act {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--alu-line);
  border-radius: 18px;
  color: var(--forest);
  font-size: .8125rem;
  text-decoration: none;
}
.chat-bubble .chat-act:hover { border-color: var(--green-btn); background: #EEF7F0; }
.chat-bubble .chat-act-main { border-color: var(--green-btn); background: var(--green-btn); color: var(--white); }
.chat-bubble .chat-act-main:hover { background: var(--green-btn-dark); }
.chat-bubble .chat-act-zalo { color: var(--zalo); }

.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chat-chip {
  padding: 7px 12px;
  border: 1px solid #BFDCC7;
  border-radius: 16px;
  background: #EEF7F0;
  color: var(--forest);
  font: inherit;
  font-size: .8125rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.chat-chip:hover { border-color: var(--green-btn); background: #DDF0E2; }
.chat-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.chat-typing .chat-bubble { display: flex; align-items: center; gap: 10px; color: var(--steel); font-size: .875rem; }
.chat-spinner {
  flex: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid #D6EBDB;
  border-top-color: var(--green-btn);
  border-radius: 50%;
  animation: chat-spin .8s linear infinite;
}
@keyframes chat-spin { to { transform: rotate(360deg); } }

.chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--alu-line);
  background: var(--white);
}
.chat-form input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--alu-line);
  border-radius: 22px;
  background: #F6F8F9;
  color: var(--char);
  font: inherit;
  font-size: 1rem; /* không nhỏ hơn 16px để iOS không tự phóng to */
}
.chat-form input:focus { outline: none; border-color: var(--green-btn); background: var(--white); box-shadow: 0 0 0 3px rgba(27, 122, 54, .15); }
.chat-send {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--green-btn);
  color: var(--white);
  cursor: pointer;
}
.chat-send:hover { background: var(--green-btn-dark); }
.chat-send:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.chat-send .icon { width: 20px; height: 20px; margin-left: -2px; }
.chat-note { margin: 0; padding: 0 16px 10px; background: var(--white); font-size: .6875rem; line-height: 1.4; color: var(--steel); text-align: center; }
.chat-note a { color: inherit; font-weight: 600; }

@media (max-width: 599px) {
  .chatbot {
    inset: 0;
    z-index: 60; /* phủ cả header khi mở trên điện thoại */
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    transform: translateY(24px);
  }
  .chat-is-open, .chat-is-open body { overflow: hidden; }
  .chat-head { padding-top: max(14px, env(safe-area-inset-top)); }
  .chat-note { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (max-width: 479px) {
  .chat-launcher { width: 56px; height: 56px; }
  .chat-launcher-avatar { width: 50px; height: 50px; }
  .chat-teaser { font-size: .8125rem; }
}

/* ---------- Đường dẫn (breadcrumb) ---------- */
.crumbs { padding-top: 18px; font-size: .875rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; color: var(--steel); }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--alu-line); }
.crumbs a { color: var(--steel); text-underline-offset: 3px; }
.crumbs a:hover { color: var(--green-btn); }
.crumbs [aria-current="page"] { color: var(--char); font-weight: 500; }

/* ---------- Đầu trang con ---------- */
.page-head { position: relative; padding-block: 24px 48px; }
/* Dải thanh sàn tĩnh dưới đầu trang: tiếng vọng nhỏ của dải chữ ký ở trang chủ */
.page-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: repeating-linear-gradient(180deg, #C9D1D6 0 2px, transparent 2px 3px);
}
.page-head-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) {
  .page-head { padding-block: 32px 64px; }
  .page-head-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; }
}
.page-head h1 { font-size: clamp(2.375rem, 1.7rem + 3vw, 3.75rem); margin-bottom: 16px; max-width: 18ch; }
.page-head .lead { max-width: 60ch; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.page-head-img { margin: 0; }
.page-head-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--alu); }
.page-head-img--light img { object-fit: contain; background: var(--white); }
/* Logo tròn Như Tín thay ảnh ở đầu trang Về Như Tín */
.page-head-logo { justify-self: center; width: min(360px, 70vw); }
.page-head-logo img { aspect-ratio: 1; object-fit: contain; border-radius: 50%; background: none; }
@media (min-width: 900px) { .page-head-logo { justify-self: end; } }
.seal-wrap--head { justify-self: start; width: min(220px, 60vw); }
@media (min-width: 900px) { .seal-wrap--head { justify-self: end; } }

/* ---------- Khối văn bản và hình ---------- */
.prose { max-width: 68ch; }
.prose p, .prose li { color: var(--steel); }
.prose h2 { margin-top: 0; }
.prose > .btn { margin-top: 8px; }
.h2-small { font-size: clamp(1.625rem, 1.4rem + 1vw, 2rem); }
.sub-h { margin: 32px 0 12px; font-size: 1.125rem; }
.sub-h:first-child { margin-top: 0; }

.split { display: grid; gap: 40px; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
  .split-top { align-items: start; }
}
.split img { width: 100%; border-radius: var(--radius); }
.split .about-img img { aspect-ratio: 4 / 3; object-fit: cover; }
.prose .process { grid-template-columns: 1fr; gap: 0; }

.media-frame { margin: 0; }
.media-frame img, .media-frame video { width: 100%; border-radius: var(--radius); background: var(--alu); }
.media-frame--light img { background: var(--white); border: 1px solid var(--alu-line); padding: 12px; }
.media-frame figcaption, .how-sim figcaption { margin-top: 10px; font-size: .875rem; color: var(--steel); }

.more-link { margin: 32px 0 0; }

/* ---------- Mạng lưới HALLCO: bản đồ Google + danh sách văn phòng ---------- */
.network { display: grid; gap: 24px; }
.network-map {
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--alu-line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(34, 32, 33, .06), 0 12px 32px -12px rgba(34, 32, 33, .18);
}
.network-map-frame { position: relative; aspect-ratio: 4 / 3; background: var(--alu); }
.network-map-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  /* My Maps nhúng có thanh tiêu đề đen ~60px phía trên: đẩy lên để khung chỉ còn bản đồ */
  top: -60px; height: calc(100% + 60px);
}
.network-map figcaption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--alu-line);
  font-size: .875rem; color: var(--steel);
}
.network-map figcaption a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.network-map figcaption a:hover { text-decoration: underline; }

.network-list {
  display: flex; flex-direction: column;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--alu-line);
  border-radius: 8px;
}
.network-list-title {
  margin: 0 0 4px;
  font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--steel);
}
.network-list ul { margin: 0; padding: 0; list-style: none; }
.network-list li, .network-home { display: flex; gap: 12px; align-items: flex-start; }
.network-list li { padding: 12px 0; border-bottom: 1px solid var(--alu-line); }
.network-list .icon { margin-top: 2px; color: var(--steel); }
.network-list strong { display: block; color: var(--char); line-height: 1.35; }
.network-list span { display: block; font-size: .9375rem; color: var(--steel); }
.network-home {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--green);
  border-radius: 4px;
  background: #EAF5EC;
}
.network-home .icon { color: var(--green-btn); }
.network-home strong { color: var(--green-btn-dark); }
@media (min-width: 960px) {
  .network { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: stretch; }
  .network-map { display: flex; flex-direction: column; }
  .network-map-frame { flex: 1; aspect-ratio: auto; min-height: 460px; }
  .network-home { margin-top: auto; }
  .network-list ul { margin-bottom: 16px; }
}

/* ---------- Danh sách ---------- */
.facts { display: grid; margin: 0; padding: 0; list-style: none; }
.facts li { padding: 14px 0; border-top: 1px solid var(--alu-line); }
.facts li:last-child { border-bottom: 1px solid var(--alu-line); }
.facts strong { display: block; color: var(--char); }
.facts span { color: var(--steel); }
@media (min-width: 760px) {
  .facts-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
  .facts-cols li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--alu-line); }
}
.table-scroll + .facts-cols { margin-top: 32px; }

.checks, .crosses { margin: 0 0 1em; padding: 0; list-style: none; }
.checks li, .crosses li { position: relative; padding: 6px 0 6px 30px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 12px;
  width: 14px; height: 7px;
  border-left: 2.5px solid var(--green-btn);
  border-bottom: 2.5px solid var(--green-btn);
  transform: rotate(-45deg);
}
.crosses li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 16px; height: 16px;
  background:
    linear-gradient(45deg, transparent 43%, var(--steel) 43% 57%, transparent 57%),
    linear-gradient(-45deg, transparent 43%, var(--steel) 43% 57%, transparent 57%);
}

.parts-list { margin: 0; padding: 0; list-style: none; }
.parts-list li {
  display: grid;
  gap: 2px;
  padding: 14px 0 14px 20px;
  border-top: 1px solid var(--alu-line);
  background: linear-gradient(var(--green), var(--green)) 0 20px / 4px 14px no-repeat;
}
.parts-list span { color: var(--steel); }

.steps-list { padding-left: 1.25em; }
.steps-list li { padding: 4px 0; color: var(--steel); }
.steps-list strong { color: var(--char); }

/* ---------- Bảng dữ liệu ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--alu-line);
  border-radius: var(--radius);
  background: var(--white);
}
.data-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .9375rem; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--alu-line); }
.data-table thead th { border-top: 0; background: var(--forest); color: var(--white); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.data-table tbody th { font-weight: 600; color: var(--char); }
.data-table td { color: var(--steel); }
.spec-table tbody th { width: 40%; }
.table-scroll + .note, .table-scroll + p { margin-top: 16px; }

/* ---------- Mục lục trong trang ---------- */
.toc-section { padding-block: 20px; border-bottom: 1px solid var(--alu-line); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--alu-line);
  border-radius: 20px;
  color: var(--char);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
}
.toc a:hover { border-color: var(--green-btn); color: var(--green-btn); }

/* ---------- Từng loại hàng ---------- */
.app-row { padding-block: 48px; }
.app-row--alt { background: var(--alu); }
.app-row-grid { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .app-row { padding-block: 72px; }
  .app-row-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
  .app-row--alt .app-row-img { order: 2; }
}
.app-row-img { margin: 0; }
.app-row-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--alu-line); }
.app-row-body { max-width: 64ch; }
.app-row-body p { color: var(--steel); }
.config {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--green);
  background: var(--alu);
}
.app-row--alt .config { background: var(--white); }
.config dt { font-size: .8125rem; font-weight: 600; color: var(--green-btn); }
.config dd { margin: 4px 0 0; color: var(--char); }

/* ---------- Liên hệ, 404 ---------- */
.quote-page h1, .page-404 h1 { font-size: clamp(2.375rem, 1.7rem + 3vw, 3.5rem); margin-bottom: 16px; }
.contact-list { display: grid; gap: 18px; margin: 28px 0 0; padding: 0; list-style: none; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; color: rgba(255, 255, 255, .8); font-size: .875rem; }
.contact-list .icon { margin-top: 4px; color: var(--green); }
.contact-list a { color: var(--white); font-size: 1.125rem; font-weight: 600; text-underline-offset: 3px; }
.page-404 .toc { margin-top: 24px; }

/* ---------- Quy trình 4 bước ---------- */
.process { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
@media (min-width: 900px) { .process { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
.prose .process { grid-template-columns: 1fr; gap: 0; }
.process li { padding: 20px 0; border-top: 4px solid var(--green); }
.process .how-num { display: block; margin-bottom: 10px; color: var(--green-btn); }
.process h3 { margin-bottom: 6px; }
.process p { color: var(--steel); }

/* ---------- Giảm chuyển động ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  /* Ngoại lệ: dải thanh sàn và mô phỏng luôn chuyển động (yêu cầu của khách hàng) */
  .floor .slat, .floor .slat::before, .floor-load, .floor-crate {
    transition-duration: var(--dur) !important;
  }
  .floor .slat { transition-duration: .3s !important; }
}
