/* ========================================
   Header & Navigation Styles
======================================== */

header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: white;
	width: 100%;
}

nav {
	display: flex;
	align-items: center;
	height: 5rem;
	padding: 0 2rem;
	max-width: 1200px;
	margin: 0 auto;
	position: relative;
}

nav::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 1200px;
	max-width: 100vw;
	border-bottom: 1px solid #ddd;
}

/* PC 화면 (1024px 이상) */
@media (min-width: 1024px) {
	nav {
		height: 7.5rem; /* 144px - PC 높이 */
	}
}

/* 네비게이션 그룹 레이아웃 */
.nav-left {
	display: flex;
	align-items: center;
	gap: 3.5rem;
}

.nav-center {
	flex: 1;
	display: flex;
	justify-content: flex-end;
	margin-left: 2rem;
	margin-right: 8rem;
}

.nav-right {
	display: flex;
	align-items: center;
	gap: 1rem;
}

/* 로고 */
.logo {
	font-family: "Metropolis Street", sans-serif;
	font-size: 30px;
	font-weight: bold;
	color: #f99b9b;
}

/* 메뉴 아이템 */
.menu-item {
	color: #333;
	font-size: 16px;
	font-family: "Noto Sans KR", sans-serif;
	font-weight: bold;
}

/* 검색 폼 */
.search-form {
	display: flex;
	width: 100%;
	max-width: 450px;
	position: relative;
}

.search-input {
	flex: 1;
	padding: 10px 15px;
	background-color: #f9f9f9;
	border: 1px solid #f9f9f9;
	border-radius: 4px;
	font-size: 14px;
	padding-right: 42px;
}

.search-input:focus {
	outline: none;
	border-color: #999;
}

.search-btn {
	position: absolute;
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	padding: 0;
	background: transparent; /* 배경 박스 제거 */
	border: none;
	border-radius: 0;
	color: #222222; /* 아이콘 색상 */
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

/* 장바구니 아이콘 */
.cart-icon {
	font-size: 20px;
	color: #222222;
}

/* 인증 링크 */
.auth-link {
	color: #333;
	font-size: 14px;
	font-family: "Noto Sans KR", sans-serif;
	font-weight: bold;
}

.separator {
	color: #ddd;
}

/* ========================================
   Footer Styles
======================================== */

footer {
	max-width: 1200px;
	padding: 0;
	margin: 0 auto 50px;
}

.footer-content {
	background-color: #f5f5f5; /* 회색 배경을 여기로 이동 */
	padding: 50px 30px; /* 세로 여백 조정 가능 👈 */
	text-align: left;
	display: flex;
	justify-content: center;
}

.footer-info {
	width: fit-content;
}

.footer-info p {
	font-size: 13px; /* 글자 크기 조정 가능 👈 */
	line-height: 2; /* 줄 간격 조정 가능 👈 */
	font-weight: 300; /* 얇은 폰트 */
	display: flex;
	justify-content: flex-start;
	align-items: center;
}

.footer-info p strong {
	display: inline-block;
	width: 120px; /* 키워드 영역 고정 너비 */
	text-align: left;
	font-weight: 600; /* bold */
}

/* ========================================
   Main Page - Ad Banner & Content Styles
======================================== */

/* 광고 배너 - 독립 영역 (헤더 바로 아래) */
.ad-banner {
	max-width: 1200px;
	margin: 0 auto 0 auto;
	height: 280px;
	overflow: hidden;
	position: relative;
}

.ad-slider {
	width: 100%;
	height: 100%;
	display: flex;
	transition: transform 0.8s ease-in-out;
}

.ad-slide {
	min-width: 100%;
	height: 100%;
}

.ad-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* 첫 번째 슬라이드 - 연한 핑크 */
.ad-slide:nth-child(1) {
	background-color: #ffe5e5;
}

/* 두 번째 슬라이드 - 연한 하늘색 */
.ad-slide:nth-child(2) {
	background-color: #e5f3ff;
}

/* 세 번째 슬라이드 - 연한 민트색 */
.ad-slide:nth-child(3) {
	background-color: #e5fff0;
}

/* 네 번째 슬라이드(1번 복제) - 연한 핑크 */
.ad-slide:nth-child(4) {
	background-color: #ffe5e5;
}

/* 슬라이드 버튼 */
.slide-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 25px;
	height: 25px;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.3);
	border: none;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
}

