.ac14-filtros__destacados {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.ac14-filtros__destacado-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    background: #cf2e2e;
    color: #fff !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .15s;
}
.ac14-filtros__destacado-btn:hover { background: #fff; color: #cf2e2e !important; box-shadow: inset 0 0 0 1.5px #cf2e2e; }
.ac14-filtros__destacado-btn svg { flex-shrink: 0; }

.ac14-filtros__activos {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 0.5px solid #e5e5e5;
}
.ac14-filtros__activos-titulo {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #999;
    margin-bottom: 8px;
}
.ac14-filtros__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.ac14-filtros__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 10px;
    background: #e8f0fb;
    color: #1F4E79;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.ac14-filtros__chip button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: rgba(31,78,121,.15);
    color: #1F4E79;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.ac14-filtros__borrar-link {
    background: none;
    border: none;
    padding: 0;
    color: #cf2e2e;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.ac14-filtros__bloque {
    padding: 14px 0;
    border-bottom: 0.5px solid #e5e5e5;
}
.ac14-filtros__bloque:first-child { padding-top: 0; }
.ac14-filtros__bloque h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #333;
    margin: 0 0 10px;
}

.ac14-filtros__oferta-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
}
.ac14-filtros__oferta-btn.activo {
    background: #cf2e2e;
    border-color: #cf2e2e;
    color: #fff;
}

.ac14-filtros__precio-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ac14-filtros__precio-inputs input {
    width: 0;
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
}
.ac14-filtros__precio-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    background: #1F4E79;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
}

