/* 기본 스타일 초기화 */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

a {
	text-decoration: none;
	color: inherit;
}

ul {
	list-style: none;
}

/* 헤더 컨테이너 */
.header-container {
	width: 100%;
	background-color: #fff;
	position: relative;
	z-index: 100;
}

/* 상단 유틸리티 바 */
.header-top-utility {
	background-color: #F5F5F5;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 20px;
	padding: 10px 40px;
	font-size: 12px;
	color: #333;
}

.header-top-utility a,
.header-top-utility .logout-button {
	color: #333;
	font-weight: 400;
	cursor: pointer;
}

.header-top-utility a:hover,
.header-top-utility .logout-button:hover {
	color: #000;
}

.logout-form {
	display: inline;
	margin: 0;
}

.logout-form .logout-button {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
}

/* 메인 헤더 (로고 + 메뉴 + 검색) - 한 줄 배치 */
.header-middle {
	background-color: #fff;
	border-bottom: 1px solid #E5E5E5;
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px 40px;
	display: flex;
	align-items: center;
	position: relative;
	justify-content: space-between;
}

/* 로고 */
.logo-img {
	height: 28px;
	width: auto;
}

.logo-text {
	font-size: 28px;
	font-weight: 300;
	color: #000;
	letter-spacing: -0.5px;
	white-space: nowrap;
}

/* 모바일 아이콘 영역 숨김 (PC에서) */
.mobile-cart-icon {
	display: none;
}

.mobile-search-icon {
	display: none;
}

/* 모바일 메뉴 버튼 숨김 (PC에서) */
.mobile-menu-btn {
	display: none;
}

/* 모바일 검색바 숨김 (PC에서) */
.mobile-search-bar {
	display: none;
}

/* 모바일 메뉴 숨김 (PC에서) */
.mobile-menu,
.mobile-menu-overlay {
	display: none;
}

/* 카테고리 영역 - 절대 중앙 배치 */
.nav-left {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
}

.category-menu {
	display: flex;
	align-items: center;
}

.category-list {
	display: flex;
	align-items: center;
	gap: 0;
}

.category-list li {
	position: relative;
	padding: 0 60px;
}

.category-list li:first-child {
	padding-left: 0;
}

.category-list li:not(:last-child)::after {
	content: '|';
	position: absolute;
	right: 0;
	color: #D0D0D0;
}

.category-list li .nav-link {
	color: #000;
	font-size: 15px;
	font-weight: 500;
	white-space: nowrap;
	transition: color 0.3s;
}

.category-list li .nav-link:hover {
	color: #648876;
}

.category-list li .nav-link.active {
	color: #648876;
	font-weight: 600;
}

/* 더보기 드롭다운 메뉴 */
.more-menu {
	position: relative;
}

.more-link {
	display: flex;
	align-items: center;
	gap: 4px;
}

.more-arrow {
	font-size: 10px;
	transition: transform 0.2s;
}

.more-menu.open .more-arrow {
	transform: rotate(180deg);
}

.more-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	min-width: 140px;
	padding: 8px 0;
	margin-top: 16px;
	z-index: 100;
}

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

.more-dropdown li {
	padding: 0 !important;
}

.more-dropdown li::after {
	display: none !important;
}

.more-dropdown li a {
	display: block;
	padding: 10px 20px;
	font-size: 14px;
	color: #333;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
	white-space: nowrap;
}

.more-dropdown li a:hover {
	background: #f8f8f8;
	color: #648876;
}

.more-dropdown li a.active {
	color: #648876;
	font-weight: 600;
}

/* 검색바 */
.search-bar {
	display: flex;
	align-items: center;
	background-color: #F5F5F5;
	border-radius: 20px;
	width: 350px;
	margin-left: 20px;
}

.search-bar form {
	display: flex;
	align-items: center;
	width: 100%;
}

.search-input {
	flex: 1;
	border: none;
	background: transparent;
	padding: 10px 16px;
	font-size: 13px;
	outline: none;
	color: #666;
}

.search-input::placeholder {
	color: #999;
}

.search-btn {
	background: transparent;
	border: none;
	padding: 10px 16px;
	cursor: pointer;
}

.search-icon {
	width: 18px;
	height: 18px;
}

/* 반응형 - 중간 데스크탑 (1201px ~ 1350px) */
@media (max-width: 1350px) {
	.category-list li {
		padding: 0 40px;
	}

	.search-bar {
		width: 300px;
	}
}

/* 반응형 - 태블릿/작은 데스크탑 */
@media (max-width: 1200px) {
	.category-list li {
		padding: 0 30px;
	}

	.search-bar {
		width: 280px;
	}
}

