/* ============================================================
   QDB.CA — Public Front-End Stylesheet
   Site: qdb.ca — Canadian Property Classifieds
   Theme: Red #e32b2b on white/light-gray
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --qdb-red:          #e32b2b;
  --qdb-red-dark:     #c41f1f;
  --qdb-red-light:    rgba(227, 43, 43, 0.08);
  --qdb-red-mid:      rgba(227, 43, 43, 0.15);
  --qdb-dark:         #1a1a1a;
  --qdb-footer-bg:    #2a2a2a;
  --qdb-gray:         #6c757d;
  --qdb-light-gray:   #f5f5f5;
  --qdb-border:       #e8e8e8;
  --qdb-card-shadow:  0 2px 16px rgba(0,0,0,0.08);
  --qdb-card-shadow-hover: 0 8px 32px rgba(0,0,0,0.14);
  --qdb-radius:       10px;
  --qdb-radius-sm:    6px;
  --qdb-radius-pill:  50px;
  --qdb-transition:   0.22s ease;
  --qdb-font:         'Segoe UI', system-ui, -apple-system, sans-serif;
  --qdb-font-mono:    'SFMono-Regular', Consolas, monospace;
  --qdb-header-h:     68px;
}

/* ── Reset / Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--qdb-font);
  color: var(--qdb-dark);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--qdb-red);
  text-decoration: none;
  transition: color var(--qdb-transition);
}
a:hover { color: var(--qdb-red-dark); }

ul { list-style: none; margin: 0; padding: 0; }

/* ============================================================
   1. PUBLIC HEADER / NAVBAR
   ============================================================ */
.qdb-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid var(--qdb-border);
  height: var(--qdb-header-h);
  display: flex;
  align-items: center;
  transition: box-shadow var(--qdb-transition);
}

.qdb-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.10);
}

.qdb-header .container-fluid,
.qdb-header .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

/* Logo */
.qdb-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.qdb-logo img {
  height: 38px;
  width: auto;
}

.qdb-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--qdb-red);
  letter-spacing: -0.5px;
  line-height: 1;
}

.qdb-logo-text span {
  color: var(--qdb-dark);
  font-weight: 400;
}

/* Main nav */
.qdb-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1rem;
}

.qdb-nav .nav-link {
  color: #444;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--qdb-radius-sm);
  transition: color var(--qdb-transition), background var(--qdb-transition);
  white-space: nowrap;
}

.qdb-nav .nav-link:hover,
.qdb-nav .nav-link.active {
  color: var(--qdb-red);
  background: var(--qdb-red-light);
}

/* Header right actions */
.qdb-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Post Ad CTA button */
.btn-post-ad {
  background: var(--qdb-red);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 1.15rem;
  border-radius: var(--qdb-radius-pill);
  border: 2px solid var(--qdb-red);
  transition: background var(--qdb-transition), border-color var(--qdb-transition), transform 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-post-ad:hover {
  background: var(--qdb-red-dark);
  border-color: var(--qdb-red-dark);
  color: #fff !important;
  transform: translateY(-1px);
}

.btn-post-ad svg,
.btn-post-ad i { width: 15px; height: 15px; }

/* User dropdown trigger */
.qdb-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1.5px solid var(--qdb-border);
  border-radius: var(--qdb-radius-pill);
  padding: 0.3rem 0.75rem 0.3rem 0.4rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: #444;
  transition: border-color var(--qdb-transition), background var(--qdb-transition);
}

.qdb-user-btn:hover {
  border-color: var(--qdb-red);
  background: var(--qdb-red-light);
}

.qdb-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--qdb-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.qdb-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dropdown menu */
.qdb-user-dropdown {
  min-width: 210px;
  border: 1px solid var(--qdb-border);
  border-radius: var(--qdb-radius);
  box-shadow: var(--qdb-card-shadow-hover);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.qdb-user-dropdown .dropdown-item {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #444;
  transition: background var(--qdb-transition), color var(--qdb-transition);
}

.qdb-user-dropdown .dropdown-item:hover {
  background: var(--qdb-red-light);
  color: var(--qdb-red);
}

.qdb-user-dropdown .dropdown-item svg,
.qdb-user-dropdown .dropdown-item i { width: 16px; height: 16px; }

.qdb-user-dropdown .dropdown-divider { margin: 0.3rem 0; }

/* Mobile hamburger */
.qdb-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: #444;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
}

.qdb-mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--qdb-transition), opacity var(--qdb-transition);
}

/* ============================================================
   2. MOBILE MENU OVERLAY
   ============================================================ */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1040;
}

.mobile-overlay.show { display: block; }

.mobile-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 1050;
  overflow-y: auto;
  transition: left 0.28s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
}

.mobile-menu.open { left: 0; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--qdb-border);
}

.mobile-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #666;
  padding: 0.2rem 0.5rem;
  line-height: 1;
}

.mobile-nav {
  padding: 1rem 0;
  flex: 1;
}

.mobile-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  color: #444;
  font-size: 0.95rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--qdb-transition);
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
  color: var(--qdb-red);
  background: var(--qdb-red-light);
  border-left-color: var(--qdb-red);
}

.mobile-menu-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--qdb-border);
}

/* ============================================================
   3. HERO SECTION
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d0000 50%, #1a1a1a 100%);
  overflow: hidden;
}

.hero-section .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.35;
}

.hero-section .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,26,26,0.65) 0%, rgba(26,26,26,0.80) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem 1rem;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.hero-content h1 em {
  color: var(--qdb-red);
  font-style: normal;
}

.hero-content p {
  color: rgba(255,255,255,0.80);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* Hero stats strip */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
  color: rgba(255,255,255,0.90);
}

.hero-stat .stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

.hero-stat .stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

/* ============================================================
   4. SEARCH FORM (HERO / STANDALONE)
   ============================================================ */
.search-form-wrap {
  background: #fff;
  border-radius: var(--qdb-radius-pill);
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
}

.search-form-wrap .sf-group {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 1rem;
  position: relative;
}

.search-form-wrap .sf-group + .sf-group {
  border-left: 1.5px solid var(--qdb-border);
}

.search-form-wrap .sf-icon {
  color: var(--qdb-red);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.search-form-wrap .sf-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  line-height: 1;
  margin-bottom: 2px;
}

.search-form-wrap .sf-input,
.search-form-wrap .sf-select {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--qdb-dark);
  background: transparent;
  width: 100%;
}

