/* ===== 상단 헤더/탑메뉴 전용 스타일 (분리) ===== */

/* 공통 변수 */
:root {
  --header-h: 80px;
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }
}

@media (max-width: 480px) {
  :root {
    --header-h: 55px;
  }
}

/* 헤더 래퍼 */
#way_hd {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 3000 !important;
  /* 레이어 최상위 */
  transition: all 0.3s ease !important;
  background: transparent !important;
  /* 투명 배경 */
  backdrop-filter: none !important;
  box-shadow: none !important;
}

/* 스크롤 시 배경 */
#way_hd.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
}

/* 스크롤 시 모든 텍스트 검정색으로 변경 */
#way_hd.scrolled .main_navigation .nav_li>a {
  color: #333 !important;
}

#way_hd.scrolled .logo_center a {
  color: #000 !important;
}

#way_hd.scrolled .logo_center h1 {
  color: #000 !important;
}

#way_hd.scrolled .family-btn {
  color: #333 !important;
}

#way_hd.scrolled .language-combo-btn {
  color: #333 !important;
}

#way_hd.scrolled .mn_icon_line {
  background: #333 !important;
}

/* 메가메뉴 열림 시 헤더를 흰색 배경으로 고정 */
#way_hd.mega-open {
  background: #ffffff !important;
  backdrop-filter: none !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08) !important;
}

#way_hd.mega-open .main_navigation .nav_li>a {
  color: #111 !important;
}

#way_hd.mega-open .logo_center a {
  color: #000 !important;
}

#way_hd.mega-open .logo_center h1 {
  color: #000 !important;
}

#way_hd.mega-open .family-btn {
  color: #333 !important;
}

#way_hd.mega-open .language-combo-btn {
  color: #333 !important;
}

#way_hd.mega-open .mn_icon_line {
  background: #333 !important;
}

/* 메가 메뉴 컨테이너 */
.mega_menu_container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  padding: 0 40px !important;
  position: relative !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  height: var(--header-h) !important;
}

/* 그리드 자식 모두 수직 중앙 정렬 및 줄바꿈 방지 */
.mega_menu_container>* {
  align-self: center !important;
}

.logo_center,
.main_navigation,
.right_menu_group {
  height: var(--header-h) !important;
}

.main_navigation {
  min-width: 0 !important;
}

/* 메인 네비게이션 (중앙) */
.main_navigation {
  display: flex !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
}

.main_navigation #way_top_nav {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  gap: 32px !important;
  /* 간격 소폭 축소 */
  height: var(--header-h) !important;
  /* 헤더 높이와 동일 */
  white-space: nowrap !important;
  /* 항목 줄바꿈 방지 */
}

.main_navigation .nav_li {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  height: var(--header-h) !important;
  /* 헤더 높이와 동일 */
  /* 호버 영역 확장을 위한 가상 요소 추가 */
}

.main_navigation .nav_li::after {
  content: '';
  position: absolute;
  bottom: -10px;
  /* 하단으로 10px 확장 */
  left: 0;
  right: 0;
  height: 10px;
  /* 투명한 호버 영역 */
}

.main_navigation .nav_li>a {
  display: flex !important;
  /* 수직 중앙 정렬을 위한 플렉스 */
  align-items: center !important;
  height: 100% !important;
  /* 부모 80px에 맞춤 */
  padding: 0 22px !important;
  /* 좌우 패딩만 유지 */
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  position: relative !important;
}

/* 메인 메뉴 호버/포커스 시 메가 드롭다운 표시 */
.main_navigation .nav_li:hover>.mega_dropdown,
.main_navigation .nav_li:focus-within>.mega_dropdown,
.main_navigation .nav_li.open>.mega_dropdown,
.mega_dropdown:hover {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

/* 투명 헤더일 때 메뉴 색상 - 서브페이지에서는 흰색 */
#way_hd:not(.scrolled) .main_navigation .nav_li>a {
  color: #ffffff;
}

/* 좌측 로고 */
.logo_center {
  display: flex !important;
  justify-content: flex-start !important;
  position: absolute !important;
  left: 40px !important;
  top: 0 !important;
  height: var(--header-h) !important;
}