@media (max-width: 1100px) {
	.category-list li {
		padding: 0 20px;
	}

	.search-bar {
		width: 250px;
	}
}

/* 반응형 - 작은 태블릿 (901px ~ 1000px) */
@media (max-width: 1000px) {
	.category-list li {
		padding: 0 10px;
	}

	.category-list li .nav-link {
		font-size: 13px;
	}

	.search-bar {
		width: 160px;
		margin-right: 0;
		flex-shrink: 0;
	}

	.search-input {
		padding: 8px 12px;
		font-size: 12px;
	}

	.search-btn {
		padding: 8px 12px;
	}

	.nav-left {
		position: relative;
		left: auto;
		transform: none;
		margin-left: 20px;
	}

	.header-middle {
		padding: 16px 16px;
		gap: 10px;
	}

	.logo-img {
		height: 24px;
	}
}

/* 반응형 - 모바일 */
@media (max-width: 900px) {
	.header-top-utility {
		display: none;
	}

	.header-middle {
		padding: 16px 20px;
		justify-content: space-between;
		position: relative;
	}

	.logo-link {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
	}

	.logo-img {
		height: 22px;
	}

	.logo-text {
		font-size: 16px;
		font-weight: 300;
		margin: 0;
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
	}

	/* 카테고리 메뉴 숨김 */
	.nav-left {
		display: none;
	}

	.search-bar {
		display: none;
	}

	/* 모바일 우측 아이콘 영역 */
	.mobile-cart-icon {
		display: flex;
		align-items: center;
		gap: 16px;
		margin-left: auto;
	}

	.mobile-search-icon {
		display: flex;
		width: 20px;
		height: 20px;
	}

	.mobile-search-icon img {
		width: 100%;
		height: 100%;
	}

	.mobile-cart-icon a {
		display: flex;
	}

	.mobile-cart-icon img {
		width: 20px;
		height: 20px;
	}
}

@media (max-width: 900px) {
	.header-middle {
		padding: 14px 16px;
	}

	.logo-img {
		height: 20px;
	}

	.logo-text {
		font-size: 15px;
		font-weight: 300;
	}

	.mobile-cart-icon {
		gap: 14px;
	}

	.mobile-search-icon,
	.mobile-cart-icon a {
		width: 18px;
		height: 18px;
	}

	.mobile-search-icon img,
	.mobile-cart-icon img {
		width: 100%;
		height: 100%;
	}
}

@media (max-width: 500px) {
	.header-middle {
		padding: 14px 16px;
	}

	.logo-img {
		height: 16px;
	}
}

/* ============================================
   모바일 메뉴 스타일
   ============================================ */