.search-form-wrap .sf-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* Location dropdown suggestions */
.location-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--qdb-border);
  border-radius: var(--qdb-radius);
  box-shadow: var(--qdb-card-shadow-hover);
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
}

.location-option {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: #444;
  transition: background var(--qdb-transition), color var(--qdb-transition);
}

.location-option:hover {
  background: var(--qdb-red-light);
  color: var(--qdb-red);
}

.location-option svg,
.location-option i { width: 14px; height: 14px; color: var(--qdb-red); }

/* Search button */
.btn-search {
  background: var(--qdb-red);
  color: #fff;
  border: none;
  border-radius: var(--qdb-radius-pill);
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--qdb-transition), transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-search:hover {
  background: var(--qdb-red-dark);
  transform: scale(1.03);
}

.btn-search svg,
.btn-search i { width: 18px; height: 18px; }

/* Secondary search bar (results page) */
.search-bar-inline {
  background: #fff;
  border: 1.5px solid var(--qdb-border);
  border-radius: var(--qdb-radius);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.search-bar-inline .form-control,
.search-bar-inline .form-select {
  border: none;
  background: transparent;
  box-shadow: none;
}

.search-bar-inline .form-control:focus,
.search-bar-inline .form-select:focus {
  border: none !important;
  box-shadow: none !important;
}

/* ============================================================
   5. SECTION HEADER
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header .section-tag {
  display: inline-block;
  background: var(--qdb-red-light);
  color: var(--qdb-red);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.85rem;
  border-radius: var(--qdb-radius-pill);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--qdb-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.section-header p {
  color: var(--qdb-gray);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto 1rem;
}

.section-underline {
  width: 48px;
  height: 4px;
  background: var(--qdb-red);
  border-radius: 2px;
  margin: 0 auto;
}

/* Left-aligned variant */
.section-header.left {
  text-align: left;
}
.section-header.left .section-underline { margin: 0; }
.section-header.left p { margin: 0; }

/* ============================================================
   6. CATEGORY CARDS
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: #fff;
  border: 1.5px solid var(--qdb-border);
  border-radius: var(--qdb-radius);
  cursor: pointer;
  text-decoration: none;
  color: var(--qdb-dark);
  transition: transform var(--qdb-transition), box-shadow var(--qdb-transition), border-color var(--qdb-transition);
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--qdb-red);
  transform: scaleX(0);
  transition: transform var(--qdb-transition);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--qdb-card-shadow-hover);
  border-color: var(--qdb-red);
  color: var(--qdb-red);
}

.category-card:hover::after { transform: scaleX(1); }

.cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--qdb-red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  transition: background var(--qdb-transition);
  font-size: 1.4rem;
}

.category-card:hover .cat-icon {
  background: var(--qdb-red);
  color: #fff;
}

.cat-icon svg,
.cat-icon i {
  width: 24px;
  height: 24px;
  color: var(--qdb-red);
  transition: color var(--qdb-transition);
}

.category-card:hover .cat-icon svg,
.category-card:hover .cat-icon i { color: #fff; }

.cat-name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}

.cat-count {
  font-size: 0.72rem;
  color: var(--qdb-gray);
  margin-top: 0.2rem;
}

/* ============================================================
   7. PROPERTY CARDS
   ============================================================ */
.property-card {
  background: #fff;
  border: 1px solid var(--qdb-border);
  border-radius: var(--qdb-radius);
  overflow: hidden;
  transition: transform var(--qdb-transition), box-shadow var(--qdb-transition);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--qdb-card-shadow-hover);
}

/* Card image */
.property-card .card-img-wrap {
  position: relative;
  overflow: hidden;
  padding-top: 62%;
  background: var(--qdb-light-gray);
  flex-shrink: 0;
}

.property-card .card-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s ease;
}

.property-card:hover .card-img-wrap img {
  transform: scale(1.06);
}

/* Card badges */
.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.qdb-badge {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: var(--qdb-radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.qdb-badge-featured {
  background: var(--qdb-red);
  color: #fff;
}

.qdb-badge-urgent {
  background: #ff6b00;
  color: #fff;
}

.qdb-badge-highlight {
  background: #f0b400;
  color: #fff;
}

.qdb-badge-sold {
  background: #555;
  color: #fff;
}

.qdb-badge-new {
  background: #16a34a;
  color: #fff;
}

/* Bookmark button */
.bookmark-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--qdb-transition), transform 0.15s;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
  backdrop-filter: blur(4px);
}

.bookmark-btn:hover {
  background: #fff;
  transform: scale(1.12);
}

.bookmark-btn svg,
.bookmark-btn i {
  width: 17px;
  height: 17px;
  color: #999;
  transition: color var(--qdb-transition);
}

.bookmark-btn.bookmarked svg,
.bookmark-btn.bookmarked i,
.bookmark-btn:hover svg,
.bookmark-btn:hover i {
  color: var(--qdb-red);
}

.bookmark-btn.loading { opacity: 0.5; pointer-events: none; }

/* Card body */
.property-card .card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.property-card .card-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--qdb-red);
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.property-card .card-price .price-period {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--qdb-gray);
}

.property-card .card-title {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--qdb-dark);
  margin-bottom: 0.4rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Specs row */
.card-specs {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.8rem;
  color: var(--qdb-gray);
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.card-spec {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.card-spec svg,
.card-spec i { width: 13px; height: 13px; color: var(--qdb-red); }

/* Card footer */
.property-card .card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--qdb-border);
  font-size: 0.78rem;
  color: var(--qdb-gray);
}

.card-location {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  overflow: hidden;
}

.card-location svg,
.card-location i { width: 12px; height: 12px; color: var(--qdb-red); flex-shrink: 0; }

.card-location span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-time {
  flex-shrink: 0;
  margin-left: 0.5rem;
}

/* List view variant */
.property-card.list-view {
  flex-direction: row;
}

.property-card.list-view .card-img-wrap {
  width: 220px;
  min-width: 220px;
  padding-top: 0;
  height: 160px;
}

.property-card.list-view .card-body {
  padding: 1rem 1.25rem;
}

/* ============================================================
   8. CITY CARDS
   ============================================================ */
.city-card {
  position: relative;
  border-radius: var(--qdb-radius);
  overflow: hidden;
  display: block;
  text-decoration: none;
  height: 180px;
}

.city-card .city-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.city-card:hover .city-bg { transform: scale(1.08); }

.city-card .city-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.15) 60%);
}

.city-card .city-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  color: #fff;
}

.city-card .city-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  display: block;
}

