/* ============ 手机页眉 + 搜索/菜单弹出层（公共，参考 zmk99.cn 手机版，绿色主题） ============ */
.m-head, .m-search-overlay, .m-menu-overlay { display: none; }

@media (max-width: 767px) {
  /* 页眉：sticky 吸顶，logo 图片+文字，右搜索/菜单按钮 */
  .m-head { display: block !important; position: sticky; top: 0; z-index: 1000; background: #14532d; }
  .m-head-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 14px; }
  .m-head-logo { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 18px; font-weight: 700; text-decoration: none; }
  .m-head-logo img { height: 40px; width: auto; display: block; }
  .m-head-btns { display: flex; align-items: center; }
  .m-head-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: #fff; }
  .m-icon { width: 24px; height: 24px; fill: currentColor; }

  /* 搜索弹出层：顶部滑入（fadeInDown 模仿） */
  .m-search-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, 0.8); display: flex !important; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .m-search-panel { background: #14532d; padding: 20px 16px; transform: translateY(-100%); transition: transform 0.3s ease; }
  .m-search-overlay.m-open { opacity: 1; pointer-events: auto; }
  .m-search-overlay.m-open .m-search-panel { transform: translateY(0); }
  .m-search-form { display: flex; align-items: center; background: rgba(255, 255, 255, 0.15); border-radius: 6px; overflow: hidden; }
  .m-search-input { flex: 1; background: transparent; border: none; outline: none; color: #fff; font-size: 15px; padding: 10px 14px; min-width: 0; }
  .m-search-input::placeholder { color: rgba(255, 255, 255, 0.6); }
  .m-search-btn { display: flex; align-items: center; justify-content: center; width: 48px; height: 40px; color: #fff; border: none; }

  /* 菜单弹出层：左侧滑入（fadeInLeft 模仿） */
  .m-menu-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, 0.6); display: flex !important; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .m-menu-panel { position: absolute; top: 0; left: 0; bottom: 0; width: 78%; max-width: 320px; background: #14532d; transform: translateX(-100%); transition: transform 0.3s ease; display: flex; flex-direction: column; }
  .m-menu-overlay.m-open { opacity: 1; pointer-events: auto; }
  .m-menu-overlay.m-open .m-menu-panel { transform: translateX(0); }
  .m-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
  .m-menu-logo { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 18px; font-weight: 700; text-decoration: none; }
  .m-menu-logo img { height: 40px; width: auto; display: block; }
  .m-menu-close { color: #fff; display: flex; padding: 4px; }
  .m-menu-list { list-style: none; margin: 0; padding: 8px 0; overflow-y: auto; }
  .m-menu-list li { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .m-menu-list a { display: block; color: #fff; font-size: 16px; padding: 14px 20px; text-decoration: none; }
  .m-menu-list a:active { background: rgba(255, 255, 255, 0.1); }
}
