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

/* ---- 헤더 ---- */

.header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--bg);
	font-family: var(--font-efilow-point);
}

.header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-md);
	min-height: 60px;
}
@media (min-width: 900px) { .header__inner { position: relative; min-height: 84px; } }

/* 로고 파일은 정사각형 안에 글자가 있어서 시안 크기로 잘라 쓴다 */
/* 모바일 : 기획안(850 폭)의 로고 233 을 화면 폭에 맞춰 줄인 크기 (390 에서 107) */
.header__logo { display: block; width: clamp(92px, calc(233 * 100vw / 850), 120px); aspect-ratio: 92 / 30; overflow: hidden; }
.header__logo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .header__logo { width: 120px; height: 39px; } }

.header__right { display: flex; align-items: center; gap: 8px; }
.header__contact { display: none; }
@media (min-width: 900px) {
	.header__contact {
		display: inline-flex;
		align-items: center; justify-content: center;
		width: 116px; height: 40px;
		margin-inline-start: 12px;
		background: var(--efilow-orange);
		color: #0a0a0a;
		border-radius: 26px;
		font-size: 16px; line-height: 1;
		transition: opacity .2s var(--ease);
	}
	.header__contact:hover { opacity: .85; }
}

/* 데스크톱 메뉴 */
.nav { display: none; }
@media (min-width: 900px) { .nav { display: block; } }

.nav__list { display: flex; align-items: center; gap: 56px; }
.nav__item--mega { position: static; }
.nav__link {
	display: inline-flex;
	align-items: center;
	padding-block: 28px;   /* 헤더 높이만큼 채워 펼침 메뉴까지 마우스가 끊기지 않게 한다 */
	color: #0a0a0a;
	font-size: 16px;
}
.nav__link:hover,
.nav__item--mega:hover > .nav__link { color: var(--efilow-orange); }

/* 기획안 헤더 (Header 1303 × 80, 배너는 y 118 부터) : 1920 화면에서 시안 크기 그대로.
   로고 245 × 80 · 메뉴 18px 가운데 (Shop 856 / Our Story 984) · 아이콘 47 간격 · Contact 150 × 50 (카트에서 32 떨어짐).
   1280~1919 는 화면 폭에 맞춰 같은 비율로 줄인다 (시안 크기가 노트북 화면에서는 너무 커 보여서).
   1280 보다 좁으면 메뉴가 로고 · 아이콘과 부딪혀서 위의 작은 크기를 쓴다. */
@media (min-width: 1280px) {
	.header__inner { min-height: clamp(84px, calc(118 * 100vw / 1920), 118px); padding-top: calc(6 * 100vw / 1920); }
	.header__logo { width: clamp(150px, calc(245 * 100vw / 1920), 245px); height: auto; aspect-ratio: 245 / 80; }
	.nav { position: absolute; left: 50%; top: 0; bottom: 0; transform: translateX(-50%); padding-top: calc(6 * 100vw / 1920); display: flex; align-items: center; }
	.nav__list { gap: clamp(56px, calc(87 * 100vw / 1920), 87px); }
	.nav__link { padding-block: clamp(30px, calc(43 * 100vw / 1920), 43px); font-size: clamp(16px, calc(18 * 100vw / 1920), 18px); }
	.header__right { gap: 7px; }
	.header__contact { width: clamp(110px, calc(150 * 100vw / 1920), 150px); height: clamp(40px, calc(50 * 100vw / 1920), 50px); margin-inline-start: clamp(12px, calc(25 * 100vw / 1920), 25px); font-size: clamp(16px, calc(18 * 100vw / 1920), 18px); }
}

