/* Local Font Face Fallbacks */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/web/bvp-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;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/web/bvp-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;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/web/bvp-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;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/web/bvp-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;
}

body, h1, h2, h3, h4, h5, h6, input, select, textarea, button, .brand-text, .nav-menu, .spec-val, .kpi-value, .lead-name {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ==========================================================================
   HABAKI INDUSTRIAL DESIGN SYSTEM (Chuẩn getdesign.md & Batdongsan)
   ========================================================================== */

:root {
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #ea580c;
  --accent-hover: #c2410c;
  --accent-light: #fff7ed;
  --success: #16a34a;
  --success-light: #dcfce7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);
  --font-sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  height: 40px;
  width: auto;
}
.brand-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  letter-spacing: -0.5px;
}
.brand-text small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0;
}
.nav-menu {
  display: flex;
  gap: 20px;
  list-style: none;
}
.nav-menu a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-body);
  transition: color 0.15s;
}
.nav-menu a:hover, .nav-menu a.active {
  color: var(--primary);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-hotline {
  background: var(--primary-light);
  color: var(--primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-zalo {
  background: #0068ff;
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

/* Hero Section & Search Tabs */
.hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  padding: 48px 0 56px;
  text-align: center;
}
.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.hero-subtitle {
  font-size: 15px;
  color: #cbd5e1;
  max-width: 680px;
  margin: 0 auto 28px;
}
.search-card-wrapper {
  max-width: 980px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  text-align: left;
}
.search-tabs {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}
.search-tab {
  padding: 12px 24px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.2s;
}
.search-tab.active {
  background: #ffffff;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}
.search-form-grid {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}
.search-field {
  display: flex;
  flex-direction: column;
}
.search-field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.search-input, .search-select {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  background: #fff;
}
.search-input:focus, .search-select:focus {
  border-color: var(--border-focus);
}
.btn-search {
  background: var(--accent);
  color: #fff;
  border: none;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
  align-self: flex-end;
}
.btn-search:hover {
  background: var(--accent-hover);
}

/* Quick Tags */
.quick-tags-bar {
  padding: 10px 20px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-top: 1px solid #f1f5f9;
}
.quick-tag-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
}
.tag-chip {
  background: var(--bg-page);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.15s;
}
.tag-chip:hover, .tag-chip.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Listings Container */
.listings-section {
  padding: 36px 0 60px;
}
.listings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.results-count {
  font-size: 15px;
  color: var(--text-muted);
}
.results-count strong {
  color: var(--text-main);
  font-weight: 800;
}
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.view-toggle {
  display: flex;
  background: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 2px;
}
.view-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.view-btn.active {
  background: #fff;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Grid Layout */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

/* Card Design */
.property-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.property-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}
.card-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3; /* Exact 720x540 match for Habaki images without cropping */
  background: #e2e8f0;
  overflow: hidden;
}
.card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.property-card:hover .card-img {
  transform: scale(1.03);
}
.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-thue { background: var(--primary); color: #fff; }
.badge-ban { background: var(--accent); color: #fff; }
.badge-hot { background: var(--danger); color: #fff; }
.badge-status { background: rgba(15, 23, 42, 0.75); color: #fff; backdrop-filter: blur(2px); }
.card-code {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-loc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 14px;
}
.card-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.15s;
}
.card-title a:hover {
  color: var(--primary);
}

/* 4 Core Specs */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  border: 1px solid #f1f5f9;
}
.spec-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.spec-icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}
.spec-info {
  display: flex;
  flex-direction: column;
}
.spec-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.spec-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

/* Card Action Bar */
.card-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.compare-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-so9-fast {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s;
}
.btn-so9-fast:hover {
  background: var(--primary-hover);
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.price-block {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.price-highlight {
  font-size: 20px;
  font-weight: 800;
  color: var(--danger);
}
.price-unit {
  font-size: 12px;
  color: var(--text-muted);
}
.btn-arrow-detail {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-arrow-detail:hover {
  background: var(--primary);
  color: #fff;
}

/* Compare Floating Drawer */
.compare-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 2px solid var(--primary);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  z-index: 999;
  padding: 14px 0;
}
.compare-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-card {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--shadow-xl);
  position: relative;
}
.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
}

@media (max-width: 900px) {
  .search-form-grid {
    grid-template-columns: 1fr;
  }
  .properties-grid {
    grid-template-columns: 1fr;
  }
}

