/* =================================================================
 * layout.css — 헤더 · 푸터 · 페이지별 큰 뼈대
 * ================================================================= */

/* ---- 상단 띠배너 (피그마 01 HOME · div : PC 높이 41 · 13px / 모바일 35 · 12px, Soft Black 바탕 · 흰 글자) ---- */

.topbar {
	display: flex; align-items: center; justify-content: center;
	min-height: 35px;
	padding: 4px var(--page-margin);
	background: var(--soft-black);
	color: #fff;
	font-family: var(--font-body);
	font-size: 12px; line-height: 1.4; letter-spacing: 0.4px;
	text-align: center;
}
.topbar__text { margin: 0; }
.topbar__pc { display: none; }
@media (min-width: 900px) {
	.topbar { min-height: 41px; font-size: 13px; }
	.topbar__pc { display: inline; }
	.topbar__pc[hidden] { display: none; }
}

/* ---- 헤더 (피그마 01 HOME · header)
       PC 1440 : 높이 131 (위 줄 76 · 메뉴 줄 55) + 아래 선 · 로고 102×34 가운데 · 아이콘 22 (검색 왼쪽 120 · 계정 · 찜 · 장바구니 46 간격 오른쪽 1320)
       모바일 390 : 높이 56 + 아래 선 · 메뉴 19 · 검색 63 · 로고 72×24 가운데 · 계정 305 · 장바구니 349 ---- */

.header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--bg);
	border-bottom: 1px solid var(--border);
	font-family: var(--font-body);
}

.header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 55px;
	padding-inline: 10px;   /* 아이콘 22 를 40 버튼에 넣어 화면 끝에서 19 (시안) */
}
@media (min-width: 900px) {
	.header__inner {
		height: 76px;
		max-width: var(--page-width);
		margin-inline: auto;
		padding-inline: calc(var(--page-margin) - 9px);   /* 아이콘이 콘텐츠 끝(120 · 1320)에 맞게 */
	}
}

.header__left, .header__right { display: flex; align-items: center; gap: 4px; }
@media (min-width: 900px) { .header__right { gap: 6px; } }   /* 아이콘 시작점 사이 46 */

/* WHA' YUNSUL 로고 (img/wha/logo-black.png, 425×142 = 3:1, 피그마 Assets). 피그마 헤더 : 모바일 72×24 · PC 102×34 */
.header__logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: block; width: 72px; line-height: 0; }
.header__logo img { display: block; width: 100%; height: auto; }
@media (min-width: 900px) { .header__logo { width: 102px; } }

@media (min-width: 900px) { .header .header__menu { display: none; } }   /* .icon-btn 보다 뒤에 정의돼도 이기게 */

/* PC 메뉴 줄 : 14px · 글자 사이 50, 지금 보는 메뉴는 굵게 + 아래 2px 밑줄 (피그마 03 BRAND · 04 SHOP 헤더) */
.nav { display: none; }
@media (min-width: 900px) { .nav { display: block; } }
.nav__list { display: flex; justify-content: center; gap: 50px; height: 55px; }
.nav__link {
	position: relative;
	display: flex;
	align-items: center;
	height: 100%;
	padding-block-end: 6px;
	color: var(--ink);
	font-size: 14px; letter-spacing: 0.4px;
	white-space: nowrap;
}
.nav__link:hover { color: var(--fg-muted); }
.nav__link.is-current { font-weight: 700; color: var(--ink); }
.nav__link.is-current::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }

/* 헤더 검색창 */
.header-search {
	position: absolute;
	top: 100%; left: 50%;
	display: flex; flex-wrap: wrap; align-items: center;
	width: min(1200px, calc(100vw - 40px));
	padding: 10px 16px 16px 24px;
	background: #fff;
	border: 1px solid var(--border);
	transform: translateX(-50%);
}
.header-search[hidden] { display: none; }
.header-search__input { flex: 1; height: 40px; min-width: 0; border: 0; outline: 0; background: none; font-family: var(--font-body); font-size: var(--fs-base); }
.header-search .search-chips { flex-basis: 100%; }
.header-search__btn { display: inline-flex; padding: 6px; border: 0; background: none; cursor: pointer; }

/* 아이콘 버튼 */
.icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center; justify-content: center;
	width: 40px; height: 40px;
	padding: 0; border: 0; background: none;
	border-radius: 999px; cursor: pointer;
	transition: background-color .2s var(--ease);
}
.icon-btn:hover { background: var(--soft); }
.header__desktop { display: none; }
@media (min-width: 900px) { .header__desktop { display: inline-flex; } }

.cart-count {
	position: absolute; top: 2px; right: 2px;
	min-width: 16px; height: 16px;
	padding-inline: 4px;
	display: grid; place-items: center;
	background: var(--ink); color: #fff;
	border-radius: 999px;
	font-family: var(--font-body);
	font-size: 10px; line-height: 1;
}

