/* 전체 기본 여백 제거 */
body {
  margin: 0;
  padding: 0;
}

/* 네비게이션바 */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  padding: 0 40px;
  box-sizing: border-box;
  z-index: 1000;

  background-color: #000000;
}

body {
  padding-top: 70px;
}

/* 메뉴 레이아웃 설정 */
nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 30px;
  align-items: center;
}

/* 메뉴 텍스트 스타일 */
nav a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  transition: color 0.3s;
}

/* 텍스트에 마우스 올렸을 때 효과 */
nav a:hover {
  color: #bbbbbb;
}

/* 모바일 햄버거 버튼 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #ffffff;
}

/* 모바일 슬라이드 메뉴 오버레이 */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
}

.mobile-menu-overlay.open {
  display: block;
}

/* 모바일 슬라이드 메뉴 패널 */
.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: -210px;
  width: 210px;
  height: 100%;
  background-color: #14171A;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-menu-overlay.open .mobile-menu-panel {
  right: 0;
}

.mobile-menu-close {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 10px;
}

/* 모바일 메뉴 내 언어 선택기 */
.mobile-lang-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mobile-lang-selector .lang-dropdown {
  top: calc(100% + 6px);
  left: 0;
  right: auto;
}

.mobile-menu-close button {
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
  padding: 4px;
}

.mobile-menu-items {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.mobile-menu-items a {
  display: block;
  padding: 18px 28px;
  text-decoration: none;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #2c2d31;
  transition: background 0.2s;
}

.mobile-menu-items a:hover {
  background-color: #222327;
}

.mobile-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 28px;
  background: none;
  border: none;
  border-bottom: 1px solid #2c2d31;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s;
}

.mobile-accordion-header:hover {
  background-color: #222327;
}

.mobile-accordion-header svg {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.mobile-accordion.open .mobile-accordion-header svg {
  transform: rotate(180deg);
}

.mobile-accordion-body {
  display: none;
  flex-direction: column;
}

.mobile-accordion.open .mobile-accordion-body {
  display: flex;
}

.mobile-accordion-body a {
  padding-left: 44px;
  font-size: 15px;
  color: #aaaaaa;
}

/* 언어 선택 버튼 */
.lang-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* 현재 선택된 언어 표시하는 버튼 */
.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #222327;
  border: 1px solid #444;
  border-radius: 6px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}

/* 버튼 호버링 피드백 */
.lang-btn:hover {
  background: #2c2d31;
}

/* 언어 목록 드롭다운 */
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #2E3134;
  border: 1px solid #444;
  border-radius: 6px;
  overflow: hidden;
  min-width: 100%;
  z-index: 1100;
}

/* 드롭다운 표시 */
.lang-selector.open .lang-dropdown {
  display: block;
}

/* 드롭다운 내 언어 항목 */
.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* 언어 항목 피드백 */
.lang-dropdown a:hover {
  background: #222327;
}

/* 현재 선택된 언어 강조 */
.lang-dropdown a.active {
  color: #FB2864;
}

/* 상품정보/구매하기 드롭다운 */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  cursor: pointer;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 14px;
  z-index: 1100;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu-inner {
  background: #2E3134;
  border: 1px solid #444;
  border-radius: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 18px;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
}

.nav-dropdown-menu a:hover {
  background: #222327;
  color: #ffffff !important;
}

/* 모바일 헤더 레이아웃 */
@media (max-width: 768px) {
  nav {
    padding: 0 20px;
  }

  nav ul {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  /* 모바일에서 헤더의 언어 선택기 숨기기 */
  #langSelector {
    display: none;
  }
}
