/* ========================
   Layout & Containers
======================== */
#search {
    max-width: 1440px;
    margin: 24px auto;
  }
  
  .search-bar {
    margin-bottom: 12px;
  }
  
  .visually-hidden {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0;
    border: 0;
    height: 1px;
    width: 1px;
    overflow: hidden;
  }
  
  /* ========================
     Grid for results
  ======================== */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
  }
  
  /* ========================
     Property Card
  ======================== */
  .prop-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    text-decoration: none;
    color: inherit;
    transition: transform .08s ease, box-shadow .12s ease;
  }
  .prop-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
  }
  
  /* Card media */
  .prop-card__media {
    position: relative;
    background: #f3f4f6;
    aspect-ratio: 4 / 3;
  }
  .prop-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  /* Status chip */
  .prop-card__status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
    color: #fff;
    border-radius: 999px;
    background: #6b7280;
  }
  .status--active { background: #16a34a; }
  .status--pending { background: #f59e0b; }
  .status--coming-soon { background: #0ea5e9; }
  .status--canceled,
  .status--withdrawn,
  .status--closed { background: #ef4444; }
  
  /* Card body */
  .prop-card__body { padding: 12px; }
  .prop-card__price {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 4px;
  }
  .prop-card__meta {
    color: #4b5563;
    font-size: 14px;
    margin-bottom: 8px;
  }
  .prop-card__addr1 {
    font-weight: 600;
    font-size: 14px;
  }
  .prop-card__addr2 {
    color: #6b7280;
    font-size: 13px;
  }
  
  /* ========================
     Messages
  ======================== */
  .empty,
  .error {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
  }
  .error {
    background: #fef2f2;
    color: #991b1b;
  }
  
  /* ========================
     Search Bar
  ======================== */
  .searchbar {
    width: 100%;
    background: var(--white, #fff);
    border: 1px solid var(--l-grey, #ccc);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    padding: 0.75rem;
    position: relative;
  }
  .searchbar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  /* Address input */
  .searchbar-input {
    flex: 4 4 420px;
    min-width: 260px;
    height: 44px;
    border: 1px solid var(--l-grey, #bbb);
    background: var(--m-green, #f5f7f2);
    padding: 0 0.85rem;
    font-size: var(--lth-body-font-size, 1rem);
    outline: none;
  }
  .searchbar-input:focus {
    border-color: var(--d-blue, #1A4E9C);
    box-shadow: 0 0 0 3px rgba(26, 78, 156, .18);
    background: #fff;
  }
  
  /* Filter buttons */
  .searchbar-control { flex: 1 1 160px; }
  .searchbar-btn {
    height: 44px;
    padding: 0 0.9rem;
    border: 1px solid var(--l-grey, #bbb);
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    width: 100%;
  }
  .searchbar-btn:focus {
    box-shadow: 0 0 0 3px rgba(26, 156, 156, .18);
    border-color: var(--teal, #1A9C9C);
  }
  .searchbar-btn[aria-expanded="true"] {
    border-color: var(--teal, #1A9C9C);
    box-shadow: 0 0 0 3px rgba(26, 156, 156, .18);
  }
  
  /* Submit */
  .searchbar-submit {
    flex: 0 0 120px;
    height: 44px;
    padding: 0 1.1rem;
    border: none;
    background: var(--gold, #D3BE87);
    color: var(--d-grey, #2A292B);
    font-weight: 700;
    cursor: pointer;
  }
  .searchbar-submit:focus {
    box-shadow: 0 0 0 3px rgba(211, 190, 135, .35);
  }
  
  /* ========================
     Dropdown Panels
  ======================== */
  .dropdown { position: relative; }
  .dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(92vw, 420px);
    background: #fff;
    border: 1px solid var(--l-grey, #bbb);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
    padding: 0.85rem;
    z-index: 40;
  }
  .dropdown-panel[hidden] { display: none; }
  .dropdown-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--d-grey, #2A292B);
  }
  .dropdown-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
  }
  .dropdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  /* ========================
     Form Fields
  ======================== */
  .field { width: 100%; }
  .field-label {
    display: block;
    font-size: 0.85rem;
    color: var(--l-grey, #666);
    margin-bottom: 0.35rem;
  }
  .field-input,
  .field-select {
    width: 100%;
    height: 40px;
    border: 1px solid var(--l-grey, #bbb);
    background: var(--m-green, #f5f7f2);
    outline: none;
    padding: 0 0.7rem;
  }
  .field-select {
    background: #fff;
    padding: 0 0.5rem;
  }
  .field-input:focus,
  .field-select:focus {
    border-color: var(--d-blue, #1A4E9C);
    box-shadow: 0 0 0 3px rgba(26, 78, 156, .18);
    background: #fff;
  }
  
  /* Price range */
  .range-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 0.75rem;
    align-items: end;
    margin-bottom: 0.75rem;
  }
  .range-input { height: 40px; }
  
  /* ========================
     Checkboxes
  ======================== */
  .checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin-bottom: 0.75rem;
  }
  .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: var(--sans-font);
    font-size: 0.95rem;
  }
  .checkbox-input {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--d-grey);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
  }
  .checkbox-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
  }
  .checkbox-input:checked::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
  
  /* ========================
     Dropdown Actions
  ======================== */
  .dropdown-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .btn-primary {
    height: 40px;
    padding: 0 1rem;
    border: none;
    background: var(--teal, #1A9C9C);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
  }
  .btn-secondary {
    height: 40px;
    padding: 0 1rem;
    border: 1px solid var(--l-grey, #bbb);
    background: #fff;
    color: var(--d-grey, #2A292B);
    font-weight: 600;
    cursor: pointer;
  }
  
  /* ========================
     Responsiveness & Wrapping
  ======================== */
  
  /* Stage 1: wrap search button */
  @media (max-width: 1245px) {
    .searchbar-submit {
      flex-basis: 100%;
      order: 99;
    }
  }
  
  /* Stage 2: input full row */
  @media (max-width: 1117px) {
    .searchbar-input {
      flex-basis: 100%;
    }
  }
  
  /* Stage 3: stack all */
  @media (max-width: 689px) {
    .searchbar-row {
      flex-direction: column;
      align-items: stretch;
    }
    .searchbar-control,
    .searchbar-btn,
    .searchbar-submit,
    .searchbar-input {
      flex: 1 1 auto !important;
      width: 100% !important;
    }
    .dropdown-grid {
      grid-template-columns: 1fr;
    }
    .dropdown-panel {
      width: min(96vw, 520px);
    }
  }
  
  /* ========================
     Results container
  ======================== */
  #results-grid {
    margin-top: 2rem;
    min-height: 300px;
    padding: 1rem;
  }
  

  .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
  }
  
  .page-btn {
    cursor: pointer;
    background: var(--white);
    border: 1px solid var(--l-grey, #bbb);
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: var(--d-grey, #333);
    transition: background 0.2s;
  }
  
  .page-btn:hover:not(:disabled) {
    background: var(--m-green, #f5f7f2);
  }
  
  .page-btn:disabled,
  .page-btn--disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background: #f3f4f6;
    border-color: #ddd;
    color: #999;
  }
  
  
  .page-info {
    font-weight: 600;
    color: var(--d-grey, #2A292B);
  }
  