/* ---- 모바일 메뉴 · 검색 (피그마 02 MENU · SEARCH (Mobile))
       화면 전체 흰 바탕 · 위 56 (로고 왼쪽 20 · 닫기 오른쪽 19) · 검색창 50 · 추천 검색어 29 (Warm Ivory)
       메뉴 17px 줄 높이 56 + 구분선 · 하위 메뉴 14px #545454 줄 42 왼쪽 36 · Sign in · Wishlist 버튼 170×40 · 아래 검은 띠 59 ---- */

.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer__panel {
	position: absolute; inset: 0;
	display: flex; flex-direction: column;
	background: #fff;
	font-family: var(--font-body);
	color: var(--ink);
	opacity: 0;
	transition: opacity .2s var(--ease);
}
.drawer.is-open .drawer__panel { opacity: 1; }

.drawer__head {
	display: flex; align-items: center; justify-content: space-between;
	flex: none;
	height: 56px;
	padding-inline: 20px 10px;   /* 닫기 아이콘 22 를 40 버튼에 넣어 오른쪽 19 (시안) */
	border-bottom: 1px solid var(--border);
}
.drawer__logo { display: block; width: 72px; line-height: 0; }
.drawer__logo img { width: 100%; height: auto; }

.drawer__scroll { flex: 1; overflow-y: auto; padding: 16px 20px 20px; }

.drawer__input {
	display: block; width: 100%; height: 50px;
	padding-inline: 14px;
	border: 1px solid var(--ink); border-radius: 0;
	background: #fff;
	font-family: inherit; font-size: 15px; color: var(--ink);
}
.drawer__input::placeholder { color: #8a8a8a; }

/* 추천 검색어 (모바일 메뉴 · PC 검색창 공통) */
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 10px; }
.search-chips a { display: inline-flex; align-items: center; height: 29px; padding-inline: 10px; background: var(--warm-ivory); font-size: 12px; color: var(--ink); }
.search-chips a:hover { background: var(--light-gray); }

.drawer__nav { margin-block-start: 16px; }
.drawer__item {
	display: flex; align-items: center; justify-content: space-between;
	height: 56px;
	border-bottom: 1px solid var(--border);
	font-size: 17px; color: var(--ink);
	list-style: none; cursor: pointer;
}
.drawer__item::-webkit-details-marker { display: none; }
.drawer__item::after { font-size: 18px; color: var(--dark-gray); }
.drawer__item--link::after { content: "\203A"; }                 /* › */
.drawer__group > .drawer__item::after { content: "+"; }
.drawer__group[open] > .drawer__item::after { content: "\2212"; }   /* − */
.drawer__sub a { display: flex; align-items: center; height: 42px; padding-inline-start: 16px; font-size: 14px; color: var(--dark-gray); }

.drawer__account { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-block-start: 20px; }
.drawer__btn { display: flex; align-items: center; justify-content: center; height: 40px; border: 1px solid var(--ink); font-size: 13px; font-weight: 500; color: var(--ink); }

.drawer__foot {
	display: flex; align-items: center; justify-content: space-between;
	flex: none;
	min-height: 59px;
	padding-inline: 20px 14px;
	background: var(--soft-black);
	color: #fff;
	font-size: 13px;
}
.drawer__ship { display: flex; align-items: center; gap: 4px; }
.drawer__ship select { max-width: 160px; padding: 4px 2px; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; }
.drawer__ship option { color: var(--ink); }
.drawer__foot a { padding: 10px 6px; }

@media (min-width: 900px) { .drawer { display: none; } }

/* ---- 플로팅 버튼 (피그마 01 HOME : 52 원형 · 오른쪽 28 · 맨 위로 흰 바탕 + 회색 테두리 / 장바구니 Soft Black, 간격 10) ---- */

.float-btns { display: none; }
@media (min-width: 900px) {
	.float-btns { position: fixed; right: 28px; bottom: 32px; z-index: 40; display: grid; gap: 10px; }
}
.float-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; padding: 0;
	border: 1px solid var(--border); border-radius: 50%;
	background: #fff; cursor: pointer;
	transition: transform .2s var(--ease);
}
.float-btn[hidden] { display: none; }
.float-btn:hover { transform: translateY(-2px); }
.float-btn--cart { border-color: var(--soft-black); background: var(--soft-black); }

/* ---- 미니카트 (피그마 07-1 CART DRAWER : 오른쪽 폭 460 · 안쪽 32 · 뒤 rgba(25,25,25,.45)) ---- */

