/* ============================================
   ScorchGallery.com — Mobile Submenu Fix (CSS + JS)
   Fixes Collections & Services dropdown on mobile
   Kadence theme bug: drawer-sub-toggle click binding
   2026-07-09
   ============================================ */

/* Submenu display control */
@media (max-width: 1024px) {
  /* Ensure submenus start hidden */
  .mobile-navigation .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    opacity: 0;
  }

  /* When toggled open - via class added by JS */
  .mobile-navigation .menu-item-has-children.drawer-sub-menu-open > .sub-menu {
    max-height: 2000px;
    opacity: 1;
  }

  /* Submenu items styling */
  .mobile-navigation .sub-menu li a {
    padding-left: 2em !important;
    font-size: 13px !important;
  }

  /* Make sure the drawer-sub-toggle button is clickable */
  .drawer-sub-toggle {
    min-width: 48px !important;
    min-height: 48px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 10 !important;
  }

  /* Clicking the parent label also opens submenu */
  .drawer-nav-drop-wrap {
    cursor: pointer !important;
  }

  /* Rotate arrow when open */
  .menu-item-has-children.drawer-sub-menu-open .drawer-sub-toggle svg {
    transform: rotate(180deg);
  }
}

/* Fix: make sure mobile drawer has proper dark background */
#mobile-drawer .drawer-inner {
  background-color: #1A1512 !important;
}

.mobile-navigation ul li.menu-item-has-children .drawer-nav-drop-wrap {
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}
