/* ══════════════════════════════════════════
   PhongTroVN247 — home.css  (fixed)
   Mobile-first · Be Vietnam Pro · #0d6efd
   ══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800;900&family=Sora:wght@700;800&display=swap');

/* ── Variables ── */
:root {
  --primary:        #0d6efd;
  --primary-dark:   #0b5ed7;
  --primary-light:  #e8f0fe;
  --primary-soft:   #dbeafe;
  --gold:           #f59e0b;
  --bg:             #f4f6fb;
  --surface:        #ffffff;
  --surface2:       #f8faff;
  --text:           #0f172a;
  --text2:          #334155;
  --muted:          #64748b;
  --border:         #e2e8f0;
  --border2:        #cbd5e1;
  --vip5-a:#dc2626; --vip5-b:#ef4444;
  --vip4-a:#ea580c; --vip4-b:#f97316;
  --vip3-a:#7c3aed; --vip3-b:#a855f7;
  --vip2-a:#0b5ed7; --vip2-b:#3b82f6;
  --vip1-a:#059669; --vip1-b:#10b981;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:       0 4px 20px rgba(13,110,253,.12);
  --shadow-sm:    0 1px 8px rgba(0,0,0,.06);
  --shadow-hover: 0 8px 32px rgba(13,110,253,.18);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* FIX: đảm bảo body không overflow ngang */
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 6px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ══════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════ */
.site-header {
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(13,110,253,.07);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 12px;
  /* FIX: ngăn header tràn ra ngoài */
  min-width: 0;
}
.logo-text {
  font-family: 'Sora', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-text span { color: var(--text); }

/* Nav */
.nav-desktop { display: none; align-items: center; gap: 2px; }
@media (min-width: 992px) { .nav-desktop { display: flex; } }

.nav-link-custom {
  color: var(--text2);
  font-weight: 500;
  font-size: 0.82rem;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.nav-link-custom:hover { background: var(--primary-light); color: var(--primary); }

/* Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  /* FIX: không để overflow */
  min-width: 0;
}

/* Filter button */
.btn-filter-nav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border2);
  background: var(--surface);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text2);
  cursor: pointer;
  position: relative;
  transition: border-color .18s, color .18s;
  white-space: nowrap;
}
.btn-filter-nav:hover { border-color: var(--primary); color: var(--primary); }
.filter-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  width: 17px; height: 17px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}

/* Post button */
.btn-post {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 14px;
  transition: background .18s, transform .12s;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  flex-shrink: 0;
}
.btn-post:hover { background: var(--primary-dark); transform: translateY(-1px); color: #fff; }

/* Icon buttons */
.header-icon-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #475569;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background .15s, color .15s;
  text-decoration: none;
  background: transparent;
  border: none;
  flex-shrink: 0;
  /* FIX: cho phép dropdown tràn ra */
  overflow: visible;
}
.header-icon-btn:hover { background: #f1f5f9; color: var(--primary); }
.header-icon-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: #e02424;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}

/* Avatar toggle */
.header-avatar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px 8px 4px 4px;
  border-radius: 24px;
  transition: background .15s;
  user-select: none;
}
.header-avatar-wrap:hover { background: #f1f5f9; }
.header-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.header-chevron {
  font-size: 0.65rem;
  color: #94a3b8;
  transition: transform .2s;
}
.header-avatar-wrap.show .header-chevron { transform: rotate(180deg); }

/* ── Dropdown base ── */
.header-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.13);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.header-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* FIX: notif toggle cần overflow visible để dropdown hiện ra */
#notifToggle {
  overflow: visible;
}

/* Notif dropdown */
.notif-dropdown {
  width: 300px;
  /* FIX: giới hạn chiều cao, scroll bên trong */
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* FIX: trên mobile notif dropdown không tràn viewport */
@media (max-width: 360px) {
  .notif-dropdown { width: 260px; }
}

.hdrop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid #f1f5f9;
  /* FIX: sticky header bên trong scroll */
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.hdrop-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.6;
}

