/* =================================================================
 * main.css — 메인 페이지 (피그마 01 HOME (PC) 1440 · 01 HOME (Mobile) 390, WBS 3.2.1)
 * PC : 콘텐츠 1200 (좌우 120) · 영역 제목 36 Bold · 보조 제목 12 Medium 자간 2.4
 * 모바일 : 좌우 20 · 영역 제목 26 Bold
 * 900px 부터 PC 배치. (home.css 는 다른 화면도 쓰는 예전 공용 스타일이라 따로 둔다)
 * ================================================================= */

.home { color: var(--ink); }

.hm-wrap { width: min(var(--content-width), 100% - var(--page-margin) * 2); margin-inline: auto; }   /* 좌우 : 모바일 20 · 태블릿 32 · PC 콘텐츠 1200 */

/* PC 에서만 · 모바일에서만 (요소 고유의 display 는 건드리지 않는다) */
@media (max-width: 899px) { .hm-pc { display: none !important; } }
@media (min-width: 900px) { .hm-m { display: none !important; } }

.hm-eyebrow { margin: 0; font-size: 11px; font-weight: 500; line-height: normal; letter-spacing: 2.4px; color: var(--dark-gray); }
.hm-title { margin: 0; font-size: 26px; font-weight: 700; line-height: 32.5px; letter-spacing: -0.6px; color: var(--ink); }
.hm-eyebrow + .hm-title { margin-block-start: 15px; }
@media (max-width: 899px) { .hm-eyebrow.hm-pc + .hm-title { margin-block-start: 0; } }   /* 모바일 시안은 보조 제목 없이 바로 제목 (WBS 6.1.3) */
@media (min-width: 900px) {
	.hm-eyebrow { font-size: 12px; }
	.hm-title { font-size: 36px; line-height: 45px; }
}

.hm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.hm-head__note { margin: 0 0 6px; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); }

.hm-badge {
	position: absolute; top: 12px; left: 12px;
	display: inline-flex; align-items: center;
	height: 24px; padding-inline: 8px;
	background: var(--soft-black); color: #fff;
	font-size: 11px; font-weight: 700; letter-spacing: 1px;
}

