/* ==========================================================================
   Search-results pages (pet friendly, rent, buy, search)
   ========================================================================== */

/* ---- Page banner (smaller than the home hero) ---- */
.page-hero { position: relative; overflow: hidden; background: var(--cream); }
.page-hero__inner {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 32px;
    padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(32px, 5vw, 56px);
}
.page-hero__title { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-bottom: .35em; max-width: 18ch; }
.page-hero__lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin-bottom: 22px; }
@media (max-width: 820px) {
    .page-hero__inner { grid-template-columns: 1fr; gap: 8px; }
}

/* Rent / Buy banner: soft brand tint with the house mark and a small accent icon */
.page-hero--listings {
    background:
        radial-gradient(640px 340px at 88% 60%, rgba(203, 209, 235, .7), transparent 70%),
        radial-gradient(520px 300px at 8% 0%, rgba(240, 184, 169, .25), transparent 70%),
        var(--cream);
}
.page-hero--listings .eyebrow .icon { color: var(--peach-dark); }
.page-hero__art { position: relative; justify-self: end; width: min(100%, 300px); aspect-ratio: 1; }
.page-hero__mark { width: 100%; height: auto; opacity: .9; }
.page-hero__badge {
    position: absolute; right: -6px; bottom: 14%;
    display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
    background: #fff; color: var(--slate); box-shadow: var(--shadow-lg);
}
.page-hero__badge .icon { width: 40px; height: 40px; }
@media (max-width: 820px) {
    .page-hero__art { display: none; }
}

/* ---- Quick filters ("Popular with renters", "What does your pet need?") ---- */
.quick-filters { padding: 28px 0 8px; }
.quick-filters__title { font-size: 1.35rem; margin-bottom: 14px; }
.quick-filters__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 960px) { .quick-filters__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.need-chip {
    display: flex; align-items: center; gap: 12px; width: 100%; height: 100%; padding: 12px 14px;
    text-align: left; cursor: pointer; font: inherit; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.need-chip:hover { border-color: var(--pale); box-shadow: var(--shadow); }
.need-chip__icon {
    display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px;
    background: var(--pale-soft); color: var(--slate);
}
.need-chip__icon .icon { width: 24px; height: 24px; }
.need-chip__text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.need-chip__text strong { font-weight: 600; }
.need-chip__text span { font-size: .85rem; color: var(--muted); }
.need-chip__check { width: 20px; height: 20px; color: var(--slate); opacity: 0; transition: opacity .2s; }
.need-chip[aria-pressed="true"] { border-color: var(--slate); background: var(--pale-soft); }
.need-chip[aria-pressed="true"] .need-chip__icon { background: var(--slate); color: #fff; }
.need-chip[aria-pressed="true"] .need-chip__check { opacity: 1; }

@media (max-width: 520px) {
    /* Compact 2 x 2 on phones: icon above title, short text hidden */
    .quick-filters__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .need-chip { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; position: relative; }
    .need-chip__text span { display: none; }
    .need-chip__check { position: absolute; top: 10px; right: 10px; }
}

/* ---- Filters ---- */
.results { padding: 28px 0 72px; scroll-margin-top: calc(var(--header-h) + 12px); }

.filters {
    background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
    padding: 14px; margin-bottom: 16px;
}
.filters__toggle { display: none; }
.filters__main { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }

.field { display: grid; gap: 4px; flex: 1 1 170px; min-width: 0; }
.field--small { flex: 0 1 96px; }
.field--pair { flex: 1 1 230px; }
.field__label { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field__pair { display: flex; align-items: center; gap: 6px; }
.field__pair input { min-width: 0; }

.filters select, .filters input[type="number"], .filters input[type="search"] {
    width: 100%; height: 44px; padding: 0 12px;
    font: inherit; font-size: 1rem; color: var(--ink);
    background: var(--cream); border: 1px solid var(--line); border-radius: 10px;
}
.filters select:focus, .filters input:focus { outline: 2px solid var(--pale); border-color: var(--slate); }

/* Any / Rent / Buy */
.segmented { display: flex; margin: 0; padding: 4px; border: 0; background: var(--pale-soft); border-radius: 12px; align-self: flex-end; }
.segmented label { position: relative; }
.segmented input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.segmented span {
    display: block; padding: 10px 16px 8px; border-radius: 9px;
    font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
    transition: background-color .2s, color .2s;
}
.segmented input:checked + span { background: var(--slate); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--peach-dark); outline-offset: 1px; }

.filters__more-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px;
    font: 600 .9rem var(--font-body); color: var(--slate); cursor: pointer;
    background: transparent; border: 1.5px solid var(--pale); border-radius: 10px;
}
.filters__more-btn .icon { transition: transform .2s; }
.filters__more-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }

.filters__more { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.filters__more-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.features { margin: 0; padding: 0; border: 0; }
.features legend { margin-bottom: 8px; }
.features__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; }
.check { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--slate); flex: none; }

@media (max-width: 760px) {
    .filters { padding: 10px; }
    .filters__toggle { display: inline-flex; width: 100%; }
    .filters__body { display: none; margin-top: 12px; }
    .filters.is-open .filters__body { display: block; }
    .filters__main > * { flex: 1 1 100%; }
    .field--small { flex: 1 1 calc(50% - 6px); }
    .segmented label { flex: 1; text-align: center; }
}

/* ---- Active filter chips ---- */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.active-filters__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px 5px 14px;
    font: 600 .85rem var(--font-body); color: var(--slate); cursor: pointer;
    background: var(--pale-soft); border: 1px solid var(--pale); border-radius: 999px;
}
.chip:hover { background: var(--pale); }
.chip__x { font-size: 1.1rem; line-height: 1; margin-top: -2px; }

/* ---- Count + sort ---- */
.results__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 20px; }
.results__count { margin: 0; color: var(--muted); }
.results__count strong { color: var(--ink); font-weight: 600; }
.results__sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.results__sort select {
    height: 40px; padding: 0 10px; font: inherit; color: var(--ink);
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
}

/* ---- Pagination ---- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.pagination__btn {
    min-width: 42px; height: 42px; padding: 0 10px; border-radius: 10px; cursor: pointer;
    font: 600 1rem var(--font-body); color: var(--slate); background: #fff; border: 1px solid var(--line);
}
.pagination__btn:hover:not(:disabled) { border-color: var(--slate); }
.pagination__btn[aria-current="page"] { background: var(--slate); border-color: var(--slate); color: #fff; }
.pagination__btn:disabled:not([aria-current]) { opacity: .4; cursor: default; }
.pagination__gap { color: var(--muted); padding: 0 4px; }

/* ---- Nothing found ---- */
.empty-results {
    text-align: center; max-width: 560px; margin: 24px auto; padding: 40px 24px;
    border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-results__icon { width: 48px; height: 48px; color: var(--pale); fill: none; stroke: currentColor; margin-bottom: 8px; }
.empty-results h3 { font-size: 1.4rem; }
.empty-results p { color: var(--muted); }
.empty-results__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }

/* Badge with an icon (e.g. "Pets welcome") */
.badge .icon { width: 1.05em; height: 1.05em; margin-right: 4px; vertical-align: -.18em; }