.city-card .city-count {
  display: inline-block;
  background: var(--qdb-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: var(--qdb-radius-pill);
}

/* Tall city card */
.city-card.tall { height: 378px; }

/* ============================================================
   9. BREADCRUMB
   ============================================================ */
.qdb-breadcrumb {
  background: var(--qdb-light-gray);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--qdb-border);
}

.qdb-breadcrumb .breadcrumb {
  margin: 0;
  background: none;
  padding: 0;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.qdb-breadcrumb .breadcrumb-item a {
  color: var(--qdb-gray);
  transition: color var(--qdb-transition);
}

.qdb-breadcrumb .breadcrumb-item a:hover { color: var(--qdb-red); }

.qdb-breadcrumb .breadcrumb-item.active { color: var(--qdb-dark); font-weight: 500; }

.qdb-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: #bbb;
}

/* ============================================================
   10. FILTER SIDEBAR
   ============================================================ */
.filter-sidebar {
  background: #fff;
  border: 1px solid var(--qdb-border);
  border-radius: var(--qdb-radius);
  overflow: hidden;
  position: sticky;
  top: calc(var(--qdb-header-h) + 1rem);
  max-height: calc(100vh - var(--qdb-header-h) - 2rem);
  overflow-y: auto;
}

.filter-sidebar::-webkit-scrollbar { width: 4px; }
.filter-sidebar::-webkit-scrollbar-thumb { background: var(--qdb-red); border-radius: 4px; }

.filter-block {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--qdb-border);
}

.filter-block:last-child { border-bottom: none; }

.filter-block-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.filter-block-title svg,
.filter-block-title i {
  width: 14px;
  height: 14px;
  transition: transform var(--qdb-transition);
}

.filter-block-title.collapsed svg,
.filter-block-title.collapsed i { transform: rotate(-90deg); }

/* Category tree */
.cat-tree { }

.cat-tree .cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.88rem;
  color: #444;
  cursor: pointer;
  transition: color var(--qdb-transition);
}

.cat-tree .cat-item:hover,
.cat-tree .cat-item.active { color: var(--qdb-red); }

.cat-tree .cat-item-count {
  background: var(--qdb-light-gray);
  color: var(--qdb-gray);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: var(--qdb-radius-pill);
}

.cat-tree .cat-item.active .cat-item-count {
  background: var(--qdb-red-light);
  color: var(--qdb-red);
}

.cat-tree .sub-items {
  padding-left: 1rem;
  border-left: 2px solid var(--qdb-border);
  margin-left: 0.25rem;
}

/* Price range */
.price-range-wrap {
  padding-top: 0.5rem;
}

.price-range-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--qdb-dark);
  margin-bottom: 0.5rem;
}

.price-range-inputs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.price-range-inputs .form-control {
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  text-align: center;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--qdb-border);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--qdb-red);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(227,43,43,0.15);
  transition: box-shadow var(--qdb-transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(227,43,43,0.22);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--qdb-red);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* Bedroom filter pills */
.bed-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bed-pill {
  padding: 0.3rem 0.7rem;
  border: 1.5px solid var(--qdb-border);
  border-radius: var(--qdb-radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all var(--qdb-transition);
  background: transparent;
  user-select: none;
}

.bed-pill:hover,
.bed-pill.active {
  background: var(--qdb-red);
  border-color: var(--qdb-red);
  color: #fff;
}

/* Filter apply button */
.btn-filter-apply {
  width: 100%;
  background: var(--qdb-red);
  color: #fff;
  border: none;
  border-radius: var(--qdb-radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--qdb-transition);
}

.btn-filter-apply:hover { background: var(--qdb-red-dark); }

/* ============================================================
   11. RESULTS TOOLBAR / MAP TOGGLE
   ============================================================ */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--qdb-border);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.results-count {
  font-size: 0.9rem;
  color: var(--qdb-gray);
}

.results-count strong { color: var(--qdb-dark); }

.results-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-sort label {
  font-size: 0.85rem;
  color: var(--qdb-gray);
  white-space: nowrap;
}

.results-sort .form-select {
  font-size: 0.85rem;
  padding: 0.3rem 2rem 0.3rem 0.65rem;
  border-color: var(--qdb-border);
  min-width: 160px;
}

/* View toggle */
.view-toggle {
  display: flex;
  background: var(--qdb-light-gray);
  border-radius: var(--qdb-radius-sm);
  padding: 3px;
  gap: 2px;
}

.view-btn {
  background: transparent;
  border: none;
  border-radius: var(--qdb-radius-sm);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  color: var(--qdb-gray);
  transition: all var(--qdb-transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.view-btn.active {
  background: #fff;
  color: var(--qdb-red);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

.view-btn svg,
.view-btn i { width: 16px; height: 16px; }

/* Floating map toggle (mobile) */
.map-toggle-float {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: var(--qdb-dark);
  color: #fff;
  border: none;
  border-radius: var(--qdb-radius-pill);
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  display: none;
  align-items: center;
  gap: 0.5rem;
  transition: background var(--qdb-transition);
}

.map-toggle-float:hover { background: var(--qdb-red); }
.map-toggle-float svg,
.map-toggle-float i { width: 18px; height: 18px; }

/* Map container */
#mapView {
  border-radius: var(--qdb-radius);
  overflow: hidden;
  min-height: 500px;
}

/* ============================================================
   12. LISTING DETAIL PAGE
   ============================================================ */
/* Gallery */
.listing-gallery { margin-bottom: 1.5rem; }

.gallery-main {
  border-radius: var(--qdb-radius);
  overflow: hidden;
  background: var(--qdb-light-gray);
  margin-bottom: 0.5rem;
  height: 400px;
}

#mainGalleryImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.gallery-thumb {
  border-radius: var(--qdb-radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--qdb-transition), opacity var(--qdb-transition);
  aspect-ratio: 4/3;
  background: var(--qdb-light-gray);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb:hover { border-color: var(--qdb-red); }
.gallery-thumb.active { border-color: var(--qdb-red); }
.gallery-thumb:not(.active) { opacity: 0.7; }
.gallery-thumb:not(.active):hover { opacity: 1; }

/* Listing info card */
.listing-info-card {
  background: #fff;
  border: 1px solid var(--qdb-border);
  border-radius: var(--qdb-radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.listing-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--qdb-red);
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.listing-price .price-type {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--qdb-gray);
}

.listing-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--qdb-dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.listing-address {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  color: var(--qdb-gray);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.listing-address svg,
.listing-address i { width: 15px; height: 15px; color: var(--qdb-red); margin-top: 2px; flex-shrink: 0; }

/* Specs table */
.specs-table {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--qdb-border);
  border-radius: var(--qdb-radius-sm);
  overflow: hidden;
}

.spec-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--qdb-border);
  font-size: 0.88rem;
}

