/**
 * CLP SIDEBAR PREMIUM — Dark panel redesign
 * Carga LAST en categoria.php → máxima especificidad.
 * Inspiración: Linear · Figma · Arc · Vercel
 * Paleta: navy #0d1525 + --cat-clr (dinámico por categoría)
 */

/* ============================================================
   1. CONTENEDOR — Dark panel con glow de categoría
   ============================================================ */
@media (min-width: 1024px) {

body.clp-theme .clp-sidebar {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--cat-clr, #3b82f6) 8%, #0d1525) 0%,
        #0d1525 30%,
        #0b1220 100%
    ) !important;
    border: 1px solid color-mix(in srgb, var(--cat-clr, #3b82f6) 20%, rgba(255,255,255,0.07)) !important;
    border-radius: 20px !important;
    padding: 0 !important;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 8px 32px -8px rgba(0,0,0,0.55),
        0 32px 64px -24px rgba(0,0,0,0.35),
        0 0 48px -16px color-mix(in srgb, var(--cat-clr, #3b82f6) 18%, transparent) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255,255,255,0.12) transparent !important;
}

body.clp-theme .clp-sidebar::-webkit-scrollbar { width: 5px; }
body.clp-theme .clp-sidebar::-webkit-scrollbar-track { background: transparent; }
body.clp-theme .clp-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.14);
    border-radius: 99px;
}

/* ============================================================
   2. HEADER — Visible en desktop, con tint de categoría
   ============================================================ */
body.clp-theme .clp-sidebar .clp-sheet-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: color-mix(in srgb, var(--cat-clr, #3b82f6) 14%, rgba(255,255,255,0.04)) !important;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
    padding: 1.1rem 1.35rem !important;
    margin: 0 !important;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.clp-theme .clp-sheet-title {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: rgba(255,255,255,0.95) !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em !important;
}

body.clp-theme .clp-sheet-title i {
    color: var(--cat-clr, #3b82f6) !important;
    font-size: 0.82rem !important;
    filter: drop-shadow(0 0 6px var(--cat-clr, #3b82f6));
}

body.clp-theme .clp-active-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    border-radius: 99px !important;
    font-size: 10.5px !important;
    font-weight: 900 !important;
    color: #fff !important;
    background: var(--cat-clr, #3b82f6) !important;
    box-shadow:
        0 0 0 2px rgba(255,255,255,0.12),
        0 2px 8px -2px color-mix(in srgb, var(--cat-clr, #3b82f6) 70%, transparent) !important;
    letter-spacing: 0 !important;
}

body.clp-theme .clp-sheet-close { display: none !important; }

/* ============================================================
   3. FORM WRAPPER — padding interno
   ============================================================ */
body.clp-theme .clp-filters {
    padding: 0.75rem 1.35rem 1.35rem !important;
    background: transparent !important;
}

/* ============================================================
   4. GRUPOS DE FILTRO — separadores sutiles
   ============================================================ */
body.clp-theme .clp-filter-group {
    padding: 1rem 0 !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    position: relative;
}

body.clp-theme .clp-filter-group:last-of-type {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

body.clp-theme .clp-filter-group:first-of-type {
    padding-top: 0.25rem !important;
}

/* Línea de acento en grupos que tienen filtro activo */
body.clp-theme .clp-filter-group.has-active {
    position: relative;
}
body.clp-theme .clp-filter-group.has-active::before {
    content: '';
    position: absolute;
    left: -1.35rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(
        180deg,
        var(--cat-clr, #3b82f6) 0%,
        color-mix(in srgb, var(--cat-clr, #3b82f6) 40%, transparent) 100%
    );
    border-radius: 0 3px 3px 0;
}

/* ============================================================
   5. LEGENDS — eyebrow con ícono y dot de acento
   ============================================================ */
body.clp-theme .clp-filter-legend {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.13em !important;
    color: rgba(255,255,255,0.45) !important;
    margin-bottom: 0.85rem !important;
    padding: 0 !important;
    border: none !important;
    width: 100%;
}

body.clp-theme .clp-filter-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

body.clp-theme .clp-filter-legend .legend-ico {
    color: var(--cat-clr, #3b82f6) !important;
    font-size: 0.7rem;
    opacity: 0.9;
    filter: drop-shadow(0 0 3px color-mix(in srgb, var(--cat-clr, #3b82f6) 60%, transparent));
}

body.clp-theme .clp-filter-group.has-active .clp-filter-legend {
    color: rgba(255,255,255,0.78) !important;
}

/* Botón limpiar */
body.clp-theme .clp-legend-reset {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.22) !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0.2rem 0.45rem !important;
    border-radius: 6px !important;
    transition: color 0.18s ease, background 0.18s ease !important;
}

body.clp-theme .clp-legend-reset:hover {
    color: #f87171 !important;
    background: rgba(248,113,113,0.1) !important;
}

body.clp-theme .clp-filter-group.has-active .clp-legend-reset {
    color: rgba(255,255,255,0.45) !important;
}

/* ============================================================
   6. CHIPS DE SUBCATEGORÍA (dentro del sidebar)
   ============================================================ */
body.clp-theme .clp-chips { gap: 0.38rem !important; }

body.clp-theme .clp-chip span {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: rgba(255,255,255,0.65) !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 0.38rem 0.75rem !important;
    border-radius: 99px !important;
    transition: all 0.18s ease !important;
}

body.clp-theme .clp-chip span em {
    color: rgba(255,255,255,0.35) !important;
}

body.clp-theme .clp-chip:hover span {
    background: rgba(255,255,255,0.09) !important;
    border-color: color-mix(in srgb, var(--cat-clr, #3b82f6) 55%, rgba(255,255,255,0.2)) !important;
    color: rgba(255,255,255,0.9) !important;
}

body.clp-theme .clp-chip input:checked + span {
    background: var(--cat-clr, #3b82f6) !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--cat-clr, #3b82f6) 60%, transparent) !important;
}

body.clp-theme .clp-chip input:checked + span em {
    color: rgba(255,255,255,0.7) !important;
}

/* ============================================================
   7. PRECIO — histograma, slider, inputs
   ============================================================ */

/* Quick chips de rango */
body.clp-theme .clp-price-quick {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.38rem !important;
    margin-bottom: 0.85rem !important;
}

body.clp-theme .clp-price-quick__chip {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: rgba(255,255,255,0.65) !important;
    border-radius: 99px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 0.35rem 0.75rem !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}

body.clp-theme .clp-price-quick__chip:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: color-mix(in srgb, var(--cat-clr, #3b82f6) 55%, rgba(255,255,255,0.15)) !important;
    color: rgba(255,255,255,0.9) !important;
    transform: translateY(-1px) !important;
}

body.clp-theme .clp-price-quick__chip.is-active {
    background: var(--cat-clr, #3b82f6) !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--cat-clr, #3b82f6) 60%, transparent) !important;
}

/* Histograma */
body.clp-theme .clp-histogram {
    height: 44px !important;
    gap: 2px !important;
    margin-bottom: 0 !important;
    align-items: flex-end;
    padding: 0 !important;
}

body.clp-theme .clp-hist-bar {
    background: rgba(255,255,255,0.1) !important;
    border-radius: 2px 2px 0 0 !important;
    transition: background 0.2s ease, transform 0.15s ease !important;
    min-height: 3px !important;
}

body.clp-theme .clp-hist-bar.is-active {
    background: color-mix(in srgb, var(--cat-clr, #3b82f6) 75%, rgba(255,255,255,0.3)) !important;
}

body.clp-theme .clp-hist-bar.is-inactive {
    background: rgba(255,255,255,0.05) !important;
}

/* Valores min/max */
body.clp-theme .clp-price-values {
    color: rgba(255,255,255,0.55) !important;
    font-size: 0.78rem !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.25rem !important;
}

body.clp-theme .clp-price-values strong {
    color: rgba(255,255,255,0.95) !important;
    font-family: 'Space Grotesk', system-ui, sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
}

body.clp-theme .clp-price-sep {
    color: rgba(255,255,255,0.2) !important;
}

/* Track del slider */
body.clp-theme .clp-price-track {
    background: rgba(255,255,255,0.1) !important;
    height: 4px !important;
}

body.clp-theme .clp-price-fill {
    background: linear-gradient(
        90deg,
        var(--cat-clr, #3b82f6) 0%,
        color-mix(in srgb, var(--cat-clr, #3b82f6) 80%, #fff) 100%
    ) !important;
    box-shadow: 0 0 8px -2px color-mix(in srgb, var(--cat-clr, #3b82f6) 55%, transparent) !important;
}

/* Thumb del range */
body.clp-theme .clp-price-sliders input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 2.5px solid var(--cat-clr, #3b82f6) !important;
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--cat-clr, #3b82f6) 18%, transparent),
        0 2px 8px rgba(0,0,0,0.35) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

body.clp-theme .clp-price-sliders input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.18) !important;
    box-shadow:
        0 0 0 6px color-mix(in srgb, var(--cat-clr, #3b82f6) 22%, transparent),
        0 2px 8px rgba(0,0,0,0.4) !important;
}

body.clp-theme .clp-price-sliders input[type="range"]::-moz-range-thumb {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 2.5px solid var(--cat-clr, #3b82f6) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Inputs de precio */
body.clp-theme .clp-price-inputs {
    gap: 0.5rem !important;
    margin-top: 0.85rem !important;
}

body.clp-theme .clp-price-inputs label > span,
body.clp-theme .clp-price-inputs label > :first-child:not(input) {
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.35) !important;
    margin-bottom: 0.3rem !important;
    display: block;
}

body.clp-theme .clp-price-inputs input {
    width: 100% !important;
    height: 38px !important;
    background: rgba(255,255,255,0.07) !important;
    border: 1.5px solid rgba(255,255,255,0.12) !important;
    border-radius: 10px !important;
    color: rgba(255,255,255,0.95) !important;
    font-family: 'Space Grotesk', system-ui, sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums;
    padding: 0 0.65rem !important;
    box-sizing: border-box !important;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease !important;
}

body.clp-theme .clp-price-inputs input:focus {
    outline: none !important;
    background: rgba(255,255,255,0.1) !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-clr, #3b82f6) 22%, transparent) !important;
}

/* ============================================================
   8. CHECKBOXES — marcas y opciones
   ============================================================ */
body.clp-theme .clp-checks { gap: 0 !important; max-height: 220px !important; }

body.clp-theme .clp-checks li { margin: 0 !important; }

body.clp-theme .clp-check {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    padding: 0.48rem 0.6rem !important;
    margin: 0 -0.6rem !important;
    border-radius: 10px !important;
    cursor: pointer;
    transition: background 0.15s ease !important;
}

body.clp-theme .clp-check:hover {
    background: rgba(255,255,255,0.06) !important;
}

body.clp-theme .clp-check-box {
    width: 17px !important;
    height: 17px !important;
    border-radius: 5px !important;
    border: 1.5px solid rgba(255,255,255,0.2) !important;
    background: rgba(255,255,255,0.06) !important;
    display: grid !important;
    place-items: center !important;
    flex-shrink: 0 !important;
    transition: all 0.15s cubic-bezier(0.34,1.56,0.64,1) !important;
}

body.clp-theme .clp-check-box i {
    color: #fff !important;
    font-size: 0.6rem !important;
    opacity: 0 !important;
    transform: scale(0.5) !important;
    transition: opacity 0.15s ease, transform 0.2s cubic-bezier(0.34,1.56,0.64,1) !important;
}

body.clp-theme .clp-check input:checked + .clp-check-box,
body.clp-theme .clp-check input:checked ~ .clp-check-box {
    background: var(--cat-clr, #3b82f6) !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-clr, #3b82f6) 25%, transparent) !important;
}

body.clp-theme .clp-check input:checked + .clp-check-box i,
body.clp-theme .clp-check input:checked ~ .clp-check-box i {
    opacity: 1 !important;
    transform: scale(1) !important;
}

body.clp-theme .clp-check-label {
    font-size: 0.83rem !important;
    font-weight: 500 !important;
    color: rgba(255,255,255,0.65) !important;
    flex: 1 !important;
    transition: color 0.15s ease !important;
}

body.clp-theme .clp-check:hover .clp-check-label {
    color: rgba(255,255,255,0.9) !important;
}

body.clp-theme .clp-check input:checked ~ .clp-check-label {
    color: rgba(255,255,255,0.95) !important;
    font-weight: 600 !important;
}

body.clp-theme .clp-check-count {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    color: rgba(255,255,255,0.28) !important;
    background: rgba(255,255,255,0.07) !important;
    padding: 0.1rem 0.45rem !important;
    border-radius: 99px !important;
    font-variant-numeric: tabular-nums;
}

/* Search de marcas */
body.clp-theme .clp-search-inline {
    margin-bottom: 0.65rem !important;
}

body.clp-theme .clp-search-inline i {
    color: rgba(255,255,255,0.35) !important;
    font-size: 0.78rem !important;
}

body.clp-theme .clp-search-inline input {
    background: rgba(255,255,255,0.07) !important;
    border: 1.5px solid rgba(255,255,255,0.12) !important;
    border-radius: 10px !important;
    color: rgba(255,255,255,0.9) !important;
    font-size: 0.83rem !important;
    padding: 0.48rem 0.75rem 0.48rem 2rem !important;
    box-sizing: border-box !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}

body.clp-theme .clp-search-inline input::placeholder {
    color: rgba(255,255,255,0.3) !important;
}

body.clp-theme .clp-search-inline input:focus {
    outline: none !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-clr, #3b82f6) 20%, transparent) !important;
}

/* ============================================================
   9. RATINGS — filas interactivas con estrellas
   ============================================================ */
body.clp-theme .clp-ratings { gap: 0 !important; }

body.clp-theme .clp-rating {
    display: flex !important;
    align-items: center !important;
    padding: 0.48rem 0.6rem !important;
    margin: 0 -0.6rem !important;
    border-radius: 10px !important;
    cursor: pointer;
    transition: background 0.15s ease !important;
    position: relative;
}

body.clp-theme .clp-rating:hover {
    background: rgba(255,255,255,0.06) !important;
}

body.clp-theme .clp-rating input:checked ~ .clp-rating-stars i:not(.empty) {
    filter: drop-shadow(0 0 4px #f59e0b);
}

body.clp-theme .clp-rating-stars {
    font-size: 0.88rem !important;
    gap: 0.12rem !important;
}

body.clp-theme .clp-rating-stars i { color: #f59e0b !important; }

body.clp-theme .clp-rating-stars i.empty {
    color: rgba(255,255,255,0.14) !important;
}

body.clp-theme .clp-rating-stars em {
    font-size: 0.76rem !important;
    color: rgba(255,255,255,0.4) !important;
    font-style: normal !important;
    margin-left: 0.38rem !important;
    transition: color 0.15s ease;
}

body.clp-theme .clp-rating:hover .clp-rating-stars em {
    color: rgba(255,255,255,0.65) !important;
}

body.clp-theme .clp-rating--reset span {
    font-size: 0.82rem !important;
    color: rgba(255,255,255,0.38) !important;
    font-weight: 500 !important;
}

/* Rating activo — línea izquierda de acento */
body.clp-theme .clp-rating input:checked ~ .clp-rating-stars,
body.clp-theme .clp-rating--reset input:checked + span {
    color: rgba(255,255,255,0.95) !important;
}

/* ============================================================
   10. STORAGE CHIPS — pills oscuras
   ============================================================ */
body.clp-theme .clp-storage-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
}

body.clp-theme .clp-storage-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.38rem !important;
    padding: 0.42rem 0.8rem !important;
    background: rgba(255,255,255,0.06) !important;
    border: 1.5px solid rgba(255,255,255,0.1) !important;
    border-radius: 99px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: rgba(255,255,255,0.6) !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    font-family: 'Space Grotesk', system-ui, sans-serif;
}

body.clp-theme .clp-storage-chip:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: color-mix(in srgb, var(--cat-clr, #3b82f6) 60%, rgba(255,255,255,0.2)) !important;
    color: rgba(255,255,255,0.9) !important;
    transform: translateY(-1px) !important;
}

body.clp-theme .clp-storage-chip.is-active,
body.clp-theme .clp-storage-chip:has(input:checked) {
    background: var(--cat-clr, #3b82f6) !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    color: #fff !important;
    box-shadow:
        0 4px 14px -4px color-mix(in srgb, var(--cat-clr, #3b82f6) 65%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

body.clp-theme .clp-storage-chip__label {
    color: inherit !important;
    font-weight: 700 !important;
}

body.clp-theme .clp-storage-chip__count {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    color: rgba(255,255,255,0.35) !important;
    background: rgba(255,255,255,0.1) !important;
    padding: 0.05rem 0.4rem !important;
    border-radius: 99px !important;
    font-variant-numeric: tabular-nums;
}

body.clp-theme .clp-storage-chip.is-active .clp-storage-chip__count {
    background: rgba(255,255,255,0.22) !important;
    color: rgba(255,255,255,0.85) !important;
}

/* ============================================================
   11. COLOR SWATCHES — sobre fondo oscuro
   ============================================================ */
body.clp-theme .clp-color-swatches {
    gap: 0.45rem 0.35rem !important;
}

body.clp-theme .clp-color-swatch {
    padding: 0.32rem !important;
    border-radius: 10px !important;
    cursor: pointer;
    transition: background 0.18s ease !important;
}

body.clp-theme .clp-color-swatch:hover {
    background: rgba(255,255,255,0.08) !important;
}

body.clp-theme .clp-color-swatch__circle {
    width: 26px !important;
    height: 26px !important;
    border: 2px solid rgba(255,255,255,0.2) !important;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.08),
        0 2px 6px rgba(0,0,0,0.3) !important;
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease !important;
}

body.clp-theme .clp-color-swatch.is-active .clp-color-swatch__circle,
body.clp-theme .clp-color-swatch input:checked + .clp-color-swatch__circle {
    transform: scale(1.12) !important;
    box-shadow:
        0 0 0 2px var(--cat-clr, #3b82f6),
        0 4px 10px rgba(0,0,0,0.35) !important;
    border-color: rgba(255,255,255,0.6) !important;
}

body.clp-theme .clp-color-swatch__name {
    font-size: 0.63rem !important;
    font-weight: 600 !important;
    color: rgba(255,255,255,0.45) !important;
    text-align: center !important;
}

body.clp-theme .clp-color-swatch.is-active .clp-color-swatch__name {
    color: rgba(255,255,255,0.85) !important;
}

/* ============================================================
   12. CHECK FEATURED ("Solo disponibles") — sobre fondo oscuro
   ============================================================ */
body.clp-theme .clp-check--featured {
    background: rgba(16,185,129,0.08) !important;
    border: 1px solid rgba(16,185,129,0.22) !important;
    border-radius: 10px !important;
    padding: 0.55rem 0.6rem !important;
}

body.clp-theme .clp-check--featured:hover {
    background: rgba(16,185,129,0.13) !important;
    border-color: rgba(16,185,129,0.35) !important;
}

body.clp-theme .clp-check--featured .clp-check-label {
    color: rgba(255,255,255,0.75) !important;
}

body.clp-theme .clp-check-icon {
    color: #34d399 !important;
    filter: drop-shadow(0 0 4px rgba(52,211,153,0.5));
}

} /* end @media (min-width: 1024px) */

/* ============================================================
   13. GRID — ancho del sidebar ajustado al nuevo panel oscuro
   ============================================================ */
@media (min-width: 1024px) {
    body.clp-theme .clp-layout-inner {
        grid-template-columns: 288px 1fr !important;
        gap: 2rem !important;
        align-items: start !important;
    }
}

/* ============================================================
   14. Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    body.clp-theme .clp-check-box,
    body.clp-theme .clp-storage-chip,
    body.clp-theme .clp-color-swatch__circle {
        transition: none !important;
    }
}

/* ============================================================
   15. NUCLEAR OVERRIDE — Fondo transparente de todos los
       contenedores internos del sidebar (especificidad 0,3,0
       que vence cualquier regla 0,2,0 de archivos anteriores)
   ============================================================ */
@media (min-width: 1024px) {
    body.clp-theme .clp-sidebar .clp-filters,
    body.clp-theme .clp-sidebar .clp-filter-group,
    body.clp-theme .clp-sidebar fieldset {
        background: transparent !important;
    }

    /* Inputs y chips sí tienen fondo propio */
    body.clp-theme .clp-sidebar .clp-check-box {
        background: rgba(255,255,255,0.06) !important;
        border-color: rgba(255,255,255,0.2) !important;
    }
    body.clp-theme .clp-sidebar .clp-check input:checked ~ .clp-check-box {
        background: var(--cat-clr, #3b82f6) !important;
        border-color: var(--cat-clr, #3b82f6) !important;
    }
    body.clp-theme .clp-sidebar .clp-check-label {
        color: rgba(255,255,255,0.65) !important;
    }
    body.clp-theme .clp-sidebar .clp-check:hover .clp-check-label {
        color: rgba(255,255,255,0.9) !important;
    }
    body.clp-theme .clp-sidebar .clp-check input:checked ~ .clp-check-label {
        color: rgba(255,255,255,0.95) !important;
    }
    body.clp-theme .clp-sidebar .clp-price-inputs input[type="number"] {
        background: rgba(255,255,255,0.07) !important;
        border-color: rgba(255,255,255,0.12) !important;
        color: rgba(255,255,255,0.95) !important;
    }
    body.clp-theme .clp-sidebar .clp-search-inline input {
        background: rgba(255,255,255,0.07) !important;
        border-color: rgba(255,255,255,0.12) !important;
        color: rgba(255,255,255,0.9) !important;
    }
    body.clp-theme .clp-sidebar .clp-chip > span {
        background: rgba(255,255,255,0.05) !important;
        border-color: rgba(255,255,255,0.1) !important;
        color: rgba(255,255,255,0.65) !important;
    }
    body.clp-theme .clp-sidebar .clp-chip input:checked + span {
        background: var(--cat-clr, #3b82f6) !important;
        border-color: var(--cat-clr, #3b82f6) !important;
        color: #fff !important;
    }
    body.clp-theme .clp-sidebar .clp-storage-chip {
        background: rgba(255,255,255,0.06) !important;
        border-color: rgba(255,255,255,0.1) !important;
        color: rgba(255,255,255,0.6) !important;
    }
    body.clp-theme .clp-sidebar .clp-filters .clp-storage-chip.is-active,
    body.clp-theme .clp-sidebar .clp-filters .clp-storage-chip:has(input:checked) {
        background: var(--cat-clr, #3b82f6) !important;
        border-color: var(--cat-clr, #3b82f6) !important;
        color: #fff !important;
    }
    body.clp-theme .clp-sidebar .clp-price-quick__chip {
        background: rgba(255,255,255,0.06) !important;
        border-color: rgba(255,255,255,0.1) !important;
        color: rgba(255,255,255,0.65) !important;
    }
    body.clp-theme .clp-sidebar .clp-price-quick__chip.is-active {
        background: var(--cat-clr, #3b82f6) !important;
        border-color: var(--cat-clr, #3b82f6) !important;
        color: #fff !important;
    }
    body.clp-theme .clp-sidebar .clp-filter-legend {
        color: rgba(255,255,255,0.45) !important;
    }
    body.clp-theme .clp-sidebar .clp-filter-legend::before {
        background: var(--cat-clr, #3b82f6) !important;
    }
    body.clp-theme .clp-sidebar .clp-check:hover {
        background: rgba(255,255,255,0.06) !important;
    }
    body.clp-theme .clp-sidebar .clp-rating:hover {
        background: rgba(255,255,255,0.06) !important;
    }
    body.clp-theme .clp-sidebar .clp-rating-stars i {
        color: #f59e0b !important;
    }
    body.clp-theme .clp-sidebar .clp-rating-stars i.empty {
        color: rgba(255,255,255,0.14) !important;
    }
    body.clp-theme .clp-sidebar .clp-rating-stars em {
        color: rgba(255,255,255,0.4) !important;
    }
    body.clp-theme .clp-sidebar .clp-check-count {
        background: rgba(255,255,255,0.07) !important;
        color: rgba(255,255,255,0.28) !important;
    }
    body.clp-theme .clp-sidebar .clp-price-values strong {
        color: rgba(255,255,255,0.95) !important;
    }
    body.clp-theme .clp-sidebar .clp-price-values {
        color: rgba(255,255,255,0.55) !important;
    }
    body.clp-theme .clp-sidebar .clp-price-sep {
        color: rgba(255,255,255,0.2) !important;
    }
    body.clp-theme .clp-sidebar .clp-hist-bar {
        background: rgba(255,255,255,0.1) !important;
    }
    body.clp-theme .clp-sidebar .clp-hist-bar.is-active {
        background: color-mix(in srgb, var(--cat-clr, #3b82f6) 75%, rgba(255,255,255,0.3)) !important;
    }
    body.clp-theme .clp-sidebar .clp-price-track {
        background: rgba(255,255,255,0.1) !important;
    }
    body.clp-theme .clp-sidebar .clp-sheet-actions {
        display: none !important;
    }
    /* Limpiar sidebar header (sobrescribe el blanco del desktop-premium) */
    body.clp-theme .clp-sidebar .clp-sheet-head {
        background: color-mix(in srgb, var(--cat-clr, #3b82f6) 14%, rgba(255,255,255,0.04)) !important;
        border-bottom-color: rgba(255,255,255,0.07) !important;
    }
    body.clp-theme .clp-sidebar .clp-sheet-title {
        color: rgba(255,255,255,0.95) !important;
    }
    body.clp-theme .clp-sidebar .clp-sheet-title i {
        color: var(--cat-clr, #3b82f6) !important;
    }
    body.clp-theme .clp-sidebar .clp-active-count {
        background: var(--cat-clr, #3b82f6) !important;
        color: #fff !important;
    }
    body.clp-theme .clp-sidebar .clp-legend-reset {
        color: rgba(255,255,255,0.22) !important;
        background: none !important;
    }
    body.clp-theme .clp-sidebar .clp-legend-reset:hover {
        color: #f87171 !important;
        background: rgba(248,113,113,0.1) !important;
    }
    body.clp-theme .clp-sidebar .clp-color-swatch__name {
        color: rgba(255,255,255,0.45) !important;
    }
    body.clp-theme .clp-sidebar .clp-color-swatch__circle {
        border-color: rgba(255,255,255,0.2) !important;
    }
}

/* ============================================================
   16. MOBILE — Modal oscuro premium (mismo look que desktop)
   Aplica al modal centrado de filtros en pantallas < 1024px
   ============================================================ */
@media (max-width: 1023px) {

    /* ── Layout: bottom-sheet con flex column ── */
    body.clp-theme .clp-sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 90dvh !important;
        border-radius: 22px 22px 0 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        transform: translateY(100%) !important;
        transition: transform 0.35s cubic-bezier(0.32,0.72,0,1) !important;
        /* Gradiente navy */
        background: linear-gradient(
            180deg,
            color-mix(in srgb, var(--cat-clr, #3b82f6) 10%, #0d1525) 0%,
            #0d1525 30%,
            #0b1220 100%
        ) !important;
        border: 1px solid color-mix(in srgb, var(--cat-clr, #3b82f6) 22%, rgba(255,255,255,0.08)) !important;
        border-bottom: none !important;
        box-shadow:
            0 -4px 60px -10px color-mix(in srgb, var(--cat-clr, #3b82f6) 28%, transparent),
            0 -2px 32px rgba(0,0,0,0.5) !important;
    }

    body.clp-theme .clp-sidebar.is-open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Área de filtros — flex grow + scroll propio */
    body.clp-theme .clp-sidebar .clp-filters {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(255,255,255,0.15) transparent !important;
    }

    /* Header oscuro con tint */
    body.clp-theme .clp-sidebar .clp-sheet-head,
    body.clp-theme .clp-sheet-head {
        background: color-mix(in srgb, var(--cat-clr, #3b82f6) 14%, rgba(255,255,255,0.04)) !important;
        border-bottom-color: rgba(255,255,255,0.08) !important;
    }

    body.clp-theme .clp-sidebar .clp-sheet-title,
    body.clp-theme .clp-sheet-title {
        color: rgba(255,255,255,0.95) !important;
    }

    body.clp-theme .clp-sidebar .clp-sheet-title i,
    body.clp-theme .clp-sheet-title i {
        color: var(--cat-clr, #3b82f6) !important;
        filter: drop-shadow(0 0 6px var(--cat-clr, #3b82f6));
    }

    /* Botón cerrar glass */
    body.clp-theme .clp-sidebar .clp-sheet-close,
    body.clp-theme .clp-sheet-close {
        background: rgba(255,255,255,0.1) !important;
        color: rgba(255,255,255,0.8) !important;
        border: 1px solid rgba(255,255,255,0.12) !important;
    }
    body.clp-theme .clp-sidebar .clp-sheet-close:hover,
    body.clp-theme .clp-sheet-close:hover {
        background: rgba(255,255,255,0.18) !important;
        color: #fff !important;
    }

    /* Contador activos */
    body.clp-theme .clp-sidebar .clp-active-count {
        background: var(--cat-clr, #3b82f6) !important;
        color: #fff !important;
    }

    /* Área de filtros — transparente para ver el fondo del modal */
    body.clp-theme .clp-sidebar .clp-filters,
    body.clp-theme .clp-sidebar .clp-filter-group,
    body.clp-theme .clp-sidebar fieldset {
        background: transparent !important;
    }

    body.clp-theme .clp-sidebar .clp-filters {
        scrollbar-color: rgba(255,255,255,0.15) transparent !important;
    }

    /* Separadores entre grupos */
    body.clp-theme .clp-sidebar .clp-filter-group {
        border-bottom-color: rgba(255,255,255,0.07) !important;
    }

    /* Legends */
    body.clp-theme .clp-sidebar .clp-filter-legend {
        color: rgba(255,255,255,0.45) !important;
    }
    body.clp-theme .clp-sidebar .clp-filter-legend::before {
        background: var(--cat-clr, #3b82f6) !important;
    }
    body.clp-theme .clp-sidebar .clp-legend-reset {
        color: rgba(255,255,255,0.25) !important;
        background: none !important;
    }
    body.clp-theme .clp-sidebar .clp-legend-reset:hover {
        color: #f87171 !important;
        background: rgba(248,113,113,0.1) !important;
    }

    /* Chips subcategoría */
    body.clp-theme .clp-sidebar .clp-chip > span {
        background: rgba(255,255,255,0.06) !important;
        border-color: rgba(255,255,255,0.12) !important;
        color: rgba(255,255,255,0.7) !important;
    }
    body.clp-theme .clp-sidebar .clp-chip input:checked + span {
        background: var(--cat-clr, #3b82f6) !important;
        border-color: var(--cat-clr, #3b82f6) !important;
        color: #fff !important;
    }

    /* Precio — valores */
    body.clp-theme .clp-sidebar .clp-price-values {
        color: rgba(255,255,255,0.5) !important;
    }
    body.clp-theme .clp-sidebar .clp-price-values strong {
        color: rgba(255,255,255,0.95) !important;
    }
    body.clp-theme .clp-sidebar .clp-price-sep {
        color: rgba(255,255,255,0.2) !important;
    }

    /* Histograma */
    body.clp-theme .clp-sidebar .clp-hist-bar {
        background: rgba(255,255,255,0.1) !important;
    }
    body.clp-theme .clp-sidebar .clp-hist-bar.is-active {
        background: color-mix(in srgb, var(--cat-clr, #3b82f6) 75%, rgba(255,255,255,0.3)) !important;
    }

    /* Track del slider */
    body.clp-theme .clp-sidebar .clp-price-track {
        background: rgba(255,255,255,0.1) !important;
    }
    body.clp-theme .clp-sidebar .clp-price-fill {
        background: linear-gradient(90deg, var(--cat-clr, #3b82f6), color-mix(in srgb, var(--cat-clr, #3b82f6) 80%, #fff)) !important;
    }

    /* Quick chips de precio */
    body.clp-theme .clp-sidebar .clp-price-quick__chip {
        background: rgba(255,255,255,0.06) !important;
        border-color: rgba(255,255,255,0.12) !important;
        color: rgba(255,255,255,0.65) !important;
    }
    body.clp-theme .clp-sidebar .clp-price-quick__chip.is-active {
        background: var(--cat-clr, #3b82f6) !important;
        border-color: var(--cat-clr, #3b82f6) !important;
        color: #fff !important;
    }

    /* Inputs de precio */
    body.clp-theme .clp-sidebar .clp-price-inputs input,
    body.clp-theme .clp-sidebar .clp-price-inputs input[type="number"] {
        background: rgba(255,255,255,0.07) !important;
        border-color: rgba(255,255,255,0.14) !important;
        color: rgba(255,255,255,0.95) !important;
    }
    body.clp-theme .clp-sidebar .clp-price-inputs label > span {
        background: transparent !important;
        color: rgba(255,255,255,0.38) !important;
    }

    /* Search de marcas */
    body.clp-theme .clp-sidebar .clp-search-inline input {
        background: rgba(255,255,255,0.07) !important;
        border-color: rgba(255,255,255,0.12) !important;
        color: rgba(255,255,255,0.9) !important;
    }
    body.clp-theme .clp-sidebar .clp-search-inline i {
        color: rgba(255,255,255,0.35) !important;
    }

    /* Checkboxes */
    body.clp-theme .clp-sidebar .clp-check:hover {
        background: rgba(255,255,255,0.06) !important;
    }
    body.clp-theme .clp-sidebar .clp-check-box {
        background: rgba(255,255,255,0.07) !important;
        border-color: rgba(255,255,255,0.22) !important;
    }
    body.clp-theme .clp-sidebar .clp-check input:checked ~ .clp-check-box {
        background: var(--cat-clr, #3b82f6) !important;
        border-color: var(--cat-clr, #3b82f6) !important;
    }
    body.clp-theme .clp-sidebar .clp-check-label {
        color: rgba(255,255,255,0.7) !important;
    }
    body.clp-theme .clp-sidebar .clp-check:hover .clp-check-label {
        color: rgba(255,255,255,0.95) !important;
    }
    body.clp-theme .clp-sidebar .clp-check input:checked ~ .clp-check-label {
        color: rgba(255,255,255,0.95) !important;
    }
    body.clp-theme .clp-sidebar .clp-check-count {
        background: rgba(255,255,255,0.08) !important;
        color: rgba(255,255,255,0.32) !important;
    }

    /* Ratings */
    body.clp-theme .clp-sidebar .clp-rating:hover {
        background: rgba(255,255,255,0.06) !important;
    }
    body.clp-theme .clp-sidebar .clp-rating-stars i {
        color: #f59e0b !important;
    }
    body.clp-theme .clp-sidebar .clp-rating-stars i.empty {
        color: rgba(255,255,255,0.15) !important;
    }
    body.clp-theme .clp-sidebar .clp-rating-stars em {
        color: rgba(255,255,255,0.4) !important;
    }

    /* Storage chips */
    body.clp-theme .clp-sidebar .clp-storage-chip {
        background: rgba(255,255,255,0.07) !important;
        border-color: rgba(255,255,255,0.12) !important;
        color: rgba(255,255,255,0.65) !important;
    }
    body.clp-theme .clp-sidebar .clp-storage-chip.is-active,
    body.clp-theme .clp-sidebar .clp-storage-chip:has(input:checked) {
        background: var(--cat-clr, #3b82f6) !important;
        border-color: var(--cat-clr, #3b82f6) !important;
        color: #fff !important;
    }

    /* Swatches de color */
    body.clp-theme .clp-sidebar .clp-color-swatch__circle {
        border-color: rgba(255,255,255,0.2) !important;
    }
    body.clp-theme .clp-sidebar .clp-color-swatch__name {
        color: rgba(255,255,255,0.45) !important;
    }
    body.clp-theme .clp-sidebar .clp-color-swatch:hover {
        background: rgba(255,255,255,0.08) !important;
    }

    /* Footer de acciones — oscuro translúcido */
    body.clp-theme .clp-sidebar .clp-sheet-actions,
    body.clp-theme .clp-sheet-actions {
        background: rgba(11,18,32,0.95) !important;
        border-top-color: rgba(255,255,255,0.08) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
    }
    body.clp-theme .clp-sheet-actions .clp-btn-ghost {
        background: rgba(255,255,255,0.08) !important;
        border-color: rgba(255,255,255,0.14) !important;
        color: rgba(255,255,255,0.7) !important;
    }
    body.clp-theme .clp-sheet-actions .clp-btn-ghost:hover,
    body.clp-theme .clp-sheet-actions .clp-btn-ghost:active {
        background: rgba(255,255,255,0.14) !important;
        color: #fff !important;
    }
}

/* ============================================================
   17. FIX GLOBAL — reglas sin media-query en clp-desktop-premium
       (aplica a desktop Y mobile, mayor especificidad + !important)
   ============================================================ */

/* Label flotante: cambiar a bloque simple, sin overlay blanco */
body.clp-theme .clp-sidebar .clp-price-inputs label {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.3rem !important;
}

body.clp-theme .clp-sidebar .clp-price-inputs label > span {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.38) !important;
    pointer-events: none !important;
}

/* Inputs de precio — fondo oscuro translúcido */
body.clp-theme .clp-sidebar .clp-price-inputs input,
body.clp-theme .clp-sidebar .clp-price-inputs input[type="number"] {
    background: rgba(255,255,255,0.07) !important;
    border: 1.5px solid rgba(255,255,255,0.14) !important;
    border-radius: 10px !important;
    color: rgba(255,255,255,0.95) !important;
    height: 36px !important;
    padding: 0 0.6rem !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
    /* Quitar flechas nativas del input number */
    -moz-appearance: textfield !important;
}

body.clp-theme .clp-sidebar .clp-price-inputs input::-webkit-inner-spin-button,
body.clp-theme .clp-sidebar .clp-price-inputs input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

body.clp-theme .clp-sidebar .clp-price-inputs input:focus {
    outline: none !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-clr, #3b82f6) 22%, transparent) !important;
    background: rgba(255,255,255,0.1) !important;
}

body.clp-theme .clp-sidebar .clp-price-inputs input::placeholder {
    color: rgba(255,255,255,0.3) !important;
}

/* Sheet head fuera de media query también (aplica desktop y mobile) */
body.clp-theme .clp-sidebar .clp-sheet-head {
    background: color-mix(in srgb, var(--cat-clr, #3b82f6) 14%, rgba(255,255,255,0.04)) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

body.clp-theme .clp-sidebar .clp-sheet-title {
    color: rgba(255,255,255,0.95) !important;
}

body.clp-theme .clp-sidebar .clp-sheet-title i {
    color: var(--cat-clr, #3b82f6) !important;
}

/* ============================================================
   18. SORTBAR + PRESETS + SUBCAT — Premium v4
   Sin hacks de pseudo-elemento. Layout natural con container.
   Color: accent top en sortbar, subcat con tinte de cat-clr.
   ============================================================ */
@media (min-width: 992px) {

/* ── 18.1 Sortbar wrapper ── */
body.clp-theme .clp-sortbar {
    background: #fff !important;
    border-top: 2.5px solid var(--cat-clr, #3b82f6) !important;
    border-bottom: none !important;
    box-shadow: 0 2px 16px -6px rgba(15,23,42,0.07) !important;
    padding: 0 !important;
}

/* ── 18.2 Toolbar row ── */
body.clp-theme .clp-sortbar-inner {
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    padding-top: 0.9rem !important;
    padding-bottom: 0.9rem !important;
    min-height: 72px !important;
    border-bottom: 1px solid rgba(15,23,42,0.06) !important;
}

/* ── 18.3 Layout izquierda / derecha ── */
body.clp-theme .clp-sortbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}
body.clp-theme .clp-sortbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    flex-shrink: 0 !important;
    padding-left: 1.25rem !important;
    border-left: 1px solid rgba(15,23,42,0.08) !important;
}

/* ── 18.4 Botón FILTROS ── */
body.clp-theme .clp-filter-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
    height: 44px !important;
    padding: 0 1.35rem !important;
    background: linear-gradient(135deg,
        #0f172a 0%,
        color-mix(in srgb, var(--cat-clr, #3b82f6) 30%, #0f172a) 100%
    ) !important;
    border: none !important;
    border-radius: 14px !important;
    color: #fff !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow:
        0 2px 4px rgba(15,23,42,0.14),
        0 6px 18px -4px color-mix(in srgb, var(--cat-clr, #3b82f6) 40%, rgba(15,23,42,0.2)),
        inset 0 1px 0 rgba(255,255,255,0.1) !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease !important;
}
body.clp-theme .clp-filter-toggle i {
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 70%, #fff) !important;
    font-size: 0.85rem !important;
}
body.clp-theme .clp-filter-toggle:hover {
    transform: translateY(-1px) !important;
    box-shadow:
        0 3px 8px rgba(15,23,42,0.15),
        0 10px 28px -6px color-mix(in srgb, var(--cat-clr, #3b82f6) 55%, rgba(15,23,42,0.25)),
        inset 0 1px 0 rgba(255,255,255,0.13) !important;
}
body.clp-theme .clp-filter-toggle:active { transform: translateY(0) !important; }

body.clp-theme .clp-filter-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 5px !important;
    background: rgba(255,255,255,0.25) !important;
    border-radius: 99px !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    color: #fff !important;
}

/* ── 18.5 Búsqueda ── */
body.clp-theme .clp-search,
body.clp-theme .clp-search--enhanced {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 480px !important;
    position: relative !important;
}
body.clp-theme .clp-search-input {
    height: 44px !important;
    padding: 0 2.4rem 0 2.6rem !important;
    background: #f1f5f9 !important;
    border: 1.5px solid transparent !important;
    border-radius: 14px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    box-shadow: none !important;
    transition: all 0.18s ease !important;
    width: 100% !important;
}
body.clp-theme .clp-search-input::placeholder { color: #94a3b8 !important; font-weight: 400 !important; }
body.clp-theme .clp-search-input:hover {
    background: #e8eef5 !important;
    border-color: transparent !important;
}
body.clp-theme .clp-search-input:focus {
    outline: none !important;
    background: #fff !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--cat-clr, #3b82f6) 16%, transparent) !important;
}
body.clp-theme .clp-search-ic {
    color: #94a3b8 !important;
    font-size: 0.88rem !important;
    left: 0.85rem !important;
}
body.clp-theme .clp-search-input:focus ~ .clp-search-ic { color: var(--cat-clr, #3b82f6) !important; }
body.clp-theme .clp-search-kbd {
    background: rgba(15,23,42,0.07) !important;
    border: none !important;
    color: #94a3b8 !important;
    border-radius: 6px !important;
    font-size: 0.72rem !important;
    padding: 0.15rem 0.4rem !important;
    box-shadow: none !important;
}
body.clp-theme .clp-search-clear {
    background: rgba(15,23,42,0.09) !important;
    border: none !important;
    color: #64748b !important;
    border-radius: 50% !important;
    width: 26px !important;
    height: 26px !important;
    right: 0.5rem !important;
}

/* ── 18.6 Count + Sort ── */
body.clp-theme .clp-results-count {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 0.25rem !important;
    white-space: nowrap !important;
    font-size: 0.82rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
}
body.clp-theme .clp-results-count strong {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.03em !important;
    font-variant-numeric: tabular-nums !important;
}
body.clp-theme .clp-sort-label {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.09em !important;
    color: #94a3b8 !important;
    white-space: nowrap !important;
}
body.clp-theme .clp-select-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
}
body.clp-theme .clp-select {
    height: 40px !important;
    padding: 0 2.3rem 0 0.9rem !important;
    background: #f1f5f9 !important;
    border: 1.5px solid transparent !important;
    border-radius: 12px !important;
    color: #1e293b !important;
    font-size: 0.83rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-shadow: none !important;
    transition: all 0.18s ease !important;
    letter-spacing: -0.01em !important;
}
body.clp-theme .clp-select:hover { background: #e8eef5 !important; }
body.clp-theme .clp-select:focus {
    outline: none !important;
    background: #fff !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-clr, #3b82f6) 16%, transparent) !important;
}
body.clp-theme .clp-select-wrap .clp-select-caret {
    position: absolute !important;
    right: 0.65rem !important;
    pointer-events: none !important;
    color: #64748b !important;
    font-size: 0.72rem !important;
}

/* ── 18.7 PRESETS ROW ── */
body.clp-theme .clp-presets-row {
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
    border-top: 1px solid rgba(15,23,42,0.055) !important;
    border-bottom: 1px solid rgba(15,23,42,0.055) !important;
}
body.clp-theme .clp-presets {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.4rem !important;
    overflow-x: auto !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    align-items: center !important;
}
body.clp-theme .clp-presets::-webkit-scrollbar { display: none !important; }

/* Chips — pill con fondo gris sólido, texto oscuro con contraste */
body.clp-theme .clp-preset {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.38rem !important;
    height: 33px !important;
    padding: 0 0.92rem !important;
    border-radius: 99px !important;
    border: none !important;
    background: #dde3ed !important;
    color: #1e293b !important;
    font-size: 0.79rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    letter-spacing: -0.005em !important;
    flex-shrink: 0 !important;
}
body.clp-theme .clp-preset i {
    font-size: 0.72rem !important;
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 65%, #64748b) !important;
    transition: color 0.15s ease !important;
}
body.clp-theme .clp-preset:hover {
    background: color-mix(in srgb, var(--cat-clr, #3b82f6) 14%, #dde3ed) !important;
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 90%, #0f172a) !important;
    transform: translateY(-1px) !important;
}
body.clp-theme .clp-preset:hover i { color: var(--cat-clr, #3b82f6) !important; }
body.clp-theme .clp-preset[aria-pressed="true"] {
    background: var(--cat-clr, #3b82f6) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--cat-clr, #3b82f6) 55%, transparent) !important;
    transform: none !important;
}
body.clp-theme .clp-preset[aria-pressed="true"] i { color: rgba(255,255,255,0.9) !important; }

/* ── 18.8 SUBCAT STRIP ── */
body.clp-theme .clp-subcat-strip {
    background: #ffffff !important;
    border-bottom: none !important;
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    box-shadow: 0 6px 24px -8px rgba(15,23,42,0.12) !important;
}
body.clp-theme .clp-subcat-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.4rem !important;
    overflow-x: auto !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    align-items: center !important;
    padding: 2px 0 3px !important;
}
body.clp-theme .clp-subcat-pills::-webkit-scrollbar { display: none !important; }
body.clp-theme .clp-subcat-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    height: 36px !important;
    padding: 0 1rem !important;
    border-radius: 10px !important;
    border: 1.5px solid #dde3ed !important;
    background: #dde3ed !important;
    color: #1e293b !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: all 0.18s ease !important;
    letter-spacing: -0.01em !important;
    box-shadow: none !important;
}
body.clp-theme .clp-subcat-pill i {
    font-size: 0.75rem !important;
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 60%, #64748b) !important;
    transition: color 0.18s ease !important;
}
body.clp-theme .clp-subcat-pill:hover {
    background: color-mix(in srgb, var(--cat-clr, #3b82f6) 12%, #dde3ed) !important;
    border-color: color-mix(in srgb, var(--cat-clr, #3b82f6) 40%, #dde3ed) !important;
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 90%, #0f172a) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--cat-clr, #3b82f6) 22%, transparent) !important;
}
body.clp-theme .clp-subcat-pill:hover i { color: var(--cat-clr, #3b82f6) !important; }
body.clp-theme .clp-subcat-pill.active {
    background: linear-gradient(135deg,
        #0f172a 0%,
        color-mix(in srgb, var(--cat-clr, #3b82f6) 30%, #0f172a) 100%
    ) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow:
        0 2px 4px rgba(15,23,42,0.18),
        0 6px 18px -4px color-mix(in srgb, var(--cat-clr, #3b82f6) 38%, rgba(15,23,42,0.25)),
        inset 0 1px 0 rgba(255,255,255,0.1) !important;
    transform: none !important;
}
body.clp-theme .clp-subcat-pill.active i {
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 70%, #fff) !important;
}
body.clp-theme .clp-subcat-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 22px !important;
    height: 20px !important;
    padding: 0 6px !important;
    background: rgba(15,23,42,0.09) !important;
    border-radius: 99px !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    font-variant-numeric: tabular-nums !important;
}
body.clp-theme .clp-subcat-pill.active .clp-subcat-count {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
}

/* ── 18.9 ACTIVE CHIPS ROW ── */
body.clp-theme .clp-activechips-row {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    gap: 0.4rem !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(15,23,42,0.05) !important;
    background: color-mix(in srgb, var(--cat-clr, #3b82f6) 4%, #f8fafc) !important;
}
body.clp-theme .clp-activechips-title {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #94a3b8 !important;
    white-space: nowrap !important;
}
body.clp-theme .clp-activechip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    height: 28px !important;
    padding: 0 0.7rem !important;
    border-radius: 99px !important;
    background: color-mix(in srgb, var(--cat-clr, #3b82f6) 10%, #fff) !important;
    border: 1px solid color-mix(in srgb, var(--cat-clr, #3b82f6) 28%, rgba(15,23,42,0.08)) !important;
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 85%, #0f172a) !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.16s ease !important;
    white-space: nowrap !important;
}
body.clp-theme .clp-activechip i { font-size: 0.65rem !important; opacity: 0.7 !important; }
body.clp-theme .clp-activechip:hover {
    background: color-mix(in srgb, var(--cat-clr, #3b82f6) 16%, #fff) !important;
    border-color: var(--cat-clr, #3b82f6) !important;
}
body.clp-theme .clp-activechip-clear,
body.clp-theme .clp-share-filters {
    height: 28px !important;
    padding: 0 0.75rem !important;
    border-radius: 99px !important;
    border: 1.5px solid rgba(15,23,42,0.09) !important;
    background: transparent !important;
    color: #64748b !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.16s ease !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
}
body.clp-theme .clp-activechip-clear:hover { color: #ef4444 !important; border-color: #ef4444 !important; }
body.clp-theme .clp-share-filters:hover { color: var(--cat-clr, #3b82f6) !important; border-color: var(--cat-clr, #3b82f6) !important; }

} /* end @media (min-width: 992px) */

/* ============================================================
   19. FAMILIAS HEADER — Premium dark card
   ============================================================ */
body.clp-theme .clp-families-head {
    position: relative !important;
    background: linear-gradient(
        135deg,
        #0f172a 0%,
        color-mix(in srgb, var(--cat-clr, #3b82f6) 22%, #0d1525) 100%
    ) !important;
    border-radius: 18px !important;
    padding: 2rem 2.25rem 2rem !important;
    margin-bottom: 2rem !important;
    overflow: hidden !important;
    border: 1px solid color-mix(in srgb, var(--cat-clr, #3b82f6) 18%, rgba(255,255,255,0.06)) !important;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 8px 32px -8px rgba(0,0,0,0.45),
        0 0 60px -20px color-mix(in srgb, var(--cat-clr, #3b82f6) 22%, transparent) !important;
}

/* Glow orb decorativo en la esquina */
body.clp-theme .clp-families-head::before {
    content: '' !important;
    position: absolute !important;
    top: -40px !important;
    right: -40px !important;
    width: 200px !important;
    height: 200px !important;
    background: radial-gradient(
        circle,
        color-mix(in srgb, var(--cat-clr, #3b82f6) 28%, transparent) 0%,
        transparent 70%
    ) !important;
    pointer-events: none !important;
    border-radius: 50% !important;
}

/* Línea accent izquierda */
body.clp-theme .clp-families-head::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 3px !important;
    border-radius: 18px 0 0 18px !important;
    background: linear-gradient(
        180deg,
        var(--cat-clr, #3b82f6) 0%,
        color-mix(in srgb, var(--cat-clr, #3b82f6) 40%, transparent) 100%
    ) !important;
}

body.clp-theme .clp-families-eyebrow {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.13em !important;
    text-transform: uppercase !important;
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 80%, #fff) !important;
    margin-bottom: 0.7rem !important;
    background: color-mix(in srgb, var(--cat-clr, #3b82f6) 16%, rgba(255,255,255,0.06)) !important;
    padding: 0.28rem 0.75rem !important;
    border-radius: 99px !important;
    border: 1px solid color-mix(in srgb, var(--cat-clr, #3b82f6) 30%, rgba(255,255,255,0.08)) !important;
}

body.clp-theme .clp-families-eyebrow i {
    font-size: 0.72rem !important;
    color: var(--cat-clr, #3b82f6) !important;
}

body.clp-theme .clp-families-title,
body.clp-theme .clp-families .clp-families-title,
body.clp-theme .clp-families-head .clp-families-title {
    font-size: clamp(1.35rem, 2.5vw, 1.8rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    color: #ffffff !important;
    margin: 0 0 0.4rem !important;
    line-height: 1.15 !important;
    font-family: 'Urbanist', 'DM Sans', sans-serif !important;
}

body.clp-theme .clp-families-sub,
body.clp-theme .clp-families .clp-families-sub {
    font-size: 0.88rem !important;
    color: rgba(255,255,255,0.48) !important;
    margin: 0 !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

/* ============================================================
   20. MOBILE SORTBAR + PRESETS + SUBCAT — Premium override
   Reemplaza los estilos pesados de clp-mobile-premium-fix.css
   ============================================================ */
@media (max-width: 991px) {

/* ── 20.1 Sortbar wrapper ── */
body.clp-theme .clp-sortbar {
    background: #ffffff !important;
    border-top: 2.5px solid var(--cat-clr, #3b82f6) !important;
    border-bottom: none !important;
    box-shadow: 0 2px 12px -4px rgba(15,23,42,0.07) !important;
    padding: 0 !important;
}

/* ── 20.2 Filas internas ── */
body.clp-theme .clp-sortbar-inner {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.55rem !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.6rem !important;
    border-bottom: 1px solid rgba(15,23,42,0.06) !important;
    min-height: unset !important;
}

/* ── 20.3 Fila 1: Filtros + Search ── */
body.clp-theme .clp-sortbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    flex: 1 1 100% !important;
}

/* ── 20.4 Botón Filtros ── */
body.clp-theme .clp-filter-toggle {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 1.1rem !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    border-radius: 14px !important;
    flex-shrink: 0 !important;
    background: linear-gradient(135deg,
        #0f172a 0%,
        color-mix(in srgb, var(--cat-clr, #3b82f6) 28%, #0f172a) 100%
    ) !important;
    box-shadow:
        0 2px 4px rgba(15,23,42,0.14),
        0 6px 18px -4px color-mix(in srgb, var(--cat-clr, #3b82f6) 38%, rgba(15,23,42,0.2)),
        inset 0 1px 0 rgba(255,255,255,0.1) !important;
}
body.clp-theme .clp-filter-toggle i {
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 70%, #fff) !important;
    font-size: 0.85rem !important;
}

/* ── 20.5 Search — clean fill, sin borde pesado ── */
body.clp-theme .clp-search-input {
    height: 44px !important;
    min-height: 44px !important;
    background: #f1f5f9 !important;
    border: 1.5px solid transparent !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    transition: all 0.18s ease !important;
}
body.clp-theme .clp-search-input:focus {
    background: #fff !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--cat-clr, #3b82f6) 16%, transparent) !important;
    transform: none !important;
}
body.clp-theme .clp-search-input:hover {
    background: #e8eef5 !important;
    box-shadow: none !important;
    transform: none !important;
}
body.clp-theme .clp-search-ic {
    color: #94a3b8 !important;
}

/* ── 20.6 Fila 2: Resultados + Sort ── */
body.clp-theme .clp-sortbar-right {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    gap: 0.5rem !important;
    padding-left: 0 !important;
    border-left: none !important;
    padding-top: 0 !important;
}
body.clp-theme .clp-sort-label { display: none !important; }
body.clp-theme .clp-results-count {
    font-size: 0.84rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
}
body.clp-theme .clp-results-count strong {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}
body.clp-theme .clp-select {
    height: 38px !important;
    background: #f1f5f9 !important;
    border: 1.5px solid transparent !important;
    border-radius: 12px !important;
    font-size: 0.83rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    box-shadow: none !important;
}
body.clp-theme .clp-select:focus {
    background: #fff !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-clr, #3b82f6) 16%, transparent) !important;
    outline: none !important;
}

/* ── 20.7 PRESETS ROW ── */
body.clp-theme .clp-presets-row {
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
    margin: 0 !important;
    border-top: 1px solid rgba(15,23,42,0.055) !important;
    border-bottom: 1px solid rgba(15,23,42,0.055) !important;
    background: #ffffff !important;
}
body.clp-theme .clp-presets {
    display: flex !important;
    gap: 0.4rem !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    padding: 2px 1rem !important;
    margin: 0 -1rem !important;
    -webkit-overflow-scrolling: touch !important;
    align-items: center !important;
}
body.clp-theme .clp-presets::-webkit-scrollbar { display: none !important; }
body.clp-theme .clp-preset {
    flex: 0 0 auto !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 0.9rem !important;
    font-size: 0.79rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background: #dde3ed !important;
    border: none !important;
    border-radius: 99px !important;
    box-shadow: none !important;
}
body.clp-theme .clp-preset i {
    font-size: 0.72rem !important;
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 65%, #64748b) !important;
}
body.clp-theme .clp-preset:active { transform: scale(0.96) !important; }
body.clp-theme .clp-preset[aria-pressed="true"] {
    background: linear-gradient(135deg,
        #0f172a 0%,
        color-mix(in srgb, var(--cat-clr, #3b82f6) 28%, #0f172a) 100%
    ) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px -3px color-mix(in srgb, var(--cat-clr, #3b82f6) 35%, rgba(15,23,42,0.2)) !important;
}
body.clp-theme .clp-preset[aria-pressed="true"] i { color: rgba(255,255,255,0.9) !important; }

/* ── 20.8 SUBCAT STRIP ── */
body.clp-theme .clp-subcat-strip {
    background: #ffffff !important;
    border-top: none !important;
    border-bottom: none !important;
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
    box-shadow: 0 4px 20px -8px rgba(15,23,42,0.1) !important;
}
body.clp-theme .clp-subcat-pills {
    display: flex !important;
    gap: 0.4rem !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    padding: 2px 1rem !important;
    margin: 0 -1rem !important;
    -webkit-overflow-scrolling: touch !important;
    align-items: center !important;
}
body.clp-theme .clp-subcat-pills::-webkit-scrollbar { display: none !important; }
body.clp-theme .clp-subcat-pill {
    flex: 0 0 auto !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 0.95rem !important;
    font-size: 0.81rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background: #dde3ed !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
}
body.clp-theme .clp-subcat-pill i {
    font-size: 0.75rem !important;
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 60%, #64748b) !important;
}
body.clp-theme .clp-subcat-pill:active { transform: scale(0.97) !important; }
body.clp-theme .clp-subcat-pill.active {
    background: linear-gradient(135deg,
        #0f172a 0%,
        color-mix(in srgb, var(--cat-clr, #3b82f6) 30%, #0f172a) 100%
    ) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow:
        0 2px 4px rgba(15,23,42,0.18),
        0 6px 18px -4px color-mix(in srgb, var(--cat-clr, #3b82f6) 38%, rgba(15,23,42,0.22)),
        inset 0 1px 0 rgba(255,255,255,0.1) !important;
}
body.clp-theme .clp-subcat-pill.active i {
    color: color-mix(in srgb, var(--cat-clr, #3b82f6) 70%, #fff) !important;
}
body.clp-theme .clp-subcat-count {
    display: inline-grid !important;
    place-items: center !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 5px !important;
    background: rgba(15,23,42,0.1) !important;
    border-radius: 99px !important;
    font-size: 0.67rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    font-variant-numeric: tabular-nums !important;
}
body.clp-theme .clp-subcat-pill.active .clp-subcat-count {
    background: rgba(255,255,255,0.22) !important;
    color: #fff !important;
}

} /* end @media (max-width: 991px) */

/* ============================================================
   SORTBAR CONSOLIDATION (UX premium · v4.2.7)
   Cuando hay filtros activos, los presets desaparecen para evitar
   que dos filas de chips compitan visualmente. Los chips activos
   pasan a ser la fuente de verdad. Vuelven al limpiar todo.
   Requiere :has() — soportado en evergreen browsers 2023+.
   ============================================================ */
body.clp-theme .clp-sortbar:has(#clpActiveChipsRow:not([hidden])) .clp-presets-row {
    display: none !important;
}

/* ============================================================
   FAMILIES HEAD REDESIGN (v4.2.7)
   El card oscuro original era visualmente pesado pero poco resaltante
   (sub a 48% opacity). Se reemplaza por un section header tipo
   Stripe/Apple: tipografía fuerte, eyebrow con dot accent, sin caja.
   ============================================================ */
body.clp-theme .clp-families-head {
    position: relative !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 0 0 1rem !important;
    margin: 0 0 1.25rem !important;
    overflow: visible !important;
    /* Línea accent izquierda fina como anclaje visual */
    border-left: 3px solid var(--cat-clr, #3b82f6) !important;
}
body.clp-theme .clp-families-head::before,
body.clp-theme .clp-families-head::after {
    display: none !important;
}
body.clp-theme .clp-families-eyebrow {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    color: var(--cat-clr, #3b82f6) !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 0 0.35rem !important;
    border-radius: 0 !important;
}
body.clp-theme .clp-families-eyebrow i {
    font-size: 0.78rem !important;
    color: var(--cat-clr, #3b82f6) !important;
}
body.clp-theme .clp-families-title,
body.clp-theme .clp-families .clp-families-title,
body.clp-theme .clp-families-head .clp-families-title {
    font-size: clamp(1.3rem, 1.9vw, 1.55rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em !important;
    color: #0f172a !important;
    margin: 0 0 0.25rem !important;
    line-height: 1.15 !important;
    font-family: 'Urbanist', 'DM Sans', sans-serif !important;
}
body.clp-theme .clp-families-sub,
body.clp-theme .clp-families .clp-families-sub {
    font-size: 0.88rem !important;
    color: #64748b !important;          /* slate-500 — legible, no wash-out */
    margin: 0 !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    max-width: 60ch;
}
/* Padding superior de la sección un poco más respirado */
body.clp-theme .clp-families {
    padding-top: 0.5rem !important;
}

/* ============================================================
   MARCA SEARCH INPUT — FIX DE CONTRASTE (v4.3.1)
   El input "Buscar marca" tenía colores en conflicto entre el tema
   light de categoria-landing.css y el tema dark de la sidebar premium,
   y placeholder a opacity 0.3 (debajo de AA). Forzamos contraste AA
   en sidebar oscuro con bg/borde/texto y placeholder visibles.
   Especificidad doblada (body.clp-theme .clp-sidebar) para vencer
   reglas previas con misma especificidad pero source order anterior.
   ============================================================ */
body.clp-theme .clp-sidebar .clp-search-inline input,
body.clp-theme .clp-sidebar .clp-search-inline input[type="text"] {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    caret-color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
body.clp-theme .clp-sidebar .clp-search-inline input::placeholder {
    color: rgba(255, 255, 255, 0.62) !important;  /* AA sobre #1e293b */
    opacity: 1 !important;
}
body.clp-theme .clp-sidebar .clp-search-inline input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.62) !important;
}
body.clp-theme .clp-sidebar .clp-search-inline input:focus {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: var(--cat-clr, #3b82f6) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-clr, #3b82f6) 28%, transparent) !important;
    outline: none !important;
}
body.clp-theme .clp-sidebar .clp-search-inline i {
    color: rgba(255, 255, 255, 0.62) !important;
}
