li.has-custom-dropdown,
li:has(.shop-cats-dropdown) {
  position: relative;
}


li.has-custom-dropdown > ul.sub-menu {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

li.has-custom-dropdown > .shop-cats-dropdown,
li:has(.shop-cats-dropdown) > .shop-cats-dropdown {
  display: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
  background-color: #161616;
  box-shadow: 0 8px 24px rgba(18,30,60,0.12);
  border-radius: 6px;
  padding: 8px;
  z-index: 99999;
  pointer-events: none;
}

li.has-custom-dropdown:hover > .shop-cats-dropdown,
li.has-custom-dropdown:focus-within > .shop-cats-dropdown,
li:has(.shop-cats-dropdown):hover > .shop-cats-dropdown,
li:has(.shop-cats-dropdown):focus-within > .shop-cats-dropdown,
li.has-custom-dropdown.shop-open > .shop-cats-dropdown,
li:has(.shop-cats-dropdown).shop-open > .shop-cats-dropdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  border-radius: 10px;
}

li.has-custom-dropdown .shop-cats-list,
li:has(.shop-cats-dropdown) .shop-cats-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

li.has-custom-dropdown .shop-cat-item a,
li:has(.shop-cats-dropdown) .shop-cat-item a {
  display: block;
  padding: 8px 10px;
  text-decoration: none;
  color: #ffffff;
  border-radius: 4px;
  white-space: nowrap;
}
li.has-custom-dropdown .shop-cat-item a:hover,
li:has(.shop-cats-dropdown) .shop-cat-item a:hover {
  background: rgba(43,60,98,0.06);
}

li.has-custom-dropdown .shop-toggle-btn,
li:has(.shop-cats-dropdown) .shop-toggle-btn {
  display: none;
  border: none;
  background: transparent;
  font-size: 14px;
  line-height: 1;
  padding: 6px;
  margin-left: 6px;
  cursor: pointer;
  vertical-align: middle;
}

li.has-custom-dropdown .shop-toggle-btn::after,
li:has(.shop-cats-dropdown) .shop-toggle-btn::after {
  content: "▾";
  display: inline-block;
  transition: transform .18s ease;
}

li.has-custom-dropdown.shop-open .shop-toggle-btn::after,
li:has(.shop-cats-dropdown).shop-open .shop-toggle-btn::after {
  content: "▴";
}

@media (min-width: 769px) {
  li.has-custom-dropdown .shop-toggle-btn,
  li:has(.shop-cats-dropdown) .shop-toggle-btn {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  li.has-custom-dropdown > .shop-cats-dropdown,
  li:has(.shop-cats-dropdown) > .shop-cats-dropdown {
    position: static !important;
    display: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none;
    padding: 0.25rem 0;
    width: 100%;
    pointer-events: auto;
    margin-top: 6px;
    border-radius: 0;
  }

  li.has-custom-dropdown .shop-cat-item a,
  li:has(.shop-cats-dropdown) .shop-cat-item a {
    white-space: normal;
  }

  .modal.modal-scroll ul.shop-cats-list {
    padding-top: 0px;
  }

  li.has-custom-dropdown.shop-open > .shop-cats-dropdown,
  li:has(.shop-cats-dropdown).shop-open > .shop-cats-dropdown {
    display: block !important;
  }

  li.has-custom-dropdown .shop-cat-item a,
  li:has(.shop-cats-dropdown) .shop-cat-item a {
    padding-left: 18px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: block;
  }

  .shop-cats-dropdown {
    margin-top: 6px;
  }

  .modal.modal-scroll .model-content {
    padding-bottom: 55vh; 
  }
  
}

.shop-init-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

li.shop-open > .shop-cats-dropdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
