/* ═══════════════════════════════════════════════
   fixes-patch.css
   Load AFTER fixes.css:
   <link rel="stylesheet" href="fixes-patch.css">
   (or paste the contents at the bottom of fixes.css)
═══════════════════════════════════════════════ */

/* ── 1. Price & Year boxes: make them readable ── */

/* Give the two range filters more room in the grid */
#f-price,
#f-year {
  min-width: 0;
  width: 100%;
}

#f-price .ais-RangeInput-form,
#f-year .ais-RangeInput-form {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
}

#f-price .ais-RangeInput-label,
#f-year .ais-RangeInput-label {
  flex: 1 1 70px;
  min-width: 70px;
  margin: 0;
}

/* The actual number boxes */
#f-price input,
#f-year input,
#f-price .ais-RangeInput-input,
#f-year .ais-RangeInput-input {
  width: 100% !important;
  min-width: 70px !important;
  height: 40px !important;
  padding: 0 10px !important;
  font-size: 15px !important;
  line-height: 40px;
  box-sizing: border-box;
  color: #111 !important;
  background: #fff !important;
  border: 1px solid #cfd4da !important;
  border-radius: 6px;
}

#f-price input::placeholder,
#f-year input::placeholder {
  color: #6b7280 !important;
  opacity: 1;
  font-size: 14px;
}

#f-price .ais-RangeInput-separator,
#f-year .ais-RangeInput-separator {
  flex: 0 0 auto;
  padding: 0 2px;
  color: #6b7280;
}

#f-price .ais-RangeInput-submit,
#f-year .ais-RangeInput-submit {
  flex: 1 1 100%;
  height: 38px;
  font-size: 14px;
  cursor: pointer;
}

/* If they are sliders instead of inputs */
#f-price .ais-RangeSlider,
#f-year .ais-RangeSlider {
  padding: 18px 10px 8px;
}

/* Make sure the filter cells themselves don't squash them */
.filters-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

.filter-group.wide {
  grid-column: span 2;
}

@media (max-width: 600px) {
  .filters-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .filter-group.wide {
    grid-column: span 2;
  }
  #f-price .ais-RangeInput-label,
  #f-year .ais-RangeInput-label {
    flex: 1 1 80px;
  }
}


/* ── 2. Desktop: crop hero picture so the search bar shows on first load ── */

@media (min-width: 900px) {
  .hero .about-img {
    display: none !important;   /* hidden on desktop */
    width: 100%;
    max-width: 900px;
    height: 200px;            /* adjust: smaller = search bar higher */
    margin: 16px auto;
    overflow: hidden;
    border-radius: 12px;
  }

  .hero .about-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;        /* crops instead of squashing */
    object-position: center 60%;  /* which part of the car stays visible */
  }

  /* tighten hero spacing a little so search is above the fold */
  .hero h1 {
    margin-bottom: 8px;
  }
  .hero-tagline,
  .hero-sub {
    margin-bottom: 8px;
  }
}

/* Short laptop screens (e.g. 768px tall) */
@media (min-width: 900px) and (max-height: 800px) {
  .hero .about-img {
    height: 150px;
  }
}