.spec-row:nth-last-child(1),
.spec-row:nth-last-child(2) { border-bottom: none; }

.spec-row:nth-child(odd) { border-right: 1px solid var(--qdb-border); }

.spec-icon {
  width: 30px;
  height: 30px;
  background: var(--qdb-red-light);
  border-radius: var(--qdb-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spec-icon svg,
.spec-icon i { width: 15px; height: 15px; color: var(--qdb-red); }

.spec-label {
  font-size: 0.75rem;
  color: var(--qdb-gray);
  display: block;
  line-height: 1;
}

.spec-value {
  font-weight: 600;
  color: var(--qdb-dark);
  display: block;
  line-height: 1.3;
}

/* Description */
.listing-description {
  font-size: 0.93rem;
  color: #444;
  line-height: 1.8;
}

.listing-description h3,
.listing-description h4 { color: var(--qdb-dark); margin-top: 1.25rem; font-weight: 700; }

/* Contact card (sticky right) */
.contact-card {
  background: #fff;
  border: 1px solid var(--qdb-border);
  border-radius: var(--qdb-radius);
  overflow: hidden;
  position: sticky;
  top: calc(var(--qdb-header-h) + 1rem);
}

.contact-card-header {
  background: var(--qdb-red);
  padding: 1rem 1.25rem;
  text-align: center;
  color: #fff;
}

.contact-card-header .seller-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  margin: 0 auto 0.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  border: 2px solid rgba(255,255,255,0.5);
}

.contact-card-header .seller-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-card-header .seller-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.contact-card-header .seller-type {
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 0.1rem;
}

.contact-card-body {
  padding: 1.25rem;
}

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--qdb-radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all var(--qdb-transition);
  margin-bottom: 0.6rem;
}

.contact-btn-primary {
  background: var(--qdb-red);
  color: #fff;
  border-color: var(--qdb-red);
}

.contact-btn-primary:hover {
  background: var(--qdb-red-dark);
  border-color: var(--qdb-red-dark);
  color: #fff;
}

.contact-btn-outline {
  background: transparent;
  color: var(--qdb-dark);
  border-color: var(--qdb-border);
}

.contact-btn-outline:hover {
  border-color: var(--qdb-red);
  color: var(--qdb-red);
  background: var(--qdb-red-light);
}

.contact-btn svg,
.contact-btn i { width: 17px; height: 17px; }

/* Phone reveal */
.phone-reveal {
  text-align: center;
  font-size: 0.82rem;
  color: var(--qdb-gray);
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.phone-reveal:hover { color: var(--qdb-red); }

/* Contact form */
#contactSellerForm .form-control,
#contactSellerForm .form-select {
  font-size: 0.88rem;
  border-radius: var(--qdb-radius-sm);
}

#contactMsg { font-size: 0.85rem; }

/* Listing meta strip */
.listing-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.82rem;
  color: var(--qdb-gray);
  padding: 0.65rem 0;
  border-top: 1px solid var(--qdb-border);
  border-bottom: 1px solid var(--qdb-border);
  margin: 1rem 0;
  flex-wrap: wrap;
}

.listing-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.listing-meta-item svg,
.listing-meta-item i { width: 14px; height: 14px; color: var(--qdb-red); }

/* ============================================================
   13. USER DASHBOARD
   ============================================================ */
.dash-stat-card {
  background: #fff;
  border: 1px solid var(--qdb-border);
  border-radius: var(--qdb-radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow var(--qdb-transition);
}

.dash-stat-card:hover { box-shadow: var(--qdb-card-shadow-hover); }

.dash-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--qdb-radius);
  background: var(--qdb-red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-stat-icon svg,
.dash-stat-icon i { width: 24px; height: 24px; color: var(--qdb-red); }

.dash-stat-info { flex: 1; min-width: 0; }

.dash-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--qdb-dark);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.dash-stat-label {
  font-size: 0.8rem;
  color: var(--qdb-gray);
  font-weight: 500;
}

.dash-stat-change {
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.dash-stat-change.up { color: #16a34a; }
.dash-stat-change.down { color: var(--qdb-red); }

/* My listings table */
.dash-table {
  background: #fff;
  border: 1px solid var(--qdb-border);
  border-radius: var(--qdb-radius);
  overflow: hidden;
}

.dash-table-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--qdb-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-table-header h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.dash-listing-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--qdb-border);
  transition: background var(--qdb-transition);
}

.dash-listing-row:last-child { border-bottom: none; }
.dash-listing-row:hover { background: var(--qdb-light-gray); }

.dash-listing-thumb {
  width: 60px;
  height: 48px;
  border-radius: var(--qdb-radius-sm);
  object-fit: cover;
  background: var(--qdb-light-gray);
  flex-shrink: 0;
}

.dash-listing-info { flex: 1; min-width: 0; }

.dash-listing-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--qdb-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.15rem;
}

.dash-listing-meta {
  font-size: 0.78rem;
  color: var(--qdb-gray);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dash-listing-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--qdb-red);
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-listing-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.dash-action-btn {
  background: none;
  border: 1px solid var(--qdb-border);
  border-radius: var(--qdb-radius-sm);
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--qdb-gray);
  transition: all var(--qdb-transition);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.dash-action-btn:hover { border-color: var(--qdb-red); color: var(--qdb-red); }