.logo_center a.logo_link {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

.logo_center a.logo_link img {
  display: block !important;
  height: 32px !important;
  width: auto !important;
}

/* 기본: 투명 헤더(평상시)에는 흰색 로고 표시 */
.logo_center a.logo_link img.logo-default { display: block !important; }
.logo_center a.logo_link img.logo-hover { display: none !important; }

/* 헤더가 흰 배경 상태일 때(hover/scrolled/mega-open): 검정 로고로 전환 */
#way_hd:hover .logo_center a.logo_link img.logo-default,
#way_hd.scrolled .logo_center a.logo_link img.logo-default,
#way_hd.mega-open .logo_center a.logo_link img.logo-default { display: none !important; }

#way_hd:hover .logo_center a.logo_link img.logo-hover,
#way_hd.scrolled .logo_center a.logo_link img.logo-hover,
#way_hd.mega-open .logo_center a.logo_link img.logo-hover { display: block !important; }

/* 로고 이미지 사용 시 높이 통일 및 하단 여백 제거 (a.logo_link 규칙과 동일 높이) */
.logo_center img {
  display: block !important;
  height: 32px !important;
  width: auto !important;
}

/* 반응형: 매우 작은 화면에서도 동일 동작 유지 */
@media (max-width: 1024px) {
  .logo_center a.logo_link img,
  .logo_center img { height: 30px !important; }
}

@media (max-width: 768px) {
  .logo_center a.logo_link img,
  .logo_center img { height: 28px !important; }
}

@media (max-width: 480px) {
  .logo_center a.logo_link img,
  .logo_center img { height: 24px !important; }
}

.logo_center a {
  display: flex !important;
  align-items: center !important;
  /* 수직 중앙 */
  height: 100% !important;
  /* 80px */
  color: #ffffff !important;
  text-decoration: none !important;
}

.logo_center h1 {
  font-size: 24px !important;
  font-weight: bold !important;
  color: #ffffff !important;
  transition: all 0.3s ease !important;
  margin: 0 !important;
  /* 기본 마진 제거 */
}

/* 우측 메뉴 그룹 */
.right_menu_group {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  position: absolute !important;
  right: 40px !important;
  top: 0 !important;
  height: var(--header-h) !important;
}

/* 우측 래퍼들도 높이/정렬 고정 */
.family_site_selector,
.language_selector {
  height: var(--header-h) !important;
  display: flex !important;
  align-items: center !important;
}

/* 우측 버튼류 수직 중앙 정렬 및 높이 통일 */
.family-btn,
.language-combo-btn,
.pc_all_btn {
  height: 40px !important;
  /* 내부 컨트롤 높이 */
  line-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  /* 의도치 않은 아래쪽 여백 제거 */
}

/* Family Site */
.family_site_selector {
  position: relative;
  display: flex;
  align-items: center;
}

.family-btn {
  display: flex;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  background: transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 120px;
  justify-content: space-between;
}

.family-btn::after {
  content: '▼';
  font-size: 10px;
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.family-btn:hover {
  color: #0066ff;
}

.family-btn.active::after {
  transform: rotate(180deg);
}

.family_dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.family_site_selector.active .family_dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.family_dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.family_dropdown li {
  border-bottom: 1px solid #eee;
}

.family_dropdown li:last-child {
  border-bottom: none;
}

.family_dropdown a {
  display: block;
  padding: 10px 12px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.family_dropdown a:hover {
  background: #f8f9fa;
  color: #0066ff;
}

/* Language */
.language_selector {
  position: relative;
  display: flex;
  align-items: center;
}

.language-combo-btn {
  display: flex;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  background: transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 80px;
  justify-content: space-between;
}

.language-combo-btn::after {
  content: '▼';
  font-size: 10px;
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.language-combo-btn:hover {
  color: #0066ff;
}

.language-combo-btn.active::after {
  transform: rotate(180deg);
}

.language_dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.language_selector.active .language_dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language_dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.language_dropdown li {
  border-bottom: 1px solid #eee;
}

.language_dropdown li:last-child {
  border-bottom: none;
}

.language_dropdown a {
  display: block;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.language_dropdown a:hover {
  background: #f8f9fa;
  color: #0066ff;
}

/* 전체 메뉴 버튼 */
.pc_all_btn {
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: transparent;
  transition: all 0.3s ease;
}

.pc_menu_icon,
.m_menu_icon {
  width: 24px;
  height: 24px;
  position: relative;
}

.m_menu_icon {
  display: none;
}

.mn_icon_line {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  position: absolute;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  border-radius: 1px;
  transform-origin: center;
}

.mn_icon_l {
  top: 6px;
}

.mn_icon_c {
  top: 50%;
  transform: translateY(-50%);
}

.mn_icon_r {
  bottom: 6px;
}

.pc_all_btn.active .mn_icon_line {
  background: #0066cc;
}

.pc_all_btn.active .mn_icon_l {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.pc_all_btn.active .mn_icon_c {
  opacity: 0;
  transform: translateY(-50%) scale(0);
}

.pc_all_btn.active .mn_icon_r {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* 호버 효과도 부드럽게 */
.pc_all_btn:hover .mn_icon_line {
  transform: scale(1.1);
}

.pc_all_btn:hover.active .mn_icon_l {
  transform: translateY(-50%) rotate(45deg) scale(1.1);
}

.pc_all_btn:hover.active .mn_icon_r {
  transform: translateY(50%) rotate(-45deg) scale(1.1);
}

/* 메가 드롭다운 */
.mega_dropdown {
  position: fixed;
  /* 뷰포트 기준으로 좌측부터 100% */
  top: var(--header-h);
  /* 헤더 바로 아래로 위치 조정 + 여유 */
  left: 0;
  width: 100vw;
  background: #ffffff;
  /* 불투명 흰색 배경 */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2900;
  /* 헤더(3000) 아래 */
  /* 겹침 방지를 위해 패딩 제거 */
  max-height: calc(100vh - var(--header-h) - 6px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
  .mega_dropdown { top: var(--header-h); max-height: calc(100vh - var(--header-h) - 14px); }
}

/* iOS 안전영역 보정 */
@supports (padding: env(safe-area-inset-top)) {
  .mega_dropdown { padding-top: env(safe-area-inset-top); }
  #pc_all_wrap .menu_all_content { padding-top: calc(10px + env(safe-area-inset-top)); }
}

/* 메가 드롭다운 활성화 */
.mega_dropdown.show,
.main_navigation .nav_li.open>.mega_dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  display: block !important;
  pointer-events: auto !important;
}

/* 메가메뉴 내부 링크들의 클릭 활성화 */
.mega_dropdown.show a,
.mega_dropdown.show .mega_image a,
.mega_dropdown.show .submenu_list a {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* 메가 컨텐츠 */
.mega_content {
  display: flex;
  padding: 12px 32px;
  gap: 10px;
  /* 서브메뉴와 이미지 간격 증가 */
  max-width: 1400px;
  margin: 0 auto;
  min-height: 230px;
  /* 기본 높이 유지 */
  height: auto;
  /* 내용에 따라 자동 확장 */
  /* 흰색 배경 제거하여 투명하게 */
}

.submenu_section {
  flex: 0 0 220px;
  min-width: 220px;
  margin-right: auto;
  /* 서브메뉴를 좌측으로 정렬 */
  padding-left: 10px;
  /* 좌측으로 더 이동 */
  display: none !important;
  /* 좌측 텍스트 영역 숨김 */
}

.submenu_list {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: -150px;
}

.submenu_list li {
  margin-bottom: 18px;
}

.submenu_list li a {
  display: block;
  padding: 12px 16px;
  color: #ffffff;
  /* 흰색 텍스트 */
  font-size: 17px;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.submenu_list li a {
  text-align: center;
}

.submenu_list li a:hover {
  background: rgba(255, 255, 255, 0.2);
  /* 투명한 흰색 배경 */
  color: #93d4ff;
  /* 밝은 파란색 */
}

/* 이미지 섹션 */
.image_section {
  flex: 1;
  display: flex;
  gap: 35px;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  /* 이미지를 중앙 정렬 */
  margin-left: 0;
  /* 중앙 정렬 시 좌우 마진 제거 */
}

.mega_image {
  /* 카드 폭을 반응형으로 고정(최소 160px, 최대 220px) */
  flex: 0 0 clamp(160px, 18vw, 220px);
  height: auto;
  /* 캡션 + 이미지 총 높이 */
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
}

.mega_image a {
  display: flex;
  flex-direction: column-reverse;
  /* 캡션이 이미지 위(윗단)에 보이도록 */
  width: 100%;
  height: 100%;
  position: relative;
}

.mega_image img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  /* 세로 길이 축소 */
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 이미지 윗단 캡션(상단 바) */
.mega_image .mega_caption {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 8px;
  color: #222;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  background: transparent;
  text-shadow: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mega_image .mega_caption {
  text-align: center;
}

/* 호버 인터랙션(이미지 이동/확대 제거) */
.mega_image a:hover .mega_caption {
  color: #0066ff;
}

@media (max-width: 1200px) {
  .mega_image .mega_caption {
    font-size: 12px !important;
    padding: 0 4px !important;
    min-height: 28px !important;
  }
}

@media (max-width: 1024px) {
  .mega_image .mega_caption {
    font-size: 11px !important;
    padding: 0 2px !important;
    min-height: 24px !important;
  }
}

/* 오버레이: 헤더에 mega-open 클래스가 있을 때 표시 */
/* 오버레이는 사용하지 않음 */
#way_hd.mega-open #mega_menu_overlay {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* 메가 메뉴 오버레이 */
#mega_menu_overlay {
  display: none !important;
}

/* 주메뉴 호버 시: 헤더 바 흰색 + 모든 텍스트 검정 */
#way_hd:hover {
  background: #ffffff !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08) !important;
}

#way_hd:hover .main_navigation .nav_li>a {
  color: #111 !important;
}

#way_hd:hover .logo_center a {
  color: #000 !important;
}

#way_hd:hover .logo_center h1 {
  color: #000 !important;
}

#way_hd:hover .family-btn {
  color: #333 !important;
}

#way_hd:hover .language-combo-btn {
  color: #333 !important;
}

#way_hd:hover .mn_icon_line {
  background: #333 !important;
}

/* 전체 메뉴 팝업 (All menu) - 상단 고정 헤더 높이만큼 오프셋 */
@media (max-width: 1024px) {
  #pc_all_wrap {
    top: var(--header-h) !important;
    height: calc(100% - var(--header-h)) !important;
  }
}

@media (max-width: 480px) {
  #pc_all_wrap {
    top: calc(var(--header-h) + 6px) !important;
    height: calc(100% - var(--header-h) - 6px) !important;
  }
}

