/* ==========================================================================
   OFFLINE REAL ESTATE CLASSIFIEDS PROP STYLES
   100% Self-Contained, No External CDN Dependencies
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #0d9488;
  --secondary-hover: #0f766e;
  --secondary-light: #f0fdfa;
  --amber: #f59e0b;
  --coral: #e11d48;
  --text-title: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

/* 4-Tile Architectural Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 3px;
}

.logo-tile {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.logo-tile.blue { background-color: #2563eb; }
.logo-tile.amber { background-color: #f59e0b; }
.logo-tile.emerald { background-color: #0d9488; }
.logo-tile.coral { background-color: #e11d48; }

.brand-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: -0.2px;
  white-space: nowrap;
}

/* Search Bar */
.search-form {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 620px;
  margin: 0 16px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  outline: none;
  font-size: 14px;
  color: var(--text-title);
  background: #ffffff;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--primary);
}

.search-btn {
  height: 42px;
  padding: 0 22px;
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: background-color 0.15s;
  flex-shrink: 0;
}

.search-btn:hover {
  background-color: var(--primary-hover);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.action-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-body);
  font-weight: 600;
  font-size: 13px;
  transition: color 0.15s;
}

.action-link:hover {
  color: var(--primary);
}

.action-link .badge {
  background-color: var(--primary);
  color: #ffffff;
  font-size: 10px;
  border-radius: 10px;
  padding: 1px 6px;
  font-weight: 700;
}

.btn-add-listing {
  background-color: var(--secondary);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  transition: background-color 0.15s;
  white-space: nowrap;
}

.btn-add-listing:hover {
  background-color: var(--secondary-hover);
}

.mobile-profile-btn {
  display: none;
  font-size: 18px;
  color: var(--text-body);
  padding: 6px;
}

/* ==========================================================================
   CATEGORY SUB-NAV
   ========================================================================== */
.category-nav {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-list {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 46px;
  list-style: none;
}

.category-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color 0.15s;
  display: inline-block;
}

.category-link:hover {
  color: var(--text-title);
}

.category-link.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

/* ==========================================================================
   CATALOG FILTERS BAR
   ========================================================================== */
.filters-bar {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin: 24px 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Room Buttons - Centered text & wide Studio button */
.room-btn-group {
  display: flex;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
}

.room-btn {
  height: 36px;
  min-width: 40px;
  padding: 0 12px;
  border-right: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background-color 0.15s, color 0.15s;
}

.room-btn:last-child {
  border-right: none;
}

.room-btn.room-studio {
  min-width: 78px;
  padding: 0 14px;
}

.room-btn:hover {
  background-color: #f1f5f9;
}

.room-btn.active {
  background-color: var(--primary);
  color: #ffffff;
}

/* Price Range Inputs */
.price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-input {
  width: 110px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-title);
  outline: none;
}

.price-input:focus {
  border-color: var(--primary);
}

.price-divider {
  color: var(--text-muted);
}

/* Dropdown Filters */
.filter-select {
  height: 36px;
  padding: 0 28px 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  cursor: pointer;
  outline: none;
}

.filter-select:focus {
  border-color: var(--primary);
}

/* Mobile Quick Filter Chips */
.quick-chips-row {
  display: none;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  white-space: nowrap;
}

.quick-chips-row::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text-body);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.chip-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   CATALOG LISTING GRID
   ========================================================================== */
.catalog-head {
  margin-bottom: 18px;
}

.catalog-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.catalog-count {
  font-size: 13px;
  color: var(--text-muted);
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

/* Listing Card */
.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  position: relative;
}

.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.listing-card.featured {
  border-color: var(--primary);
  border-width: 1.5px;
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #e2e8f0;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.listing-card:hover .card-img {
  transform: scale(1.03);
}

.card-badge-top {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--secondary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
}

.card-counter {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  z-index: 2;
}

.card-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
  z-index: 2;
  transition: transform 0.15s, background-color 0.15s;
}

.card-fav-btn:hover {
  transform: scale(1.1);
  background: #ffffff;
}

.card-fav-btn.is-active {
  background: #ef4444;
  color: #ffffff;
}

.card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 2px;
}

.card-subprice {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title:hover {
  text-decoration: underline;
}

.card-address {
  font-size: 13px;
  color: var(--text-body);
  margin-bottom: 6px;
}

.card-metro {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 10px;
}

.metro-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  flex-shrink: 0;
}

.card-footer {
  margin-top: auto;
  font-size: 11px;
  color: var(--text-light);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 50px;
}

.page-btn {
  height: 38px;
  min-width: 38px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-body);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   DETAIL LISTING PAGE
   ========================================================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 0 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs-sep {
  color: #cbd5e1;
}

.listing-header {
  margin-bottom: 18px;
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.detail-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* Detail Main Layout: Left Content & Right Sticky Panel */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  margin-bottom: 60px;
  align-items: start;
}

.detail-main {
  min-width: 0;
}

/* GALLERY */
.gallery-container {
  margin-bottom: 20px;
  position: relative;
}