.dash-action-btn.danger:hover { border-color: #dc3545; color: #dc3545; }

.dash-action-btn svg,
.dash-action-btn i { width: 14px; height: 14px; }

/* Status badges for dashboard */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--qdb-radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-active { background: rgba(22,163,74,0.12); color: #16a34a; }
.status-pending { background: rgba(234,179,8,0.12); color: #b45309; }
.status-expired { background: rgba(107,114,128,0.12); color: #6b7280; }
.status-paused { background: rgba(59,130,246,0.12); color: #2563eb; }

/* ============================================================
   14. AUTH PAGES (Login / Register)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f5 0%, #fde8e8 100%);
  padding: 2rem 1rem;
}

.auth-card {
  background: #fff;
  border-radius: var(--qdb-radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

.auth-card-header {
  background: var(--qdb-red);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  color: #fff;
}

.auth-card-header .auth-logo {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
}

.auth-card-header p {
  font-size: 0.88rem;
  opacity: 0.88;
  margin: 0;
}

.auth-card-body {
  padding: 2rem;
}

.auth-card-body .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.35rem;
}

.auth-card-body .form-control {
  border-radius: var(--qdb-radius-sm);
  font-size: 0.92rem;
  padding: 0.55rem 0.85rem;
}

.btn-auth {
  width: 100%;
  padding: 0.7rem;
  background: var(--qdb-red);
  color: #fff;
  border: none;
  border-radius: var(--qdb-radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--qdb-transition);
}

.btn-auth:hover { background: var(--qdb-red-dark); }

.auth-divider {
  text-align: center;
  position: relative;
  margin: 1.25rem 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--qdb-border);
}

.auth-divider span {
  background: #fff;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  color: var(--qdb-gray);
  position: relative;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem;
  border: 1.5px solid var(--qdb-border);
  border-radius: var(--qdb-radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: #444;
  transition: border-color var(--qdb-transition), background var(--qdb-transition);
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.auth-social-btn:hover {
  border-color: var(--qdb-red);
  background: var(--qdb-red-light);
  color: var(--qdb-dark);
}

.auth-card-footer {
  padding: 1rem 2rem 1.5rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--qdb-gray);
  border-top: 1px solid var(--qdb-border);
}

.auth-card-footer a { font-weight: 700; }

/* ============================================================
   15. FOOTER
   ============================================================ */
.qdb-footer {
  background: var(--qdb-footer-bg);
  color: rgba(255,255,255,0.72);
  padding: 3.5rem 0 0;
  margin-top: 4rem;
}

.footer-logo {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--qdb-red);
  letter-spacing: -0.5px;
  display: block;
  margin-bottom: 0.75rem;
  text-decoration: none;
}

.footer-logo span { color: #fff; }

.footer-tagline {
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: rgba(255,255,255,0.60);
}

.footer-social {
  display: flex;
  gap: 0.5rem;
}

.footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.70);
  transition: background var(--qdb-transition), color var(--qdb-transition);
  text-decoration: none;
}

.footer-social-btn:hover {
  background: var(--qdb-red);
  color: #fff;
}

.footer-social-btn svg,
.footer-social-btn i { width: 16px; height: 16px; }

.footer-heading {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-links { display: flex; flex-direction: column; gap: 0.45rem; }

.footer-links a {
  font-size: 0.87rem;
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  transition: color var(--qdb-transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-links a:hover { color: var(--qdb-red); }

.footer-links a::before {
  content: '›';
  color: var(--qdb-red);
  font-weight: 700;
}

/* Newsletter */
.footer-newsletter .input-group {
  border-radius: var(--qdb-radius-sm);
  overflow: hidden;
}

.footer-newsletter .form-control {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 0.87rem;
}

.footer-newsletter .form-control::placeholder { color: rgba(255,255,255,0.45); }
.footer-newsletter .form-control:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--qdb-red) !important;
  box-shadow: none !important;
  color: #fff;
}

.footer-newsletter .btn {
  background: var(--qdb-red);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.footer-newsletter .btn:hover { background: var(--qdb-red-dark); }

/* Footer bottom bar */
.footer-bottom {
  background: rgba(0,0,0,0.25);
  padding: 1rem 0;
  margin-top: 2.5rem;
}

.footer-bottom .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.50);
}

.footer-bottom-links {
  display: flex;
  gap: 1.25rem;
}

.footer-bottom-links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.50);
  text-decoration: none;
  transition: color var(--qdb-transition);
}

.footer-bottom-links a:hover { color: var(--qdb-red); }

/* ============================================================
   16. UTILITY CLASSES
   ============================================================ */
/* Section spacing */
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-lg { padding: 6rem 0; }

/* Background helpers */
.bg-qdb-light { background: var(--qdb-light-gray); }
.bg-qdb-red { background: var(--qdb-red); }
.bg-qdb-dark { background: var(--qdb-dark); }

/* Text helpers */
.text-qdb-red { color: var(--qdb-red) !important; }
.text-qdb-dark { color: var(--qdb-dark) !important; }
.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }

/* Scroll to top */
.tap-top {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 42px;
  height: 42px;
  background: var(--qdb-red);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(227,43,43,0.4);
  transition: background var(--qdb-transition), transform 0.15s;
}

.tap-top.active { display: flex; }
.tap-top:hover { background: var(--qdb-red-dark); transform: translateY(-2px); }
.tap-top svg, .tap-top i { width: 20px; height: 20px; }

/* Flash alerts */
.alert {
  border-radius: var(--qdb-radius-sm);
  font-size: 0.9rem;
  transition: opacity 0.4s;
}
.alert:not(.show) { opacity: 0; pointer-events: none; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--qdb-radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Tag pills */
.tag-pill {
  display: inline-block;
  background: var(--qdb-light-gray);
  color: #555;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--qdb-radius-pill);
  transition: background var(--qdb-transition), color var(--qdb-transition);
  text-decoration: none;
}

.tag-pill:hover {
  background: var(--qdb-red-light);
  color: var(--qdb-red);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--qdb-gray);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--qdb-dark);
  margin-bottom: 0.5rem;
}

.empty-state p { font-size: 0.9rem; margin-bottom: 1.25rem; }

/* Share button */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--qdb-light-gray);
  border: none;
  border-radius: var(--qdb-radius-sm);
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all var(--qdb-transition);
}

.share-btn:hover {
  background: var(--qdb-red-light);
  color: var(--qdb-red);
}

/* Promoted / featured listing highlight */
.listing-promoted {
  border-color: var(--qdb-red) !important;
  box-shadow: 0 0 0 1px var(--qdb-red), var(--qdb-card-shadow);
}

/* Price history / chart area */
.price-chart-wrap {
  border: 1px solid var(--qdb-border);
  border-radius: var(--qdb-radius);
  padding: 1.25rem;
  background: #fff;
}

/* Ad submission steps */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--qdb-gray);
}

.step-item:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--qdb-border);
  margin: 0 0.5rem;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--qdb-light-gray);
  border: 2px solid var(--qdb-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: all var(--qdb-transition);
}

.step-item.active .step-num {
  background: var(--qdb-red);
  border-color: var(--qdb-red);
  color: #fff;
}

.step-item.active { color: var(--qdb-red); }

