document.addEventListener("DOMContentLoaded", function () {
const prices = document.querySelectorAll(".e-filter-price__detail");
prices.forEach(el => {
let text = el.innerText;
// Extrae números decimales
let matches = text.match(/[\d\.]+/g);
if (!matches) return;
// Formato CLP sin decimales
let min = Math.round(Number(matches[0])) || 0;
let max = Math.round(Number(matches[1])) || 0;
el.innerText = `$${min.toLocaleString("es-CL")} - $${max.toLocaleString("es-CL")}`;
});
});