/* =========================================================
   KEYS99 - SEARCH.HTML STYLES
   Self-contained: no shared stylesheet. Safe to edit without
   affecting index.html or property-details.html.
========================================================= */

:root{
  --green:#006b5b;
  --green-dark:#004f45;
  --green-soft:#eaf7f3;

  --gold:#e1a400;
  --gold-dark:#bd8300;

  --ink:#092c3d;
  --muted:#6c7d86;
  --line:#e7eceb;

  --cream:#fff9ed;
  --white:#fff;

  --shadow:0 12px 35px rgba(8,45,56,.09);

  --radius:22px;
}

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

html{
  scroll-behavior:smooth;
}

body{
  font-family:"DM Sans",sans-serif;
  color:var(--ink);
  background:#fff;
  line-height:1.5;
  overflow-x:hidden;
}

button,
input,
select{
  font:inherit;
}

button{
  cursor:pointer;
}

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

.container{
  width:min(1200px,calc(100% - 48px));
  margin:auto;
}


/* =========================================================
   HEADER
========================================================= */

.header{
  height:78px;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid #edf1f0;

  display:flex;
  align-items:center;

  position:sticky;
  top:0;
  z-index:50;

  backdrop-filter:blur(14px);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
}


/* LOGO */

.logo{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:max-content;
}

.logo-link{
  display:flex;
  align-items:center;
}

.header-logo{
  width:185px;
  height:auto;
  max-height:54px;
  object-fit:contain;
  display:block;
}


/* NAVIGATION */

.nav-links{
  display:flex;
  align-items:center;
  gap:28px;

  font-size:14px;
  font-weight:500;
}

.nav-links a{
  padding:28px 0;
  position:relative;
}

.nav-links a.active,
.nav-links a:hover{
  color:var(--green);
}

.nav-links a.active:after{
  content:"";

  position:absolute;
  bottom:15px;
  left:0;
  right:0;

  height:2px;

  background:var(--green);
}


/* ACTIONS */

.nav-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.menu-btn{
  width:42px;
  height:42px;

  border-radius:12px;
  border:0;

  background:var(--green);
  color:#fff;

  display:none;
  place-items:center;

  font-size:20px;
}

.login-btn{
  border:1px solid #d7e0de;
  background:#fff;

  border-radius:25px;

  padding:10px 17px;

  font-size:13px;
  font-weight:600;

  color:var(--ink);
}

.mobile-menu{
  display:none;
}


/* =========================================================
   GENERAL
========================================================= */

section{
  padding:62px 0;
}

.eyebrow{
  color:var(--green);

  font-size:12px;
  font-weight:700;
  letter-spacing:3px;

  text-transform:uppercase;

  display:flex;
  align-items:center;

  gap:10px;

  margin-bottom:10px;
}

.eyebrow:before{
  content:"";

  width:28px;
  height:2px;

  background:var(--gold);
}

.property-state{
  padding:26px 0;
  text-align:center;
  color:var(--muted);
  font-size:13px;
}

.property-state.property-error{
  color:#b3403a;
}


/* =========================================================
   PAGE HERO / BREADCRUMB
========================================================= */