/* 버튼 내부 아이콘 크기 조정 */
.slide-btn .material-symbols-outlined {
	font-size: 16px;
}

/* 왼쪽 화살표 아이콘 중앙 정렬 보정 */
.slide-prev .material-symbols-outlined {
	margin-left: 3px;
}

.slide-prev {
	left: 15px;
}

.slide-next {
	right: 15px;
}

/* 페이지 인디케이터 */
.slide-indicator {
	position: absolute;
	bottom: 13px;
	right: 15px;
	background-color: rgba(0, 0, 0, 0.3);
	color: white;
	padding: 6px 13px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: bold;
	z-index: 10;
}

/* 본문 콘텐츠 영역 */
.main-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 0 20px 0;
}

/* 공통 박스 스타일 */
.section-box {
	padding: 20px;
	padding-left: 20px;
}

.section-title {
	font-size: 24px;
	font-weight: bold;
	margin-bottom: 10px;
}

/* 섹션 헤더 레이아웃 */
.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.section-header-left {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.section-subtitle {
	font-size: 14px;
	color: #666;
	font-weight: 400;
}

.section-more {
	display: flex;
	align-items: center;
	gap: 4px;
	color: #333;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: color 0.2s;
}

.section-more:hover {
	color: #f99b9b;
}

.section-more .material-symbols-outlined {
	font-size: 18px;
}

/* 카테고리 선택 박스 */
.category-box {
	display: flex;
	justify-content: center;
}

/* 카테고리 섹션 전용 스타일 */
.category-section {
	padding: 0 200px; /* 👈 세로 길이 조정  */
	border: none;
	border-bottom: 1px solid #ddd;
}

.category-btn {
	flex: 1;
	max-width: 200px;
	height: 50px; /* 👈 고정 높이 (직접 수정 가능) */
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none;
	color: #333;
	background-color: #fff;
	font-size: 14px;
	font-weight: 400;
	border: none;
	cursor: pointer;
	user-select: none;
}

/* 선택된 카테고리 버튼 스타일 */
.category-btn.active {
	color: #f99b9b;
	border-bottom: 3px solid #f99b9b;
	font-weight: 600;
}

/* 추천 순위 안내 텍스트 */
.rank-guide-text {
	margin-top: 45px;
	font-size: 17px;
	font-weight: 700;
	text-align: center;
	color: #333;
}

/* 카테고리별 슬라이드 컨테이너 */
.category-slide-container {
	max-width: 1200px;
	min-height: auto;
	overflow: hidden;
	position: relative;
	margin-bottom: 60px;
	transition: height 0.5s ease-in-out;
}

.category-slider {
	width: 100%;
	display: flex;
	transition: transform 0.5s ease-in-out;
	align-items: flex-start;
}

.category-slide {
	min-width: 100%;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 20px 0;
	margin-top: 20px;
}

/* 제품 그리드 레이아웃 */
.product-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 15px;
	width: 100%;
	padding: 0 165px;
}

/* PC 화면 (1024px 이상) - 5개 열 */
@media (min-width: 1024px) {
	.product-grid {
		grid-template-columns: repeat(5, 1fr);
		gap: 20px;
	}
}

/* 제품 카드 */
.product-card {
	background-color: #fff;
	border: none;
	border-radius: 0;
	overflow: hidden;
	position: relative;
	transition: transform 0.2s, box-shadow 0.2s;
}

/* 제품 이미지 영역 */
.product-image {
	width: 100px;
	height: 100px;
	background-color: #f5f5f5;
	position: relative;
	border: 1px solid #e5e5e5;
	border-radius: 30px;
	transition: transform 0.2s, box-shadow 0.2s;
	cursor: pointer;
	margin: 0 auto;
}