@media (max-width: 900px) {

	/* 햄버거 메뉴 버튼 */
	.mobile-menu-btn {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		width: 20px;
		height: 16px;
		background: none;
		border: none;
		padding: 0;
		cursor: pointer;
		z-index: 10;
	}

	.mobile-menu-btn span {
		display: block;
		width: 100%;
		height: 2px;
		background-color: #333;
		transition: all 0.3s;
	}

	/* 모바일 검색 오버레이 */
	.mobile-search-overlay {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 1100;
	}

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

	/* 모바일 검색바 - 전체 화면 모달 */
	.mobile-search-bar {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		background: #fff;
		z-index: 1200;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	}

	.mobile-search-bar.open {
		display: block;
	}

	.mobile-search-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 16px 20px;
		border-bottom: 1px solid #e5e5e5;
	}

	.mobile-search-title {
		font-size: 16px;
		font-weight: 600;
		color: #333;
	}

	.mobile-search-close {
		background: none;
		border: none;
		font-size: 28px;
		color: #666;
		cursor: pointer;
		padding: 0;
		line-height: 1;
	}

	.mobile-search-form {
		display: flex;
		gap: 10px;
		padding: 16px 20px;
	}

	.mobile-search-input {
		flex: 1;
		padding: 14px 16px;
		border: 1px solid #e5e5e5;
		border-radius: 8px;
		font-size: 16px;
		background: #f8f8f8;
	}

	.mobile-search-input:focus {
		outline: none;
		border-color: #648876;
		background: #fff;
	}

	.mobile-search-submit {
		padding: 14px 24px;
		background: #648876;
		color: #fff;
		border: none;
		border-radius: 8px;
		font-size: 15px;
		font-weight: 500;
		cursor: pointer;
		white-space: nowrap;
	}

	/* 검색 열릴 때 스크롤 방지 */
	body.search-open {
		overflow: hidden;
	}

	/* 하단 네비게이션이 검색 오버레이 위에 표시되도록 */
	body.search-open .mobile-bottom-nav {
		z-index: 1300;
	}

	/* 모바일 메뉴 오버레이 */
	.mobile-menu-overlay {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 998;
	}

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

	/* 모바일 메뉴 */
	.mobile-menu {
		display: block;
		position: fixed;
		top: 0;
		left: -100%;
		width: 85%;
		max-width: 320px;
		height: 100%;
		background: #fff;
		z-index: 999;
		transition: left 0.3s ease;
		overflow-y: auto;
	}

	.mobile-menu.open {
		left: 0;
	}

	/* 모바일 메뉴 헤더 */
	.mobile-menu-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20px;
		border-bottom: 1px solid #e5e5e5;
	}

	.mobile-menu-title {
		font-size: 18px;
		font-weight: 300;
		color: #333;
	}

	.mobile-menu-close {
		background: none;
		border: none;
		font-size: 28px;
		color: #666;
		cursor: pointer;
		padding: 0;
		line-height: 1;
	}

	/* 모바일 메뉴 탭 */
	.mobile-menu-tabs {
		display: flex;
		border-bottom: 1px solid #e5e5e5;
	}

	.mobile-tab {
		flex: 1;
		padding: 15px 10px;
		background: none;
		border: none;
		font-size: 14px;
		font-weight: 500;
		color: #999;
		cursor: pointer;
		position: relative;
		transition: color 0.2s;
	}

	.mobile-tab.active {
		color: #648876;
		font-weight: 600;
	}

	.mobile-tab.active::after {
		content: '';
		position: absolute;
		bottom: -1px;
		left: 0;
		right: 0;
		height: 2px;
		background: #648876;
	}

	/* 모바일 탭 컨텐츠 */
	.mobile-tab-content {
		display: none;
		padding-bottom: 60px;
	}

	.mobile-tab-content.active {
		display: block;
	}

	/* 모바일 카테고리 리스트 */
	.mobile-category-list {
		list-style: none;
		padding: 0;
		margin: 0;
	}

	.mobile-category-list li {
		border-bottom: 1px solid #f0f0f0;
	}

	.mobile-category-list li a {
		display: block;
		padding: 16px 20px;
		font-size: 15px;
		color: #333;
		text-decoration: none;
		transition: background 0.2s;
	}

	.mobile-category-list li a:hover {
		background: #f8f8f8;
	}

	/* 모바일 로그아웃 폼 */
	.mobile-logout-form {
		margin: 0;
	}

	.mobile-logout-form button {
		display: block;
		width: 100%;
		padding: 16px 20px;
		text-align: left;
		font-size: 15px;
		color: #333;
		background: none;
		border: none;
		cursor: pointer;
		transition: background 0.2s;
	}

	.mobile-logout-form button:hover {
		background: #f8f8f8;
	}

	/* 모바일 메뉴 내 검색 */
	.mobile-menu-search {
		padding: 16px 20px;
		border-bottom: 1px solid #e5e5e5;
		background: #f8f9fa;
	}

	.mobile-menu-search a {
		display: flex;
		align-items: center;
		gap: 12px;
		color: #333;
		font-size: 15px;
		font-weight: 500;
		text-decoration: none;
	}

	.mobile-menu-search img {
		width: 20px;
		height: 20px;
		opacity: 0.7;
	}

	.mobile-menu-search a:hover {
		color: #648876;
	}

	.mobile-menu-search a:hover img {
		opacity: 1;
	}

	/* 관리자 페이지 링크 스타일 */
	.mobile-category-list li a.admin-link {
		color: #648876;
		font-weight: 600;
	}

	.mobile-category-list li a.admin-link:hover {
		background: #f0f5f3;
	}

	/* 모바일 메뉴 하단 고정 로그아웃 */
	.mobile-menu-footer {
		position: absolute;
		bottom: 68px;
		left: 0;
		right: 0;
		padding: 16px 20px;
		border-top: 1px solid #e5e5e5;
		background: #fff;
	}

	.mobile-menu-logout-form {
		margin: 0;
		width: 100%;
	}

	/* 로그인 버튼 스타일 */
	.mobile-menu-login-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		padding: 14px 20px;
		background-color: #648876;
		color: #fff;
		border-radius: 8px;
		text-decoration: none;
		font-size: 15px;
		font-weight: 500;
	}

	.mobile-menu-login-btn:hover {
		background-color: #547565;
	}

	.mobile-menu-logout-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		padding: 14px 20px;
		background-color: #f5f5f5;
		color: #666;
		border: none;
		border-radius: 8px;
		font-size: 15px;
		font-weight: 500;
		cursor: pointer;
	}

	.mobile-menu-logout-btn:hover {
		background-color: #ebebeb;
		color: #333;
	}
}