:root {
  --bg: #f8f9fa;
  --card: #ffffff;
  --accent: #7ed321;
  --muted: #8a92a6;
  --brand: #314481;
  --gutter: 16px;
}

/* Hero */
.hero-section {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1500&q=80')
    center/cover no-repeat;
  filter: brightness(0.45);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  padding: 28px 0;
}
.hero-title {
  color: #fff;
  font-size: 1.9rem;
  margin: 0 0 6px;
  font-weight: 800;
}
.hero-subtitle {
  color: rgba(241, 245, 249, 0.95);
  margin: 0 0 14px;
  font-weight: 600;
}
.search-bar form {
  display: flex;
  gap: 12px;
  align-items: center;
}
.search-input-lg {
  padding: 14px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(49, 68, 129, 0.08) !important;
  font-size: 1rem !important;
  width: 100% !important;
  transition: all 0.3s;
}
.search-input-wrapper {
  flex: 1;
  position: relative;
}
.search-actions {
  display: flex;
  gap: 8px;
}
/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 0;
  overflow: visible;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.search-dropdown.show {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  overflow: visible;
}

.search-dropdown-content {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  min-height: 50px;
}

.search-dropdown-section {
  margin-bottom: 4px;
}

.search-dropdown-section:last-child {
  margin-bottom: 0;
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.search-dropdown-item:hover {
  background: #f8f9fa;
  text-decoration: none;
}

.search-dropdown-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.search-dropdown-item .fa-map-marker-alt {
  color: #ff6b6b;
}

.search-dropdown-item .fa-building {
  color: var(--brand);
}

.search-dropdown-item .fa-hard-hat {
  color: #7ed321;
}

.search-item-text {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
}

.search-item-tag {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.location-tag {
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
}

.project-tag {
  background: rgba(49, 68, 129, 0.1);
  color: var(--brand);
}

.developer-tag {
  background: rgba(126, 211, 33, 0.1);
  color: #5fa819;
}
.search-actions {
  display: flex;
  gap: 8px;
}
.btn-primary, .btn-primary:hover {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 700;
}

.btn-ghost, .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(49, 68, 129, 0.08);
  padding: 14px 12px;
  border-radius: 10px;
  color: #000;
}

.page-body {
  padding: 20px 0;
}
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--brand);
  margin-bottom: 14px;
}
.search-layout {
  display: flex;
  gap: 24px;
}
.filters {
  width: 280px;
  position: relative;
}
.filter-block {
  background: var(--card);
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(49, 68, 129, 0.04);
}

.reset-filters-btn {
  position: sticky;
  bottom: 20px;
  width: 100%;
  padding: 12px 16px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(49, 68, 129, 0.2);
  transition: all 0.3s;
  margin-top: 16px;
}

.reset-filters-btn:hover {
  background: #23315d;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(49, 68, 129, 0.3);
}

.reset-filters-btn i {
  font-size: 0.9rem;
}

.filter-block h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--brand);
}
.filter-block label {
  display: block;
  padding: 6px 0;
  color: #394b63;
}
.see-more {
  display: inline-block;
  margin-top: 8px;
  color: var(--brand);
  text-decoration: none;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  background: #f1f5f9;
  border: 1px solid rgba(49, 68, 129, 0.04);
  padding: 8px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  color: #000;
  line-height:normal;
  font-size: 14px;
}
.chip:hover {
  background: #e2e8f0;
  border-color: rgba(49, 68, 129, 0.12);
}
.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.price-range {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.price-slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
}
.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
}
.price-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  border: none;
}
.price-inputs {
  display: flex;
  gap: 8px;
  align-items: center;
}
.price-input {
  width: 120px;
  padding: 8px;
  border: 1px solid rgba(49, 68, 129, 0.08);
  border-radius: 6px;
  font-size: 0.9rem;
}
.unit-label {
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
}

.toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
}
.toggle-checkbox {
  width: 44px;
  height: 24px;
  -webkit-appearance: none;
  appearance: none;
  background: #ccc;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
}
.toggle-checkbox:checked {
  background: var(--accent);
}
.toggle-checkbox::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: left 0.3s;
}
.toggle-checkbox:checked::before {
  left: 22px;
}
.toggle-description {
  color: #394b63;
  font-size: 0.9rem;
  line-height: 1.4;
}

.results {
  flex: 1;
}
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.results-title {
  font-size: 1.4rem;
  margin: 0;
  color: var(--brand);
}

.filter-toggle-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-toggle-btn:hover {
  background: #23315d;
}

.filter-toggle-btn i {
  font-size: 0.9rem;
}

.filters-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.filters-overlay.overlay-visible {
  opacity: 1;
  pointer-events: auto;
}

.filters-close-btn {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
}

.filters-close-btn:hover {
  background: #f8f9fa;
  transform: scale(1.1);
}

