/* Name Retailer layout fixes (Hello Elementor + Elementor header) */

html,
body {
  overflow-x: hidden;
}

/* Paint header (including nav dropdowns) above main content */
.elementor-location-header {
  position: relative;
  z-index: 1000;
}

/* Prevent common flex/grid children from forcing wider-than-viewport layouts */
.elementor-location-header .elementor-container,
.elementor-location-header .elementor-column,
.elementor-location-header .elementor-widget-wrap {
  min-width: 0;
}

/* Header row: keep controls inside the viewport */
.elementor-location-header .elementor-section.elementor-element-10c97ecf .elementor-container {
  align-items: center;
}

.elementor-location-header .elementor-element.elementor-element-5833e9b3 {
  min-width: 0;
}

.elementor-location-header .elementor-element.elementor-element-5833e9b3 .elementor-widget-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* Elementor Nav Menu widget (header) */
.elementor-location-header .elementor-element.elementor-element-63ae661b {
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.elementor-location-header .elementor-element.elementor-element-63ae661b.elementor-absolute {
  position: relative !important;
  inset: auto !important;
}

.elementor-location-header .elementor-element.elementor-element-63ae661b .elementor-widget-container {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* WooCommerce cart widget (Elementor Pro) */
.elementor-location-header .elementor-element.elementor-element-312e8917 {
  flex: 0 0 auto;
}
.elementor-location-header .elementor-element.elementor-element-312e8917 .elementor-menu-cart__wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Desktop/tablet: keep menu on one line (no horizontal scroll — see comment block) */
@media (min-width: 768px) {
  /*
   * Avoid overflow-x: auto / overflow-y: hidden on this nav — any non-visible
   * overflow clips Elementor nested dropdowns (they live inside the same nav > ul).
   * Stacking over page content is handled by .elementor-location-header z-index.
   */
  .elementor-location-header .elementor-element.elementor-element-63ae661b nav.elementor-nav-menu--main {
    max-width: 100%;
    overflow: visible;
  }

  .elementor-location-header .elementor-element.elementor-element-63ae661b .elementor-nav-menu {
    flex-wrap: nowrap !important;
    white-space: nowrap;
  }

  .elementor-location-header .elementor-element.elementor-element-63ae661b .elementor-nav-menu > li {
    flex: 0 0 auto;
  }

  .elementor-location-header .elementor-element.elementor-element-63ae661b .elementor-nav-menu a {
    white-space: nowrap;
  }
}

/* Mobile: keep Elementor defaults for menu logic; only normalize spacing/sizing. */
@media (max-width: 767px) {
  /* Force reliable hamburger behavior on mobile. */
  .elementor-location-header .elementor-element.elementor-element-63ae661b .elementor-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .elementor-location-header .elementor-element.elementor-element-63ae661b {
    flex: 0 0 auto;
    order: 1;
  }

  .elementor-location-header .elementor-element.elementor-element-63ae661b .elementor-widget-container {
    width: auto;
    max-width: none;
    flex: 0 0 auto;
  }

  .elementor-location-header .elementor-element.elementor-element-312e8917 {
    order: 2;
    margin: 0 !important;
  }

  /* Keep burger + cart aligned and easy to tap */
  .elementor-location-header .elementor-element.elementor-element-63ae661b .elementor-menu-toggle,
  .elementor-location-header .elementor-element.elementor-element-312e8917 .elementor-menu-cart__toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .elementor-location-header .elementor-element.elementor-element-312e8917 .elementor-menu-cart__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
  }

  /* Badge should not push layout */
  .elementor-location-header .elementor-element.elementor-element-312e8917 .elementor-menu-cart__toggle .elementor-button-icon[data-counter],
  .elementor-location-header .elementor-element.elementor-element-312e8917 .elementor-menu-cart__toggle .elementor-menu-cart__toggle-button {
    position: relative;
  }

  /* If the bubble clips into the burger, keep it inside the cart button */
  .elementor-location-header .elementor-element.elementor-element-312e8917 .elementor-button-icon[data-counter]::after {
    right: -6px;
    top: -6px;
  }

  /* Keep dropdown above content but let Elementor control its positioning behavior. */
  .elementor-location-header .elementor-element.elementor-element-63ae661b nav.elementor-nav-menu__container.elementor-nav-menu--dropdown {
    z-index: 10002 !important;
  }

  /* JS fallback hook: force open state when toggle script adds class. */
  .elementor-location-header .elementor-menu-toggle.nr-mobile-open + .elementor-nav-menu--dropdown,
  .elementor-location-header .elementor-nav-menu--dropdown.nr-mobile-open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Hide default "Home" page title on the front page (hero already provides heading). */
.home .entry-title,
.home .page-header {
  display: none;
}

/* Defensive: ensure footer region is not hidden by third-party CSS. */
.elementor-location-footer {
  display: block !important;
  visibility: visible !important;
}

/* Safety hotfix: disable custom full-screen loader overlay (was masking guest pages). */
#mobile-loader,
.mobile-loader,
.mobile-loader--active {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Recovery fix: ensure content is not stuck hidden if Elementor animation init fails. */
.elementor-invisible {
  visibility: visible !important;
  opacity: 1 !important;
}