@supports (top: env(safe-area-inset-top)) {
  #pc_all_wrap {
    top: calc(var(--header-h) + env(safe-area-inset-top)) !important;
    height: calc(100% - var(--header-h) - env(safe-area-inset-top)) !important;
  }
}

/* 전체 메뉴 팝업 (All menu) - 부드러운 애니메이션 */
#pc_all_wrap {
  position: fixed;
  top: 0 !important;
  left: 0;
  width: 100%;
  height: 100% !important;
  background: rgba(0, 0, 0, 0);
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  backdrop-filter: blur(0px);
}

#pc_all_wrap.nav-active {
  visibility: visible;
  opacity: 1;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  /* 스크롤 체이닝 방지: 배경으로 스크롤 전파 차단 */
  overscroll-behavior: contain;
}

.menu_all {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
}

.menu_all_content {
  width: 100%;
  height: 100%;
  background: #f8f9fa;
  display: flex;
  transform: translateX(100%) scale(0.95);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  /* 내부 스크롤 활성화 */
  overflow-x: hidden;
  overflow-y: auto;
  /* iOS 모멘텀 스크롤 */
  -webkit-overflow-scrolling: touch;
  /* 스크롤 체이닝 방지 */
  overscroll-behavior: contain;
  opacity: 0;
  padding-top: 12px;
  box-sizing: border-box;
}

