/* Home and House — responsive & usability layer.
   Loaded after each page's inline styles so these rules win without !important. */

/* ---------- Legibility: no text below ~11px ---------- */
.section-label, .form-label, .contact-card__tag, .channel-item__label,
.project-card__type, .stats__label, .about__stat-label, .home-feature__stat-label,
.os-feature__stat-label, .os-hcard__tag, .os-hero__scroll, .contact-hero__scroll,
.product-card__cat, .product-card__add, .filter-btn, .nav__link, .nav__cta-link,
.footer__col-title, .hero__scroll, .hero__scroll-wrap span {
  font-size: max(0.7rem, 11px);
}
.product-card__badge { font-size: max(0.64rem, 10.5px); }

/* ---------- Hero titles scale with height too, so short laptops (1366×768,
   1440×800) keep the headline and sub-copy on the first screen ---------- */
.os-hero__title   { font-size: clamp(2.3rem, min(9vw, 15vh), 10rem); }
.hero__title      { max-width: 100%; }
.contact-hero__title { font-size: clamp(2.6rem, min(8vw, 14vh), 8rem); }
@media (max-height: 820px) and (min-width: 901px) {
  .os-hero { padding-top: calc(var(--header-h) + 32px); padding-bottom: 36px; }
}

/* ---------- Furniture filters ---------- */
/* Desktop/tablet: wrap onto two rows instead of silently clipping categories */
@media (min-width: 901px) {
  .filter-bar__cats { flex-wrap: wrap; overflow: visible; row-gap: 8px; }
}
/* Phone: horizontal swipe with a fade that signals more categories */
@media (max-width: 900px) {
  .filter-bar { padding: 14px 0; }
  .filter-bar__cats {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity;
    margin-right: -24px; padding-right: 40px;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
            mask-image: linear-gradient(to right, #000 85%, transparent);
  }
  .filter-btn { scroll-snap-align: start; min-height: 40px; }
}

/* ---------- Touch targets (≥ 44px) ---------- */
.nav__burger {
  width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
}
.nav__burger span { width: 24px; }
@media (max-width: 900px) {
  .contact-card__action, .channel-item__link, .hero__phone {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  .form-check { padding: 6px 0; }
  .form-check input { width: 20px; height: 20px; }
  .form-check a { display: inline-block; padding: 2px 0; }
  .form-input { min-height: 48px; font-size: 16px; } /* 16px stops iOS zoom-on-focus */
  .form-textarea { min-height: 140px; }
  .footer__links li { margin-bottom: 4px; }
  .footer__links a { display: inline-block; padding: 8px 0; }
}

/* ---------- Long words / emails never overflow narrow cards ---------- */
.contact-card__title, .channel-item__value, .footer__links, .legal p { overflow-wrap: anywhere; }

/* ---------- Large screens: keep line lengths readable ---------- */
@media (min-width: 1800px) {
  .container { max-width: 1520px; }
}

/* ---------- Phone header: give the mark breathing room ---------- */
@media (max-width: 600px) {
  .nav__logo, .nav--split .nav__logo--center { height: 38px !important; }
}
.product-card__add { min-height: 40px; }

/* ---------- Heritage — Home Builder Vietnam ---------- */
.heritage { background: #0a0a0a; color: #fff; padding: clamp(80px, 12vw, 160px) 0; }
.heritage__inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.heritage__media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; }
.heritage__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.heritage__flag {
  position: absolute; left: 20px; bottom: 20px;
  background: rgba(10,10,10,0.72); backdrop-filter: blur(6px);
  padding: 10px 16px; font-size: max(0.66rem, 11px); font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.heritage__label { display: block; font-size: max(0.7rem, 11px); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 24px; }
.heritage__title { font-weight: 200; font-size: clamp(2rem, 4.2vw, 3.8rem); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 32px; }
.heritage__title em { font-style: italic; }
.heritage__text { font-size: 0.95rem; font-weight: 300; line-height: 1.85; color: rgba(255,255,255,0.7); max-width: 560px; margin-bottom: 18px; }
.heritage__facts { list-style: none; display: flex; gap: clamp(28px, 5vw, 64px); margin: 40px 0 44px; padding: 28px 0 0; border-top: 1px solid rgba(255,255,255,0.14); }
.heritage__facts strong { display: block; font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 200; line-height: 1; }
.heritage__facts span { display: block; margin-top: 10px; font-size: max(0.66rem, 11px); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.45); }
.heritage__link {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 28px;
  border: 1px solid rgba(255,255,255,0.5); font-size: max(0.68rem, 11px); font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: #fff;
  transition: background 0.35s ease, color 0.35s ease;
}
.heritage__link:hover { background: #fff; color: #0a0a0a; }
.footer__parent { margin-top: 16px !important; font-size: 0.8rem !important; color: rgba(255,255,255,0.5) !important; }
.footer__parent a { color: rgba(255,255,255,0.8); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) {
  .heritage__inner { grid-template-columns: 1fr; }
  .heritage__media { aspect-ratio: 16 / 10; }
}
@media (max-width: 480px) {
  .heritage__facts { gap: 22px; }
  .heritage__link { width: 100%; justify-content: center; }
}