.filters-close-btn i {
  color: #333;
  font-size: 1rem;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  margin-left: 8px;
}
.results-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.results-controls select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(49, 68, 129, 0.08);
}

.listings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Listing Card Styles - from Single project */
.listing-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.listing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-image {
  position: relative;
  height: 200px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  gap: 0.3rem;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.2;
}

.badge.ready {
  background: #7ed321;
  color: white;
}

.card-image-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.image-action-btn {
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #666;
  transition: all 0.3s;
  text-decoration: none;
  cursor: pointer;
}

.image-action-btn:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.image-action-btn.favorite-btn {
  color: #ff6b6b;
}

.image-action-btn.favorite-btn:hover {
  background: #ff6b6b;
  color: white;
}

.image-action-btn.compare-btn:hover {
  background: #4ecdc4;
  color: white;
}

.image-action-btn.share-btn {
  color: #2d8cff;
}

.image-action-btn.share-btn:hover {
  background: #2d8cff;
  color: white;
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-content h3 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #333;
}

.card-price {
  font-size: 1.1rem;
  font-weight: bold;
  color: #7ed321;
  margin-bottom: 1rem;
}

.card-details {
  margin-bottom: 1rem;
}

.card-details span {
  display: block;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.card-specs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-specs span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: #666;
}

.card-specs i {
  color: #7ed321;
}

.card-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.card-developer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.developer-logo-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e0e0e0;
}

.developer-logo-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.developer-name-small {
  font-size: 0.7rem;
  font-weight: 600;
  color: #666;
  text-align: center;
  white-space: nowrap;
}

.card-buttons-row {
  display: flex;
  gap: 0.3rem;
  flex: 1;
}

.card-buttons-row .contact-btn {
  flex: 1;
  padding: 0.7rem 0.6rem;
  border: none;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  text-decoration: none;
}

.card-buttons-row .contact-btn.call-btn {
  background: #314481;
  color: white;
}

.card-buttons-row .contact-btn.call-btn:hover {
  background: #23315d;
  transform: translateY(-1px);
}

.card-buttons-row .contact-btn.whatsapp-btn {
  background: #25d366;
  color: white;
}

.card-buttons-row .contact-btn.whatsapp-btn:hover {
  background: #1da851;
  transform: translateY(-1px);
}

.card-buttons-row .contact-btn.zoom-btn {
  background: #2d8cff;
  color: white;
}

.card-buttons-row .contact-btn.zoom-btn:hover {
  background: #1a75ff;
  transform: translateY(-1px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.page-btn:hover {
  background: #f8f9fa;
  text-decoration: none;
}

.page-btn.active {
  background: #7ed321;
  color: white;
  border-color: #7ed321;
}

.page-dots {
  color: #666;
  margin: 0 0.5rem;
}

/* responsive */
@media (max-width: 900px) {
  :root {
    --gutter: 12px;
  }

  body {
    padding: 0;
  }

  .container {
    padding: 0 16px;
  }

  .hero-section {
    margin: 0 -16px;
  }

  .breadcrumb-container .container {
    padding: 0 16px;
  }

  .page-body {
    padding: 12px 16px;
  }
  .search-layout {
    flex-direction: column;
  }

  /* Mobile filter modal */
  .filter-toggle-btn {
    display: flex;
  }

  .filters-overlay {
    display: block;
  }

  .filters {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 1000;
    overflow-y: auto;
    padding: 0 16px 80px;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 16px;
  }

  .filters-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
  }

  .filters-close-btn {
    display: flex;
  }
  .filters.filters-open {
    left: 0;
  }

  .reset-filters-btn {
    position: fixed;
    bottom: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    border-radius: 0;
    margin: 0;
    z-index: 1001;
    transition: left 0.3s ease;
  }

  .filters.filters-open ~ * .reset-filters-btn,
  .filters-open .reset-filters-btn {
    left: 0;
  }

  .results-header {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
  }
  
  .filter-toggle-btn {
    grid-column: 1;
    grid-row: 1;
  }
  
  .results-controls {
    grid-column: 2;
    grid-row: 1;
  }
  
  .results-controls select {
    width: 100%;
  }
  
  .results-title {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 1.1rem;
  }  .listings {
    grid-template-columns: 1fr;
  }

  /* Hero responsive */
  .hero-section {
    min-height: 180px;
    margin: 0 -16px;
  }

  .hero-content {
    text-align: center;
    padding: 20px 30px;
  }
  .hero-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 16px;
  }

  .search-bar {
    flex-direction: column;
    gap: 10px;
  }

  .search-input-lg {
    width: 100%;
  }

  .search-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    padding: 12px;
  }

  .card-buttons-row .contact-btn {
    padding: 0.8rem 0.6rem;
    min-width: 50px;
  }
  .card-buttons-row .contact-btn .btn-text {
    display: none;
  }
  .card-buttons-row .contact-btn i {
    font-size: 1.2rem;
  }
}
