function updatePreview() { const getVal = id => document.getElementById(id).value; const getAlign = id => { const val = document.getElementById(id).value; if (val === "center") return "text-center"; if (val === "right") return "text-end"; return "text-start"; }; const fitur = getVal("fitur").split('\n').map(i => `
${i}
`).join(''); const manfaat = getVal("manfaat").split('\n').map(i => `
${i}
`).join(''); const bonus = getVal("bonus").split('\n').map(i => `
${i}
`).join(''); const testi = getVal("testimoni").split('\n').map(i => `
${i}
`).join(''); const previewHTML = `

${getVal("judul")}

${getVal("subjudul")}

Gambar Produk

${getVal("deskripsi").replace(/\n/g, "
")}

Fitur Produk:

${fitur}

Manfaat:

${manfaat}

Bonus:

${bonus}

Testimoni:

${testi}

Pertanyaan Umum:

${getVal("faq").split('\n').map((f, i) => { const [q, a] = f.split("|"); return `

${a}
`; }).join('')}

${getVal("disclaimer").replace(/\n/g, "
")}

`; document.getElementById("preview").innerHTML = previewHTML; startCountdown(); }