/* Make search input and filter buttons the same height */
.miami-autocomplete-input,
.filter-button,
.miami-select {
  height: 44px !important;          /* fixed height for consistency */
  padding: 0 14px !important;       /* same horizontal padding */
  font-size: 16px !important;
  line-height: 1.2 !important;
  border-radius: 8px !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  display: flex;
  align-items: center;
}

/* Prevent search box text from sitting off-center */
.miami-autocomplete-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.miami-filters-bar{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
}
.miami-filters-actions{
  display:flex;
  align-items:flex-end;
}
.miami-btn-save {
  border-radius: 8px !important;   /* override pill radius */
  background: #0d0d0d !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  height: 44px !important;         /* match filter height */
  line-height: 1.2 !important;
  padding: 0 18px !important;      /* uniform padding */
  cursor: pointer;
  border: 1px solid #0d0d0d !important;
  transition: background .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.miami-btn-save:hover {
  background: #c7ac6f !important;
  border: 1px solid #c7ac6f !important;
}
button.miami-btn-save,
.miami-filters-bar .miami-btn-save,
.miami-btn-save {
  border-radius: 8px !important;
 margin-right:16px;    
    
}

/* Force 8px corners on the filters — higher specificity + important */
.miami-filters-bar .miami-filters--selects select.miami-select,
.miami-filters-bar .miami-filters--selects input.miami-input,
.miami-filters-bar .miami-filters--selects .miami-select,
.miami-filters-bar .miami-filters--selects .miami-input {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 8px !important;
}

/* If any residual buttons exist in the bar (e.g., Apply) */
.miami-filters-bar .apply-button,
.miami-filters-bar .filter-button {
  border-radius: 8px !important;
}

/* Mobile toggle buttons, if they picked up the pill style */
.miami-mobile-header .miami-toggle-btn {
  border-radius: 8px !important;
}

/* Prevent theme utility classes from re-rounding nested controls */
.miami-filters-bar *[class*="radius"],
.miami-filters-bar *[class*="rounded"] {
  border-radius: 8px !important;
}

/* --------------------------------------------------
   listings-grid-style.css (combined filters + grid styles)
   -------------------------------------------------- */
/* ==================== Filters Bar & Autocomplete ==================== */
.miami-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  padding: 0 10px 10px 10px;
  background: #fff;
    z-index:1001 !important;
    position:fixed !important;
    width:100%;
}

.miami-filters-bar input[type="text"] {
  padding: 10px;
  font-size: 14px;
  line-height: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
}
.filter-dropdown {
  position: relative;
}
.filter-button {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  line-height: 20px;
}
.filter-menu {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 16px;
  z-index: 9999;
  min-width: 220px;
  white-space: nowrap;
  box-sizing: border-box;
  text-align: left;
  direction: ltr;
}
.filter-dropdown.open .filter-menu {
  display: block;
}
.filter-menu label,
.filter-menu input[type="number"],
.filter-menu select {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}
.filter-menu input[type="checkbox"],
.filter-menu input[type="radio"] {
  margin-right: 8px;
}
.apply-button {
  background-color: #c7ac6f;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  padding: 10px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
}
.apply-button:hover {
  background-color: #0d0d0d;
}

/* Autocomplete wrapper & dropdown */
.miami-autocomplete-wrapper {
  position: relative;
  flex: 0 0 40%;
  min-width: 300px;
  max-width: 40%;
  overflow: visible;
  z-index: 1;
}
.miami-autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #fff;
  max-height: 350px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  isolation: isolate; /* Prevent z-index conflicts */
}
.miami-autocomplete-suggestions::-webkit-scrollbar {
  width: 10px;
}
.miami-autocomplete-suggestions::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 6px;
}
.miami-autocomplete-suggestions::-webkit-scrollbar-track {
  background: #eee;
}
.miami-autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f1f1f1;
  background-color: #fff;
}
.miami-autocomplete-item:hover {
  background: #f7f7f7;
}
.miami-autocomplete-heading {
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: #c7ac6f;
  border-bottom: 1px solid #e0e0e0;
  text-transform: uppercase;
  pointer-events: none;
}
.miami-autocomplete-item.no-match {
  color: #999;
  font-style: italic;
  text-align: center;
  padding: 12px;
  pointer-events: none;
}

/* ==================== Grid Header & Sort ==================== */
/* ── Grid header: title on its own line, controls below ── */
.miami-grid-header {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
  margin: 1.5rem 0 !important;
}
/* Title full-width */
.miami-grid-header > h1 {
  margin: 0 !important;
  width: 100% !important;
}

/* Controls row: count on left, sort label+select on right */
.miami-grid-header .miami-sort-container {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  margin-top:-20px;
}

/* Never wrap the count text */
.miami-sort-container .miami-listings-count {
  margin: 0 !important;
  white-space: nowrap !important;
  font-weight: normal !important;
}

/* Push “Sort” label and dropdown to the right */
.miami-sort-container label {
  margin: 0 10px 0 0 !important;
  margin-left: auto !important;
  font-weight: normal !important;
}

.miami-sort-container label::after {
  content: ":";
}

/* Tidy up the dropdown’s width */
.miami-sort-container select#miami-sort {
  flex: 0 0 160px !important;
  max-width: 160px !important;
  width: 100% !important;
}