.step-item.done .step-num {
  background: var(--qdb-red);
  border-color: var(--qdb-red);
  color: #fff;
}

/* ============================================================
   17. RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 991px) {
  /* Hide desktop nav, show mobile toggle */
  .qdb-nav { display: none; }
  .qdb-mobile-toggle { display: flex; }

  /* Header actions trim */
  .qdb-header-actions .qdb-user-btn .user-name { display: none; }

  /* Search form stack */
  .search-form-wrap {
    flex-direction: column;
    border-radius: var(--qdb-radius);
    padding: 1rem;
    gap: 0.75rem;
  }

  .search-form-wrap .sf-group { border-left: none; border-bottom: 1px solid var(--qdb-border); padding: 0 0 0.65rem; }
  .search-form-wrap .sf-group:last-of-type { border-bottom: none; }
  .btn-search { width: 100%; justify-content: center; }

  /* Filter sidebar becomes offcanvas */
  .filter-sidebar {
    position: static;
    max-height: none;
  }

  /* Gallery */
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }

  /* Listing detail contact */
  .contact-card { position: static; }

  /* City card */
  .city-card.tall { height: 220px; }

  /* Property card list view collapses */
  .property-card.list-view { flex-direction: column; }
  .property-card.list-view .card-img-wrap { width: 100%; height: 200px; padding-top: 0; }

  /* Specs table single column on small */
  .specs-table { grid-template-columns: 1fr; }
  .spec-row:nth-child(odd) { border-right: none; }
  .spec-row:nth-last-child(1) { border-bottom: none; }
  .spec-row:nth-last-child(2) { border-bottom: 1px solid var(--qdb-border); }

  /* Map toggle float visible on mobile */
  .map-toggle-float { display: flex; }

  /* Dashboard */
  .dash-listing-actions { flex-direction: column; }
}

/* ============================================================
   18. RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 575px) {
  .hero-section { min-height: 420px; }
  .hero-content { padding: 2rem 0.75rem; }

  .gallery-main { height: 240px; }
  .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }

  .listing-price { font-size: 1.5rem; }
  .listing-title { font-size: 1.1rem; }

  .results-toolbar { flex-direction: column; align-items: flex-start; }

  .footer-bottom .row { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; }

  .category-grid { grid-template-columns: repeat(3, 1fr); }

  .hero-stats { gap: 1.5rem; }
  .hero-stat .stat-number { font-size: 1.25rem; }

  .auth-card-body { padding: 1.25rem; }
  .auth-card-header { padding: 1.5rem; }

  .step-indicator { flex-wrap: wrap; gap: 0.5rem; }
  .step-item:not(:last-child)::after { display: none; }

  .dash-listing-row { flex-wrap: wrap; }
  .dash-listing-thumb { display: none; }

  .qdb-breadcrumb .breadcrumb { font-size: 0.78rem; }

  .specs-table { grid-template-columns: 1fr; }

  .contact-card-body { padding: 1rem; }

  .search-bar-inline { flex-direction: column; gap: 0.5rem; }
  .search-bar-inline .btn-search { width: 100%; justify-content: center; }
}

/* ============================================================
   19. PRINT STYLES
   ============================================================ */
@media print {
  .qdb-header,
  .qdb-footer,
  .filter-sidebar,
  .contact-card,
  .tap-top,
  .bookmark-btn,
  .share-btn { display: none !important; }

  .listing-gallery,
  .listing-info-card,
  .listing-description { page-break-inside: avoid; }
}

/* ============================================================
   20. HOMEPAGE COMPONENTS — Hero, Stats, Cards, CTA, etc.
   ============================================================ */

/* ── Navbar (new styles for redesigned header) ── */
.navbar {
  padding: 0;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  min-height: 68px;
}

.qdb-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  transition: box-shadow .25s ease;
}

.qdb-header.header-scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
}

/* Logo */
.qdb-logo {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -.5px;
  text-decoration: none;
  line-height: 1;
}

.qdb-logo .logo-qdb  { color: var(--qdb-red); }
.qdb-logo .logo-dot  { color: #222; }

.navbar-brand.qdb-logo { margin-right: 32px; }

/* Nav links */
.navbar-nav .nav-link {
  font-weight: 600;
  font-size: 14.5px;
  color: #374151;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all .18s ease;
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--qdb-red);
  background: rgba(227,43,43,.07);
}

.navbar-nav .nav-link.active::after {
  content: '';
  display: block;
  width: 20px;
  height: 3px;
  background: var(--qdb-red);
  border-radius: 2px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Post ad button */
.btn-post-ad {
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-post-ad-mobile {
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1;
}

.btn-auth {
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
}

/* User menu button */
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f8f9fa;
  border: 1.5px solid #e5e7eb;
  border-radius: 50px;
  transition: all .18s ease;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
}

.user-menu-btn:hover,
.user-menu-btn:focus {
  background: #f0f0f5;
  border-color: #d1d5db;
  color: #111;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--qdb-red);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name-text {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chevron {
  opacity: .5;
  transition: transform .2s;
}

.user-dropdown-menu {
  min-width: 220px;
  padding: 8px;
}

/* Hamburger */
.hamburger-btn {
  width: 40px;
  height: 40px;
  background: #f5f5f5;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: background .15s;
  padding: 0;
}

.hamburger-btn:hover { background: #eee; }

.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: #333;
  border-radius: 2px;
  transition: all .2s;
}

/* Flash container */
.qdb-flash-container {
  padding-top: 12px;
}

/* ── Scroll-to-top ── */
#tapTop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--qdb-red);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(227,43,43,.4);
}

#tapTop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#tapTop:hover {
  background: var(--qdb-red-dark);
  box-shadow: 0 6px 24px rgba(227,43,43,.5);
}

/* ── Mobile menu (new classes) ── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1040;
  backdrop-filter: blur(3px);
}

.mobile-overlay.show { display: block; }

.mobile-menu {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100%;
  background: #fff;
  z-index: 1050;
  overflow-y: auto;
  transition: left .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 32px rgba(0,0,0,.15);
}

.mobile-menu.open { left: 0; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #f0f0f5;
}

.mobile-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f5f5f5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #555;
  transition: background .15s;
}

.mobile-close:hover { background: #ebebeb; }

.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--qdb-light-gray, #f8f9fa);
  border-bottom: 1px solid #f0f0f5;
  font-size: 14px;
}

.mobile-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.mobile-nav {
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: all .15s;
}

.mobile-nav-link svg,
.mobile-nav-link i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mobile-nav-link:hover,
.mobile-nav-link.mobile-nav-active {
  background: rgba(227,43,43,.08);
  color: var(--qdb-red);
}

.mobile-nav-link.mobile-nav-danger { color: #dc2626; }
.mobile-nav-link.mobile-nav-danger:hover { background: #fef2f2; color: #dc2626; }

.mobile-nav-divider {
  height: 1px;
  background: #f0f0f5;
  margin: 8px 0;
}

/* ── HERO ── */
.hero-section {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.03);
  transition: transform 8s ease;
}

