@media (max-width: 1023px) {
  :root.moeblo-menu-open {
    overflow: hidden;
  }

  :root.moeblo-menu-open body {
    overflow: hidden;
    width: 100%;
  }

  :root.moeblo-menu-open .moeblo-menu__overlay,
  :root.moeblo-menu-open .moeblo-menu__panel {
    right: var(--moeblo-menu-scrollbar, 0);
  }
}

.moeblo-menu {
  display: block;
}

@media (min-width: 1024px) {
  .moeblo-menu {
    display: none !important;
  }
}

/* Jeśli nasz moduł jest obecny, chowamy stary przycisk modułu megamenu tylko na mobile */
@media (max-width: 991px) {
  .mobile-menu:has(.moeblo-menu) .ets_mm_megamenu {
    display: none !important;
  }
}

.moeblo-menu__toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: #232323;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.moeblo-menu__toggle:focus,
.moeblo-menu__toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

.moeblo-menu__burger {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.moeblo-menu__burger .icon-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #000;
}

.moeblo-menu__label {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1;
}

@media (max-width: 767px) {
  .moeblo-menu__label {
    display: none !important;
  }
}

.moeblo-menu__overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 20000;
}

.moeblo-menu__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  background: #f7f7f7;
  z-index: 20010;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.moeblo-menu__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  background: rgba(222, 185, 112, 1);
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.moeblo-menu__body {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  background: #f7f7f7;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.moeblo-menu__body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Navbar (hamburger, logo, ikony) nad otwartym panelem — bez zmian w custom.css motywu */
@media (max-width: 1023px) {
  :root.moeblo-menu-open .desktopheader,
  :root.moeblo-menu-open .desktopheader.show,
  :root.moeblo-menu-open .desktopheader.sticky {
    z-index: 10050 !important;
    transform: none !important;
    transition: none !important;
  }

  :root.moeblo-menu-open .header-top-bar {
    z-index: 10040 !important;
  }

  :root.moeblo-menu-open #mobile_top_menu_wrapper,
  :root.moeblo-menu-open #header .header-top,
  :root.moeblo-menu-open #header .header-top > .container {
    overflow: visible !important;
  }

  :root.moeblo-menu-open #mobile_top_menu_wrapper .mobile-menu {
    overflow: visible !important;
    z-index: 10003;
  }

  :root.moeblo-menu-open #mobile_top_menu_wrapper .mobile-box {
    position: relative;
    z-index: 10010 !important;
    isolation: isolate;
  }

  :root.moeblo-menu-open #mobile_top_menu_wrapper .mobile-menu,
  :root.moeblo-menu-open #mobile_top_menu_wrapper .logo-mobile,
  :root.moeblo-menu-open #mobile_top_menu_wrapper .mobile-icons {
    visibility: visible !important;
    pointer-events: auto !important;
    position: relative;
  }

  :root.moeblo-menu-open #mobile_top_menu_wrapper .logo-mobile {
    display: block !important;
  }

  :root.moeblo-menu-open #mobile_top_menu_wrapper .mobile-icons {
    display: flex !important;
  }
}

.moeblo-menu__title {
  font-size: 14px;
}

.moeblo-menu__back {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  height: 44px;
  margin: -12px -16px -12px 0;
  padding: 0 16px 0 12px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 44px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.moeblo-menu__back:focus,
.moeblo-menu__back:focus-visible {
  outline: none;
  box-shadow: none;
}

.moeblo-menu__back-icon {
  position: relative;
  width: 12px;
  height: 12px;
  display: inline-block;
  flex: 0 0 auto;
}

.moeblo-menu__back-icon::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-left: 2px solid #fff;
  border-top: 2px solid #fff;
  transform: translateY(-50%) rotate(-45deg);
}

.moeblo-menu__back-label {
  display: inline-block;
}