/* ==================== Split Layout: Map + Grid ==================== */
@media (min-width: 769px) {
    
.miami-mobile-header {
  display: none;
}    
    
.miami-split-layout {
    display: block;
    overflow: visible;
  }

  /* 1) Pin the map between header and footer */
:root {
  --filters-height:  80px;   /* height of your filters bar */
  --footer-height:  130px;   /* height of your footer */
}

/* 1) FIXED LEFT MAP */
.miami-map-panel {
  position: fixed;                            /* pin it in place */
  top: 130px;
  left: 0;                                    /* flush to left edge */
  width: 50%;                                 /* half the viewport width */
  height: calc(100vh - var(--filters-height));/* fill to bottom of window */
  background: #e0e0e0;                        /* or transparent if you like */
  z-index: 10;     /* above the grid */
}
    

  /* 2) Push the grid out of the map’s left half */
  .miami-grid-panel {
margin-left: 50%;    /* carve out left half for map */
  height: 100%;
  overflow-y: auto;    /* only this side scrolls */
  -webkit-overflow-scrolling: touch; /* smooth on iOS */
  background: #fff;
  padding: 20px;
  box-sizing: border-box;
  z-index: 0;
  }

  /* 3) Restore normal page scrolling */
  body {
    overflow-y: auto;
  }
/* Top-left overlay with listing count */
#miami-map-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fff;
  color: #111;
  padding: 6px 12px;
  font-weight: bold;
  font-size: 14px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  z-index: 999;
}
}
/* ==================== Listings Grid & Cards ==================== */
.miami-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.miami-listing-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.miami-listing-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.miami-listing-card a {
  color: inherit;
  text-decoration: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.miami-listing-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.miami-listing-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.miami-listing-content h3 {
  font-size: 18px;
  margin: 0 0 8px 0;
  color: #333;
}
.miami-price {
  font-weight: bold;
  font-size: 16px;
  color: #0073aa;
  margin-bottom: 6px;
}
.miami-details {
  font-size: 14px;
  color: #666;
}

/* ==================== Pagination ==================== */
#miami-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 2rem 0;
}

.miami-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-weight: 500;
  color: #000;
  transition: background-color 0.2s;
}

.miami-page-link:hover {
  background-color: #f0f0f0;
}

.miami-page-current {
  background-color: #000;
  border-color: #000;
  color: #fff;
}
.miami-page-link.miami-page-current {
  background-color: #000;
  border-color: #000;
  color: #fff !important;
}

/* ==================== MOBILE FIX ==================== */
@media (max-width: 768px) {
  .miami-grid-header {
    display: none !important;
  }
  .miami-filters-bar {
    position: fixed;
    top: 58px;
    width: 100%;
    z-index: 1001;
    background: #fff;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #eee;
  }

  .miami-mobile-header {
    position: fixed;
    top: 180px;
    width: 100%;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: #fff;
    border-bottom: 1px solid #eee;
    height: auto;
    row-gap: 8px;
  }

  .miami-toggle-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    font-size: 14px;
  }

  .miami-toggle-btn.active {
    background: #000;
    color: #fff;
  }

  .miami-mobile-toggle {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
  }

  .miami-mobile-count {
    font-size: 14px;
    font-weight: bold;
  }

  .miami-mobile-sort select {
    font-size: 14px;
  }

  .miami-split-layout {
    position: relative;
    flex-direction: column;
    height: calc(100vh - 56px);
    overflow: hidden;
  }

  .miami-grid-panel,
  .miami-map-panel {
    position: absolute;
    top: 170px; /* below filters and header */
    left: 0;
    width: 100%;
    height: calc(100% - 140px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .miami-split-layout.show-grid .miami-grid-panel {
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    padding: 1rem;
    box-sizing: border-box;
  }

  .miami-split-layout.show-map .miami-map-panel {
    opacity: 1;
    pointer-events: auto;
    z-index: 0;
  }

  .miami-listings-grid {
    grid-template-columns: 1fr;
    padding-left: 12px;
    padding-right: 12px;
  }
}




/*=============================================
  1) Hide the built-in InfoWindow arrow
=============================================*/
/*—— Reset ALL InfoWindow wrapper spacing ——*/
.gm-style .gm-style-iw {
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important; /* allow our custom arrow to show */
}

.gm-style .gm-style-iw-s,
.gm-style .gm-style-iw-c,
.gm-style .gm-style-iw-d {
  margin: -17px 0 0 0 !important;
  padding: 0 !important;
  overflow: visible !important; /* allow our custom arrow to show */
}

/*———————————————————————————————————————
  hide Google’s default tip so it doesn’t double-up
———————————————————————————————————————*/
/* the little “sibling” DIV that actually draws the arrow */
.gm-style .gm-style-iw + div {
  display: none !important;
}

/* just in case, also target their pseudo-elements: */
.gm-style .gm-style-iw-t::after,
.gm-style .gm-style-iw-s::before {
  display: none !important;
}

/*—— Add YOUR single arrow at the bottom ——*/
.gm-style .gm-style-iw-d {
  position: relative !important;
}
.gm-style .gm-style-iw-d::after {
  content: "";
  position: absolute;
  bottom: -8px;       /* pulls the arrow just below the bubble */
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

/* hide the invisible close-button container */
.gm-style .gm-ui-hover-effect {
  display: none !important;
}