/* ==========================================================================
   BHUMI-GO CORE DESIGN SYSTEM (BATCH 1)
   Exact Forest Green & Soft Sage Mobile App Proportions + 60fps GPU Motion
   ========================================================================== */

:root {
  /* Core Palette Extracted from Screenshot */
  --bg-outer: #E4ECE7;
  --bg-app: #F8FAF9;
  --bg-surface: #FFFFFF;
  --bg-sage-soft: #EBF3EE;
  --bg-sage-card: #E6F1EA;
  --bg-sage-hover: #DCECE2;

  /* Forest Green Brand Accents */
  --green-primary: #1B5E3A;
  --green-dark: #13452A;
  --green-medium: #2A7B4F;
  --green-tint: rgba(27, 94, 58, 0.10);

  /* Text Hierarchy */
  --text-primary: #13221B;
  --text-secondary: #56685E;
  --text-muted: #84958B;
  --text-inverse: #FFFFFF;

  /* Borders & Elevation */
  --border-subtle: #E2EBE5;
  --border-pill: #D6E3DC;
  --shadow-card: 0 4px 16px rgba(19, 34, 27, 0.05);
  --shadow-search: 0 2px 10px rgba(19, 34, 27, 0.04);
  --shadow-nav: 0 -4px 20px rgba(19, 34, 27, 0.05);

  /* Exact Sizing & Radii (Matches Screenshot Proportions) */
  --radius-pill: 9999px;
  --radius-card: 18px;
  --radius-banner: 20px;
  --radius-sheet: 24px;
  --nav-height: 66px;
  --header-height: 52px;

  /* 60fps Hardware-Accelerated Easing */
  --ease-60fps: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Touch Optimization */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-outer);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button, input {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
  user-select: none;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   APP VIEWPORT & SHELL (100% Native Mobile Proportions)
   ========================================================================== */
.app-viewport {
  width: 100%;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at top left, #DCE8E0, #EBF2EE);
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100dvh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(19, 34, 27, 0.14);
}

@media (max-width: 480px) {
  .app-shell {
    max-width: 100%;
    box-shadow: none;
  }
}

/* ==========================================================================
   TOP BRAND BAR & EXACT TOP-RIGHT '+' BUTTON
   ========================================================================== */
.top-brand-bar {
  height: var(--header-height);
  min-height: var(--header-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-app);
  z-index: 20;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.brand-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--green-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(27, 94, 58, 0.25);
}

.brand-text-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-name {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-badge-zero {
  font-size: 10px;
  font-weight: 700;
  color: var(--green-primary);
  background: var(--bg-sage-soft);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-pill);
}

.brand-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guest-signin-pill {
  height: 32px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-pill);
  color: var(--green-primary);
  font-size: 12.5px;
  font-weight: 700;
  transition: transform 0.18s var(--ease-60fps), background-color 0.18s ease;
}

.guest-signin-pill:active {
  transform: scale(0.95);
  background: var(--bg-sage-soft);
}

/* Exact Top-Right '+' Button */
.top-plus-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(27, 94, 58, 0.28);
  transition: transform 0.2s var(--ease-spring), background-color 0.2s ease;
  will-change: transform;
}

.top-plus-btn:active {
  transform: scale(0.9) rotate(90deg);
  background: var(--green-dark);
}

/* ==========================================================================
   MAIN SCROLLABLE CONTAINER & 60FPS VIEW TRANSITIONS
   ========================================================================== */
.app-main-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 16px calc(var(--nav-height) + 22px);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.app-main-scroll::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

.page-view {
  display: none;
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  will-change: transform, opacity;
}

.page-view.active {
  display: block;
  animation: pageEnter60fps 0.28s var(--ease-60fps) forwards;
}

