/* Map height bump on desktop */
@media (min-width:1024px){
  .custom-google-map{ height:350px !important; }
}

/* Grid + Cards */
.homes-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px}
.he-empty{display:none;margin-top:8px;color:#6b7280}

.home-card{
  border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.04);transition:box-shadow .2s,transform .2s;
  display:flex;flex-direction:column;
}
.home-card:hover{box-shadow:0 10px 20px rgba(0,0,0,.08);transform:translateY(-1px)}

.he-card-media{position:relative;aspect-ratio:16/9;background:#f3f4f6;overflow:hidden}
.he-card-media img{width:100%;height:100%;object-fit:cover;display:block}

/* Card body: flex column, actions pinned bottom */
.he-card-body{
  padding:10px 12px 12px;border-top:1px solid #e9ecef;
  display:flex;flex-direction:column;flex:1 1 auto;min-height:0;
}
.he-actions{margin-top:auto;display:flex;gap:8px;flex-wrap:nowrap;align-items:center}
.he-actions .fusion-button{flex:1 1 0;min-width:0;padding:6px 8px;font-size:12px;line-height:1.1;white-space:nowrap;text-align:center}

/* Text bits */
.he-price{font-size:18px;font-weight:700;margin:0 0 4px 0;line-height:1.2}
.he-plan{font-size:16px;font-weight:600;color:#374151}
.he-title{font-size:14px;line-height:1.2;margin:0 0 6px 0}
.he-specs{color:#374151;font-weight:500;margin:0 0 6px 0;line-height:1.2}
.he-sep{color:#9ca3af;margin:0 4px}
.he-notes{margin:6px 0;color:#374151;font-size:12px}

/* Badges and banners */
.he-banner{position:absolute;left:8px;right:8px;bottom:5px;padding:0 10px;border-radius:6px;font-size:16px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:6px;z-index:6}
.he-banner-tax{background:rgba(118,189,29,.85);color:#fff}
.he-info{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:999px;border:1px solid #d1d5db;background:#f3f4f6;color:#6b7280;font-family:"Times New Roman", Georgia, serif;font-size:11px;line-height:1}
.he-status-badge{
  position:absolute;left:50%;top:50%;
  transform:translate(-50%,-50%) rotate(-25deg);
  width:200%;
  background:#76bd1d;color:#fff;
  display:flex;align-items:center;justify-content:center;
  height:58px;font-size:18px;font-weight:800;letter-spacing:.3px;text-transform:uppercase;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
  z-index:7;pointer-events:none;opacity:.95;white-space:nowrap
}
@media (max-width:639.98px){ .he-status-badge{height:50px;font-size:16px} }

.he-chip{position:absolute;top:10px;left:10px;padding:6px 10px;border-radius:9999px;font-size:12px;font-weight:700;color:#fff;background:#76bd1d;z-index:5}
.he-chip-type{left:10px;right:auto}
.he-chip-stock{left:auto;right:10px;background:rgba(17,24,39,.6);font-weight:600;border-radius:6px;padding:4px 6px;font-size:11px;letter-spacing:.2px;z-index:8}

/* 5s flash highlight for "Show in list" */
@keyframes heFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(118,189,29,0), 0 10px 20px rgba(0,0,0,.08); }
  50%      { box-shadow: 0 0 0 4px rgba(118,189,29,.75), 0 10px 24px rgba(0,0,0,.12); }
}
.he-card-flash { animation: heFlash 1s ease-in-out 5; }

/* Filters — Row 1 order: Type → Sort → Price → Actions */
.he-filters-row1{display:flex;gap:10px;align-items:end;flex-wrap:wrap;justify-content:center;margin:30px 0 30px 0}
.he-filter{display:flex;flex-direction:column;align-items:center}
.he-filters-row1 select,.he-filters-row2 select{color:#1f2937}
.he-filters-row1 select option,.he-filters-row2 select option{color:#111827;background:#fff}

/* Price UI */
.he-price-grid{display:flex;gap:6px;align-items:center}
.he-price-sep{font-size:12px;color:#6b7280}
.he-input-wrap{position:relative}
.he-infix{position:absolute;left:8px;top:50%;transform:translateY(-50%);font-size:12px;color:#6b7280;pointer-events:none}
.he-infix-cur{position:absolute;left:36px;top:50%;transform:translateY(-50%);font-size:12px;color:#6b7280;pointer-events:none}
.he-input-wrap input{padding:6px 6px 6px 46px;font-size:13px;border:1px solid #e5e7eb;border-radius:6px;text-align:right;color:#1f2937}
.he-price-min-ui,.he-price-max-ui{padding-left:62px !important}

/* Row 2: More filters */
.he-filters-row2{display:none;gap:10px;align-items:end;flex-wrap:wrap;justify-content:center;margin:-10px 0px 40px}
.he-area-grid{display:flex;gap:6px;align-items:center}
.he-area-sep{font-size:12px;color:#6b7280}
.he-results-count{color:#6b7280;font-size:13px}

/* Reset + More filters stacked same width */
.he-filter-actions{display:flex;flex-direction:column;gap:8px;align-items:stretch}
.he-filter-actions .fusion-button{display:block;width:150px;padding:6px 8px;line-height:1.1;text-align:center}

/* Modal (always on top) */
.he-modal{position:fixed;inset:0;display:none;z-index:2147483000}
.he-modal__backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:2147483000}
.he-modal__dialog{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);max-width:560px;width:calc(100% - 32px);background:#fff;border-radius:10px;box-shadow:0 20px 50px rgba(0,0,0,.25);z-index:2147483001}
.he-modal__close{position:absolute;right:10px;top:10px;border:0;background:#f3f4f6;border-radius:6px;width:32px;height:32px;cursor:pointer;font-size:18px;line-height:1}
.he-modal__inner{padding:18px 18px 16px}
.he-modal__inner h3{margin:0 0 10px;font-size:18px}
.he-form{display:grid;gap:10px}
.he-form label{display:grid;gap:4px}
.he-form label span{font-size:12px;font-weight:600;color:#374151}
.he-form input,.he-form textarea{padding:8px;border:1px solid #e5e7eb;border-radius:6px}
.he-modal__actions{display:flex;gap:8px;justify-content:flex-end;align-items:center;margin-top:4px}
.he-modal__status{font-size:12px;color:#374151;min-height:18px}
html.he-modal-open, body.he-modal-open{overflow:hidden}

/* InfoWindow compact style */
.he-infowin{min-width:220px;max-width:260px}
.he-infowin__title{margin:0 0 6px 0;font-size:14px;line-height:1.25;font-weight:700}
.he-infowin__subtitle{font-weight:600;color:#374151}
.he-infowin__actions{margin:6px 0 0 0}

/* Mobile-only layout: Type + Sort side-by-side; Price full-width; Actions full-width */
@media (max-width: 768px) {
  .he-filters-row1{
    display:grid !important;
    grid-template-columns: 1fr 1fr;
    grid-column-gap:10px;
    grid-row-gap:10px;
    align-items:end;
    justify-content:stretch;
  }
  .he-filter--type { grid-column:1; }
  .he-filter--sort { grid-column:2; }
  .he-filter--price { grid-column:1 / -1; }
  .he-filter-actions { grid-column:1 / -1; }
  .he-filters-row1 .he-type-select,
  .he-filters-row1 .he-sort { width:100% !important; max-width:none !important; }
  .he-filters-row1 .he-input-wrap { width:100% !important; }
  .he-filters-row1 .he-input-wrap input { width:100% !important; }
  .he-filter-actions .fusion-button { width:100% !important; }
}


/* === Filters: unify input boxes with dropdowns (v1.0.4) === */
.he-filter select,
.he-filter .he-input-wrap input[type="text"],
.he-filter .he-input-wrap input[type="number"]{
  height:38px;
  padding:8px 10px;
  border:1px solid #e5e7eb;
  border-radius:6px;
  background:#fff;
  color:#1f2937;
  font-size:14px;
  line-height:1.2;
  width:100%;
  box-sizing:border-box;
}
/* Make numeric/text inputs align like selects, leaving space for prefixes */
.he-filter .he-input-wrap input[type="text"],
.he-filter .he-input-wrap input[type="number"]{
  padding-left:46px;
  text-align:left;
}