/* Notif item bên trong dropdown header */
.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  text-decoration: none;
  border-bottom: 1px solid #eef2f7;
  transition: background .12s;
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #fafcff; }

/* Avatar dropdown */
.avatar-dropdown {
  width: 270px;
  /* FIX: overflow hidden để border-radius hoạt động đúng */
  overflow: hidden;
}

.adrop-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #f1f5f9;
}
.adrop-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.adrop-name { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.adrop-phone { font-size: 0.75rem; color: var(--muted); }

.adrop-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  margin: 10px 12px;
  padding: 10px 13px;
  gap: 8px;
}
.adrop-balance-label { font-size: 0.7rem; color: #92400e; font-weight: 600; margin-bottom: 2px; }
.adrop-balance-num { font-size: 1rem; font-weight: 800; color: var(--text); }
.adrop-topup {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gold);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: filter .15s;
  flex-shrink: 0;
}
.adrop-topup:hover { filter: brightness(1.08); color: #fff; }

.adrop-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #94a3b8;
}
.adrop-viewall {
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: none;
}
.adrop-viewall:hover { text-decoration: underline; }

.adrop-post-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px 10px 10px;
}
.adrop-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px;
  border-radius: 9px;
  background: #f8fafc;
  text-decoration: none;
  color: #475569;
  font-size: 0.63rem;
  font-weight: 600;
  text-align: center;
  transition: background .15s, color .15s;
  line-height: 1.3;
}
.adrop-stat-item i { font-size: 1.05rem; color: var(--muted); }
.adrop-stat-item:hover { background: var(--primary-soft); color: #1d4ed8; }
.adrop-stat-item:hover i { color: #1d4ed8; }

.adrop-divider { border: none; border-top: 1px solid #f1f5f9; margin: 2px 0; }

.adrop-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: background .12s, color .12s;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}
.adrop-menu-item i { font-size: 0.95rem; color: var(--muted); width: 18px; flex-shrink: 0; }
.adrop-menu-item:hover { background: #f8fafc; color: var(--primary); }
.adrop-menu-item:hover i { color: var(--primary); }
.adrop-logout { color: #e02424; }
.adrop-logout i { color: #e02424; }
.adrop-logout:hover { background: #fff1f2; color: #e02424; }

/* FIX: overlay — dùng display:none thay vì position:fixed để không block click */
#headerOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 999;
}
#headerOverlay.active { display: block; }

/* ══════════════════════════════════════════
   HERO
   ══════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, #0f1e4a 0%, #0d2b6e 45%, #0d6efd 100%);
  padding: 36px 0 28px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,255,255,.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,.05) 0%, transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-inner { position: relative; text-align: center; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.85);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.hero-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.4rem, 4.5vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.hero-title .highlight { color: var(--gold); }
.hero-sub { color: rgba(255,255,255,.65); font-size: 0.85rem; margin-bottom: 22px; }

/* Search bar */
.search-bar {
  background: #fff;
  border-radius: var(--radius);
  padding: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  max-width: 820px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.search-bar select {
  border: none;
  outline: none;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.82rem;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  flex: 1 1 120px;
  min-width: 0;
  padding: 8px 6px;
}
.search-divider { width: 1px; height: 22px; background: var(--border); flex-shrink: 0; }
.btn-search {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background .18s;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 0.83rem;
  white-space: nowrap;
}
.btn-search:hover { background: var(--primary-dark); }

.quick-tags { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.quick-tag {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: 4px 13px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: background .18s, border-color .18s;
  text-decoration: none;
  font-weight: 500;
}
.quick-tag:hover { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.4); }

@media (max-width: 576px) {
  .hero { padding: 24px 0 20px; }
  .search-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 0;
  }
  .search-bar select {
    padding: 9px 8px;
    border-bottom: 1px solid var(--border);
    flex: none;
    width: 100%;
  }
  .search-bar select:last-of-type { border-bottom: none; }
  .search-divider { display: none; }
  .btn-search {
    width: 100%;
    justify-content: center;
    padding: 11px;
    margin-top: 6px;
    border-radius: var(--radius-sm);
  }
}

/* ══════════════════════════════════════════
   STATS BAR
   ══════════════════════════════════════════ */
.stats-bar { background: var(--primary); padding: 9px 0; }
.stat-item { color: rgba(255,255,255,.85); font-size: 0.78rem; font-weight: 500; }
.stat-item strong { color: #fff; font-size: 0.92rem; font-weight: 800; }

/* ══════════════════════════════════════════
   CATEGORY CHIPS
   ══════════════════════════════════════════ */
.cat-chips-wrap {
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  padding: 10px 0 8px;
  position: sticky;
  /* FIX: top = chiều cao header (~57px) */
  top: 0;
  z-index: 900;
}
.cat-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* FIX: padding để chip đầu/cuối không bị cắt */
  padding-left: 2px;
  padding-right: 2px;
}
.cat-chips-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  text-decoration: none;
  color: var(--text2);
  font-size: 0.78rem;
  font-weight: 600;
  transition: border-color .18s, color .18s, background .18s;
  white-space: nowrap;
  flex-shrink: 0;
}
.cat-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.cat-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(13,110,253,.25); }
.cat-chip i { font-size: 0.92rem; }

/* ══════════════════════════════════════════
   VIP BADGES
   ══════════════════════════════════════════ */
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.5;
}
.vip-5 { background: linear-gradient(90deg, var(--vip5-a), var(--vip5-b)); color: #fff; }
.vip-4 { background: linear-gradient(90deg, var(--vip4-a), var(--vip4-b)); color: #fff; }
.vip-3 { background: linear-gradient(90deg, var(--vip3-a), var(--vip3-b)); color: #fff; }
.vip-2 { background: linear-gradient(90deg, var(--vip2-a), var(--vip2-b)); color: #fff; }
.vip-1 { background: linear-gradient(90deg, var(--vip1-a), var(--vip1-b)); color: #fff; }
.vip-free { background: #475569; color: #fff; }

/* ══════════════════════════════════════════
   LISTING TABS
   ══════════════════════════════════════════ */
.listing-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  /* FIX: sticky dưới category chips */
  /* position: sticky; */
  top: 105px;
  z-index: 800;
  background: var(--bg);
  padding-top: 4px;
}
.listing-tabs::-webkit-scrollbar { display: none; }

.listing-tab {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .18s, border-color .18s;
  background: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.listing-tab:hover { color: var(--text); text-decoration: none; }
.listing-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-pane-custom { display: none; }
.tab-pane-custom.active { display: block; }

/* ══════════════════════════════════════════
   SECTION HEADER
   ══════════════════════════════════════════ */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  gap: 8px;
  flex-wrap: wrap;
}
.sec-title {
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  /* FIX: không để tràn */
  flex-wrap: wrap;
  min-width: 0;
}
.accent-line {
  width: 4px;
  height: 20px;
  border-radius: 2px;
  flex-shrink: 0;
}
.sec-more {
  font-size: 0.77rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.sec-more:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   SECTION WRAP
   ══════════════════════════════════════════ */
.section-wrap { padding: 20px 0 40px; }

/* ══════════════════════════════════════════
   CARDS — shared helpers
   ══════════════════════════════════════════ */
.title-link {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  transition: color .15s;
}
.title-link:hover { color: var(--primary); }

.price { font-size: 0.98rem; font-weight: 800; color: var(--primary); line-height: 1.25; }

.meta-row { display: flex; flex-wrap: wrap; gap: 5px; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
  /* FIX: không vỡ text trong chip */
  white-space: nowrap;
}

.time-ago  { font-size: 0.66rem; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.poster-name { font-size: 0.7rem; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }

.hot-tag {
  position: absolute;
  top: 8px; right: 8px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  pointer-events: none;
}
.img-count {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.save-btn {
  width: 30px; height: 30px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: border-color .18s, color .18s, background .18s;
  flex-shrink: 0;
}
.save-btn:hover { border-color: var(--primary); color: var(--primary); }
.save-btn.saved { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

.phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 11px;
  cursor: pointer;
  transition: background .18s;
  white-space: nowrap;
}
.phone-btn:hover { background: var(--primary-dark); }

/* ══════════════════════════════════════════
   CARD — VIP 5 (grid 4 col)
   ══════════════════════════════════════════ */
.card-vip5 {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card-vip5:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-vip5 .img-wrap {
  position: relative;
  /* FIX: aspect-ratio thay vì height cố định, linh hoạt hơn */
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}
.card-vip5 .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s;
  display: block;
}
.card-vip5:hover .img-wrap img { transform: scale(1.05); }
.card-vip5 .body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }

/* ══════════════════════════════════════════
   CARD — VIP 4 (horizontal 2 col)
   ══════════════════════════════════════════ */
.card-vip4 {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  display: flex;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card-vip4:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-vip4 .img-wrap {
  width: 130px;
  min-width: 130px;
  /* FIX: height tự co theo card thay vì cố định */
  min-height: 110px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.card-vip4 .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
  display: block;
  /* FIX: img phải fill đủ chiều cao khi height: auto */
  position: absolute; top: 0; left: 0;
}
.card-vip4 .body { padding: 10px 12px; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* ══════════════════════════════════════════
   CARD — small (VIP 3/2/1/free, horizontal)
   ══════════════════════════════════════════ */
.card-small {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  display: flex;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .18s;
}
.card-small:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.card-small .img-wrap {
  width: 110px;
  min-width: 110px;
  /* FIX: giống card-vip4 */
  min-height: 95px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.card-small .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
  display: block;
  position: absolute; top: 0; left: 0;
}
.card-small:hover .img-wrap img { transform: scale(1.05); }
.card-small .body { padding: 9px 11px; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* ══════════════════════════════════════════
   CARD — vertical (tab mới nhất)
   ══════════════════════════════════════════ */
.card-vertical {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.card-vertical:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-vertical-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}
.card-vertical-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s;
  display: block;
}
.card-vertical:hover .card-vertical-img img { transform: scale(1.05); }
.card-vertical-vip { position: absolute; top: 6px; left: 6px; }
.card-vertical-body { padding: 10px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }

/* Grid cho tab mới nhất */
.new-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 576px) { .new-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .new-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .new-grid { grid-template-columns: repeat(5, 1fr); } }

/* ══════════════════════════════════════════
   FILTER MODAL
   ══════════════════════════════════════════ */
.filter-modal .modal-dialog { margin: 0; max-width: 100%; height: 100%; }
@media (min-width: 576px) {
  .filter-modal .modal-dialog {
    margin: 20px auto;
    max-width: 480px;
    height: auto;
    max-height: calc(100vh - 40px);
  }
}
.filter-modal .modal-content {
  border-radius: 0;
  border: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-height: 100dvh;
}
@media (min-width: 576px) {
  .filter-modal .modal-content {
    border-radius: var(--radius);
    max-height: calc(100vh - 40px);
  }
}
.filter-modal .modal-header {
  padding: 14px 18px;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}
.filter-modal .modal-title { font-weight: 800; font-size: 0.95rem; }
.filter-modal .modal-body {
  padding: 0 18px 18px;
  overflow-y: auto;
  flex: 1;
  /* FIX: overscroll trong modal */
  overscroll-behavior: contain;
}
.filter-modal .modal-footer {
  padding: 12px 18px;
  border-top: 1.5px solid var(--border);
  background: var(--surface);
  gap: 10px;
  flex-shrink: 0;
}

.filter-section { padding: 16px 0; border-bottom: 1.5px solid var(--border); }
.filter-section:last-child { border-bottom: none; }
.filter-section-title { font-weight: 800; font-size: 0.87rem; margin-bottom: 11px; color: var(--text); }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  text-align: center;
  color: var(--text2);
}
.cat-grid-item i { font-size: 1.2rem; }
.cat-grid-item:hover,
.cat-grid-item.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

.filter-select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.tag-chip-group { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-chip {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  background: var(--surface);
  color: var(--text2);
  white-space: nowrap;
}
.tag-chip:hover,
.tag-chip.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.tag-chip.active-all { border-color: var(--primary); background: var(--primary); color: #fff; }

.feature-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.feature-chip {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  background: var(--surface);
  color: var(--text2);
  user-select: none;
}
.feature-chip input { display: none; }
.feature-chip:hover { border-color: var(--primary); color: var(--primary); }
.feature-chip.checked { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }

.btn-apply-filter {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 11px 0;
  flex: 1;
  cursor: pointer;
  transition: background .18s;
}
.btn-apply-filter:hover { background: var(--primary-dark); }
.btn-reset-filter {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 600;
  font-size: 0.83rem;
  padding: 11px 16px;
  cursor: pointer;
  transition: border-color .18s, color .18s;
}
.btn-reset-filter:hover { border-color: var(--text); color: var(--text); }

.active-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 0 4px; }
.active-filter-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px 4px 12px;
  cursor: pointer;
  transition: background .15s;
}
.active-filter-chip:hover { background: var(--primary-soft); }
.active-filter-chip i { font-size: 0.68rem; }

/* ══════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════ */
.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
  font-family: 'Be Vietnam Pro', sans-serif;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13,110,253,.3);
}

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.site-footer {
  background: #0c1630;
  color: rgba(255,255,255,.6);
  padding: 40px 0 20px;
  margin-top: 48px;
  font-size: 0.8rem;
}
.footer-logo {
  font-family: 'Sora', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.footer-logo span { color: var(--primary); }
.footer-link {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
  transition: color .15s;
  font-size: 0.79rem;
}
.footer-link:hover { color: #fff; }
.footer-title { color: rgba(255,255,255,.9); font-weight: 700; margin-bottom: 12px; font-size: 0.84rem; }
.footer-divider { border-color: rgba(255,255,255,.08); margin: 20px 0 16px; }
.footer-social a { color: rgba(255,255,255,.45); font-size: 1.2rem; transition: color .15s; }
.footer-social a:hover { color: var(--primary); }
.footer-input {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  font-size: 0.78rem;
  font-family: 'Be Vietnam Pro', sans-serif;
}
.footer-input::placeholder { color: rgba(255,255,255,.35); }
.footer-input:focus {
  background: rgba(255,255,255,.1);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,.2);
  color: #fff;
  outline: none;
}

/* ══════════════════════════════════════════
   MOBILE BOTTOM NAV
   ══════════════════════════════════════════ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1.5px solid var(--border);
  z-index: 999;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
@media (max-width: 767px) {
  .mobile-nav { display: flex; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 4px 0;
  transition: color .15s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'Be Vietnam Pro', sans-serif;
}
.mobile-nav-item i { font-size: 1.2rem; }
.mobile-nav-item.active,
.mobile-nav-item:hover { color: var(--primary); }

/* ══════════════════════════════════════════
   POST DETAIL — pd-*
   ══════════════════════════════════════════ */
.pd-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px 100px; }

.pd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 16px;
  flex-wrap: wrap;
  line-height: 1.6;
}
.pd-breadcrumb a { color: var(--muted); text-decoration: none; }
.pd-breadcrumb a:hover { color: var(--primary); }
.pd-breadcrumb .sep { color: var(--border2); }
.pd-breadcrumb span { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pd-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }

.pd-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.pd-card-head {
  padding: 11px 18px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 7px;
}
.pd-card-body { padding: 18px; }

/* Gallery */
.gallery-main-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  margin-bottom: 8px;
  aspect-ratio: 16/9;
}
.gallery-main-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .25s;
}
.gallery-counter {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 5px;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background .15s;
  z-index: 2;
}
.gallery-arrow:hover { background: rgba(255,255,255,.32); }
.gallery-arrow.prev { left: 10px; }
.gallery-arrow.next { right: 10px; }

.gallery-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  margin-bottom: 14px;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex-shrink: 0;
  width: 72px; height: 54px;
  border-radius: 7px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  opacity: .65;
}
.gallery-thumb.active,
.gallery-thumb:hover { border-color: var(--primary); opacity: 1; transform: translateY(-2px); }

/* Post title */
.post-vip-row { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; flex-wrap: wrap; }
.post-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 12px;
}
.post-price-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.post-price { font-size: 1.45rem; font-weight: 800; color: #e02424; letter-spacing: -.02em; }
.post-price-unit { font-size: 0.8rem; color: #94a3b8; font-weight: 500; margin-left: -6px; }
.post-meta-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.post-meta-chips .meta-chip { font-size: 0.78rem; padding: 5px 11px; border-radius: 20px; }
.post-meta-chips .meta-chip i { color: var(--primary); font-size: 0.82rem; }
.address-line { display: flex; align-items: flex-start; gap: 7px; font-size: 0.88rem; color: #475569; margin-bottom: 4px; line-height: 1.5; }
.address-line i { color: #e02424; margin-top: 2px; flex-shrink: 0; }
.address-line a { color: var(--primary); text-decoration: none; font-weight: 500; }
.address-line a:hover { text-decoration: underline; }
.post-desc { font-size: 0.9rem; line-height: 1.85; color: #374151; }
.post-desc p { margin-bottom: .55rem; }

.amenity-list { display: flex; flex-wrap: wrap; gap: 7px; }
.amenity-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #bfdbfe;
}

/* Map */
.map-toolbar { display: flex; background: #f8fafc; border-bottom: 1px solid var(--border); }
.map-tb-btn {
  flex: 1;
  padding: 8px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background .12s, color .12s;
}
.map-tb-btn:last-child { border-right: none; }
.map-tb-btn.active { background: var(--primary); color: #fff; }
.map-tb-btn:not(.active):hover { background: var(--border); }
#pd-map { height: 260px; width: 100%; }

/* Info table */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid #f1f5f9; }
.info-table tr:last-child { border-bottom: none; }
.info-table td { padding: 9px 4px; font-size: 0.83rem; vertical-align: top; }
.info-table td:first-child {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  width: 36%;
  padding-right: 10px;
}
.info-table td:last-child { color: #1e293b; font-weight: 500; }

.expires-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.expires-chip.soon { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.report-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: #94a3b8;
  text-decoration: none;
  margin-top: 10px;
  transition: color .15s;
}
.report-link:hover { color: #e02424; }

/* Sidebar */
.sidebar-sticky { position: sticky; top: 76px; }

.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(26,86,219,.07);
}
.contact-card-top {
  background: linear-gradient(135deg, #1a56db 0%, #2563eb 100%);
  padding: 20px 18px 16px;
  position: relative;
  overflow: hidden;
}
.contact-card-top::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 110px; height: 110px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.contact-card-top::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -20px;
  width: 75px; height: 75px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.contact-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
  z-index: 1;
}
.contact-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid rgba(255,255,255,.55);
  flex-shrink: 0;
}
.contact-name { font-weight: 700; font-size: 0.95rem; color: #fff; margin-bottom: 2px; }
.contact-role { font-size: 0.72rem; color: rgba(255,255,255,.78); font-weight: 500; }
.contact-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
  position: relative;
  z-index: 1;
}
.contact-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  padding: 4px 11px;
  border-radius: 20px;
}
.contact-card-body { padding: 16px 18px; }

.btn-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: #e02424;
  color: #fff;
  font-weight: 700;
  font-size: 0.93rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: filter .15s, transform .1s;
  margin-bottom: 9px;
  text-decoration: none;
  line-height: 1.2;
}
.btn-phone:hover { filter: brightness(1.08); transform: translateY(-1px); color: #fff; }
.btn-phone.revealed { background: #0e9f6e; }

.btn-zalo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  background: #f0f9ff;
  color: #0284c7;
  font-weight: 700;
  font-size: 0.86rem;
  border: 1.5px solid #bae6fd;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: 9px;
  text-decoration: none;
}
.btn-zalo:hover { background: #e0f2fe; color: #0284c7; }

.btn-save-post {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-save-post:hover,
.btn-save-post.saved { background: #fff1f2; color: #e02424; border-color: #fecdd3; }

.contact-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid #f1f5f9;
}
.c-stat { text-align: center; background: #f8fafc; border-radius: 9px; padding: 9px 6px; }
.c-stat-num { font-size: 1rem; font-weight: 800; color: #1e293b; line-height: 1; margin-bottom: 3px; white-space: nowrap; }
.c-stat-lbl { font-size: 0.62rem; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; font-weight: 600; }

.security-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 11px;
  padding: 13px 15px;
  font-size: 0.77rem;
  color: #92400e;
  line-height: 1.6;
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.security-note i { color: #d97706; font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

.related-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.related-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}
.related-card {
  display: flex;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: opacity .15s;
}
.related-card:hover { opacity: .78; }
.related-card:last-child { border-bottom: none; }
.related-img { width: 78px; height: 58px; border-radius: 7px; object-fit: cover; flex-shrink: 0; }
.related-info { flex: 1; min-width: 0; }
.related-post-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.related-price { font-size: 0.8rem; font-weight: 700; color: #e02424; }
.related-meta {
  font-size: 0.7rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

/* ══════════════════════════════════════════
   RESPONSIVE — Post Detail
   ══════════════════════════════════════════ */
@media (min-width: 1100px) {
  .pd-grid { grid-template-columns: 1fr 340px; gap: 24px; }
}
@media (max-width: 900px) {
  .pd-grid { grid-template-columns: 1fr; }
  .sidebar-sticky { position: static; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Header
   ══════════════════════════════════════════ */
@media (max-width: 991px) {
  .nav-desktop { display: none !important; }
}
@media (max-width: 767px) {
  .header-avatar-wrap .nav-link-custom { display: none; }
  /* FIX: ẩn "Đăng tin" text trên mobile nhỏ, chỉ hiện icon */
  .btn-post .d-none { display: none !important; }
}
@media (max-width: 640px) {
  .pd-wrap { padding: 12px 12px 110px; }
  .post-title { font-size: 1.05rem; }
  .post-price { font-size: 1.15rem; }
  .pd-card { border-radius: 10px; margin-bottom: 12px; }
  .pd-card-body { padding: 14px; }
  .pd-card-head { padding: 10px 14px; font-size: 0.67rem; }
  .gallery-arrow { width: 30px; height: 30px; font-size: 0.82rem; }
  .gallery-thumb { width: 58px; height: 44px; }
  #pd-map { height: 200px; }
  .c-stat-num { font-size: 0.85rem; }
  .c-stat-lbl { font-size: 0.55rem; }
}
@media (max-width: 480px) {
  .pd-card-body { padding: 12px; }
  .gallery-thumb { width: 52px; height: 40px; }
  .related-img { width: 68px; height: 52px; }
  .post-title { font-size: 0.98rem; }
  .post-price { font-size: 1.08rem; }
}
@media (max-width: 360px) {
  .logo-text { font-size: 1.1rem; }
  .post-title { font-size: 0.92rem; }
  .contact-avatar { width: 48px; height: 48px; }
  .gallery-thumb { width: 46px; height: 36px; }
  #pd-map { height: 180px; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Cards & Listing
   ══════════════════════════════════════════ */
@media (max-width: 576px) {
  .card-vip4 .img-wrap { width: 100px; min-width: 100px; }
  .card-small .img-wrap { width: 95px; min-width: 95px; }
  .listing-tab { padding: 8px 14px; font-size: 0.82rem; }
  .listing-tabs { top: 100px; }
  .stat-item { font-size: 0.72rem; }
  .stat-item strong { font-size: 0.85rem; }
}

/* FIX: đảm bảo notif dropdown không tràn viewport bên phải trên mobile */
@media (max-width: 480px) {
  .notif-dropdown {
    right: -8px;
    width: calc(100vw - 20px);
    max-width: 320px;
  }
}
@media (max-width: 991.98px) {
    .nav-post-btn {
        display: none !important;
    }
}