/* 전체보기 카드 전용 스타일 - 인기 탭에만 적용 */
.category-slide[data-category="인기"] .product-card:last-child .product-image {
	background-color: #ffe5e5;
	border: 1px solid #ffe5e5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.category-slide[data-category="인기"]
	.product-card:last-child
	.product-image::before {
	content: "+";
	font-size: 40px;
	font-weight: bold;
	color: #f99b9b;
	font-family: Arial, sans-serif;
}

/* 제품 정보 영역 */
.product-info {
	padding: 15px;
}

.product-name {
	font-size: 14px;
	font-weight: 500;
	color: #333;
	margin-bottom: 8px;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	text-align: center;
}

.product-price {
	font-size: 16px;
	font-weight: bold;
	color: #f99b9b;
}

/* 각 카테고리별 배경색 - 하얀색으로 통일 */
.category-slide:nth-child(1) {
	background-color: #ffffff; /* 인기 - 하얀색 */
}

.category-slide:nth-child(2) {
	background-color: #ffffff; /* 수분크림 - 하얀색 */
}

.category-slide:nth-child(3) {
	background-color: #ffffff; /* 미백 - 하얀색 */
}

.category-slide:nth-child(4) {
	background-color: #ffffff; /* 모공 - 하얀색 */
}

.category-slide:nth-child(5) {
	background-color: #ffffff; /* 진정 - 하얀색 */
}

.category-slide:nth-child(6) {
	background-color: #ffffff; /* 트러블 - 하얀색 */
}

.pick-container {
	display: grid;
	grid-template-columns: repeat(5, minmax(auto, 200px));
	gap: 20px;
	margin-top: 25px;
	justify-content: start;
}

/* PC 화면 (1024px 이상) - 간격 증가 */
@media (min-width: 1024px) {
	.pick-container {
		gap: 30px;
	}
}

.pick-card {
	background-color: #ffffff;
	border: none;
	border-radius: 0;
	overflow: hidden;
	position: relative;
	transition: transform 0.2s, box-shadow 0.2s;
	margin: 0;
}

/* 픽 카드 이미지 영역 */
.pick-image {
	width: 100%;
	aspect-ratio: 1 / 1;
	background-color: #f5f5f5;
	position: relative;
	border: 1px solid #e5e5e5;
	border-radius: 15px;
	transition: transform 0.2s, box-shadow 0.2s;
	cursor: pointer;
	margin: 0 auto;
}

/* 픽 카드 제품 정보 영역 */
.pick-info {
	padding: 15px 0 15px 0;
}

.pick-name {
	font-size: 15px;
	font-weight: 600;
	color: #333;
	margin-bottom: 8px;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	text-align: left;
}

.pick-description {
	font-size: 12px;
	font-weight: 400;
	color: #666;
	text-align: left;
	line-height: 1.3;
}

/* ========================================
   Product Grid - Background Images
======================================== */

/* 인기 카테고리 이미지 */
.img-skin-toner {
    background-image: url('../images/categories/popular/skin-toner.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-essence {
    background-image: url('../images/categories/popular/essence.png');
    background-size: 90%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-cream {
    background-image: url('../images/categories/popular/cream.png');
    background-size: 95%;
	background-position: 100% center;
	background-repeat: no-repeat;
}

.img-cleansing-foam {
    background-image: url('../images/categories/popular/cleansing-foam.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-cleansing-oil {
    background-image: url('../images/categories/popular/cleansing-oil.png');
    background-size: 95%;
    background-position: center 140%;
	background-repeat: no-repeat;
}

.img-sunscreen {
    background-image: url('../images/categories/popular/sunscreen.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-body-wash {
    background-image: url('../images/categories/popular/body-wash.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

/* 스킨케어 카테고리 이미지 */
.img-lotion {
    background-image: url('../images/categories/skincare/lotion.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-eye-care {
    background-image: url('../images/categories/skincare/eye-care.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-mist {
    background-image: url('../images/categories/skincare/mist.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-gel {
    background-image: url('../images/categories/skincare/gel.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-pad {
    background-image: url('../images/categories/skincare/pad.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-night-cream {
    background-image: url('../images/categories/skincare/night-cream.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

/* 클렌징 카테고리 이미지 */
.img-foam {
    background-image: url('../images/categories/cleansing/foam.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-water {
    background-image: url('../images/categories/cleansing/water.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-oil {
    background-image: url('../images/categories/cleansing/oil.png');
    background-size: 95%;
    background-position: center 140%;
	background-repeat: no-repeat;
}

.img-scrub {
    background-image: url('../images/categories/cleansing/scrub.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

/* 선케어 카테고리 이미지 */
.img-suncare-cream {
    background-image: url('../images/categories/suncare/suncare-cream.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-spray {
    background-image: url('../images/categories/suncare/spray.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-cushion {
    background-image: url('../images/categories/suncare/cushion.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

/* 마스크팩 카테고리 이미지 */
.img-sheet {
    background-image: url('../images/categories/mask/sheet.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-peel-off {
    background-image: url('../images/categories/mask/peel-off.png');
    background-size: 85%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-spot {
    background-image: url('../images/categories/mask/spot.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-sleeping {
    background-image: url('../images/categories/mask/sleeping.png');
    background-size: 85%;
    background-position: center;
	background-repeat: no-repeat;
}

/* 바디 카테고리 이미지 */

.img-body-wash {
    background-image: url('../images/categories/body/wash.png');
    background-size: 95%;
    background-position: center;
    background-repeat: no-repeat;
}

.img-body-lotion {
    background-image: url('../images/categories/body/lotion.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-body-scrub {
    background-image: url('../images/categories/body/scrub.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-hand-cream {
    background-image: url('../images/categories/body/hand-cream.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

.img-deodorant {
    background-image: url('../images/categories/body/deodorant.png');
    background-size: 95%;
    background-position: center;
	background-repeat: no-repeat;
}

/* 구매가이드 */
.guide-container {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 15px;
	margin-top: 25px;
}

.guide-card {
	height: 150px;
	border: 1px solid #ddd;
	border-radius: 12px;
	background-color: #fff;
}

/* ========================================
   Item List Page - Category Styles
======================================== */

.item-list-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
}

/* 상위 카테고리 섹션 */
.top-category-section {
	margin-bottom: 60px;
}

.top-category-box {
	display: flex;
	justify-content: center;
	gap: 4rem;
}

.top-category-item {
	display: inline-block;
	padding: 15px 0;
	font-size: 17px;
	font-weight: 700;
	color: #333;
	text-decoration: none;
	border-bottom: 5px solid transparent;
	transition: all 0.3s ease;
	cursor: pointer;
}

.top-category-item:hover {
	color: #f99b9b;
	border-bottom-color: #f99b9b;
}

/* 하위 카테고리 섹션 */
.sub-category-section {
    max-width: 50rem;
    margin: 0 auto;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.sub-category-container {
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, height 0.3s ease;
}

.sub-category-container.active {
    opacity: 1;
    height: auto;
}

.sub-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.sub-category-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 4.5rem;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.sub-category-item:hover {
    color: #f99b9b;
    background-color: #fef5f5;
    font-weight: 700;
}

/* ========================================
   Category Detail Page Styles
======================================== */

/* 하위 카테고리 선택 영역 */
.sub-category-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 6.7rem;
    position: relative;
}

.sub-category-selector::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    max-width: 100vw;
    background-color: #f9f9f9;
    border-bottom: 1px solid #ddd;
    z-index: -1;
}

.sub-category-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.sub-category-btn:hover {
    color: #f99b9b;
}

/* 탭 네비게이션 */
.category-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    height: 3.8rem;
    background-color: white;
    position: relative;
}

.category-tabs::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    max-width: 100vw;
    border-bottom: 1px solid #ddd;
}

.tab-item {
    display: flex;
    align-items: center;
    height: 3.8rem;
    padding: 0 3.2rem;
    font-size: 16px;
    font-weight: 400;
    color: #666;
    text-decoration: none;
    border-bottom: 5px solid transparent;
    transition: all 0.3s;
}

.tab-item:hover {
    color: #333;
}

.tab-item.active {
    color: #f99b9b;
    font-weight: 600;
    border-bottom-color: #f99b9b;
}

/* 카테고리 본문 영역 */
.category-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 500px;
}

/* ========================================
   Category Detail - Content Sections
======================================== */

/* 공통 섹션 스타일 */
.beauticle-pick-section,
.ranking-section {
    margin-bottom: 60px;
}

.content-section-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.content-section-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

/* 뷰티클픽 그리드 */
.pick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.pick-grid-card {
    display: block;
    text-decoration: none;
    transition: transform 0.2s;
}

.pick-grid-card:hover {
    transform: translateY(-5px);
}

.pick-grid-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 15px;
    margin-bottom: 15px;
}

.pick-grid-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

/* 랭킹 섹션 */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ranking-card {
    display: block;
    padding: 25px 30px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.2s;
}

.ranking-card:hover {
    border-color: #f99b9b;
    box-shadow: 0 2px 8px rgba(249, 155, 155, 0.1);
}

.ranking-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-card-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.ranking-card-description {
    font-size: 14px;
    color: #666;
}

/* PC 화면 (1024px 이상) */
@media (min-width: 1024px) {
    .pick-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .ranking-card {
        padding: 30px 40px;
    }
    
    .ranking-card-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}