/* P4C Filtros por familia 1.0.0
   Mismo estilo que tenían los filtros del catálogo (Figma "Catalogo"
   4210:6001, Comentarios Noviembre #1): títulos en verde, casillas con
   borde teal, cantidades entre paréntesis, chips de filtros aplicados y
   botón de contorno "Restablecer todo". */

.p4c-ff {
    width: 100%;

    color: #515556;

    font-size: 14px;
    line-height: 1.25;
}

/* Chips de filtros aplicados */
.p4c-ff__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin: 0 0 16px !important;
    padding: 0 !important;

    list-style: none !important;
}

.p4c-ff__chip-item {
    margin: 0 !important;
    padding: 0 !important;

    list-style: none !important;
}

.p4c-ff__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    min-height: 38px;

    padding: 8px 8px 8px 16px;

    border: 1px solid #0a99ad;
    border-radius: 24px;

    background: #daf0f3;

    color: #0a99ad !important;

    font-size: 14px;
    line-height: 1.25;
    text-decoration: none !important;
}

.p4c-ff__chip:hover,
.p4c-ff__chip:focus {
    background: #c9e9ee;

    color: #186973 !important;
}

.p4c-ff__chip-x {
    display: inline-block;

    width: 18px;
    height: 18px;

    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230A99AD' d='M6.4 19 5 17.6 10.6 12 5 6.4 6.4 5 12 10.6 17.6 5 19 6.4 13.4 12 19 17.6 17.6 19 12 13.4Z'/%3E%3C/svg%3E") no-repeat center / 18px 18px;
}

/* Botón "Restablecer todo": secundario de contorno, 48px */
.p4c-ff__restablecer {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;

    margin: 0 0 24px;
    padding: 0 24px;

    border: 1px solid #0a99ad;
    border-radius: 32px;

    background: #fff;

    color: #186973 !important;

    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
}

.p4c-ff__restablecer:hover,
.p4c-ff__restablecer:focus {
    background: #e3f3f5;

    color: #035257 !important;
}

.p4c-ff__linea {
    height: 0;

    margin: 0 0 24px;

    border: 0;
    border-top: 1px solid #0a99ad;
}

/* Sección */
.p4c-ff__seccion {
    margin: 0 0 24px;
}

.p4c-ff__titulo {
    margin: 0 0 12px !important;
    padding: 0 !important;

    font-size: 14px !important;
    line-height: 1.25 !important;
}

.p4c-ff__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin: 0;
    padding: 0;

    border: 0;

    background: none;

    color: #0a99ad;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;

    cursor: pointer;
}

.p4c-ff__chevron {
    display: inline-block;

    width: 18px;
    height: 18px;

    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230A99AD' d='m12 15.4-6-6L7.4 8l4.6 4.6L16.6 8 18 9.4Z'/%3E%3C/svg%3E") no-repeat center / 18px 18px;

    transition: transform .15s ease;
}

.p4c-ff__seccion:not(.is-abierta) .p4c-ff__chevron {
    transform: rotate(-90deg);
}

.p4c-ff__seccion:not(.is-abierta) .p4c-ff__lista {
    display: none;
}

/* Opciones */
.p4c-ff__lista {
    margin: 0 !important;
    padding: 0 !important;

    list-style: none !important;
}

.p4c-ff__opcion {
    margin: 0 0 12px !important;
    padding: 0 !important;

    list-style: none !important;
}

.p4c-ff__label {
    display: flex;
    align-items: flex-start;
    gap: 8px;

    margin: 0;

    color: #515556;

    font-size: 14px;
    font-weight: 400;
    line-height: 20px;

    cursor: pointer;
}

.p4c-ff__check {
    -webkit-appearance: none;
    appearance: none;

    flex: 0 0 auto;

    box-sizing: border-box;

    width: 20px;
    height: 20px;

    margin: 0;

    border: 1px solid #0a99ad;
    border-radius: 4px;

    background: #fff no-repeat center / 12px 12px;

    cursor: pointer;
}

.p4c-ff__check:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect width='12' height='12' rx='2' fill='%230A99AD'/%3E%3C/svg%3E");
}

.p4c-ff__check:focus-visible {
    outline: 2px solid rgba(10, 153, 173, .35);
    outline-offset: 2px;
}

.p4c-ff__cantidad {
    color: #515556;

    white-space: nowrap;
}

/* Mientras carga la página filtrada */
.p4c-catalogo-wrapper.p4c-ff-cargando .p4c-catalogo-productos {
    opacity: .5;

    transition: opacity .15s ease;
}

/* Celular: el panel va arriba del listado (layout del child theme) */
@media (max-width: 767px) {
    .p4c-ff__seccion {
        margin-bottom: 8px;
    }
}
