/* ===== Design tokens from Figma ===== */
:root {
  --neutral-10: #FFFFFF;
  --neutral-20: #F7F7F7;
  --neutral-40: #D8DCE0;
  --neutral-70: #717375;
  --neutral-80: #5D5F61;
  --neutral-100: #0A0A0A;
  --primary: #D42F4D;
  --font-medium: 500;
  --font-book: 400;
}

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

body {
  font-family: -apple-system, 'SF Pro Display', sans-serif;
  background: var(--neutral-20);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

/* Mobile container */
.app {
  width: 375px;
  min-height: 100vh;
  background: var(--neutral-10);
  position: relative;
  overflow-x: hidden;
}

/* ===== Status bar ===== */
.status-bar {
  height: 44px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}
.status-bar .time { font-size: 15px; font-weight: 600; }
.status-bar .icons { font-size: 13px; color: var(--neutral-100); }

/* ===== Search Bar ===== */
.search-bar {
  padding: 8px 24px;
  background: white;
  position: sticky;
  top: 44px;
  z-index: 99;
}
.search-bar-inner {
  background: white;
  border: 0.5px solid var(--neutral-40);
  border-radius: 43px;
  padding: 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 0 16px rgba(0,0,0,0.12);
  cursor: pointer;
}
.search-bar-inner:hover { box-shadow: 0 0 20px rgba(0,0,0,0.16); }
.search-left { display: flex; align-items: center; gap: 16px; }
.search-icon { font-size: 18px; }
.search-text-main { font-size: 14px; font-weight: var(--font-medium); color: var(--neutral-100); }
.search-text-sub { font-size: 12px; color: var(--neutral-70); }
.filter-btn {
  border: 0.5px solid var(--neutral-40);
  border-radius: 24px;
  padding: 10px;
  font-size: 16px;
  cursor: pointer;
  background: white;
}

/* ===== Category tabs ===== */
.categories {
  display: flex;
  gap: 0;
  padding: 0 24px;
  border-bottom: 2px solid var(--neutral-20);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  background: white;
  position: sticky;
  top: 110px;
  z-index: 98;
}
.categories::-webkit-scrollbar { display: none; }
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--neutral-70);
  font-size: 12px;
  font-weight: var(--font-medium);
  transition: all 0.2s;
}
.category-item.active {
  border-bottom-color: var(--neutral-100);
  color: var(--neutral-100);
}
.category-icon { font-size: 20px; }

/* ===== Listings ===== */
.listings {
  padding: 24px 24px 120px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.listing-card { cursor: pointer; }
.listing-card:hover .listing-photo { transform: scale(1.02); }

.listing-photo-wrap {
  width: 327px;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: var(--neutral-40);
}
.listing-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.listing-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}
.save-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.available-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: white;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--neutral-100);
}

.listing-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 14px;
  width: 327px;
}
.listing-title {
  font-size: 14px;
  font-weight: var(--font-medium);
  color: var(--neutral-100);
  line-height: 18px;
}
.listing-desc, .listing-type, .listing-avail {
  font-size: 14px;
  color: var(--neutral-70);
  line-height: 18px;
}
.listing-price {
  font-size: 14px;
  font-weight: var(--font-medium);
  color: var(--neutral-100);
  margin-top: 8px;
}
.listing-price span { font-weight: var(--font-book); }
.listing-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  color: var(--neutral-100);
  white-space: nowrap;
}
.star { font-size: 13px; }

/* ===== Map button ===== */
.map-btn {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--neutral-100);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: var(--font-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 50;
}

/* ===== Bottom Nav ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 375px;
  background: white;
  border-top: 1px solid var(--neutral-40);
  padding: 12px 24px 28px;
  display: flex;
  justify-content: space-between;
  z-index: 100;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex: 1;
  text-decoration: none;
}
.nav-icon { font-size: 22px; }
.nav-label {
  font-size: 12px;
  color: var(--neutral-70);
  font-weight: var(--font-medium);
}
.nav-item.active .nav-label { color: var(--primary); }
.nav-item.active .nav-icon { filter: none; }

/* ===== Search / Filter page ===== */
.page-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--neutral-40);
}
.back-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}
.page-title {
  font-size: 16px;
  font-weight: var(--font-medium);
  color: var(--neutral-100);
}