/* Shop 펼침 메뉴 */
.nav__mega {
	position: absolute;
	top: 100%; left: 50%;
	display: grid;
	grid-template-columns: 170px repeat(3, minmax(0, 235px));
	gap: 33px;
	align-items: center;
	justify-content: center;
	width: min(1100px, calc(100vw - 40px));
	padding: 32px 48px 32px 48px;
	background: #fff;
	border: 2px solid var(--efilow-orange);
	border-radius: 20px;
	opacity: 0; visibility: hidden;
	transform: translateX(-50%) translateY(6px);
	transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.nav__item--mega:hover .nav__mega,
.nav__item--mega:focus-within .nav__mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav__mega-list { align-self: start; padding-block-start: 10px; }
.nav__mega-title { margin-block-end: 15px; color: #0a0a0a; font-size: 18px; }
.nav__mega-list ul { padding-inline-start: 18px; list-style: disc; font-family: var(--font-efilow-body); font-size: 15px; line-height: 30px; color: #000; }
.nav__mega-list li { list-style: disc; }
.nav__mega-list a:hover { color: var(--efilow-orange); }

/* 메뉴 사진 카드 (펼침 메뉴 · 모바일 메뉴 공용) */
.menu-card {
	position: relative;
	display: block;
	aspect-ratio: 1;
	padding: 5.1%;
	background: var(--efilow-cream);
	border-radius: 33px;
	color: #000;
}
.menu-card__tag {
	position: absolute; top: 17%; left: -18px;
	z-index: 1;
	display: grid; place-items: center;
	width: 30px; height: 100px;
	background: var(--efilow-orange);
	font-family: var(--font-efilow-point);
	font-size: 15px; line-height: 1;
}
.menu-card__tag span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.menu-card__media { position: relative; display: block; height: 100%; overflow: hidden; border-radius: 29px; background: #c4c4c4; }
.menu-card__media img { width: 100%; height: 100%; object-fit: cover; }
.menu-card--crop .menu-card__media img { position: absolute; top: -27.69%; left: 0; height: 133.35%; object-fit: fill; }
.menu-card__go { position: absolute; right: 12%; bottom: 12%; width: 20px; height: 20px; }
.menu-card__go img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* 헤더 검색창 */
.header-search {
	position: absolute;
	top: 100%; left: 50%;
	display: flex; align-items: center;
	width: min(1056px, calc(100vw - 40px));
	height: 60px;
	padding-inline: 24px 16px;
	background: #fff;
	border: 2px solid var(--efilow-orange);
	border-radius: 20px;
	transform: translateX(-50%);
}
.header-search[hidden] { display: none; }
.header-search__input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-family: var(--font-efilow-body); font-size: var(--fs-base); }
.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(--efilow-cream); }
.header__desktop { display: none; }
@media (min-width: 900px) { .header__desktop { display: inline-flex; } }

.cart-count {
	position: absolute; top: 2px; right: 2px;
	min-width: 18px; height: 18px;
	padding-inline: 5px;
	display: grid; place-items: center;
	background: var(--efilow-orange); color: #0a0a0a;
	border-radius: 999px;
	font-family: var(--font-efilow-body);
	font-size: 11px; line-height: 1;
}

/* 모바일 메뉴 탭 */
.header__explore,
.drawer__tab {
	position: absolute;
	display: grid; place-items: center;
	width: 30px; height: 100px;
	padding: 0; border: 0;
	background: var(--efilow-orange);
	color: #000;
	font-family: var(--font-efilow-point);
	font-size: 15px; line-height: 1;
	cursor: pointer;
}
.header__explore span,
.drawer__tab span { writing-mode: vertical-rl; }
.header__explore { top: 100%; left: 0; }
@media (min-width: 900px) { .header__explore { display: none; } }

/* 모바일 드로어 */
.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer__backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / .35); opacity: 0; transition: opacity .3s var(--ease); }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel {
	position: absolute; inset-block: 0; inset-inline-start: 0;
	width: min(calc(100vw - 60px), 300px);
	background: #fff;
	border: 2px solid var(--efilow-orange);
	border-radius: 0 20px 20px 0;
	transform: translateX(-110%);
	transition: transform .3s var(--ease);
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__scroll { height: 100%; padding: 40px 32px; overflow-y: auto; border-radius: 0 20px 20px 0; }
.drawer__tab { top: 60px; left: 100%; }
.drawer__list > li > a { display: block; padding-block: 10px; font-family: var(--font-efilow-point); font-size: 22px; color: #0a0a0a; }
.drawer__list ul { padding-inline-start: 18px; padding-block-end: 6px; font-family: var(--font-efilow-body); }
.drawer__list ul li { list-style: disc; }
.drawer__list ul a { display: block; padding-block: 9px; margin-block: -5px; font-size: 15px; color: #000; }   /* 누르는 높이 34 (간격은 그대로) */
.drawer__links { margin-block: 16px 28px; font-family: var(--font-efilow-body); font-size: 13px; line-height: 26px; color: var(--efilow-ink); }
.drawer__links a { display: inline-block; padding-block: 4px; margin-block: -4px; text-decoration: underline; }   /* 누르는 높이 34 */
.drawer__scroll > .menu-card { margin-inline-start: 18px; }

/* ---- 푸터 ---- */

.footer {
	background: var(--efilow-cream);
	color: var(--efilow-ink);
	font-family: var(--font-efilow-body);
	margin-block-start: var(--sp-section);
}
.footer__top {
	display: grid;
	gap: var(--sp-lg);
	padding-block: 40px;
}
.footer__col { display: none; }
@media (min-width: 900px) {
	.footer__top {
		grid-template-columns: 1fr auto auto minmax(0, 352px);
		gap: 70px;
		align-items: start;
		padding-block: 45px;
	}
	.footer__col { display: block; }
	.footer__col, .footer__news { margin-block-start: 156px; }
}
/* 피그마 푸터 : 내용 폭 1255 (헤더 1303 보다 좁다), 링크 아래 70 띄우고 주황 줄 (푸터 높이 520) */
@media (min-width: 1280px) {
	.footer__top { max-width: calc(1255px + var(--page-margin) * 2); padding-block-end: 70px; }
	/* 피그마 Contact · Cart : 마지막 내용과 푸터 사이 약 195 (기본 120 + 75) */
	.contact-page, .cart-page { padding-block-end: 75px; }
}

.footer__logo { display: block; width: 180px; height: 78px; overflow: hidden; }
.footer__logo img { width: 100%; height: 100%; object-fit: cover; }
.footer__tagline { margin-block-start: 8px; font-size: 15px; line-height: 22px; }
@media (min-width: 900px) {
	.footer__logo { width: 239px; height: 103px; }
	.footer__tagline { font-size: 18px; line-height: 25px; }
}

.footer__heading { font-family: var(--font-efilow-body); font-size: 18px; font-weight: 600; line-height: 35px; margin-block-end: 5px; }
.footer__links a { font-size: 15px; line-height: 35px; text-decoration: underline; }
.footer__links a:hover { color: var(--efilow-orange); }

.footer__news-title { margin-block-end: 22px; font-family: var(--font-efilow-point); font-size: 20px; font-weight: 800; line-height: 1.2; }
.footer__field { position: relative; }
.footer__field input {
	width: 100%; height: 51px;
	padding-inline: 24px 60px;
	border: 0; border-radius: 6px;
	background: var(--efilow-ink); color: var(--efilow-cream);
	font-family: inherit; font-size: 14px;
}
.footer__field input::placeholder { color: var(--efilow-cream); opacity: 1; }
.footer__field button { position: absolute; top: 8px; right: 13px; display: flex; padding: 0; border: 0; background: none; cursor: pointer; }
@media (min-width: 900px) { .footer__news-title { font-size: 24px; } }

.footer__bottom {
	display: flex; flex-wrap: wrap;
	align-items: center; justify-content: space-between;
	gap: 4px var(--sp-md);
	min-height: 67px;
	padding: 12px var(--page-margin);
	background: var(--efilow-orange);
	font-size: 15px;
}
.footer__bottom p { margin: 0; }
.footer__legal { display: flex; gap: var(--sp-md); }
.footer__legal a:hover { text-decoration: underline; }
@media (min-width: 900px) { .footer__bottom { padding-inline: 38px; font-size: 18px; } }

/* 사업자 정보 줄 (값은 js/common.js 의 TMM.BUSINESS) */
.footer__biz {
	display: flex; flex-wrap: wrap;
	gap: 2px var(--sp-md);
	padding: 12px var(--page-margin);
	border-top: 1px solid var(--border);
	font-size: 12px; line-height: 1.7;
	color: var(--fg-muted);
}
.footer__biz[hidden] { display: none; }
.footer__biz-label { font-weight: 600; color: var(--fg); }
.footer__biz a { text-decoration: underline; }
@media (min-width: 900px) { .footer__biz { padding-inline: 38px; font-size: 13px; } }

/* ---- 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; } }

/* 요약 상자 (주문서 · 주문 완료) : 기획안 장바구니 합계 상자 — 주황 테두리 · 모서리 33 · 글자 20 · 합계 주황 30 */
.summary {
	border: 1px solid var(--brand);
	border-radius: 33px;
	padding: 40px 44px;
	display: grid;
	gap: 18px;
	position: sticky;
	top: 92px;
	background: #fff;
	font-family: var(--font-body);
}
.summary__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-sm); font-size: 18px; color: var(--efilow-ink); }
.summary__row > :last-child { text-align: right; }
.summary__row--total { padding-block-start: 22px; border-top: 1px solid #c4c4c4; font-size: 20px; }
.summary__row--total > :last-child { font-weight: 700; font-size: 30px; color: var(--brand); }
.summary__note { margin: 0; font-size: 15px; color: var(--fg-subtle); line-height: 1.6; }
/* 무료 배송까지 남은 금액 안내 — 기획안처럼 주황 굵게 */
.summary__note--ship { font-size: 18px; color: var(--brand); font-weight: 600; }
.summary__note--ship:empty { display: none; }
@media (max-width: 899px) {
	.summary { position: static; padding: 26px 22px; border-radius: 22px; gap: 14px; }
	.summary__row { font-size: 15px; }
	.summary__row--total { font-size: 16px; }
	.summary__row--total > :last-child { font-size: 22px; }
	.summary__note--ship { font-size: 15px; }
}
/* 프로모션 코드 (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);
}