.minicart { position: fixed; inset: 0; z-index: 110; font-family: var(--font-body); color: var(--ink); }
.minicart__dim { position: absolute; inset: 0; background: rgb(25 25 25 / 0.45); opacity: 0; transition: opacity .25s var(--ease); }
.minicart__panel {
	position: absolute; top: 0; right: 0; bottom: 0;
	display: flex; flex-direction: column;
	width: min(460px, 100%);
	background: #fff;
	transform: translateX(100%);
	transition: transform .3s var(--ease);
}
.minicart.is-open .minicart__dim { opacity: 1; }
.minicart.is-open .minicart__panel { transform: none; }

.minicart__head { display: flex; align-items: center; justify-content: space-between; flex: none; padding: 30px 23px 18px 32px; }
.minicart__title { margin: 0; font-size: 20px; font-weight: 700; line-height: 28px; letter-spacing: 0; }

.minicart__body { flex: 1; overflow-y: auto; padding: 0 32px; }
.minicart__free { padding: 12px 14px; background: var(--warm-ivory); }
.minicart__free-text { margin: 0 0 9px; font-size: 13px; line-height: normal; }
.minicart__bar { height: 4px; background: var(--light-gray); }
.minicart__bar span { display: block; height: 100%; width: 0; background: var(--soft-black); transition: width .3s var(--ease); }

.minicart__empty { margin: 32px 0; font-size: 14px; color: var(--dark-gray); text-align: center; }
.minicart__list { margin-block-start: 16px; }
.minicart__item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding-block: 18px; border-bottom: 1px solid var(--border); }
.minicart__media { display: block; width: 84px; height: 84px; background: var(--soft-white); }
.minicart__media img { width: 100%; height: 100%; object-fit: cover; }
.minicart__info { display: grid; align-content: start; min-width: 0; }
.minicart__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0; }
.minicart__row--end { align-items: center; margin-block-start: 9px; }
.minicart__name, .minicart__price { font-size: 14px; font-weight: 500; line-height: normal; }
.minicart__price { flex: none; }
.minicart__opt { margin: 6px 0 0; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); }
.minicart__warn { margin: 2px 0 0; font-size: 12px; color: var(--danger); }
.minicart__qty { display: inline-flex; align-items: center; height: 34px; border: 1px solid var(--border); }
.minicart__qty button { width: 30px; height: 100%; padding: 0; border: 0; background: none; font-size: 14px; cursor: pointer; }
.minicart__qty button:disabled { color: var(--mid-gray); cursor: default; }
.minicart__qty span { min-width: 30px; text-align: center; font-size: 14px; }
.minicart__remove { padding: 0; border: 0; background: none; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); cursor: pointer; }
.minicart__remove:hover { color: var(--ink); text-decoration: underline; }

