/* 헤더 스타일 */
.section-header {
	height: 100px;
	width: 100%;
	background: var(--bg-white);
	border-bottom: 1px solid var(--border-color);
	position: sticky;
	top: 0;
	z-index: 1000;
}

.header-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
}

.header-logo-wrapper {
	width: 190px;
	min-width: 120px;
	height: 23px;
}

.header-logo-link {
	display: block;
	height: 100%;
}

.header-logo-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.main-nav {
	display: flex;
	align-items: center;
	gap: 74px;
}

.nav-items {
	display: flex;
	align-items: center;
	gap: 100px;
}

.product-menu-wrapper {
	position: relative;
}

.product-menu-toggle {
	color: var(--text-main);
	white-space: nowrap;
	cursor: pointer;
}

.product-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	padding-top: 20px;
	background: transparent;
	display: none;
	flex-direction: column;
	z-index: 1000;
}

/* 드롭다운 호버 활성화 */
.product-menu-wrapper:hover .product-dropdown {
	display: flex;
}

.product-dropdown-inner {
	background: white;
	box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2);
	border-radius: 16px;
	padding: 38px;
	display: flex;
	flex-direction: column;
	gap: 38px;
	min-width: 150px;
}

.dropdown-link-item {
	color: var(--text-main);
	font-size: 20px;
	font-weight: 700;
	line-height: 20px;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.2s;
}

.dropdown-link-item:hover {
	color: var(--primary-color);
}

.nav-link-container {
	text-decoration: none;
}

.nav-link-text {
	color: var(--text-main);
	white-space: nowrap;
}

.kakao-link-wrapper {
	display: flex;
	align-items: center;
}

.kakao-link {
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 4px;
}

.header-partner-btn {
	text-decoration: none;
}

.header-partner-btn-inner {
	padding: 12px 22px;
	background: var(--primary-color);
	border-radius: 20px;
	justify-content: center;
	align-items: center;
	gap: 10px;
	display: inline-flex;
	color: white;
	font-size: 16px;
	font-weight: 700;
	line-height: 18px;
	white-space: nowrap;
}

/* 반응형 조정 (style.css 매칭) */
@media (max-width: 1023px) {
	.section-header {
		height: 70px; /* Override 100px */
	}
	.main-nav {
		display: none; /* Hide desktop nav */
	}

	.header-logo-wrapper {
		width: 160px;
	}
}

/* 모바일 메뉴 토글 (style.css에서 이동) */
.mobile-menu-toggle {
	display: none; /* 기본적으로 숨김 */
	flex-direction: column;
	justify-content: space-between;
	width: 28px;
	height: 22px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 1001;
}

.mobile-menu-toggle span {
	display: block;
	width: 100%;
	height: 3px;
	background-color: var(--text-main);
	border-radius: 2px;
	transition: all 0.3s ease;
}

/* 햄버거 버튼 활성화 시 X 모양 */
.mobile-menu-toggle.active span:nth-child(1) {
	transform: translateY(9.5px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
	opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
	transform: translateY(-9.5px) rotate(-45deg);
}

/* ==========================================
   반응형 헤더 
========================================== */

/* 태블릿 & 모바일 (1023px 이하) */
@media (max-width: 1023px) {
	.section-header {
		height: 70px;
	}

	/* 헤더의 로고와 햄버거 버튼을 메뉴 위에 표시 */
	.section-header .header-container > div:first-child {
		position: relative;
		z-index: 1001;
	}

	/* 햄버거 버튼 표시 */
	.mobile-menu-toggle {
		display: flex;
		position: relative;
		z-index: 1001;
	}

	/* 메인 네비게이션 → 풀스크린 중앙 정렬 메뉴 */
	.main-nav {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100vh;
		background: var(--bg-white);
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 0 !important;
		padding: 100px 30px 30px;
		z-index: 1000;
		overflow-y: auto;
		/* 초기 상태: 숨김 (깜빡임 방지) */
		display: none;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-20px);
	}

	.main-nav.active {
		display: flex;
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		transition:
			opacity 0.3s ease,
			transform 0.3s ease;
	}

	/* 네비게이션 아이템 세로 정렬 */
	.nav-items {
		flex-direction: column;
		gap: 40px !important;
		width: 100%;
		align-items: center;
	}

	/* 모바일 상품 메뉴 래퍼 */
	.product-menu-wrapper {
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	/* 모바일 상품 드롭다운 (항상 열림) */
	.product-dropdown {
		position: static;
		display: flex; /* Always visible */
		flex-direction: column;
		padding-top: 20px;
		width: 100%;
		align-items: center;
		background: transparent;
		box-shadow: none;
	}

	/* .product-menu-wrapper.active 체크 제거됨 */

	.product-dropdown-inner {
		box-shadow: none;
		padding: 0;
		align-items: center;
		gap: 20px;
		background: transparent;
	}

	.dropdown-link-item {
		font-size: 18px;
		font-weight: 500;
		color: var(--text-secondary);
	}

	.nav-link-text {
		font-size: 24px;
		font-weight: 700;
	}

	.product-menu-toggle {
		font-size: 24px; /* text-btn-m equivalent */
		font-weight: 700;
	}

	/* 모바일 파트너 버튼 */
	.header-partner-btn {
		margin-top: 40px;
		width: 100%;
		display: flex;
		justify-content: center;
	}

	.header-partner-btn-inner {
		width: 100%;
		max-width: 300px;
		padding: 16px;
		font-size: 18px;
	}
}
