/* The search page: the hero, the extra-filter drawer, and the result grid.
   Colours come from app.css; this sheet is layout only. */

/* Wider than the account pages, which app.css sizes for a form. A result grid
   wants three columns on a laptop, and 880px gives two. */
.content { max-width: 1180px; }

.hero { margin-top: 1.5rem; }
.hero h1 { font-size: 1.9rem; margin: 0 0 0.35rem; }
.hero .lede { color: var(--muted); margin: 0; max-width: 46rem; }

.filters .primary { align-items: end; }
.filters .more { margin-top: 0.75rem; border-top: 1px solid var(--line-2); padding-top: 0.75rem; }
.filters .more summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; }
.filters .more .row { margin-top: 0.75rem; }

.features {
  border: 0; padding: 0.75rem 0 0; margin: 0.5rem 0 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
}
.features legend { font-size: 0.8rem; color: var(--muted); padding: 0; }
.features label {
  display: inline-flex !important; align-items: center; gap: 0.4rem;
  font-size: 0.9rem; color: var(--ink);
}
.features input { width: auto; min-width: 0; margin: 0; }

/* auto-fill rather than auto-fit: with two results, auto-fit would stretch each
   card to half the page and make a thin market look like a broken one. */
.results {
  display: grid; gap: 1.25rem; margin-top: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card-link { color: inherit; display: block; height: 100%; }
.card-link:hover { text-decoration: none; }
.results .card {
  margin: 0; padding: 0; overflow: hidden; height: 100%;
  transition: box-shadow .15s, transform .15s;
}
.results .card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.thumb { aspect-ratio: 4 / 3; background: var(--col); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* No picture, or one whose host is down. A flat quiet block rather than a
   torn-image icon: most feeds carry photographs, and the ones that do not
   should look deliberate. */
.thumb.empty img { display: none; }

.card-body { padding: 0.85rem 1rem 1rem; }
.card-body h2 {
  font-size: 1rem; margin: 0.15rem 0 0.35rem; line-height: 1.35;
  /* Feed titles run to 300 characters. Two lines, then stop. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body .kind { font-size: 0.75rem; color: var(--faint); margin: 0;
                   text-transform: uppercase; letter-spacing: .02em; }
.card-body .place { color: var(--muted); font-size: 0.9rem; margin: 0; }
.card-body .facts { color: var(--muted); font-size: 0.9rem; margin: 0.35rem 0 0; }
.card-body .price { font-weight: 700; margin: 0.5rem 0 0; }

@media (max-width: 640px) {
  .filters .row { gap: 0.75rem; }
  .filters input, .filters select { min-width: 7rem; }
}