#pc_all_wrap.nav-active .menu_all_content {
  transform: translateX(0) scale(1);
  opacity: 1;
}

/* 좌측 브랜드 영역 */
.menu_brand_section {
  flex: 0 0 45%;
  background:
    linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%),
    url('/images/menu-bg.jpg.jpg');
  /* 실제 파일명에 맞게 수정 */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 80px 60px;
  color: white;
  overflow: hidden;
  transform: translateX(-50px);
  opacity: 0;
  transition: all 1s cubic-bezier(0.23, 1, 0.32, 1) 0.2s;
}

#pc_all_wrap.nav-active .menu_brand_section {
  transform: translateX(0);
  opacity: 1;
  padding-top: 24px;
}

/* 배경 이미지 오버레이 효과 */
.menu_brand_section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 30%);
  opacity: 0.8;
  animation: shimmer 10s ease-in-out infinite;
  pointer-events: none;
}

/* 부드러운 반짝임 효과 */
@keyframes shimmer {

  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* 추가 장식 요소 */
.menu_brand_section::after {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="30" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/><circle cx="50" cy="50" r="20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/><circle cx="50" cy="50" r="10" fill="rgba(255,255,255,0.03)"/></svg>') no-repeat;
  background-size: contain;
  opacity: 0.6;
  animation: float 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }

  25% {
    transform: translateY(-10px) rotate(1deg) scale(1.02);
  }

  50% {
    transform: translateY(-20px) rotate(0deg) scale(1.05);
  }

  75% {
    transform: translateY(-5px) rotate(-1deg) scale(1.02);
  }
}

.brand_logo {
  font-size: 45px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: 2px;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.4s;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

#pc_all_wrap.nav-active .brand_logo {
  transform: translateY(0);
  opacity: 1;
}

.brand_tagline {
  font-size: 32px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.6s;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

#pc_all_wrap.nav-active .brand_tagline {
  opacity: 0.95;
  transform: translateY(0);
}

.brand_subtitle {
  font-size: 17px;
  opacity: 0;
  font-weight: 350;
  line-height: 1.6;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.8s;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#pc_all_wrap.nav-active .brand_subtitle {
  opacity: 0.9;
  transform: translateY(0);
}

/* 우측 메뉴 영역 */
.menu_nav_section {
  flex: 1;
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  transform: translateX(50px);
  opacity: 0;
  transition: all 1s cubic-bezier(0.23, 1, 0.32, 1) 0.3s;
  padding-top: 30px;
}

#pc_all_wrap.nav-active .menu_nav_section {
  transform: translateX(0);
  opacity: 1;
}

/* 닫기 버튼 */
.menu_close_btn {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 10;
  transform: rotate(0deg) scale(0.8);
  opacity: 0;
}

#pc_all_wrap.nav-active .menu_close_btn {
  transform: rotate(0deg) scale(1);
  opacity: 1;
  transition-delay: 0.5s;
}

.menu_close_btn:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: rotate(90deg) scale(1.1);
}

.menu_close_btn::before,
.menu_close_btn::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: #666;
  border-radius: 1px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.menu_close_btn::before {
  transform: rotate(45deg);
}

.menu_close_btn::after {
  transform: rotate(-45deg);
}

.menu_close_btn:hover::before,
.menu_close_btn:hover::after {
  background: #333;
}

#menu_all_list {
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: 400px;
}

.all_list {
  position: relative;
  transform: translateY(40px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.all_list:nth-child(1) {
  transition-delay: 0.5s;
}

.all_list:nth-child(2) {
  transition-delay: 0.7s;
}

.all_list:nth-child(3) {
  transition-delay: 0.9s;
}

#pc_all_wrap.nav-active .all_list {
  transform: translateY(0);
  opacity: 1;
}

.all_list>a {
  display: block;
  font-size: 36px;
  font-weight: 450;
  color: #333;
  margin-bottom: 25px;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  letter-spacing: 1px;
}

.all_list>a:hover {
  color: #667eea;
  transform: translateX(15px);
}

.all_nav_list {
  list-style: none;
  margin: 0;
  padding: 0;
  opacity: 0.8;
}

.all_nav_list li {
  margin-bottom: 8px;
  transform: translateX(30px);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

#pc_all_wrap.nav-active .all_nav_list li:nth-child(1) {
  transition-delay: 0.8s;
  transform: translateX(0);
  opacity: 1;
}

#pc_all_wrap.nav-active .all_nav_list li:nth-child(2) {
  transition-delay: 0.9s;
  transform: translateX(0);
  opacity: 1;
}

#pc_all_wrap.nav-active .all_nav_list li:nth-child(3) {
  transition-delay: 1s;
  transform: translateX(0);
  opacity: 1;
}