.filter-section {
  padding: 24px;
  border-bottom: 1px solid var(--neutral-20);
}
.filter-section-title {
  font-size: 16px;
  font-weight: var(--font-medium);
  color: var(--neutral-100);
  margin-bottom: 16px;
}

/* Month picker */
.month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.month-btn {
  border: 1.5px solid var(--neutral-40);
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  background: white;
  font-size: 13px;
  color: var(--neutral-70);
  transition: all 0.2s;
}
.month-btn:hover { border-color: var(--neutral-100); color: var(--neutral-100); }
.month-btn.selected {
  border-color: var(--neutral-100);
  background: var(--neutral-100);
  color: white;
}

/* Tenure options */
.tenure-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tenure-option {
  border: 1.5px solid var(--neutral-40);
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tenure-option:hover { border-color: var(--neutral-100); }
.tenure-option.selected { border-color: var(--neutral-100); background: #f9f9f9; }
.tenure-title { font-size: 15px; font-weight: var(--font-medium); color: var(--neutral-100); }
.tenure-desc { font-size: 13px; color: var(--neutral-70); margin-top: 2px; }
.tenure-check { font-size: 20px; }

/* Apply button */
.apply-btn {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 327px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 16px;
  font-size: 16px;
  font-weight: var(--font-medium);
  cursor: pointer;
}

/* ===== Listing detail ===== */
.detail-photos {
  width: 375px;
  height: 300px;
  background: var(--neutral-40);
  position: relative;
  overflow: hidden;
}
.detail-photo { width: 100%; height: 100%; object-fit: cover; }
.detail-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
}
.detail-back {
  position: absolute;
  top: 16px;
  left: 16px;
  background: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.detail-content { padding: 20px 24px 140px; }
.detail-title { font-size: 20px; font-weight: 600; color: var(--neutral-100); }
.detail-type { font-size: 15px; color: var(--neutral-70); margin-top: 4px; }
.detail-rating { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 14px; }
.detail-divider { border: none; border-top: 1px solid var(--neutral-40); margin: 20px 0; }
.detail-section-title { font-size: 16px; font-weight: var(--font-medium); color: var(--neutral-100); margin-bottom: 12px; }
.detail-price-row { display: flex; align-items: baseline; gap: 4px; }
.detail-price { font-size: 22px; font-weight: 700; color: var(--neutral-100); }
.detail-price-unit { font-size: 15px; color: var(--neutral-70); }

.amenity-list { display: flex; flex-wrap: wrap; gap: 8px; }
.amenity-tag {
  background: var(--neutral-20);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--neutral-80);
}

.enquire-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 375px;
  background: white;
  border-top: 1px solid var(--neutral-40);
  padding: 16px 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.enquire-price { font-size: 16px; font-weight: 700; }
.enquire-price span { font-size: 13px; font-weight: 400; color: var(--neutral-70); }
.enquire-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: var(--font-medium);
  cursor: pointer;
}

/* ===== Enquiry modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 24px;
  width: 375px;
  padding-bottom: 40px;
}
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.modal input, .modal textarea, .modal select {
  width: 100%;
  border: 1.5px solid var(--neutral-40);
  border-radius: 8px;
  padding: 14px;
  font-size: 15px;
  margin-bottom: 12px;
  outline: none;
  font-family: inherit;
}
.modal input:focus, .modal textarea:focus { border-color: var(--neutral-100); }
.modal textarea { height: 80px; resize: none; }
.modal-submit {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 16px;
  font-size: 16px;
  font-weight: var(--font-medium);
  cursor: pointer;
  margin-top: 4px;
}