.hero-section:hover .hero-bg {
  transform: scale(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,10,20,.75) 0%,
    rgba(10,10,20,.55) 60%,
    rgba(10,10,20,.45) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 80px 0 60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  margin-bottom: 20px;
}

.hero-headline {
  font-size: clamp(32px, 5.5vw, 58px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.hero-headline-accent {
  color: var(--qdb-red);
  display: block;
}

.hero-subline {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,.85);
  margin-bottom: 36px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero search card */
.hero-search-card {
  background: #fff;
  border-radius: 16px;
  padding: 6px 6px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  max-width: 860px;
  margin: 0 auto;
  text-align: left;
}

.hero-search-tabs {
  display: flex;
  border-bottom: 1px solid #f0f0f5;
  padding: 0 10px;
  margin-bottom: 16px;
  gap: 2px;
}

.hero-tab {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 2.5px solid transparent;
  transition: all .18s ease;
  border-radius: 0;
  white-space: nowrap;
}

.hero-tab:hover  { color: var(--qdb-red); }
.hero-tab.active { color: var(--qdb-red); border-bottom-color: var(--qdb-red); }

.hero-search-form { padding: 0 10px; }

.hero-search-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 180px auto;
  gap: 10px;
  align-items: end;
}

.hero-field { display: flex; flex-direction: column; gap: 5px; position: relative; }

.hero-field-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}

.hero-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  color: #111;
  background: #fafafa;
  transition: all .18s ease;
  appearance: none;
  -webkit-appearance: none;
}

.hero-input:focus {
  outline: none;
  border-color: var(--qdb-red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(227,43,43,.12);
}

.hero-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%236b7280' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

.hero-search-btn {
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  height: 48px;
}

/* Autocomplete dropdown */
.hero-autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 100;
  list-style: none;
  margin: 0;
  padding: 6px;
  display: none;
  max-height: 280px;
  overflow-y: auto;
}

.hero-autocomplete li {
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  color: #374151;
  transition: background .12s;
}

.hero-autocomplete li:hover,
.hero-autocomplete li.focused {
  background: rgba(227,43,43,.08);
  color: var(--qdb-red);
}

/* Quick links */
.hero-quick-links {
  padding: 12px 14px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hero-quick-link {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  padding: 3px 10px;
  background: #f5f5f5;
  border-radius: 50px;
  text-decoration: none;
  transition: all .15s;
}

.hero-quick-link:hover {
  background: rgba(227,43,43,.1);
  color: var(--qdb-red);
}

/* ── STATS BAR ── */
.stats-bar {
  background: #fff;
  border-bottom: 1px solid #f0f0f5;
  padding: 28px 0;
  box-shadow: 0 2px 16px rgba(0,0,0,.05);
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 40px;
  flex: 1;
  min-width: 200px;
  justify-content: center;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg,
.stat-icon i {
  width: 24px;
  height: 24px;
}

.stat-body { display: flex; flex-direction: column; }

.stat-number {
  font-size: 26px;
  font-weight: 800;
  color: #111;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  margin-top: 3px;
}

.stat-divider {
  width: 1px;
  height: 50px;
  background: #e5e7eb;
  flex-shrink: 0;
}

/* ── CATEGORIES GRID ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: #fff;
  border: 1.5px solid #f0f0f5;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all .22s ease;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cat-color, #e32b2b);
  opacity: 0;
  transition: opacity .22s;
}

.category-card:hover {
  border-color: var(--cat-color, #e32b2b);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
  color: #fff;
}

.category-card:hover::before { opacity: 1; }

.category-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(227,43,43,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: background .22s;
  color: var(--cat-color, #e32b2b);
}

.category-card:hover .category-icon-wrap {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.category-icon-wrap svg,
.category-icon-wrap i {
  width: 22px;
  height: 22px;
}

.category-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.category-name {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 3px;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-count {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  transition: color .22s;
}

.category-card:hover .category-count { color: rgba(255,255,255,.8); }

.category-arrow {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateX(-6px);
  transition: all .22s;
  color: rgba(255,255,255,.9);
}

.category-card:hover .category-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── LISTING CARD ── */
.listing-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid #f0f0f5;
  transition: all .22s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.listing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,.13);
  border-color: #e5e7eb;
}

.featured-card {
  border-color: #fde8e8;
}

.listing-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #f5f5f5;
}

.listing-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.listing-card:hover .listing-card-img {
  transform: scale(1.06);
}

/* Badges */
.listing-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}

.listing-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.listing-badge-featured {
  background: rgba(227,43,43,.92);
  color: #fff;
}

.listing-badge-urgent {
  background: rgba(245,158,11,.95);
  color: #fff;
}

/* Bookmark button */
.listing-bookmark {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .18s;
  color: #6b7280;
}

.listing-bookmark:hover {
  background: #fff;
  color: var(--qdb-red);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.listing-bookmark.bookmarked {
  color: var(--qdb-red);
  background: #fff;
}

.listing-bookmark svg,
.listing-bookmark i {
  width: 16px;
  height: 16px;
}

/* Category pill (bottom of image) */
.listing-category-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Card body */
.listing-card-body {
  padding: 16px 16px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.listing-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--qdb-red);
  line-height: 1;
}

.listing-title {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.listing-title a {
  color: #1a1a2e;
  text-decoration: none;
  transition: color .15s;
}

.listing-title a:hover { color: var(--qdb-red); }

.listing-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.listing-location svg,
.listing-location i {
  flex-shrink: 0;
  color: var(--qdb-red);
}

/* Feature row */
.listing-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f5f5f5;
}

.listing-feature {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: #374151;
  font-weight: 500;
}

.listing-feature svg,
.listing-feature i {
  color: #9ca3af;
  flex-shrink: 0;
}

/* Card footer */
.listing-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #fafafa;
  border-top: 1px solid #f0f0f5;
  font-size: 12px;
  color: #9ca3af;
}

