/* css/catalog_filters.css — Barra de "Ordenar por" + "Filtros" reusable
   en páginas de categoría, "ver todo" y resultados de búsqueda. */

.cf-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0;
}

.cf-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.cf-select {
    padding: 9px 32px 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
}
.cf-select:focus { border-color: #6a017f; }

.cf-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: all .2s;
}
.cf-filter-toggle:hover { border-color: #6a017f; color: #6a017f; }
.cf-filter-toggle.cf-active {
    background: #6a017f;
    border-color: #6a017f;
    color: white;
}
.cf-filter-toggle .cf-badge {
    background: #f19908;
    color: white;
    font-size: 10px;
    font-weight: 800;
    border-radius: 10px;
    padding: 1px 6px;
    line-height: 1.4;
}

.cf-panel {
    display: none;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 18px;
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    margin-top: 4px;
}
.cf-panel.cf-open { display: flex; }

.cf-field { display: flex; flex-direction: column; gap: 6px; }
.cf-field label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
}

.cf-price-range { display: flex; align-items: center; gap: 8px; }
.cf-price-range span { color: #94a3b8; font-size: 12px; }
.cf-price-input {
    width: 90px;
    padding: 8px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}
.cf-price-input:focus { border-color: #6a017f; }

.cf-checkbox-field {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.cf-checkbox-field label {
    text-transform: none;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}
.cf-checkbox-field input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #6a017f;
    cursor: pointer;
}

.cf-panel-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.cf-btn-apply, .cf-btn-clear {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    border: none;
}
.cf-btn-apply { background: #6a017f; color: white; }
.cf-btn-apply:hover { background: #520160; }
.cf-btn-clear { background: white; border: 1.5px solid #e2e8f0; color: #64748b; }
.cf-btn-clear:hover { border-color: #cbd5e1; color: #374151; }

@media (max-width: 640px) {
    .cf-bar { gap: 8px; }
    .cf-sort-wrap { flex: 1; }
    .cf-select { flex: 1; }
    .cf-panel { padding: 14px; }
    .cf-panel-actions { margin-left: 0; width: 100%; }
    .cf-btn-apply, .cf-btn-clear { flex: 1; }
}
