if (timeLeft < 0) {
document.querySelector(".timer-minimal").innerHTML = "Акция завершена!";
return;
}
document.getElementById("days").textContent = Math.floor(timeLeft / (1000 * 60 * 60 * 24));
document.getElementById("hours").textContent = Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
document.getElementById("minutes").textContent = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));
document.getElementById("seconds").textContent = Math.floor((timeLeft % (1000 * 60)) / 1000);
}
updateTimer();
setInterval(updateTimer, 1000);
}
startCountdown();