/* ── 1. Hide desktop nav on mobile — only the ORIGINAL in the header.
        The JS clones it into #mobile_menu which is outside #header_main_nav,
        so the clone stays visible in the flyout. ── */
@media screen and (max-width: 960px) {
  #header_main_nav #global_menu {
    display: none !important;
  }

  /* ── 3. Align search icon next to burger menu ── */
  .mobile-action-buttons {
    position: absolute !important;
    top: 0;
    right: 0;
    height: 56px;
    display: flex !important;
    align-items: center;
    z-index: 10;
  }

  /* Reset menu_button from absolute to relative to keep it in flex flow */
  #menu_button {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  a.mobile-search-trigger {
    display: flex !important;
    flex-direction: column !important; /* Stack vertically */
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 44px;
    height: 56px;
    padding: 0;
  }

  a.mobile-search-trigger img {
    display: block !important;
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-bottom: 2px;
  }

  a.mobile-search-trigger span {
    display: block !important;
    font-size: 10px;
    line-height: 1;
    color: #333;
    font-weight: normal;
  }

  /* Hide search bar by default; .active (toggled by JS) shows it */
  #header_search {
    display: none !important;
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    padding: 10px 15px;
    box-sizing: border-box;
    background: #fff;
    z-index: 50;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #eee;
  }

  #header_search.active {
    display: block !important;
  }

  #header_search .search-field-wrap {
    width: 100%;
  }

  #header_search input.search-field {
    width: 100% !important;
    height: 40px !important;
    border-radius: 4px !important;
  }
}