.page-hero{
  padding:38px 0 8px;
  background:linear-gradient(135deg,var(--green-soft),#fff);
}

.breadcrumb{
  font-size:12px;
  color:var(--muted);
  margin-bottom:14px;
}

.breadcrumb a{
  color:var(--green);
  font-weight:600;
}

.page-title{
  font-size:clamp(28px,4vw,38px);
  line-height:1.15;
  margin-bottom:8px;
}

.page-subtitle{
  font-size:14px;
  color:var(--muted);
  max-width:560px;
}


/* =========================================================
   FILTER PANEL
========================================================= */

.filter-panel{
  background:#fff;

  border:1px solid var(--line);

  border-radius:20px;

  box-shadow:0 10px 30px rgba(8,45,56,.06);

  padding:20px;

  display:grid;

  grid-template-columns:1fr auto;

  align-items:end;

  gap:14px;

  margin-bottom:8px;
}

.filter-buttons{
  display:flex;
  gap:10px;
}

.filter-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.filter-field-search{
  position:relative;
}


/* =========================================================
   SEARCH SUGGESTIONS DROPDOWN
========================================================= */

.suggest-dropdown{
  position:absolute;

  top:calc(100% + 6px);
  left:0;
  right:0;

  background:#fff;

  border:1px solid var(--line);

  border-radius:16px;

  box-shadow:var(--shadow);

  padding:8px;

  max-height:300px;
  overflow-y:auto;

  z-index:20;
}

.suggest-dropdown:not([hidden]){
  display:block;
}

.suggest-item{
  display:flex;
  align-items:center;

  gap:10px;

  padding:10px 12px;

  border-radius:10px;

  font-size:13px;
  color:var(--ink);

  cursor:pointer;
}

.suggest-item:hover,
.suggest-item.active{
  background:var(--green-soft);
  color:var(--green-dark);
}

.suggest-icon{
  color:var(--green);
  font-size:15px;
  width:18px;
  text-align:center;
}

.suggest-type{
  margin-left:auto;

  font-size:9px;
  font-weight:700;

  text-transform:uppercase;
  letter-spacing:.5px;

  color:var(--muted);
}

.filter-field label{
  font-size:10px;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.6px;
}

.filter-field input,
.filter-field select{
  border:1px solid var(--line);
  border-radius:10px;
  padding:11px 12px;
  font-size:13px;
  color:var(--ink);
  background:#fafcfb;
  outline:0;
}

.filter-field input:focus,
.filter-field select:focus{
  border-color:var(--green);
}

.btn-primary,
.btn-ghost{
  border-radius:10px;
  padding:11px 20px;
  font-weight:700;
  font-size:13px;
  white-space:nowrap;
  transition:.2s;
}

.btn-primary{
  background:var(--green);
  color:#fff;
  border:0;
}

.btn-primary:hover{
  background:var(--green-dark);
}

.btn-ghost{
  background:#fff;
  border:1px solid var(--line);
  color:var(--ink);
}

.btn-ghost:hover{
  border-color:var(--green);
  color:var(--green);
}


/* =========================================================
   FILTER TOGGLE BUTTON
========================================================= */

.filter-toggle-btn{
  height:48px;

  padding:0 20px;

  border:0;

  border-radius:10px;

  background:var(--green);

  color:#fff;

  font-weight:700;
  font-size:13px;

  display:flex;
  align-items:center;
  gap:8px;

  transition:.2s;
}

.filter-toggle-btn svg{
  width:17px;
  height:17px;
  color:#fff;
}

.filter-toggle-btn:hover,
.filter-toggle-btn.active{
  background:var(--green-dark);
}


/* =========================================================
   COLLAPSIBLE EXTRA FILTERS PANEL
   City, Locality, Developer, Status, price range, sort -
   revealed by the Filters toggle button.
========================================================= */

.filter-extra-panel{
  grid-column:1/-1;

  margin-top:14px;
  padding-top:16px;

  border-top:1px solid var(--line);

  gap:14px;
}

.filter-extra-panel:not([hidden]){
  display:grid;
  grid-template-columns:repeat(3,1fr);
}

.filter-extra-actions{
  grid-column:1/-1;

  flex-direction:row;
  align-items:center;
  justify-content:flex-end;

  gap:10px;
}


/* =========================================================
   RESULTS SUMMARY / ACTIVE FILTER CHIPS
========================================================= */

.results-summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;

  margin-bottom:20px;

  font-size:13px;
  color:var(--muted);
}

.results-summary strong{
  color:var(--ink);
  font-size:16px;
}

.active-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.active-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;

  background:var(--green-soft);
  color:var(--green-dark);

  font-size:11px;
  font-weight:700;

  padding:6px 6px 6px 12px;

  border-radius:20px;
}

.active-chip button{
  border:0;
  background:none;
  color:var(--green-dark);
  font-weight:700;
  font-size:14px;
  line-height:1;
  width:18px;
  height:18px;
  border-radius:50%;
  display:grid;
  place-items:center;
}

.active-chip button:hover{
  background:rgba(0,107,91,.15);
}


/* =========================================================
   PROPERTY RESULTS GRID
========================================================= */

#resultsGrid{
  width:100%;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:22px;
  align-items:stretch;
}


