/*
Theme Name:   xstore-child
Theme URI:    https://xstore.8theme.com
Description:  XStore is a multi-purpose theme that offers the ultimate WordPress and WooCommerce synergy, providing a comprehensive, all-in-one solution.
Author:       8theme
Author URI:   https://www.8theme.com
Template:     xstore
Version:      1.0
Text Domain:  xstore-child
Tags: e-commerce, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, custom-logo, featured-images, full-width-template, threaded-comments, accessibility-ready, rtl-language-support, footer-widgets, sticky-post, theme-options, translation-ready, ecommerce, woocommerce, shop, elementor, business, corporate, blog, news, light, dark
*/

<script>
document.addEventListener("DOMContentLoaded", function () {

  const signIn = document.getElementById("sign-in-menu");
  const myAccount = document.getElementById("my-account-menu");

  if (!signIn || !myAccount) return;

  // WordPress adds 'logged-in' class to body
  if (document.body.classList.contains("logged-in")) {
    signIn.style.display = "none";
    myAccount.style.display = "block";
  } else {
    signIn.style.display = "block";
    myAccount.style.display = "none";
  }
});
</script>
