/* 24anuncios listing: photo-first cards, useful filters, mobile filter drawer. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.listing-page-header { padding-bottom: 18px !important; }
.listing-intro { margin-bottom: 18px; }
.listing-intro h1 { font-weight: 750 !important; letter-spacing: -.8px; }
.lst-pills { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: none; }
.lst-pills::-webkit-scrollbar { display: none; }
.lst-pills .subcat-pill { flex: 0 0 auto; white-space: nowrap; }
.lst-body { padding-top: 24px; padding-bottom: 56px; }

/* Filters */
.lst-filters { background: #fff; border: 1px solid #e7ded5; border-radius: 16px; position: sticky; top: 92px; }
.lst-filters-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid #efe7df; }
.lst-filters-head h2 { font-size: 17px; font-weight: 750; margin: 0; color: var(--market-ink); }
.lst-filters-close { display: none; border: 0; background: none; font-size: 22px; color: var(--market-ink); padding: 4px; }
.lst-filters-body { padding: 4px 18px; }
.lst-filter { border: 0; padding: 14px 0; margin: 0; border-bottom: 1px solid #f1eae3; }
.lst-filter:last-child { border-bottom: 0; }
.lst-filter legend { font-size: 14px; font-weight: 700; color: var(--market-ink); margin-bottom: 10px; padding: 0; width: auto; border: 0; }
.lst-custom:empty { display: none; }
.lst-price { display: flex; align-items: center; gap: 8px; }
.lst-price input { flex: 1; min-width: 0; height: 42px !important; margin: 0 !important; padding: 0 12px !important; border: 1px solid #ddd3c9 !important; border-radius: 10px !important; font-size: 15px; box-shadow: none !important; }
.lst-price span { color: var(--market-muted); }
.lst-radio, .lst-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--market-ink); margin: 0 0 8px; cursor: pointer; font-weight: 500; }
.lst-radio input, .lst-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--market-accent); flex-shrink: 0; }
.lst-segment { display: flex; background: #f4efe9; border-radius: 10px; padding: 3px; }
.lst-segment label { flex: 1; margin: 0; cursor: pointer; }
.lst-segment input { position: absolute; opacity: 0; pointer-events: none; }
.lst-segment span { display: block; text-align: center; padding: 8px 4px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--market-muted); }
.lst-segment input:checked + span { background: #fff; color: var(--market-ink); box-shadow: 0 1px 3px #302b2b1f; }
.lst-segment input:focus-visible + span { outline: 3px solid #d99a18; }
.lst-filters-foot { padding: 14px 18px 18px; }
.lst-apply { width: 100%; min-height: 46px; border: 0; border-radius: 12px; background: var(--market-accent); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.lst-apply:hover { background: #9e2f25; }
.lst-backdrop { display: none; }
/* Legacy filter widgets from custom fields */
.lst-custom .fsv2-widget { padding: 0; margin: 0 0 12px; border: 0; box-shadow: none; background: none; }
.lst-custom .fsv2-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }

/* Toolbar */
.lst-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.lst-count { font-size: 15px; color: var(--market-muted); }
.lst-count strong { font-size: 20px; color: var(--market-ink); }
.lst-tools { display: flex; align-items: center; gap: 8px; }
.lst-filters-open { display: none; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid #ddd3c9; border-radius: 20px; background: #fff; font-weight: 600; font-size: 14px; color: var(--market-ink); }
.lst-filters-open span { background: var(--market-accent); color: #fff; border-radius: 10px; min-width: 20px; height: 20px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.lst-sort { margin: 0; }
.lst-sort select { height: 40px; margin: 0; padding: 0 34px 0 14px; border: 1px solid #ddd3c9; border-radius: 20px; background-color: #fff; font-size: 14px; font-weight: 600; color: var(--market-ink); box-shadow: none; cursor: pointer; }
.lst-view { display: flex; border: 1px solid #ddd3c9; border-radius: 20px; overflow: hidden; background: #fff; }
.lst-view .lvt-btn { width: 40px; height: 38px; border: 0; background: #fff; color: var(--market-muted); font-size: 16px; display: flex; align-items: center; justify-content: center; }
.lst-view .lvt-btn.active { background: var(--market-ink); color: #fff; }
.lst-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.lst-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--market-ink); color: #fff !important; font-size: 13px; font-weight: 600; }
.lst-chip i { font-size: 13px; opacity: .8; }
.lst-chip-clear { font-size: 13px; font-weight: 600; color: var(--market-accent); text-decoration: underline; }
.lst-alert { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid #ecc9c2; background: #fdf3ef; color: var(--market-accent) !important; font-size: 13px; font-weight: 650; }

/* Cards: grid (default) */
.lst-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lst-grid > :not(.lc) { grid-column: 1 / -1; }
.lc { position: relative; background: #fff; border: 1px solid #e7ded5; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s, border-color .2s; }
.lc:hover { box-shadow: 0 10px 28px #302b2b14; transform: translateY(-2px); border-color: #d9cdc1; }
.lc--highlight { background: #fffaf0; border-color: #f1d9a8; }
.lc-media { position: relative; aspect-ratio: 4 / 3; background: #f1ebe4; }
.lc-img { display: block; width: 100%; height: 100%; }
.lc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.lc-badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: .3px; }
.lc-badge--feat { background: #e08a00; }
.lc-badge--urg { background: #6c47d8; }
.lc-badge--new { background: #2f855a; }
.lc-pics { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; background: #000000a6; color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.lc .lc-fav.fav-icon { position: absolute; top: 10px; right: 10px; left: auto; width: 36px; height: 36px; border-radius: 50%; background: #fffffff2; color: #8a7f77; box-shadow: 0 2px 8px #0000001f; display: flex; align-items: center; justify-content: center; transform: none; z-index: 2; }
.lc .lc-fav.fav-icon:before { position: static; top: auto; font-size: 18px; }
.lc .lc-fav.fav-icon:hover { background: #fff; color: var(--market-accent); }
.lc .lc-fav.fav-icon.added { background: var(--market-accent); color: #fff; }
.lc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lc-price { font-size: 22px; font-weight: 800; color: var(--market-ink); letter-spacing: -.4px; line-height: 1.15; }
.lc-price small { font-size: 12px; font-weight: 600; color: var(--market-muted); letter-spacing: 0; margin-left: 4px; }
.lc-title { font-size: 15px; font-weight: 500; line-height: 1.4; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-title a { color: var(--market-ink); }
.lc-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.lc-specs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--market-muted); }
.lc-specs li { margin: 0; padding: 0; background: none; }
.lc-meta { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--market-muted); }
.lc-verified { color: #2f855a; font-weight: 600; }

/* Cards: list view */
.lst-grid.lst-list { grid-template-columns: 1fr; }
.lst-list .lc { flex-direction: row; }
.lst-list .lc-media { width: 260px; flex-shrink: 0; aspect-ratio: auto; min-height: 180px; }
.lst-list .lc-body { padding: 18px 20px; }
.lst-list .lc-title { font-size: 17px; }

/* Empty */
.lst-empty { text-align: center; background: #fff; border: 1px dashed #d5c8bb; border-radius: 16px; padding: 48px 24px; }
.lst-empty > i { font-size: 40px; color: var(--market-accent); }
.lst-empty h3 { font-size: 21px; margin: 12px 0 6px; }
.lst-empty p { color: var(--market-muted); max-width: 520px; margin: 0 auto 18px; }
.lst-empty div { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 1199px) { .lst-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tablet/mobile: filters become a bottom drawer */
@media (max-width: 991px) {
    .lst-filters-open { display: inline-flex; }
    .lst-filters { position: fixed; top: auto; left: 0; right: 0; bottom: 0; max-height: 88vh; border-radius: 20px 20px 0 0; z-index: 10060; transform: translateY(105%); transition: transform .25s ease; display: flex; flex-direction: column; }
    .lst-filters-body { overflow-y: auto; flex: 1; }
    .lst-filters-close { display: block; }
    .lst-filters-foot { border-top: 1px solid #efe7df; }
    body.lst-filters-shown .lst-filters { transform: translateY(0); }
    body.lst-filters-shown .lst-backdrop { display: block; position: fixed; inset: 0; background: #0000006b; z-index: 10055; }
    body.lst-filters-shown { overflow: hidden; }
}
@media (max-width: 600px) {
    .lst-body { padding-top: 14px; }
    .lst-toolbar { flex-wrap: wrap; }
    .lst-tools { width: 100%; }
    .lst-sort { flex: 1; }
    .lst-sort select { width: 100%; }
    .lst-view #vt-list { display: none; }
    .lst-grid { gap: 10px; }
    .lc-body { padding: 10px 12px 12px; gap: 4px; }
    .lc-price { font-size: 18px; }
    .lc-title { font-size: 14px; }
    .lc-specs { display: none; }
    .lc-badge { height: 20px; font-size: 10px; padding: 0 6px; }
    .lc .lc-fav.fav-icon { width: 32px; height: 32px; top: 8px; right: 8px; }
    .lc-meta span:nth-child(n+3) { display: none; }
    .lst-list .lc { flex-direction: column; }
    .lst-list .lc-media { width: 100%; aspect-ratio: 4 / 3; min-height: 0; }
    .lst-alert { margin-left: 0; }
}

/* Mobile: results first. Compact header, two-column search. */
@media (max-width: 767px) {
    .listing-page-header { padding-top: 12px !important; padding-bottom: 12px !important; }
    .lph-breadcrumb, .listing-intro .market-eyebrow, .listing-intro p:not(.market-eyebrow) { display: none !important; }
    .listing-intro { margin-bottom: 10px; }
    .listing-intro h1 { font-size: 21px !important; line-height: 1.25 !important; margin: 0 !important; letter-spacing: -.4px; }
    .lph-search-row { display: grid !important; grid-template-columns: 1fr 1fr; border-radius: 12px; overflow: hidden; }
    .lph-search-row .lph-search-kw { grid-column: 1 / -1; }
    .lph-search-row .lph-search-cat, .lph-search-row .lph-search-kw, .lph-search-row .lph-search-loc, .lph-search-row .lph-search-btn { height: 46px !important; min-height: 46px !important; max-width: none; }
    .lph-search-row .lph-search-cat { border-radius: 0 !important; }
    .lph-search-row .lph-search-btn { grid-column: 1 / -1; }
    .lph-search-row .lph-search-btn button { border-radius: 0 !important; height: 46px !important; }
    .lst-pills { margin-top: 10px; }
}
@media (max-width: 767px) {
    .lph-search-row .lph-search-kw { order: -1; }
    .lph-search-row .lph-search-cat { border-right: 1px solid #efe7df; }
}
@media (max-width: 600px) { .lc-badge:nth-child(n+2) { display: none; } }

/* Cards: description snippet; list mode with a compact photo so cards are not mostly empty */
.lc-snippet { margin:4px 0 6px;font-size:13px;line-height:1.45;color:#6f665f;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.ads-grid-mode .lc-snippet { display:none; }
.lst-list .lc, .ads-list-mode .lc { min-height:0 !important;align-items:stretch; }
.lst-list .lc-media, .ads-list-mode .lc-media { flex:0 0 220px !important;width:220px !important;height:165px !important;max-height:165px; }
.lst-list .lc-media img, .ads-list-mode .lc-media img { width:100%;height:100%;object-fit:cover; }
.lst-list .lc-body, .ads-list-mode .lc-body { display:flex;flex-direction:column;justify-content:flex-start;gap:2px;padding:14px 18px !important; }
.lst-list .lc-meta, .ads-list-mode .lc-meta { margin-top:auto; }
@media (max-width:600px){ .lst-list .lc-media, .ads-list-mode .lc-media { flex-basis:130px !important;width:130px !important;height:130px !important; } .lst-list .lc-snippet, .ads-list-mode .lc-snippet { -webkit-line-clamp:2; } }