.listing-meta-time,
.listing-meta-views {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── CITIES GRID ── */
.cities-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.city-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3/4;
  display: block;
  text-decoration: none;
  min-height: 160px;
}

.city-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .4s ease;
}

.city-card:hover .city-card-bg {
  transform: scale(1.08);
}

.city-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.75) 0%,
    rgba(0,0,0,.2) 60%,
    transparent 100%
  );
  transition: background .3s;
}

.city-card:hover .city-card-overlay {
  background: linear-gradient(
    to top,
    rgba(227,43,43,.75) 0%,
    rgba(0,0,0,.25) 60%,
    transparent 100%
  );
}

.city-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 12px 14px;
  z-index: 2;
}

.city-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.city-province {
  font-size: 11px;
  font-weight: 500;
  opacity: .85;
  display: block;
}

.city-card-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: rgba(255,255,255,.85);
  font-weight: 500;
}

/* ── RECENT LISTINGS filter tabs ── */
.recent-filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 600;
  color: #6b7280;
  background: #f5f5f5;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all .18s;
}

.filter-tab:hover {
  background: rgba(227,43,43,.08);
  color: var(--qdb-red);
}

.filter-tab.active {
  background: rgba(227,43,43,.1);
  color: var(--qdb-red);
  border-color: rgba(227,43,43,.25);
}

/* ── HOW IT WORKS ── */
.how-image-collage {
  position: relative;
  height: 440px;
}

.how-img {
  border-radius: 16px;
  object-fit: cover;
}

.how-img-main {
  width: 78%;
  height: 360px;
  position: absolute;
  top: 0;
  left: 0;
  box-shadow: 0 16px 48px rgba(0,0,0,.15);
}

.how-img-secondary {
  width: 50%;
  height: 180px;
  position: absolute;
  bottom: 0;
  right: 0;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.how-floating-badge {
  position: absolute;
  bottom: 90px;
  left: -20px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  z-index: 5;
  border: 1px solid #f0f0f5;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.how-step-num {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}

.how-step-body h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.how-step-body p {
  font-size: 14.5px;
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}

/* ── CTA SECTION ── */
.cta-section {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,10,20,.88) 0%,
    rgba(10,10,20,.78) 100%
  );
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-icon-wrap {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.cta-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,.8);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.cta-btn-primary {
  box-shadow: 0 8px 32px rgba(227,43,43,.4);
}

.cta-btn-secondary {
  border: 2px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  color: #fff;
}

.cta-btn-secondary:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.5);
  color: #fff;
}

.cta-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.cta-trust-badges span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
}

/* ── TESTIMONIALS ── */
.testimonial-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  border: 1.5px solid #f0f0f5;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  transition: all .22s ease;
  height: 100%;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 36px rgba(0,0,0,.1);
  border-color: rgba(227,43,43,.2);
}

.testimonial-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 16px;
}

.testimonial-text {
  font-size: 15px;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 700;
  font-size: 15px;
  color: #1a1a2e;
}

.testimonial-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: #9ca3af;
  margin-top: 2px;
}

/* ── FOOTER (new classes used in footer.php) ── */
.qdb-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,.75);
  font-size: 14px;
}

.footer-top {
  padding: 70px 0 50px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-logo {
  font-size: 26px;
  text-decoration: none;
}

.footer-logo .logo-qdb { color: var(--qdb-red); }
.footer-logo .logo-dot { color: #fff; }

.footer-tagline {
  color: rgba(255,255,255,.6);
  font-size: 14px;
  line-height: 1.7;
  max-width: 320px;
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 14px;
  transition: color .15s;
}

.footer-contact-link:hover { color: var(--qdb-red); }

.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-icon {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: all .18s;
}

.social-icon:hover {
  background: var(--qdb-red);
  border-color: var(--qdb-red);
  color: #fff;
  transform: translateY(-2px);
}

.social-icon svg,
.social-icon i {
  width: 16px;
  height: 16px;
}

.footer-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.footer-links a:hover {
  color: var(--qdb-red);
  transform: translateX(3px);
}

.footer-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  color: rgba(255,255,255,.5);
  font-size: 12px;
  font-weight: 500;
}

.footer-bottom {
  padding: 20px 0;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255,255,255,.45);
  font-size: 13px;
}

.footer-bottom-tagline {
  font-style: italic;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: rgba(255,255,255,.45);
  text-decoration: none;
  font-size: 13px;
  transition: color .15s;
}

.footer-bottom-links a:hover { color: rgba(255,255,255,.8); }

/* ── RESPONSIVE ── */
@media (max-width: 1199px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .cities-grid { grid-template-columns: repeat(4, 1fr); }
  .stat-item { padding: 8px 24px; }
  .hero-search-fields { grid-template-columns: 1fr 1fr; }
  .hero-field-btn { grid-column: 1 / -1; }
  .hero-search-btn { width: 100%; justify-content: center; }
}

@media (max-width: 991px) {
  .hero-section { min-height: 500px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .cities-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { justify-content: flex-start; }
  .stat-divider { display: none; }
  .stat-item { padding: 10px 20px; min-width: 150px; }
  .how-image-collage { height: 300px; }
  .how-img-main { width: 75%; height: 270px; }
  .how-img-secondary { height: 140px; }
  .how-floating-badge { bottom: 50px; left: -10px; }
  .footer-top { padding: 50px 0 36px; }
}

@media (max-width: 767px) {
  .hero-section { min-height: 420px; }
  .hero-content { padding: 60px 0 40px; }
  .hero-search-card { border-radius: 12px; }
  .hero-search-fields { grid-template-columns: 1fr; }
  .hero-field-btn { grid-column: auto; }
  .categories-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cities-grid { grid-template-columns: repeat(2, 1fr); }
  .section-header { flex-direction: column; align-items: flex-start; }
  .cta-section { padding: 64px 0; }
  .stat-item { min-width: 140px; }
  .how-image-collage { display: none; }
}

@media (max-width: 575px) {
  .hero-search-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .hero-tab { padding: 10px 14px; font-size: 13px; }
  .stats-grid { grid-template-columns: 1fr 1fr; display: grid; }
  .stat-item { padding: 16px; min-width: unset; justify-content: flex-start; }
  .cities-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cta-trust-badges { flex-direction: column; align-items: center; }
  .footer-brand { text-align: center; }
  .footer-tagline { max-width: 100%; }
  .footer-social { justify-content: center; }
  .footer-bottom { text-align: center; }
  .footer-bottom .d-flex { flex-direction: column; align-items: center; }
}
