html.cms-menu-opened, body.cms-menu-opened {
  overflow: hidden !important;
  height: 100%;
  touch-action: none;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  overflow: hidden;

  /* ✅ 오버레이 페이드 전환 */
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mobile-menu-overlay.show {
  opacity: 1;
}

.mobile-menu {
  width: 80%;
  max-width: 360px;
  height: 100vh;
  background: #fff;
  position: absolute;
  top: 0; left: 0;
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 5px 0px 15px rgba(0,0,0,0.2);
  overflow: hidden; /* ✅ 유지해도 되나, 내부 스크롤만 따로 설정해야 함 */
}

.mobile-menu.open {
  transform: translateX(0%);
  opacity: 1;
}
.mobile-menu-body {
  flex: 1;               /* ✅ 남은 공간 모두 차지 */
  overflow-y: auto;      /* ✅ 스크롤 허용 */
  -webkit-overflow-scrolling: touch; /* ✅ 모바일 터치 스크롤 부드럽게 */
  padding: 20px;
}
.mobile-menu-header {
  height: 280px;
  background: var(--theme-color, #00c73c);
  color: #fff;
  padding: 0px 15px !important;
  margin-bottom: 0px !important;
  text-align: center;
  position: relative;
  display: flex;               /* 추가 */
  flex-direction: column;      /* 추가 */
  align-items: center;         /* 추가 */
  justify-content: flex-start; /* 올바른 값으로 수정 */
  box-shadow: 0px 3px 10px rgba(0,0,0,0.2);
}
.mobile-menu-header .header-inner {
  display: flex;
  margin-top: -20px !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* 'top' → 'flex-start' */
  gap: 10px;                   /* 로고와 텍스트 사이 여백 */
}
.logo-text {
  display: block !important;
  font-size: 19px;
  font-weight: bold;
  color: white;
}
.menu-close {
  position: absolute;
  top: 16px;
  left: 10px;
  font-size: 24px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-actions {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 30px;
}
.menu-actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
}
.menu-actions i {
  font-size: 22px;
  margin-bottom: 4px;
}
.call-message {
  font-size: 13px;
  margin-top: 10px;
  color: #ffe;
}
.mobile-menu-body {
  flex: 1;
  padding: 20px 20px 130px 20px;
  overflow-y: auto;
}
.mobile-menu-body ul {
  list-style: none;
  margin: 0; padding: 0;
}
.mobile-menu-body li {
  margin-bottom: 14px;
}
.mobile-menu-body a {
  font-size: 18px;
  font-weight: 500;
  color: #222;
  text-decoration: none;
  display: block;
  padding: 6px 0;  /* 간격 줄이기 */
  scroll-behavior: smooth;
}
.mobile-menu-body a:hover {
  color: var(--theme-color, #00c73c);
}
.submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
  padding-left: 14px;
}
.submenu.open {
  max-height: 500px;
}
.submenu li a {
  font-size: 17px;
  font-weight: 400;
  color: #444;
  padding: 4px 0px 4px 10px;
}
.submenu li:first-child {
  margin-top: 10px;
}
.toggle-arrow {
  float: right;
  transition: transform 0.3s ease;
}
.toggle-arrow.rotate {
  transform: rotate(90deg);
}