/* public/css/tienda/catalogo.css — estilos de la página (catalog/index) */
.cat-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 24px 32px 64px;
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 24px;
    align-items: start;
}

/* ── Sidebar de filtros ── */
.filters {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 88px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.filters__title {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--gray-900);
    margin: 0 0 20px;
}
.fgroup { margin-bottom: 22px; }
.fgroup:last-child { margin-bottom: 0; }
.fgroup__label {
    font-size: .88rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 10px;
}
.fopt {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 0;
    font-size: .84rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: color .15s;
}
.fopt:hover { color: var(--pink); }
.fopt input[type=checkbox] {
    width: 16px; height: 16px;
    accent-color: var(--pink);
    cursor: pointer;
    flex-shrink: 0;
}
.fopt__count { color: var(--gray-400); font-size: .8rem; }
.fopt.is-active { color: var(--pink); font-weight: 500; }
.fopt.is-empty { opacity: .38; cursor: not-allowed; }
.fopt.is-empty:hover { color: var(--gray-700); }

/* Rango de precio */
.frange input[type=range] { width: 100%; accent-color: var(--pink); margin-top: 6px; }
.frange__vals {
    display: flex;
    justify-content: space-between;
    font-size: .82rem;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.filters__clear {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 8px;
    text-align: center;
    font-size: .8rem;
    font-weight: 500;
    color: var(--pink);
    background: var(--pink-light);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.filters__clear:hover { background: #fce7f3; }

/* ── Barra superior ── */
.cat-h1 {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--black);
    margin: 0 0 14px;
    line-height: 1.25;
}
.cat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.cat-count { font-size: .87rem; color: var(--gray-500); }
.cat-count strong { color: var(--gray-900); font-weight: 600; }

.cat-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .84rem;
    color: var(--gray-500);
}
.cat-sort select {
    padding: 9px 34px 9px 14px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    font-size: .84rem;
    font-family: var(--sans);
    background: #fff;
    color: var(--gray-900);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888880' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-width: 190px;
}
.cat-sort select:focus { border-color: var(--pink); }

/* Chips de filtros activos */
.active-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.achip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 12px;
    border-radius: 20px;
    background: var(--pink-light);
    color: var(--pink);
    font-size: .78rem;
    font-weight: 500;
    text-decoration: none;
}
.achip:hover { background: #fce7f3; }
.achip svg { width: 12px; height: 12px; }

/* Paginación */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--gray-200);
}
.pager a, .pager span {
    min-width: 38px; height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .84rem; font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    transition: all .15s;
}
.pager a:hover { border-color: var(--pink); color: var(--pink); }
.pager .is-current { background: var(--pink); border-color: var(--pink); color: #fff; }
.pager .is-disabled { opacity: .35; pointer-events: none; }

/* Botón filtros móvil */
.filters-toggle {
    display: none;
    width: 100%;
    padding: 11px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--gray-900);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 1024px) {
    .cat-wrap { grid-template-columns: 1fr; padding: 20px 16px 48px; }
    .filters { position: static; display: none; }
    .filters.is-open { display: block; }
    .filters-toggle { display: flex; }
}
@media (max-width: 640px) {
    .cat-top { flex-direction: column; align-items: stretch; gap: 10px; }
    .cat-sort select { width: 100%; }
}

/* Catálogo: explicación y acceso a favoritos */
.fav-hint{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:6px 0 14px;padding:10px 14px;border-radius:14px;
  background:#fff1f2;border:1px solid #fecdd3;font-size:.84rem;color:#9f1239}
.fav-hint[hidden]{display:none}
.fav-hint__txt{flex:1;min-width:200px}
.fav-hint__go{font-weight:800;color:#e11d48;text-decoration:none;white-space:nowrap}
.fav-hint__go:hover{text-decoration:underline}
.fav-hint__x{border:none;background:none;color:#9f1239;font-size:.9rem;cursor:pointer;padding:2px 4px}

/* ── Filtros nuevos (filtros.css): ajustes del catálogo ── */
.cat-wrap > main, .cat-wrap > .cat-main-col { min-width: 0; }   /* la barra de atajos se desliza dentro; no estira la página */
.fopt.cf-more { display: none; } .cf-group.show-all .fopt.cf-more { display: flex; }
.cf-more-btn { background: none; border: none; padding: 4px 0; color: var(--pink); font-weight: 600; font-size: .8rem; cursor: pointer; font-family: inherit; }
.cf-group > summary.fgroup__label { margin-bottom: 0; }
.cf-group[open] > summary.fgroup__label { margin-bottom: 10px; }
@media (min-width: 1025px) { .filters .fgroup { margin-bottom: 16px; } .filters__title { margin-bottom: 14px; } .filters .fopt { line-height: 1.3; } }
@media (max-width: 1024px) {
    .filters, .filters.is-open { display: contents; }   /* en el teléfono la columna es el panel que sube desde abajo */
    .filters__title, .filters__clear { display: none; }
    .cf-sheet .fopt { padding: 6px 0; }
}