#pc_all_wrap.nav-active .all_nav_list li:nth-child(4) {
  transition-delay: 1.1s;
  transform: translateX(0);
  opacity: 1;
}

.all_nav_list li a {
  display: block;
  font-size: 16px;
  color: #666;
  padding: 8px 0;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
}

.all_nav_list li a::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 1px;
  background: #667eea;
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.all_nav_list li a:hover {
  color: #667eea;
  padding-left: 15px;
  transform: translateX(5px);
}

.all_nav_list li a:hover::before {
  width: 12px;
}

/* 전체메뉴 반응형 */
@media (max-width: 1024px) {
  .menu_brand_section {
    padding: 60px 40px;
  }

  .menu_nav_section {
    padding: 60px 40px;
  }

  .brand_logo {
    font-size: 28px;
  }

  .brand_tagline {
    font-size: 20px;
  }

  .all_list>a {
    font-size: 30px;
  }

  #menu_all_list {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .menu_all_content {
    flex-direction: column;
  }

  .menu_brand_section {
    flex: 0 0 40%;
    padding: 40px 30px;
    text-align: center;
    align-items: center;
    background-attachment: scroll;
    /* 모바일에서는 fixed 해제 */
    background-size: cover;
    background-position: center center;
    overflow: hidden;
  }

  .menu_nav_section {
    flex: 1;
    padding: 40px 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* 스크롤 체이닝 방지 */
    overscroll-behavior: contain;
  }

  .brand_logo {
    font-size: 24px;
  }

  .brand_tagline {
    font-size: 18px;
  }

  .brand_subtitle {
    font-size: 14px;
    padding: 12px 16px;
  }

  .all_list>a {
    font-size: 28px;
  }

  #menu_all_list {
    gap: 35px;
  }

  .menu_close_btn {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .menu_brand_section {
    padding: 30px 20px;
  }

  .menu_nav_section {
    padding: 30px 20px;
  }

  .brand_logo {
    font-size: 20px;
  }

  .brand_tagline {
    font-size: 16px;
  }

  .all_list>a {
    font-size: 24px;
  }

  .all_nav_list li a {
    font-size: 14px;
  }

  #menu_all_list {
    gap: 30px;
  }
}

/* 반응형 */
@media (max-width: 1200px) {
  .mega_menu_container {
    padding: 0 20px;
  }

  .main_navigation #way_top_nav {
    gap: 20px;
  }

  .right_menu_group {
    gap: 15px;
  }

  /* 메가메뉴 반응형 조정 */
  .mega_dropdown {
    width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
  }

  .mega_content {
    padding: 20px 15px !important;
    gap: 15px !important;
    max-width: none !important;
    min-height: 180px !important;
  }

  .image_section {
    gap: 20px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  .mega_image {
    flex: 0 0 clamp(120px, 12vw, 160px) !important;
    min-width: 120px !important;
  }

  .mega_image img {
    aspect-ratio: 4 / 3 !important;
  }

  .mega_image .mega_caption {
    font-size: 12px !important;
    padding: 2px 4px !important;
    min-height: 24px !important;
  }
}

@media (max-width: 1024px) {
  .mega_menu_container {
    padding: 0 15px;
  }

  .main_navigation #way_top_nav {
    gap: 15px;
  }

  .main_navigation .nav_li>a {
    padding: 0 15px !important;
    font-size: 14px !important;
  }

  .right_menu_group {
    gap: 10px;
  }

  .family-btn,
  .language-combo-btn {
    font-size: 13px;
    padding: 6px 10px;
    min-width: 80px;
  }

  .m_menu_icon {
    display: block;
  }

  .pc_menu_icon {
    display: none;
  }

  .mega_content {
    padding: 15px 10px !important;
    gap: 10px !important;
    min-height: 140px !important;
  }

  .image_section {
    gap: 15px !important;
    justify-content: center !important;
  }

  .mega_image {
    flex: 0 0 clamp(100px, 10vw, 130px) !important;
    min-width: 100px !important;
  }

  .mega_image .mega_caption {
    font-size: 11px !important;
    padding: 1px 2px !important;
    min-height: 20px !important;
  }

  .mega_image img {
    aspect-ratio: 3 / 2 !important;
  }
}

/* 전체 메뉴 버튼은 모든 해상도에서 표시 */

/* 768px 이하에서만 메인 네비게이션 숨김 */
@media (max-width: 768px) {
  .mega_menu_container {
    height: 60px;
    padding: 0 15px;
    justify-content: space-between;
  }

  .main_navigation {
    display: none !important;
  }

  .logo_center {
    position: static !important;
    left: auto !important;
    flex: 1 !important;
    justify-content: flex-start !important;
  }

  .right_menu_group {
    position: static !important;
    right: auto !important;
    gap: 8px;
  }

  .family_site_selector {
    display: none !important;
  }

  .family-btn,
  .language-combo-btn {
    font-size: 12px;
    padding: 4px 8px;
    min-width: 60px;
  }

  .logo_center h1 {
    font-size: 18px !important;
  }

  .pc_all_btn {
    width: 35px !important;
    height: 35px !important;
  }

  .mn_icon_line {
    height: 2px !important;
  }
}