.moeblo-menu__list,
.moeblo-menu__sub {
  list-style: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.moeblo-menu__item {
  position: relative;
  border-bottom: 1px solid #DEB970;
  background: #f7f7f7;
}

.moeblo-menu__link {
  display: block;
  padding: 10px 15px;
  color: #232323;
  text-decoration: none;
  font-size: 20px;
  line-height: 1.25;
  -webkit-tap-highlight-color: transparent;
}

.moeblo-menu__link:link,
.moeblo-menu__link:visited,
.moeblo-menu__link:hover,
.moeblo-menu__link:active,
.moeblo-menu__link:focus,
.moeblo-menu__link:focus-visible {
  color: #232323;
  text-decoration: none;
  outline: none;
  box-shadow: none;
}

.moeblo-menu__expand {
  position: absolute;
  right: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.moeblo-menu__expand:focus,
.moeblo-menu__expand:focus-visible {
  outline: none;
  box-shadow: none;
}

.moeblo-menu__item:focus-within {
  outline: none;
  box-shadow: none;
}

.moeblo-menu__pm {
  position: absolute;
  inset: 0;
}

.moeblo-menu__pm::before,
.moeblo-menu__pm::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 1px;
  background: #232323;
  transform: translate(-50%, -50%);
}

.moeblo-menu__pm::after {
  width: 1px;
  height: 13px;
}

.moeblo-menu__expand[aria-expanded="true"] .moeblo-menu__pm::after {
  display: none;
}

.moeblo-menu__sub {
  background: #fff;
  border-top: 1px solid #ddd;
  padding: 8px 0;
}

/* Rozwinięta sekcja poziom 0: jedna linia na dole, bez podwójnego bordera przed kolejnym nagłówkiem */
.moeblo-menu__item[data-depth="0"].has-children.is-open {
  border-bottom: none;
}

.moeblo-menu__item[data-depth="0"].has-children.is-open > .moeblo-menu__sub {
  border-bottom: 1px solid #DEB970;
}

/* Bez nagłówków podsekcji (depth 1) zostaje domyślny padding-bottom z .moeblo-menu__sub */
.moeblo-menu__item[data-depth="0"].has-children.is-open > .moeblo-menu__sub:has(> .moeblo-menu__item[data-depth="1"].has-children) {
  padding-bottom: 0;
}

.moeblo-menu__item[data-depth="0"].has-children.is-open > .moeblo-menu__sub > .moeblo-menu__item.has-children.is-open:last-child {
  border-bottom: none;
}

/* Nested expansion: no separator directly under the parent row */
.moeblo-menu__sub .moeblo-menu__sub {
  border-top: none;
  padding-top: 0;
}

.moeblo-menu__seeall {
  padding: 6px 16px;
}

.moeblo-menu__seeall-link {
  display: inline-block;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(197, 162, 109, 1);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.moeblo-menu__seeall-link:hover,
.moeblo-menu__seeall-link:focus {
  color: rgba(197, 162, 109, 1);
  opacity: 0.9;
}

.moeblo-menu__sub .moeblo-menu__item {
  border-bottom: 0;
  background: #fff;
}

/* Group separator after expanded nested branch (gray inside submenu) */
.moeblo-menu__sub .moeblo-menu__item.has-children.is-open {
  border-bottom: 1px solid #ddd;
}

/* Depth styling to match "section heading + bullet items" layout */
.moeblo-menu__item[data-depth="0"] > .moeblo-menu__link {
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.moeblo-menu__item[data-depth="1"] > .moeblo-menu__link {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.moeblo-menu__sub .moeblo-menu__link {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 16px;
  font-size: 13px;
  line-height: 1.3;
}

/* Bullets only for real sub-items (depth >= 2) */
.moeblo-menu__item[data-depth="2"] > .moeblo-menu__link::before,
.moeblo-menu__item[data-depth="3"] > .moeblo-menu__link::before,
.moeblo-menu__item[data-depth="4"] > .moeblo-menu__link::before {
  content: '•';
  flex: 0 0 auto;
  width: 0.5em;
  line-height: 1.3;
  margin-top: 0;
  text-align: left;
}

.moeblo-menu__sub .moeblo-menu__sub .moeblo-menu__link {
  padding-left: 16px;
}

/* Don’t show bullets for section headings (depth 1) */
.moeblo-menu__item[data-depth="1"] > .moeblo-menu__link::before {
  content: none !important;
}

/* Expand button sizing per depth (align +/− with link row) */
.moeblo-menu__item[data-depth="1"] > .moeblo-menu__expand {
  top: 0;
  width: 44px;
  height: calc(12px + 1.3 * 16px + 12px);
}

.moeblo-menu__item[data-depth="2"] > .moeblo-menu__expand,
.moeblo-menu__item[data-depth="3"] > .moeblo-menu__expand,
.moeblo-menu__item[data-depth="4"] > .moeblo-menu__expand {
  top: 0;
  width: 36px;
  height: calc(6px + 1.3 * 13px + 6px);
}

