/* Filtros JS (cambio 3) — chips, details/summary, corazón, km */

.shh-filtro {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 1rem;
    margin-top: 0.25rem;
}
.shh-filtro > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.35);
    padding: 0.35rem 0;
}
.shh-filtro > summary::-webkit-details-marker { display: none; }
.shh-filtro > summary::after {
    content: "+";
    color: #ff0000;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}
.shh-filtro[open] > summary::after { content: "−"; }
.shh-filtro-body { padding: 0.75rem 0 0.25rem; }

.shh-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.shh-chip {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.75);
    border-radius: 0.75rem;
    padding: 0.45rem 0.75rem;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all .15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: inherit;
}
.shh-chip:hover {
    border-color: rgba(255,0,0,0.4);
    color: #fff;
}
.shh-chip.is-on {
    background: #ff0000;
    border-color: #ff0000;
    color: #fff;
}
.shh-chip img { width: 18px; height: 12px; object-fit: cover; border-radius: 2px; }

.shh-sub { font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.18em; color: rgba(255,255,255,0.25); margin: 0.75rem 0 0.4rem; }
.shh-legal-filtros { font-size: 10px; font-style: italic; color: rgba(255,255,255,0.35); margin-top: 0.75rem; line-height: 1.4; }

.shh-geo-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(16,185,129,0.35);
    background: linear-gradient(90deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    font-family: inherit;
}
.shh-geo-btn.is-on { background: #10b981; color: #000; border-color: #10b981; }
.shh-geo-msg { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 0.4rem; min-height: 1em; }

.shh-fav-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.55);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s ease;
}
.shh-fav-btn:hover { border-color: #ff0000; color: #ff0000; }
.shh-fav-btn.is-on { background: #ff0000; border-color: #ff0000; color: #fff; }

.shh-km {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #34d399;
}
.shh-km[hidden] { display: none !important; }

.shh-fav-nav {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.shh-fav-count {
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.28rem;
    background: #ff0000;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.shh-empty-js { display: none; }
.shh-empty-js.is-on { display: block; }

/* Gana a Tailwind `flex` en las cards: si no, el filtro marca el chip y el grid no se oculta. */
[data-shh-card].shh-hide {
    display: none !important;
}

.shh-filtros-home {
    text-align: left;
    padding: 0.75rem 0.75rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 0.5rem;
}
.shh-filtros-home .shh-filtro { border-top-color: rgba(255,255,255,0.06); }

.shh-novedades-link {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
    text-decoration: underline;
}
.shh-novedades-link:hover { color: #ff0000; }

.shh-more-btn {
    display: block;
    width: 100%;
    background: none;
    border: 0;
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    cursor: pointer;
    padding: 0.65rem 0.75rem 0.35rem;
    font-family: inherit;
    text-align: center;
}
.shh-more-btn:hover,
.shh-more-btn[aria-expanded="true"] { color: #fff; }
[data-shh-more-panel][hidden] { display: none !important; }

/* ── Toggles de la barra de filtros (antes vivían solo en index.php) ───────── */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all .2s;
}
.toggle-switch:hover { background: rgba(255,255,255,0.06); }
.toggle-track {
    width: 32px;
    height: 18px;
    border-radius: 9999px;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}
.toggle-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform .2s;
}
.toggle-switch input:checked + .toggle-track::after { transform: translateX(14px); }
.toggle-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.6);
    transition: color .2s;
}
.toggle-switch input:checked ~ .toggle-label { color: white; }

/* ── Barra de filtros compartida (home, categorías, barrios, novedades) ───── */
.shh-barra {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 2rem;
    padding: 0.75rem;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transition: border-color .3s ease;
}
.shh-barra:hover { border-color: rgba(255,0,0,0.3); }