/* 버튼 : 큰 버튼 52 (Hero) · 작은 테두리 버튼 40 (VIEW PRODUCT · DISCOVER OUR STORY) */
.hm-btn {
	display: inline-flex; align-items: center; justify-content: center;
	height: 52px; padding-inline: 30px;
	border: 1px solid var(--soft-black);
	font-size: 14px; font-weight: 500; letter-spacing: 1.4px; white-space: nowrap;
	transition: background-color .2s var(--ease), color .2s var(--ease);
}
.hm-btn--fill { background: var(--soft-black); color: #fff; }
.hm-btn--fill:hover { background: var(--brand-hover); }
.hm-btn--line { background: transparent; color: var(--ink); }
.hm-btn--line:hover { background: var(--soft-black); color: #fff; }

.hm-btn-sm {
	display: inline-flex; align-items: center; justify-content: center;
	height: 40px; padding-inline: 13px;
	border: 1px solid var(--soft-black); background: #fff; color: var(--ink);
	font-size: 13px; font-weight: 500; white-space: nowrap;
}
.hm-btn-sm:hover { background: var(--soft-black); color: #fff; }
.hm-btn-sm--white:hover { background: var(--light-gray); color: var(--ink); }

/* ---- ① Hero (PC 높이 720 · 글 왼쪽 800 / 모바일 사진 440 + 글 아래, Warm Ivory 바탕) ---- */

.hm-hero { position: relative; background: var(--warm-ivory); }
.hm-hero__slides { position: relative; height: 440px; overflow: hidden; }
.hm-hero__img {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover; object-position: 30% center;
	opacity: 0; transition: opacity .8s var(--ease);
}
.hm-hero__img.is-on { opacity: 1; }
.hm-hero__img > img { width: 100%; height: 100%; object-fit: cover; object-position: inherit; }
.hm-hero__inner { padding-block: 32px 40px; }
.hm-hero__title { margin: 20px 0 0; font-size: 32px; font-weight: 700; line-height: 37.8px; letter-spacing: -1.2px; }
.hm-hero__text { margin: 16px 0 0; font-size: 15px; line-height: 26.2px; color: var(--dark-gray); }
.hm-hero__btns { display: grid; gap: 16px; margin-block-start: 15px; }
/* 모바일 시안엔 막대가 없다 : 글 아래 대신 사진 아래쪽 안에 얹는다 (사진 높이 440 - 24) */
.hm-hero__dots { position: absolute; top: 416px; left: var(--page-margin); z-index: 1; display: flex; gap: 8px; margin: 0; }
.hm-hero__dots button { width: 28px; height: 3px; padding: 0; border: 0; background: var(--mid-gray); cursor: pointer; }
.hm-hero__dots button.is-on { background: var(--soft-black); }

@media (min-width: 900px) {
	.hm-hero__img--veil::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgb(244 241 234 / 0.92) 0%, rgb(244 241 234 / 0.82) 42%, rgb(244 241 234 / 0) 62%); }
	.hm-hero { height: 720px; }
	.hm-hero__slides { position: absolute; inset: 0; height: auto; }
	.hm-hero__img { object-position: center 25%; }
	.hm-hero__inner { position: relative; height: 100%; padding: 0; }
	/* 글 시작 800 = 콘텐츠 왼쪽 120 + 680 */
	.hm-hero__copy { position: absolute; top: 181px; left: calc(50% + 80px); width: min(566px, 50% + 40px); }
	.hm-hero__title { margin-top: 29px; font-size: 44px; line-height: 51.9px; }
	.hm-hero__text { max-width: 476px; margin-top: 26px; font-size: 17px; line-height: 29.8px; }
	.hm-hero__btns { display: flex; gap: 12px; margin-top: 26px; }
	.hm-hero__dots { position: static; margin-top: 44px; }
}

/* ---- ② UGC (Warm Ivory · PC 카드 5장 227 · 간격 16 / 모바일 260 가로 넘기기) ---- */

.hm-ugc { padding-block: 48px; background: var(--warm-ivory); border-top: 1px solid var(--border); }
.hm-ugc__list {
	display: grid; grid-auto-flow: column; grid-auto-columns: 260px; gap: 12px;
	margin: 24px -20px 0; padding-inline: 20px;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hm-ugc__list::-webkit-scrollbar { display: none; }
.hm-ugc__card { display: flex; flex-direction: column; background: #fff; scroll-snap-align: start; }
.hm-ugc__media { position: relative; display: block; height: 340px; overflow: hidden; background: var(--soft-white); }
.hm-ugc__media img { width: 100%; height: 100%; object-fit: cover; }
.hm-ugc__play {
	position: absolute; top: 12px; right: 12px;
	display: grid; place-items: center;
	width: 36px; height: 36px; border-radius: 50%;
	background: var(--soft-black);
}
.hm-ugc__foot { display: grid; gap: 16px; padding: 15px 14px 14px; }
.hm-ugc__row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start; }
.hm-ugc__thumb { display: block; width: 56px; height: 56px; background: var(--soft-white); }
.hm-ugc__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hm-ugc__name { margin: 0; font-size: 13px; font-weight: 500; line-height: 18.2px; }
.hm-ugc__price { margin: 3px 0 0; font-size: 13px; line-height: 16px; }
.hm-ugc__price b { font-weight: 700; }
.hm-ugc__price s { color: #8a8a8a; text-decoration: none; }
.hm-ugc__add {
	height: 44px; padding: 0; border: 0;
	background: var(--soft-black); color: #fff;
	font-size: 14px; font-weight: 500; letter-spacing: 1.4px; cursor: pointer;
}
.hm-ugc__add:hover { background: var(--brand-hover); }
.hm-ugc__add:disabled { opacity: .5; cursor: default; }

@media (min-width: 900px) {
	.hm-ugc { padding-block: 96px; border-top: 0; }
	.hm-ugc__list { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 41px 0 0; padding: 0; overflow: visible; }
	.hm-ugc__media { height: 400px; }
}

/* ---- ③ Best Sellers (PC 카드 187 · 6장 · ‹ › 로 넘기기 / 모바일 2열) ---- */

.hm-best__ctrl { display: flex; align-items: center; gap: 16px; }
.hm-link { font-size: 13px; line-height: normal; color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.hm-arrow {
	width: 40px; height: 40px; padding: 0;
	border: 1px solid var(--light-gray); background: #fff;
	font-size: 16px; color: var(--ink); cursor: pointer;
}
.hm-arrow:hover, .hm-arrow:last-child { border-color: var(--soft-black); }
.hm-best { padding-block: 56px 55px; }
.hm-best__track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; margin-block-start: 23px; }
.hm-best__track > :nth-child(n+5) { display: none; }   /* 모바일 시안은 4개 */

.hm-card { display: flex; flex-direction: column; min-width: 0; }
.hm-card__media { position: relative; display: block; aspect-ratio: 169 / 160; overflow: hidden; background: var(--soft-white); }
.hm-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.hm-card__media:hover img { transform: scale(1.03); }
.hm-card__name { margin-block-start: 8px; font-size: 13px; font-weight: 500; line-height: 20.5px; }
.hm-card__price { margin: 8px 0 0; font-size: 13px; line-height: 20.8px; }
.hm-card__add {
	margin-block-start: auto; height: 40px; padding: 0;
	border: 1px solid var(--soft-black); background: #fff;
	font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.hm-card__price { margin-block-end: 12px; }
.hm-card__add:hover { background: var(--soft-black); color: #fff; }
.hm-card__add:disabled { opacity: .5; cursor: default; }

@media (min-width: 900px) {
	.hm-best { padding-block: 110px; }
	.hm-best__ctrl { gap: 10px; }
	.hm-link { margin-inline-end: 6px; font-size: 14px; }
	.hm-best__track {
		grid-template-columns: none; grid-auto-flow: column;
		grid-auto-columns: calc((100% - 5 * 15.6px) / 6); gap: 15.6px;
		margin-block-start: 41px;
		overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	}
	.hm-best__track::-webkit-scrollbar { display: none; }
	.hm-best__track > :nth-child(n+5) { display: flex; }
	.hm-card { scroll-snap-align: start; }
	.hm-card__media { aspect-ratio: 187 / 190; }
	.hm-card__name { font-size: 14px; line-height: 20.3px; }
	.hm-card__price { margin-top: 6px; }
}

/* ---- ④ Shop by Skin Concern (PC 288 × 400 · 4열 / 모바일 169 × 210 · 2열, 아래 흰 띠에 제목) ---- */

.hm-concern { padding-block: 0 56px; }
.hm-concern__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block-start: 24px; }
.hm-concern__media { position: relative; display: block; aspect-ratio: 169 / 210; overflow: hidden; background: var(--soft-white); }
.hm-concern__media img { width: 100%; height: 100%; object-fit: cover; }
.hm-concern__label {
	position: absolute; left: 0; right: 0; bottom: 0;
	display: grid; gap: 2px;
	padding: 12px; background: rgb(255 255 255 / 0.94);
}
.hm-concern__label b { font-size: 14px; font-weight: 700; }
.hm-concern__label span { font-size: 12px; color: var(--dark-gray); }
.hm-concern__title { margin: 14px 0 0; font-size: 17px; font-weight: 700; line-height: 23.8px; letter-spacing: 0; }
.hm-concern__text { margin: 6px 0 0; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); }
.hm-concern__product { margin: 6px 0 0; font-size: 13px; font-weight: 500; }
.hm-concern__body .hm-btn-sm { margin-block-start: 18px; width: 130px; }

@media (min-width: 900px) {
	.hm-concern { padding-block: 0 110px; }
	.hm-concern__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-block-start: 40px; }
	.hm-concern__media { aspect-ratio: 288 / 400; }
}

/* ---- ⑤ Brand Story (Soft Black · PC 사진 왼쪽 절반 720 × 620 · 글 808 / 모바일 사진 300 + 글) ---- */

.hm-brand { background: var(--soft-black); color: #fff; }
.hm-brand__media { height: 300px; overflow: hidden; }
.hm-brand__media img { width: 100%; height: 100%; object-fit: cover; }
.hm-brand__body { padding: 36px 20px 44px; }
.hm-brand .hm-eyebrow { color: var(--mid-gray); }
.hm-brand__title { margin: 16px 0 0; font-size: 28px; font-weight: 700; line-height: 35px; letter-spacing: -0.6px; color: #fff; }
.hm-brand__text { margin: 16px 0 0; font-size: 15px; line-height: 26.2px; color: var(--light-gray); }
.hm-brand__badges { display: grid; grid-template-columns: 250px 250px; gap: 15px 18px; margin: 23px 0 0; padding-block-start: 23px; border-top: 1px solid var(--dark-gray); font-size: 13px; letter-spacing: 1.2px; }
.hm-brand .hm-btn-sm { margin-block-start: 16px; width: 171px; border-color: #fff; }

@media (min-width: 900px) {
	.hm-brand { display: grid; grid-template-columns: 1fr 1fr; height: 620px; }
	.hm-brand__media { height: 100%; }
	.hm-brand__body { align-self: center; max-width: 626px; padding: 0 20px 0 88px; }
	.hm-brand__title { margin-top: 26px; font-size: 42px; line-height: 52.5px; }
	.hm-brand__text { max-width: 518px; margin-top: 23px; font-size: 16px; line-height: 28px; }
	.hm-brand__badges { max-width: 512px; }
	.hm-brand .hm-btn-sm { margin-top: 27px; }
}

/* ---- ⑥ 브랜드 신뢰 4개 (PC 4열 · 위 검은 선 / 모바일 한 줄씩) ---- */

.hm-trust { padding-block: 48px 69px; }
.hm-trust__list { display: grid; gap: 0; list-style: none; padding: 0; }
.hm-trust__list li:last-child { padding-block-end: 0; }
.hm-trust__list li { padding-block: 16px 28px; border-top: 1px solid var(--soft-black); }
.hm-trust__list h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 22.4px; letter-spacing: 0; }
.hm-trust__list p { margin: 7px -8px 0 0; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); }
.hm-trust__no { font-size: 13px; color: var(--dark-gray); }

@media (min-width: 900px) {
	.hm-trust { padding-block: 110px; }
	.hm-trust__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
	.hm-trust__list li { padding: 24px 6px 0 0; }
	.hm-trust__list h3 { margin-top: 17px; font-size: 17px; line-height: 23.8px; }
	.hm-trust__list p { margin-top: 14px; margin-right: 0; font-size: 14px; line-height: 22.4px; }
}

/* ---- 태블릿 768 ~ 899 (피그마 사이즈 스펙 : 콘텐츠 704 · 좌우 32 · 상품 그리드 3열 · Hero 1단) WBS 3.2.11 ---- */
@media (min-width: 768px) and (max-width: 899px) {
	.hm-hero__slides { height: 520px; }
	.hm-hero__dots { top: 496px; }
	.hm-hero__inner { padding-block: 40px 48px; }
	.hm-hero__btns { grid-template-columns: 1fr 1fr; }
	.hm-ugc__list { margin-inline: calc(var(--page-margin) * -1); padding-inline: var(--page-margin); }
	.hm-best__track { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hm-best__track > :nth-child(n+5) { display: flex; }
	.hm-best__track > :nth-child(n+7) { display: none; }   /* 3열 두 줄 = 6개 */
	.hm-concern__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