.minicart__upsell { margin-block: 17px 24px; }
.minicart__upsell-title { margin: 0 0 12px; font-size: 13px; font-weight: 500; }
.minicart__upsell-box { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; background: var(--soft-white); }
.minicart__upsell-media { display: block; width: 56px; height: 56px; background: #fff; }
.minicart__upsell-media img { width: 100%; height: 100%; object-fit: cover; }
.minicart__upsell-name { margin: 0; font-size: 13px; font-weight: 500; }
.minicart__upsell-price { margin: 0; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); }
.minicart__upsell-add { height: 34px; padding-inline: 13px; border: 1px solid var(--ink); background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.minicart__upsell-add:hover { background: var(--ink); color: #fff; }

.minicart__foot { flex: none; margin-inline: 32px; padding-block: 16px 20px; border-top: 1px solid var(--border); }
.minicart__sum { display: flex; justify-content: space-between; margin: 0; font-size: 16px; font-weight: 700; }
.minicart__note { margin: 14px 0 12px; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); }
.minicart__checkout { display: flex; align-items: center; justify-content: center; height: 52px; background: var(--soft-black); color: #fff; font-size: 14px; font-weight: 500; letter-spacing: 1.4px; }
.minicart__checkout:hover { background: var(--brand-hover); }
.minicart__checkout.is-disabled { opacity: .5; }
.minicart__view { display: block; margin-block-start: 10px; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); text-align: center; }
.minicart__view:hover { color: var(--ink); text-decoration: underline; }

/* ---- 푸터 (피그마 01 HOME · footer)
       PC 1440 : Soft Black 바탕 · 높이 430 · 위 72 · 다섯 칸 왼쪽 120 · 430 · 660 · 891 · 1122 · 구분선 #3a3a3a (y 299) · 회사 정보 12px #8a8a8a
       모바일 390 : 높이 372 · 왼쪽 20 · 위 48 · 로고 72 · 연락처 세 줄 · 두 줄 링크 (180 간격) · 회사 정보 11px ---- */

.footer {
	background: var(--soft-black);
	color: var(--mid-gray);
	font-family: var(--font-body);
	margin-block-start: var(--sp-section);
}
.footer a { color: inherit; }
.footer a:hover { color: #fff; }
.footer__inner { padding: 48px 20px 33px; }
@media (min-width: 900px) {
	.footer__inner { max-width: var(--page-width); margin-inline: auto; padding: 72px var(--page-margin) 39px; }
}

.footer__top { display: grid; }
@media (min-width: 900px) {
	.footer__top { grid-template-columns: 310px 230px 231px 231px minmax(0, 1fr); padding-block-end: 48px; }
}

.footer__logo { display: block; width: 72px; line-height: 0; }
.footer__logo img { display: block; width: 100%; height: auto; }
.footer__tagline { display: none; max-width: 266px; margin: 18px 0 0; font-size: 14px; line-height: 23.8px; }
.footer__insta { display: none; margin: 18px 0 0; font-size: 14px; line-height: normal; }
.footer__insta a { color: #fff; }
.footer__care-m { margin: 20px 0 0; font-size: 14px; line-height: 23.8px; }
@media (min-width: 900px) {
	.footer__logo { width: 90px; }
	.footer__tagline, .footer__insta { display: block; }
	.footer__care-m { display: none; }
}

.footer__col { display: none; }
@media (min-width: 900px) { .footer__col { display: block; } }
.footer__heading { margin: 0 0 11px; font-family: var(--font-body); font-size: 13px; font-weight: 700; line-height: normal; letter-spacing: 1.4px; text-transform: uppercase; color: #fff; }
.footer__links { display: grid; gap: 12px; font-size: 14px; line-height: 20px; }

/* 모바일 : 두 줄 링크 (왼쪽 20 · 오른쪽 200, 줄 간격 30) */
.footer__links-m { display: grid; grid-template-columns: 180px minmax(0, 1fr); row-gap: 10px; margin-block-start: 20px; font-size: 14px; line-height: 20px; }
.footer__links-m a { color: #fff; }
@media (min-width: 900px) { .footer__links-m { display: none; } }

.footer__bottom { margin-block-start: 20px; font-size: 11px; line-height: 18.7px; color: #8a8a8a; }
.footer__bottom p { margin: 0; }
.footer__biz--pc { display: none; }
@media (min-width: 900px) {
	.footer__bottom { margin: 0; padding-block-start: 24px; border-top: 1px solid #3a3a3a; font-size: 12px; line-height: 20.4px; }
	.footer__biz--pc { display: block; }
	.footer__biz--m { display: none; }
	.footer__copy { margin-block-start: 6px !important; line-height: normal; }
}

/* 피그마 Contact · Cart : 마지막 내용과 푸터 사이 약 195 (기본 120 + 75) */
@media (min-width: 1280px) { .contact-page, .cart-page { padding-block-end: 75px; } }

/* ---- 2단 레이아웃 (장바구니 · 주문 · 마이페이지) ---- */

.split {
	display: grid;
	gap: var(--sp-lg);
	align-items: start;
}
@media (min-width: 990px) { .split { grid-template-columns: minmax(0, 1fr) 460px; gap: 48px; } }

/* 요약 상자 (주문 완료) : 피그마 결제 화면 요약처럼 회색 바탕 · 모서리 없음 (WBS 3.2.9) */
.summary {
	border: 0;
	border-radius: 0;
	padding: 32px;
	display: grid;
	gap: 18px;
	position: sticky;
	top: 92px;
	background: var(--soft);
	font-family: var(--font-body);
}
.summary__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-sm); font-size: 14px; color: var(--ink); }
.summary__row > :last-child { text-align: right; }
.summary__row--total { padding-block-start: 18px; border-top: 1px solid #dddddd; font-size: 16px; font-weight: 700; }
.summary__row--total > :last-child { font-weight: 700; font-size: 20px; color: var(--ink); }
.summary__note { margin: 0; font-size: 12px; color: #545454; line-height: 1.6; }
/* 무료 배송까지 남은 금액 안내 — 기획안처럼 주황 굵게 */
.summary__note--ship { font-size: 14px; color: var(--ink); font-weight: 600; }
.summary__note--ship:empty { display: none; }
@media (max-width: 899px) {
	.summary { position: static; padding: 24px 20px; gap: 14px; }
}
/* 프로모션 코드 (checkout) */
.promo { display: grid; gap: 10px; padding-block: 18px; border-block: 1px solid #c4c4c4; }
.promo__row { display: flex; align-items: center; gap: 8px; }
.promo__row .input { flex: 1; min-width: 0; text-transform: uppercase; }
.promo__msg { margin: 0; font-size: var(--fs-xs); color: var(--brand); font-weight: 600; }
.promo__msg.is-bad { color: #8b0000; }

/* ---- 좁은 폼 페이지 (로그인 · 회원가입) ---- */

.narrow {
	width: 100%;
	max-width: calc(620px + var(--page-margin) * 2);
	margin-inline: auto;
	padding-block: 0 var(--sp-xl);
}