.ac14-filtros__lista { display: flex; flex-direction: column; gap: 2px; }
.ac14-filtros__lista.ac14-scroll-filter {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.ac14-filtros__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 2px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
}
.ac14-filtros__item input[type="checkbox"] { flex-shrink: 0; }
.ac14-filtros__item--padre span:not(.ac14-filtros__count) { font-weight: 700; color: #1a1a1a; }
.ac14-filtros__item span:not(.ac14-filtros__count) {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ac14-filtros__count {
    flex-shrink: 0;
    font-size: 11px;
    color: #999;
}

.ac14-filtros__cat-lista { list-style: none; margin: 0; padding: 0; }
.ac14-filtros__cat-sub { margin-left: 18px; }

.ac14-filtros__cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 10px;
}
.ac14-filtros__cat-header h4 { margin: 0; }
.ac14-filtros__cat-header-izq { display: flex; align-items: center; gap: 8px; }
.ac14-filtros__catalogo-icono {
    display: flex;
    color: #cf2e2e;
}
.ac14-filtros__cat-chevron { width: 14px; height: 14px; color: #999; transition: transform .15s; flex-shrink: 0; }
.ac14-filtros__bloque.plegado .ac14-filtros__cat-chevron { transform: rotate(-90deg); }

/* Bloques plegables (precio, marca, promoción, etiquetas) */
.ac14-filtros__cab { display: flex; align-items: center; justify-content: space-between; cursor: pointer; margin-bottom: 10px; user-select: none; }
.ac14-filtros__cab h4 { margin: 0; }
.ac14-filtros__cab:focus-visible { outline: 2px solid var(--ac14-acento, #cf2e2e); outline-offset: 2px; border-radius: 4px; }
.ac14-filtros__bloque--plegable.plegado .ac14-filtros__cuerpo { display: none; }
.ac14-filtros__bloque.plegado > .ac14-filtros__cab,
.ac14-filtros__bloque--categorias.plegado > .ac14-filtros__cat-header { margin-bottom: 0; }
.ac14-filtros__bloque--categorias.plegado .ac14-filtros__cat-contenido { display: none; }

.ac14-filtros__cat-fila { display: flex; align-items: center; gap: 4px; }
.ac14-filtros__cat-fila .ac14-filtros__item { flex: 1; min-width: 0; }
.ac14-filtros__cat-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    transition: transform .15s;
}
.ac14-filtros__cat-toggle.abierto { transform: rotate(90deg); }
.ac14-filtros__cat-toggle svg { width: 12px; height: 12px; flex-shrink: 0; }
.ac14-filtros__catalogo-icono svg { width: 16px; height: 16px; flex-shrink: 0; }
.ac14-filtros__destacado-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.ac14-filtros__cat-sub-wrap { display: none; }
.ac14-filtros__cat-sub-wrap.abierto { display: block; }

.ac14-filtros__limpiar {
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    background: #fff;
    border: 1px solid #cf2e2e;
    color: #cf2e2e;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.ac14-filtros__sin-resultados { padding: 30px 0; color: #888; }

/* Posición fija respecto a la ventana (no al alto de la cuadrícula, que puede
   medir miles de píxeles) — así el aviso siempre está a la vista aunque el
   usuario tenga la página desplazada hacia abajo. */
.ac14-filtros__cargando {
    display: none;
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    font-size: 13px;
    font-weight: 600;
    color: #333;
    z-index: 9999;
    pointer-events: none;
}
.ac14-filtros__cargando.visible { display: flex; }
.ac14-filtros__spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid #ddd;
    border-top-color: #cf2e2e;
    border-radius: 50%;
    animation: ac14-filtros-girar .7s linear infinite;
}
@keyframes ac14-filtros-girar { to { transform: rotate(360deg); } }

.ac14-filtros-paginacion {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 24px 0;
}
.ac14-filtros-paginacion a {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
}
.ac14-filtros-paginacion a.current { background: #1F4E79; color: #fff; border-color: #1F4E79; }

/* ── Barra superior de la tienda (Ver / Orden / Vista) ────────────────── */
.ac14-filtros__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 0.5px solid #e5e5e5;
}
.ac14-filtros__toolbar-total {
    font-size: 13px;
    color: #666;
}
.ac14-filtros__toolbar-derecha {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.ac14-filtros__toolbar-campo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}
.ac14-filtros__toolbar-campo select {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    color: #333;
    background: #fff;
    cursor: pointer;
}
.ac14-filtros__vista-toggle {
    display: flex;
    gap: 2px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}
.ac14-filtros__vista-toggle button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    background: #fff;
    border: none;
    color: #999;
    cursor: pointer;
}
.ac14-filtros__vista-toggle button svg { width: 16px; height: 16px; flex-shrink: 0; }
.ac14-filtros__vista-toggle button:not(:last-child) { border-right: 1px solid #ddd; }
.ac14-filtros__vista-toggle button.activo { background: var(--ac14-acento, #cf2e2e); color: #fff; }

@media (max-width: 480px) {
    .ac14-filtros__toolbar-derecha { width: 100%; justify-content: space-between; }
}

/* ── Vista lista — cada producto en una fila horizontal ───────────────── */
.woocommerce ul.products.ac14-vista-lista {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 8px !important;
}
.ac14-vista-lista li.ac14-card {
    flex-direction: row !important;
    align-items: stretch;
}
.ac14-vista-lista .ac14-card__img {
    width: 140px;
    flex: 0 0 140px;
    aspect-ratio: auto;
}
.ac14-vista-lista .ac14-card__body {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
}
.ac14-vista-lista a.ac14-card__nombre {
    -webkit-line-clamp: 2;
}
.ac14-vista-lista .ac14-semaforo {
    flex: 0 0 auto;
    align-self: center;
    margin: 0 14px;
}
.ac14-vista-lista .ac14-card__action {
    flex: 0 0 260px;
    justify-content: center;
    border-top: none;
    border-left: 0.5px solid #f0f0f0;
}
@media (max-width: 700px) {
    .ac14-vista-lista li.ac14-card { flex-direction: column !important; }
    .ac14-vista-lista .ac14-card__img { width: 100%; flex: none; aspect-ratio: 1/0.85; }
    .ac14-vista-lista .ac14-card__action { flex: none; border-left: none; border-top: 0.5px solid #f0f0f0; }
}

/* Ámbito de categoría: dónde estamos (ruta + categoría actual) encima de sus subcategorías */
.ac14-filtros__ruta { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; padding: 0 0 8px; border-bottom: 1px solid #ececec; }
.ac14-filtros__ruta-enlace { font-size: 12px; color: #6b6b6b; text-decoration: none; line-height: 1.5; }
.ac14-filtros__ruta-enlace:hover { color: #cf2e2e; }
.ac14-filtros__ruta-actual { margin-top: 4px; font-size: 14px; font-weight: 700; color: #1a1a1a; line-height: 1.3; padding-left: 10px; border-left: 3px solid #cf2e2e; }

/* «Ir a otra categoría»: enlaces a hermanas y secciones principales (no filtran, cambian de página) */
.ac14-filtros__otras { margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid #ececec; }
.ac14-filtros__otras-titulo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #6b6b6b; margin: 0 0 6px; }
.ac14-filtros__otras-sub { font-size: 12px; color: #8a8a8a; margin: 8px 0 2px; }
.ac14-filtros__otras-lista { list-style: none; margin: 0; padding: 0; }
.ac14-filtros__otras-lista li { margin: 0; }
.ac14-filtros__otras-lista a { display: block; padding: 4px 0; font-size: 14px; color: #1a1a1a; text-decoration: none; line-height: 1.3; }
.ac14-filtros__otras-lista a:hover { color: #cf2e2e; }
.ac14-filtros__otras-lista--raiz a { font-weight: 600; }
.ac14-filtros__otras-hermanas { margin: 6px 0 0; }
.ac14-filtros__otras-hermanas summary { cursor: pointer; padding: 4px 0; font-size: 13px; color: #6b6b6b; }
.ac14-filtros__otras-hermanas summary:hover { color: #cf2e2e; }
.ac14-filtros__otras-hermanas .ac14-filtros__otras-lista { max-height: 240px; overflow: auto; padding-left: 8px; }
.ac14-filtros__otras-hermanas .ac14-filtros__otras-lista a { font-size: 13px; }

/* ── Barra de la tienda en MÓVIL (≤767px): fila 2 = migas + total; fila 3 = barra de solo iconos ──────────────
   [Filtros][Catálogos] ………… [Cuadrícula | Lista][Ajustes]. «Ver» y «Orden» van dentro del panel de Ajustes.
   En escritorio y tablet no cambia nada (los botones nuevos y el panel se comportan como antes). */
.ac14-tb-filtros, .ac14-tb-ajustes-btn, .ac14-tb-ajustes__titulo { display: none; }
.ac14-tb-ajustes, .ac14-tb-ajustes__panel { display: contents; }

@media (max-width: 767px) {
    .ac14-filtros__toolbar { display: block; margin: 0 0 12px; padding-bottom: 0; border-bottom: 0; }
    .ac14-filtros__toolbar-izq { margin: 0 0 10px; }
    .ac14-filtros__toolbar-derecha {
        --ac14-tb-fondo: #fff;
        position: relative; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; width: 100%;
        background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 6px; box-sizing: border-box;
    }
    /* Botones de la barra: todos de 44 px, solo icono */
    .ac14-tb-filtros, .ac14-tb-ajustes-btn {
        display: inline-flex !important; position: relative; align-items: center; justify-content: center; flex: 0 0 44px;
        width: 44px; height: 44px; padding: 0 !important; border: 1px solid #d5d8dd !important; border-radius: 10px !important;
        background: #fff !important; color: #1a1a1a !important; cursor: pointer;
    }
    /* Mismo estilo para todos (Filtros, Catálogos, Ajustes): blanco con borde gris; el color de acento solo marca lo activo */
    .ac14-tb-ajustes-btn[aria-expanded="true"] { background: var(--ac14-acento, #cf2e2e) !important; border-color: var(--ac14-acento, #cf2e2e) !important; color: #fff !important; }
    .ac14-tb-filtros__n {
        position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
        border-radius: 9px; background: var(--ac14-acento, #cf2e2e); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
    }
    /* «Catálogos» (lo pinta ac14-catalogos): solo icono */
    .ac14-filtros__toolbar-derecha .ac14vc-btn-cat, .ac14-filtros__toolbar-derecha .ac14vc-btn-cat:hover, .ac14-filtros__toolbar-derecha .ac14vc-btn-cat:focus { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 10px; border: 1px solid #d5d8dd; background: #fff; color: #1a1a1a; }
    .ac14-filtros__toolbar-derecha .ac14vc-btn-cat span { display: none; }
    .ac14-filtros__toolbar-derecha .ac14vc-btn-cat svg { width: 20px; height: 20px; }
    /* Cuadrícula | Lista a la derecha, y Ajustes al final */
    .ac14-filtros__vista-toggle { margin-left: auto; height: 44px; border-radius: 10px; border-color: #d5d8dd; }
    .ac14-filtros__vista-toggle button:not(:last-child) { border-right-color: #d5d8dd; }
    .ac14-filtros__vista-toggle button { width: 44px; height: 42px; }
    .ac14-filtros__vista-toggle button svg { width: 20px; height: 20px; }
    .ac14-tb-ajustes { display: block; position: static; order: 10; }

    /* Panel de Ajustes (Ver / Orden): desplegable bajo la barra */
    .ac14-tb-ajustes__panel {
        display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
        background: #fff; border: 1px solid #d5d8dd; border-radius: 12px; padding: 12px 14px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.16);
        flex-direction: column; gap: 12px; box-sizing: border-box;
    }
    .ac14-tb-ajustes.abierto .ac14-tb-ajustes__panel { display: flex; }
    .ac14-tb-ajustes__titulo { display: block; font-size: 14px; font-weight: 700; color: #1a1a1a; }
    .ac14-tb-ajustes__panel .ac14-filtros__toolbar-campo { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: #333; }
    .ac14-tb-ajustes__panel .ac14-filtros__toolbar-campo select { flex: 0 0 62%; max-width: 62%; height: 42px; font-size: 15px; }
}
