const acc = document.getElementsByClassName('product__accordion');
let i;
for (i = 0; i < acc.length; i++) {
	acc[i].addEventListener('click', function () {
		this.classList.toggle('active');
		const panel = this.nextElementSibling;
		if (panel.style.maxHeight) {
			panel.style.maxHeight = null;
			panel.style.visibility = null;
		} else {
			panel.style.maxHeight = `${panel.scrollHeight}px`;
			panel.style.visibility = 'visible';
		}
	});
}