@media (max-width: 480px) {
  .mega_menu_container {
    padding: 0 10px;
    height: 55px;
    justify-content: space-between;
  }

  .family_site_selector {
    display: none !important;
  }

  .logo_center h1 {
    font-size: 16px !important;
  }

  .family-btn,
  .language-combo-btn {
    font-size: 11px;
    padding: 3px 6px;
    min-width: 50px;
  }

  .right_menu_group {
    gap: 5px;
  }

  .pc_all_btn {
    width: 30px !important;
    height: 30px !important;
  }

  .pc_menu_icon,
  .m_menu_icon {
    width: 20px !important;
    height: 20px !important;
  }
}

/* iOS 안전영역 보정 (보강) */
@supports (padding: env(safe-area-inset-top)) {
  #pc_all_wrap .menu_all_content { padding-top: calc(12px + env(safe-area-inset-top)); }
  #pc_all_wrap.nav-active .menu_brand_section,
  #pc_all_wrap.nav-active .menu_nav_section { padding-top: calc(24px + env(safe-area-inset-top)); }
}

/* 전체 메뉴 팝업 (All menu) - 상단 고정 헤더 높이만큼 오프셋 */
@media (max-width: 768px) {
  #pc_all_wrap .menu_all_content { padding-top: 12px; }
  #pc_all_wrap.nav-active .menu_nav_section { padding-top: 30px; }
}

/* iOS 안전영역 보정 */
@supports (padding: env(safe-area-inset-top)) {
  #pc_all_wrap .menu_all_content { padding-top: calc(12px + env(safe-area-inset-top)); }
  #pc_all_wrap.nav-active .menu_brand_section,
  #pc_all_wrap.nav-active .menu_nav_section { padding-top: calc(24px + env(safe-area-inset-top)); }
}

/* Force the All Menu to cover the entire viewport at all sizes */
#pc_all_wrap { top: 0 !important; height: 100% !important; }

/* While menu is open, push header visually beneath overlay just in case */
body.no-scroll #way_hd { z-index: 1 !important; }

/* ===== 푸터 스타일 ===== */
#way_ft {
  background: #2c2c2c !important;
  color: #fff !important;
  padding: 50px 0 30px !important;
  margin-top: 0 !important;
}

.ft_top {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

.ft_inner {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 40px !important;
  flex-wrap: wrap !important;
}

.ft_logo {
  flex: 0 0 auto !important;
}

.ft_logo img {
  height: 50px !important;
  width: auto !important;
}

.ft_info {
  flex: 1 !important;
  min-width: 300px !important;
}

.ft_menu {
  list-style: none !important;
  margin: 0 0 20px 0 !important;
  padding: 0 !important;
  display: flex !important;
  gap: 20px !important;
  flex-wrap: wrap !important;
}

.ft_menu li {
  margin: 0 !important;
}

.ft_menu a {
  color: #fff !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: color 0.3s ease !important;
}

.ft_menu a:hover {
  color: #93d4ff !important;
}

.ft_contact {
  color: #ccc !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

.ft_contact p {
  margin: 0 0 8px 0 !important;
}

.ft_contact span {
  margin-right: 15px !important;
  display: inline-block !important;
}

.ft_contact .copyright {
  margin-top: 15px !important;
  padding-top: 15px !important;
  border-top: 1px solid #444 !important;
  color: #999 !important;
  font-size: 12px !important;
}

.ft_sns {
  flex: 0 0 auto !important;
}

.ft_sns ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  gap: 15px !important;
}

.ft_sns li {
  margin: 0 !important;
}

.ft_sns a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  background: #444 !important;
  color: #fff !important;
  border-radius: 50% !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
}

.ft_sns a:hover {
  background: #0066cc !important;
  transform: translateY(-2px) !important;
}

.ft_sns i {
  font-size: 16px !important;
}

/* 반응형 푸터 */
@media (max-width: 768px) {
  #way_ft {
    padding: 30px 0 20px !important;
  }

  .ft_inner {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 25px !important;
  }

  .ft_info {
    min-width: auto !important;
  }

  .ft_menu {
    justify-content: center !important;
    gap: 15px !important;
  }

  .ft_contact span {
    display: block !important;
    margin-right: 0 !important;
    margin-bottom: 5px !important;
  }
}

/* 배경 스크롤 잠금 */
body.no-scroll {
  overflow: hidden !important;
}

/* ===== Section 1 transparent header overrides (최고 우선순위) ===== */
/* 섹션1(현재 섹션 인덱스 1: PRODUCTS)일 때 헤더 투명 + 화이트 텍스트 유지 */
html body[data-section="1"] #way_hd {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body[data-section="1"] #way_hd .main_navigation .nav_li>a {
  color: #fff !important;
}

html body[data-section="1"] #way_hd .logo_center a {
  color: #fff !important;
}

html body[data-section="1"] #way_hd .logo_center h1 {
  color: #fff !important;
}

html body[data-section="1"] #way_hd .family-btn {
  color: #fff !important;
}

html body[data-section="1"] #way_hd .language-combo-btn {
  color: #fff !important;
}

html body[data-section="1"] #way_hd .mn_icon_line {
  background: #fff !important;
}

/* 섹션1: 스크롤 상태(.scrolled)도 투명/화이트 유지 (전역 .scrolled 무력화) */
html body[data-section="1"] #way_hd.scrolled {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body[data-section="1"] #way_hd.scrolled .main_navigation .nav_li>a {
  color: #fff !important;
}