.gallery-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: #0f172a;
  box-shadow: var(--shadow-sm);
  user-select: none;
  touch-action: pan-y;
}

.gallery-slider {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-title);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 5;
  transition: background-color 0.15s, transform 0.15s;
}

.gallery-arrow:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.05);
}

.gallery-arrow.prev { left: 16px; }
.gallery-arrow.next { right: 16px; }

.gallery-counter {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  z-index: 5;
}

/* Gallery Thumbnails */
.thumbs-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.thumb-item {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, opacity 0.15s;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-item:hover {
  opacity: 0.9;
}

.thumb-item.active {
  border-color: var(--primary);
}

/* Key Badges Row */
.badges-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.spec-badge {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  padding: 0 6px;
  white-space: nowrap;
}

/* Detail Cards */
.detail-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.detail-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 18px;
}

/* Specs Grid (2 columns) */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  row-gap: 14px;
  column-gap: 32px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed #f1f5f9;
  padding-bottom: 6px;
}

.spec-name {
  color: var(--text-muted);
  font-size: 13px;
}

.spec-value {
  color: var(--text-title);
  font-weight: 600;
  font-size: 13px;
  text-align: right;
  max-width: 60%;
}

/* Description Text */
.desc-text p {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}

.desc-text p:last-child {
  margin-bottom: 0;
}

/* Location Card (Clean Text Only) */
.loc-address {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.loc-metro {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.loc-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   RIGHT STICKY SIDEBAR
   ========================================================================== */
.detail-sidebar {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.price-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.price-main {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 4px;
}

.price-sub {
  font-size: 13px;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 2px;
}

.price-bills {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.btn-reveal-phone {
  background-color: var(--secondary);
  color: #ffffff;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s;
  width: 100%;
}

.btn-reveal-phone:hover {
  background-color: var(--secondary-hover);
}

.btn-message {
  background-color: var(--primary);
  color: #ffffff;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s;
  width: 100%;
}

.btn-message:hover {
  background-color: var(--primary-hover);
}

.quick-tools {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

.quick-tool-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s;
}

.quick-tool-btn:hover {
  color: var(--text-title);
}

.quick-tool-btn.active {
  color: #ef4444;
}

/* Seller Card */
.seller-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.seller-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.seller-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.seller-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 2px;
}

.seller-role {
  font-size: 12px;
  color: var(--secondary);
  font-weight: 600;
}

.seller-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 8px;
}

.seller-reviews {
  color: var(--text-muted);
  font-weight: 400;
}

.seller-history {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Safety Card */
.safety-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.safety-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 8px;
}

.safety-list {
  list-style: none;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.safety-list li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 4px;
}

.safety-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 40px 0 30px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-disclaimer {
  font-size: 11px;
  color: #94a3b8;
}

/* ==========================================================================
   MOBILE BOTTOM BARS
   ========================================================================== */
/* Bottom Nav Tabbar for Mobile Catalog */
.mobile-nav-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
}

.tabbar-item.active {
  color: var(--primary);
}

.tabbar-icon {
  font-size: 18px;
}

/* Sticky Action Bar for Mobile Listing Detail */
.mobile-sticky-actionbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)) 16px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  z-index: 100;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.08);
  gap: 12px;
}

.mobile-action-btn {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
}

.mobile-action-btn.btn-call {
  background-color: var(--secondary);
}

.mobile-action-btn.btn-chat {
  background-color: var(--primary);
}

.mobile-search-section,
.mobile-price-section {
  display: none;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablet (768px - 1199px) */
@media (max-width: 1199px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-sidebar {
    position: static;
  }

  .badges-row {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); /* Clearance for fixed tabbar / action bar */
  }

  .container {
    padding: 0 14px;
  }

  .header-inner {
    height: 56px;
  }

  .search-form,
  .header-actions {
    display: none;
  }

  .mobile-profile-btn {
    display: block;
  }

  /* Inline mobile search box */
  .mobile-search-section {
    display: block;
    padding: 10px 0 4px;
  }

  .mobile-search-box {
    display: flex;
    align-items: center;
    height: 40px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 0 12px;
    gap: 8px;
  }

  .mobile-search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
  }

  .filters-bar {
    display: none; /* Desktop filter bar hidden on mobile */
  }

  .quick-chips-row {
    display: flex; /* Mobile quick chips shown */
  }

  .listings-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .detail-title {
    font-size: 22px;
  }

  .thumbs-row {
    display: none; /* Swiping is primary on mobile */
  }

  .badges-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }

  .price-card {
    display: none; /* Sticky bottom action bar replaces right card on mobile */
  }

  .mobile-price-section {
    display: block !important;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin: 16px 0 20px 0;
    box-shadow: var(--shadow-sm);
  }

  .mobile-price-section .price-main {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-title);
    line-height: 1.2;
    margin-bottom: 4px;
  }

  .mobile-price-section .price-sub {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 3px;
  }

  .mobile-price-section .price-bills {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .mobile-nav-tabbar {
    display: flex;
  }

  .mobile-sticky-actionbar {
    display: flex;
  }
}