@keyframes pageEnter60fps {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* ==========================================================================
   1. PILL SEARCH BAR (EXACT SCREENSHOT PROPORTION)
   ========================================================================== */
.search-bar-wrapper {
  margin-top: 2px;
  margin-bottom: 14px;
}

.pill-search-box {
  height: 46px;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-pill);
  border-radius: var(--radius-pill);
  padding: 0 12px 0 15px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: var(--shadow-search);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pill-search-box:focus-within {
  border-color: var(--green-primary);
  box-shadow: 0 4px 14px rgba(27, 94, 58, 0.10);
}

.search-icon-left {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.pill-search-input {
  flex: 1;
  width: 100%;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.pill-search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-clear-btn,
.search-mic-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.search-clear-btn:active,
.search-mic-btn:active {
  background: var(--bg-sage-soft);
  transform: scale(0.92);
}

/* ==========================================================================
   2. FIVE CIRCULAR SAGE-GREEN CATEGORY ICONS
   ========================================================================== */
.category-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  transition: transform 0.18s var(--ease-60fps);
}

.cat-item:active {
  transform: scale(0.94);
}

.cat-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-sage-soft);
  color: var(--green-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease-spring);
  will-change: transform;
}

.cat-item.active .cat-circle {
  background: var(--green-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(27, 94, 58, 0.22);
}

.cat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.cat-item.active .cat-label {
  color: var(--green-primary);
  font-weight: 700;
}

/* ==========================================================================
   3. ACTION PILLS ROW: RENT | BUY | SORT | FILTER
   ========================================================================== */
.action-pills-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 15px;
}

.mode-pills-left,
.utility-pills-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pill-btn {
  height: 33px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 0.16s var(--ease-60fps), background-color 0.2s ease, color 0.2s ease;
  will-change: transform;
}

.pill-btn:active {
  transform: scale(0.94);
}

.mode-pill {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.mode-pill.active {
  background: var(--green-primary);
  color: #FFFFFF;
  border-color: var(--green-primary);
  box-shadow: 0 3px 10px rgba(27, 94, 58, 0.20);
}

.utility-pill {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0 12px;
}

/* ==========================================================================
   4. SAGE-GREEN PROMO BANNER ("LIST YOUR PROPERTY FOR FREE")
   ========================================================================== */
.promo-banner-card {
  position: relative;
  background: linear-gradient(135deg, #E8F3EC 0%, #DCECE2 100%);
  border: 1px solid #D0E4D8;
  border-radius: var(--radius-banner);
  padding: 16px 14px 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
  overflow: hidden;
}

.promo-content {
  flex: 1;
  min-width: 0;
  z-index: 2;
}

.promo-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.promo-italic {
  font-style: italic;
  color: var(--green-primary);
}

.promo-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.35;
}

.promo-cta-btn {
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--green-primary);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(27, 94, 58, 0.24);
  transition: transform 0.18s var(--ease-60fps), background-color 0.2s ease;
}

.promo-cta-btn:active {
  transform: scale(0.95);
  background: var(--green-dark);
}

.promo-cta-btn.full-w {
  width: 100%;
  height: 42px;
  font-size: 13.5px;
}

.promo-illustration {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   5. SECTION HEADERS & FEATURED LISTINGS CAROUSEL (60FPS SNAP SCROLL)
   ========================================================================== */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.feed-header-spacing {
  margin-top: 18px;
}

.section-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.star-accent {
  color: var(--green-primary);
  font-size: 15px;
}

.section-heading {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.live-count-chip,
.zero-broker-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green-primary);
  background: var(--bg-sage-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.section-arrow-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.section-arrow-btn:active {
  background: var(--bg-sage-soft);
  transform: translate3d(3px, 0, 0);
}

/* Horizontal Scroll Carousel */
.featured-carousel-track {
  display: flex;
  gap: 13px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  -webkit-overflow-scrolling: touch;
}

.featured-carousel-track::-webkit-scrollbar {
  display: none;
}

/* Exact Screenshot Property Card */
.property-card {
  flex: 0 0 238px;
  scroll-snap-align: start;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease-60fps);
  will-change: transform;
}

.property-card:active {
  transform: scale(0.98);
}

.property-card.vertical-card {
  flex: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 13px;
}

.card-media-box {
  position: relative;
  width: 100%;
  height: 142px;
  background: var(--bg-sage-soft);
  overflow: hidden;
}

.vertical-card .card-media-box {
  height: 168px;
}

.card-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-60fps);
}