/* =========================================================
   PROPERTY CARDS
   (markup is generated identically to index.html /
   property-details.html, so these rules are duplicated here
   on purpose - keeping this page's card styling independent)
========================================================= */

#resultsGrid .property-card{
  width:100%;
  min-width:0;
  height:100%;
  display:flex;
  flex-direction:column;
}

#resultsGrid .property-card img{
  width:100%;
  max-width:100%;
  display:block;
}

.property-card{
  min-width:0;

  border:1px solid var(--line);

  border-radius:17px;

  overflow:hidden;

  background:#fff;

  box-shadow:0 5px 20px rgba(0,0,0,.03);

  transition:.3s;
}

.property-card:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow);
}

.property-image{
  height:155px;

  position:relative;

  overflow:hidden;
}

.property-image img{
  width:100%;
  height:100%;

  object-fit:cover;

  transition:.45s;
}

.property-card:hover .property-image img{
  transform:scale(1.05);
}

.badge{
  position:absolute;

  top:10px;
  left:10px;

  border-radius:8px;

  padding:4px 10px;

  color:#fff;

  background:var(--green);

  font-size:10px;
  font-weight:700;
}

.badge.rent{
  background:#1559b7;
}

.badge.new{
  background:var(--gold);
  color:#092c3d;
}

.fav{
  position:absolute;

  top:9px;
  right:9px;

  width:32px;
  height:32px;

  border:0;

  border-radius:50%;

  background:#fff;

  display:grid;
  place-items:center;

  font-size:17px;

  color:#163944;

  box-shadow:0 3px 10px rgba(0,0,0,.08);
}

.fav.active{
  color:#d53d49;
}

.property-body{
  padding:13px;
}

.property-body h3{
  font-size:14px;
  margin-bottom:5px;
}

.location,
.developer{
  font-size:10px;
  color:var(--muted);

  margin:4px 0;
}


/* BHK CONFIGURATION - vertically scrollable list. Each row
   (config / area / price / status) stays on one line; the
   list of rows scrolls vertically when a property has many
   configs, so title/location/developer stay put above it. */

.bhk-scroll{
  display:flex;
  flex-direction:column;

  max-height:132px;
  overflow-y:auto;

  gap:8px;

  margin-top:11px;
  padding-right:4px;

  scrollbar-width:thin;
}

.bhk-scroll::-webkit-scrollbar{
  width:5px;
}

.bhk-scroll::-webkit-scrollbar-thumb{
  background:var(--line);
  border-radius:10px;
}

.bhk-chip{
  flex:0 0 auto;

  display:flex;

  align-items:stretch;

  border:1px solid var(--line);

  border-radius:12px;

  overflow:hidden;

  background:#fafdfc;
}

.bhk-stat{
  flex:1;
  min-width:0;

  padding:8px 6px;

  text-align:center;

  border-right:1px solid var(--line);
}

.bhk-stat:last-child{
  border-right:0;
}

.bhk-stat strong{
  display:block;
  font-size:11px;
  color:var(--ink);
}

.bhk-stat span{
  display:block;

  font-size:8px;

  color:var(--muted);

  text-transform:uppercase;

  letter-spacing:.4px;

  margin-top:2px;
}

.bhk-stat.price-stat strong{
  color:var(--green);
}

.bhk-stat.status-stat.status-available strong{
  color:var(--green);
}

.bhk-stat.status-stat.status-limited strong{
  color:var(--gold-dark);
}

.bhk-stat.status-stat.status-sold strong{
  color:#b3403a;
}


/* =========================================================
   FOOTER
========================================================= */

footer{
  border-top:1px solid var(--line);

  margin-top:15px;

  padding:38px 0 18px;
}

.footer-grid{
  display:grid;

  grid-template-columns:1.4fr 1fr 1fr 1fr;

  gap:30px;
}

.footer-col h4{
  font-size:12px;
  margin-bottom:12px;
}

.footer-col a,
.footer-col p{
  display:block;

  color:var(--muted);

  font-size:10px;

  margin:6px 0;
}

.socials{
  display:flex;
  gap:8px;
}

