function openMenu() {
  document.getElementById("sideMenu").style.left = "0";
}

function closeMenu() {
  document.getElementById("sideMenu").style.left = "-100%";
}
window.addEventListener("scroll", function () {
  const navbar = document.querySelector(".custom-navbar");

  if (window.scrollY > 50) {
    navbar.classList.add("scrolled");
  } else {
    navbar.classList.remove("scrolled");
  }
});
let index = 0;

setInterval(() => {
  index = (index + 1) % texts.length;
  document.getElementById("topText").innerText = texts[index];
}, 3000);

const reviews = [
  {
    text: "Hi, Neelam....",
    name: "Anonymous",
  },
  {
    text: "Amazing crystal energy!",
    name: "Rahul Sharma",
  },
  {
    text: "Loved the product quality ❤️",
    name: "Priya Singh",
  },
];

let i = 0;

setInterval(() => {
  i = (i + 1) % reviews.length;
  document.getElementById("reviewText").innerText = reviews[i].text;
  document.getElementById("reviewName").innerText = reviews[i].name;
}, 3000);