.badge-new-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(19, 34, 27, 0.72);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.badge-owner-pill {
  position: absolute;
  bottom: 9px;
  left: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--green-primary);
  font-size: 10px;
  font-weight: 800;
  padding: 2.5px 8px;
  border-radius: var(--radius-pill);
}

.card-heart-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(19, 34, 27, 0.36);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--ease-spring), background-color 0.2s ease;
}

.card-heart-btn.saved {
  background: #FFFFFF;
  color: #E11D48;
}

.card-heart-btn:active {
  transform: scale(1.22);
}

.card-body {
  padding: 11px 12px 12px;
}

.card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.card-price {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.card-price span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.card-status-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green-primary);
  background: var(--bg-sage-soft);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.card-title-line {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.card-location-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-specs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   6. NATIVE AD SLOT (ADMIN CONTROLLED IN BATCH 17)
   ========================================================================== */
.ad-slot-wrapper:empty {
  display: none;
}

.ad-native-card {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ==========================================================================
   7. SUB-PAGES & "MORE FEATURES" HUB GRID
   ========================================================================== */
.subpage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0 14px;
}

.subpage-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.subpage-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.subpage-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--green-primary);
  background: var(--bg-sage-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.features-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

.feature-hub-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s var(--ease-60fps), border-color 0.2s ease;
  will-change: transform;
}

.feature-hub-card:active {
  transform: scale(0.96);
  border-color: var(--green-primary);
}

.hub-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--bg-sage-soft);
  color: var(--green-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.hub-card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.hub-seo-pill {
  align-self: flex-start;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--green-primary);
  background: var(--bg-sage-soft);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.empty-state-card,
.profile-guest-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-card);
}

.empty-icon-circle,
.guest-avatar-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-sage-soft);
  color: var(--green-primary);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-card p,
.profile-guest-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  max-width: 280px;
  margin-bottom: 4px;
}

/* ==========================================================================
   8. BOTTOM NAVIGATION BAR (5 TABS WITH "MORE FEATURES" ON RIGHT)
   ========================================================================== */
.bottom-nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-nav);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 4px 4px env(safe-area-inset-bottom, 4px);
  z-index: 30;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  transition: color 0.18s ease, transform 0.16s var(--ease-60fps);
}

.nav-tab:active {
  transform: scale(0.92);
}

.nav-tab.active {
  color: var(--green-primary);
}

.nav-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
}

.nav-dot-badge {
  position: absolute;
  top: -3px;
  right: -7px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--green-primary);
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.nav-tab.active .nav-label {
  font-weight: 800;
}

/* ==========================================================================
   9. 60FPS BOTTOM SHEET & TOAST
   ========================================================================== */
.bottom-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 34, 27, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 40;
}

.bottom-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-surface);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  padding: 10px 18px 24px;
  transform: translate3d(0, 100%, 0);
  transition: transform 0.32s var(--ease-60fps);
  will-change: transform;
  z-index: 50;
  max-height: 82dvh;
  overflow-y: auto;
}

.bottom-sheet-panel.open {
  transform: translate3d(0, 0, 0);
}

.sheet-drag-handle {
  width: 38px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border-pill);
  margin: 0 auto 14px;
}

.app-toast {
  position: absolute;
  bottom: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translate3d(-50%, 16px, 0);
  background: #13221B;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 60;
  transition: opacity 0.22s ease, transform 0.24s var(--ease-60fps);
  will-change: transform, opacity;
}

.app-toast.show {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}