html body[data-section="1"] #way_hd.scrolled .logo_center a {
  color: #fff !important;
}

html body[data-section="1"] #way_hd.scrolled .logo_center h1 {
  color: #fff !important;
}

html body[data-section="1"] #way_hd.scrolled .family-btn {
  color: #fff !important;
}

html body[data-section="1"] #way_hd.scrolled .language-combo-btn {
  color: #fff !important;
}

html body[data-section="1"] #way_hd.scrolled .mn_icon_line {
  background: #fff !important;
}

/* 섹션1: 헤더 hover 시에도 투명 + 흰색 유지 (메가메뉴 열림은 예외) */
html body[data-section="1"] #way_hd:hover:not(.mega-open) {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body[data-section="1"] #way_hd:hover:not(.mega-open) .main_navigation .nav_li>a {
  color: #fff !important;
}

html body[data-section="1"] #way_hd:hover:not(.mega-open) .logo_center a {
  color: #fff !important;
}

html body[data-section="1"] #way_hd:hover:not(.mega-open) .logo_center h1 {
  color: #fff !important;
}

html body[data-section="1"] #way_hd:hover:not(.mega-open) .family-btn {
  color: #fff !important;
}

html body[data-section="1"] #way_hd:hover:not(.mega-open) .language-combo-btn {
  color: #fff !important;
}

html body[data-section="1"] #way_hd:hover:not(.mega-open) .mn_icon_line {
  background: #fff !important;
}

/* 섹션1: 메가메뉴가 열렸을 때만 흰색 배경 허용 */
html body[data-section="1"] #way_hd.mega-open {
  background: #ffffff !important;
  background-color: #ffffff !important;
  backdrop-filter: none !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08) !important;
}

html body[data-section="1"] #way_hd.mega-open .main_navigation .nav_li>a {
  color: #111 !important;
}

html body[data-section="1"] #way_hd.mega-open .logo_center a {
  color: #000 !important;
}

html body[data-section="1"] #way_hd.mega-open .logo_center h1 {
  color: #000 !important;
}

html body[data-section="1"] #way_hd.mega-open .family-btn {
  color: #333 !important;
}

html body[data-section="1"] #way_hd.mega-open .language-combo-btn {
  color: #333 !important;
}

html body[data-section="1"] #way_hd.mega-open .mn_icon_line {
  background: #333 !important;
}

/* 추가: 인라인 스타일도 덮어쓰기 위한 극강 우선순위 */
html body[data-section="1"] #way_hd[style*="background"] {
  background: transparent !important;
  background-color: transparent !important;
}

/* 
===== Section 2 transparent header overrides (최고 우선순위) ===== */
/* 섹션2일 때 헤더 투명 + 화이트 텍스트 유지 */
html body[data-section="2"] #way_hd {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body[data-section="2"] #way_hd .main_navigation .nav_li>a {
  color: #fff !important;
}

html body[data-section="2"] #way_hd .logo_center a {
  color: #fff !important;
}

html body[data-section="2"] #way_hd .logo_center h1 {
  color: #fff !important;
}

html body[data-section="2"] #way_hd .family-btn {
  color: #fff !important;
}

html body[data-section="2"] #way_hd .language-combo-btn {
  color: #fff !important;
}

html body[data-section="2"] #way_hd .mn_icon_line {
  background: #fff !important;
}

/* 섹션2: 스크롤 상태(.scrolled)도 투명/화이트 유지 (전역 .scrolled 무력화) */
html body[data-section="2"] #way_hd.scrolled {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body[data-section="2"] #way_hd.scrolled .main_navigation .nav_li>a {
  color: #fff !important;
}

html body[data-section="2"] #way_hd.scrolled .logo_center a {
  color: #fff !important;
}

html body[data-section="2"] #way_hd.scrolled .logo_center h1 {
  color: #fff !important;
}

html body[data-section="2"] #way_hd.scrolled .family-btn {
  color: #fff !important;
}

html body[data-section="2"] #way_hd.scrolled .language-combo-btn {
  color: #fff !important;
}

html body[data-section="2"] #way_hd.scrolled .mn_icon_line {
  background: #fff !important;
}

/* 섹션2: 헤더 hover 시에도 투명 + 흰색 유지 (메가메뉴 열림은 예외) */
html body[data-section="2"] #way_hd:hover:not(.mega-open) {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body[data-section="2"] #way_hd:hover:not(.mega-open) .main_navigation .nav_li>a {
  color: #fff !important;
}

html body[data-section="2"] #way_hd:hover:not(.mega-open) .logo_center a {
  color: #fff !important;
}

html body[data-section="2"] #way_hd:hover:not(.mega-open) .logo_center h1 {
  color: #fff !important;
}

html body[data-section="2"] #way_hd:hover:not(.mega-open) .family-btn {
  color: #fff !important;
}

html body[data-section="2"] #way_hd:hover:not(.mega-open) .language-combo-btn {
  color: #fff !important;
}

html body[data-section="2"] #way_hd:hover:not(.mega-open) .mn_icon_line {
  background: #fff !important;
}