.socials a{
  width:30px;
  height:30px;

  border:1px solid var(--line);

  border-radius:50%;

  display:grid;
  place-items:center;

  color:var(--green);
}

.copyright{
  border-top:1px solid var(--line);

  margin-top:25px;

  padding-top:14px;

  color:#87959b;

  font-size:9px;

  display:flex;

  justify-content:space-between;
}


/* =========================================================
   MOBILE BOTTOM NAVIGATION
========================================================= */

.bottom-nav{
  display:none;
}


/* =========================================================
   MOBILE
========================================================= */

@media(max-width:900px){

  .container{
    width:min(100% - 28px,700px);
  }

  .header{
    height:68px;
  }

  .nav-links,
  .login-btn{
    display:none;
  }

  .menu-btn{
    display:grid;
  }

  .header-logo{
    width:145px;
    max-height:44px;
  }

  .mobile-menu{
    position:fixed;

    top:68px;
    left:0;
    right:0;

    background:#fff;

    padding:18px 20px;

    border-bottom:1px solid var(--line);

    box-shadow:var(--shadow);

    z-index:49;
  }

  .mobile-menu.open{
    display:block;
  }

  .mobile-menu a{
    display:block;

    padding:12px;

    border-bottom:1px solid #f1f3f2;

    font-weight:600;
  }

  section{
    padding:43px 0;
  }

  .footer-grid{
    grid-template-columns:1fr 1fr;

    gap:25px;
  }

  .footer-grid .footer-brand{
    grid-column:1/-1;
  }

  .copyright{
    display:block;
    line-height:1.8;
  }

  body{
    padding-bottom:64px;
  }

  .bottom-nav{
    display:flex;

    position:fixed;

    bottom:0;
    left:0;
    right:0;

    height:60px;

    background:#fff;

    border-top:1px solid var(--line);

    box-shadow:0 -8px 24px rgba(8,45,56,.08);

    z-index:60;

    justify-content:space-around;

    align-items:center;
  }

  .bottom-nav button{
    flex:1;

    height:100%;

    border:0;

    background:none;

    display:flex;
    flex-direction:column;

    align-items:center;
    justify-content:center;

    gap:3px;

    color:#7ba89d;

    font-size:10px;
    font-weight:600;
  }

  .bottom-nav .bn-icon{
    width:42px;
    height:27px;

    display:grid;
    place-items:center;

    border-radius:14px;

    transition:background .25s, transform .25s;
  }

  .bottom-nav .bn-icon svg{
    width:21px;
    height:21px;
    display:block;
  }

  .bottom-nav .bn-label{
    transition:color .25s;
  }

  .bottom-nav button.bn-active{
    color:var(--green);
  }

  .bottom-nav button.bn-active .bn-icon{
    background:var(--green-soft);
    transform:translateY(-1px);
  }

  .filter-panel{
    grid-template-columns:1fr;
    padding:16px;
  }

  .filter-buttons{
    width:100%;
  }

  .filter-buttons .btn-primary,
  .filter-buttons .filter-toggle-btn{
    flex:1;

    justify-content:center;
  }

  .filter-extra-panel:not([hidden]){
    grid-template-columns:1fr 1fr;
  }

  .filter-extra-actions{
    justify-content:stretch;
  }

  .filter-extra-actions .btn-primary,
  .filter-extra-actions .btn-ghost{
    flex:1;

    text-align:center;
  }

}


@media(max-width:420px){

  .header-logo{
    width:135px;
  }

  .filter-panel{
    grid-template-columns:1fr;
  }

  .filter-extra-panel:not([hidden]){
    grid-template-columns:1fr;
  }

}


/* =========================================================
   RESULTS GRID - RESPONSIVE BREAKPOINTS
========================================================= */

@media(max-width:1199px){

  #resultsGrid{
    grid-template-columns:repeat(3,minmax(0,1fr));

    gap:20px;
  }

}

@media(max-width:899px){

  #resultsGrid{
    grid-template-columns:repeat(2,minmax(0,1fr));

    gap:18px;
  }

}

@media(max-width:600px){

  #resultsGrid{
    grid-template-columns:1fr;

    gap:16px;
  }

}

@media(max-width:380px){

  #resultsGrid{
    gap:14px;
  }

}