/* 섹션2: 메가메뉴가 열렸을 때만 흰색 배경 허용 */
html body[data-section="2"] #way_hd.mega-open {
  background: #ffffff !important;
  background-color: #ffffff !important;
  backdrop-filter: none !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08) !important;
}

html body[data-section="2"] #way_hd.mega-open .main_navigation .nav_li>a {
  color: #111 !important;
}

html body[data-section="2"] #way_hd.mega-open .logo_center a {
  color: #000 !important;
}

html body[data-section="2"] #way_hd.mega-open .logo_center h1 {
  color: #000 !important;
}

html body[data-section="2"] #way_hd.mega-open .family-btn {
  color: #333 !important;
}

html body[data-section="2"] #way_hd.mega-open .language-combo-btn {
  color: #333 !important;
}

html body[data-section="2"] #way_hd.mega-open .mn_icon_line {
  background: #333 !important;
}

/* 추가: 인라인 스타일도 덮어쓰기 위한 극강 우선순위 */
html body[data-section="2"] #way_hd[style*="background"] {
  background: transparent !important;
  background-color: transparent !important;
}

/* 메가메뉴 활성 시, 주메뉴 hover 버퍼 무효화로 상단 간격 0 */
body[data-mega-menu='active'] .main_navigation .nav_li::after,
#way_hd.mega-open .main_navigation .nav_li::after {
  bottom: 0;
  height: 0;
}

@media (max-width: 768px) {
  /* 전체메뉴 컨텐츠 상단 여유: 고정 헤더 높이만큼 확보 */
  #pc_all_wrap .menu_all_content { padding-top: 12px; }
  #pc_all_wrap.nav-active .menu_nav_section { padding-top: 30px; }
}

@media (max-width: 480px) {
  /* 매우 작은 화면에서 네비 간격/패딩 축소로 잘림 방지 */
  .main_navigation #way_top_nav { gap: 10px !important; }
  .main_navigation .nav_li>a { padding: 0 10px !important; font-size: 13px !important; }
}

/* iOS 안전영역 보정 */
@supports (padding: env(safe-area-inset-top)) {
  #pc_all_wrap .menu_all_content { padding-top: calc(12px + env(safe-area-inset-top)); }
  #pc_all_wrap.nav-active .menu_brand_section,
  #pc_all_wrap.nav-active .menu_nav_section { padding-top: calc(24px + env(safe-area-inset-top)); }
}

/* ===== Affiliates Modal ===== */
.affiliates-modal { position: fixed; inset: 0; display: none; z-index: 100000; }
.affiliates-modal.active, .affiliates-modal.closing { display: block; }
.affiliates-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .3s ease; }
.affiliates-modal.active .affiliates-backdrop { opacity: 1; }
.affiliates-modal.closing .affiliates-backdrop { opacity: 0; }

/* right panel */
.affiliates-content { position: fixed; top: 0; right: 0; height: 100vh; width: clamp(420px, 38vw, 560px); background: #fff; border-radius: 12px 0 0 12px; overflow: hidden; transform: translateX(100%); transition: transform .3s ease; }
.affiliates-modal.active .affiliates-content { transform: translateX(0); }
.affiliates-modal.closing .affiliates-content { transform: translateX(100%); }

.affiliates-header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid #eee; }
.affiliates-header h3 { margin:0; font-size:.95rem; font-weight:600; }
.affiliates-close { border:0; background:transparent; font-size:1.1rem; cursor:pointer; }

.affiliates-list { display:flex; flex-direction:column; height:calc(100vh - 58px); overflow-y:auto; }
.affiliate-item { position:relative; flex:1; min-height:0; background-size:cover; background-position:center; clip-path: inset(0 0 100% 0); display:block; }
.affiliate-overlay { position:absolute; inset:0; background:linear-gradient(90deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,0) 55%); display:flex; align-items:center; justify-content:flex-end; padding-right:28px; }
.affiliate-name { color:#fff; font-size:1.6rem; font-weight:700; margin-right:16px; text-shadow:0 2px 6px rgba(0,0,0,.3); }
.affiliate-btn { display:inline-block; padding:12px 20px; background:#ff7a00; color:#fff; border-radius:28px; text-decoration:none; font-weight:600; box-shadow:0 6px 20px rgba(255,122,0,.35); transition: transform .2s ease, box-shadow .2s ease; }
.affiliate-btn:hover { transform: translateY(-2px); box-shadow:0 10px 24px rgba(255,122,0,.45); }

/* reveal/merge animations */
.affiliates-modal.active .affiliate-item:nth-child(1) { animation: revealDown 650ms ease both 60ms; transform-origin: top; }
.affiliates-modal.active .affiliate-item:nth-child(2) { animation: revealUp   650ms ease both 180ms; transform-origin: bottom; }
.affiliates-modal.closing .affiliate-item:nth-child(1) { animation: concealUp   400ms ease both 0ms; }
.affiliates-modal.closing .affiliate-item:nth-child(2) { animation: concealDown 400ms ease both 80ms; }

@keyframes revealDown { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes revealUp   { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes concealUp   { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 100% 0); } }
@keyframes concealDown { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(100% 0 0 0); } }

@media (max-width: 768px){
  .affiliates-content { width: 100vw; border-radius: 0; }
  .affiliate-overlay { justify-content: center; padding-right: 0; }
  .affiliate-name { display: none; }
}