/* =================================================================
 * home.css — 메인 화면 (피그마 기획안 HOME 1920 · HOME-mobile 850, WBS 2.4.3)
 * PC 는 기획안 1920 폭 기준 값 그대로, 모바일(899px 이하)은 850 폭 기획안을 화면 폭에 맞춰 줄인다.
 * 모바일 크기 = 기획안 값 × 100vw / 850 (글자는 읽을 수 있는 최소 크기를 둔다)
 * 영역 사이 간격 (기획안) : 배너→소개 126 · 소개→카드 125 · 카드→베스트 141 · 베스트→띠 269 · 띠→가치 120 · 가치→푸터 146
 * ================================================================= */

/* ---- ① 슬라이드 배너 ---- */

.home-hero {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1920 / 750;
	min-height: 420px;
	background: #c4c4c4;
}
.home-hero__slides, .home-hero__slide { position: absolute; inset: 0; }
.home-hero__slide { display: none; }
.home-hero__slide.is-active { display: block; }

.home-hero__media { position: absolute; inset: 0; overflow: hidden; }
.home-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 기획안 배너 사진의 잘림 위치 그대로 (Hero-Section · Bakground-Image) */
.home-hero__media--design img {
	inset: auto;
	left: -0.43%;
	top: -11.03%;
	width: 114.49%;
	height: 122.1%;
	max-width: none;
	object-fit: fill;
}

/* 글 : 배너 왼쪽에서 54.6% 지점 (1048 / 1920), 세로 가운데, 폭 460 (23.96%).
   폭도 비율로 줄여야 1920 보다 좁은 화면에서 글이 오른쪽 화살표(1562)까지 넘어가지 않는다 (기획안 : 글 끝 1508 → 화살표 1562) */
.home-hero__body {
	position: absolute;
	top: 50%;
	left: 54.58%;
	transform: translateY(-50%);
	width: 23.96%;
}
.home-hero__title {
	margin: 0;
	font-family: var(--font-point);
	font-weight: 800;
	font-size: clamp(36px, 3.07vw, 59px);
	line-height: normal;
	color: #000;
}
.home-hero__text {
	margin: clamp(10px, 0.95vw, 18px) 0 0;
	font-family: Lato, var(--font-body);
	font-size: clamp(17px, 1.3vw, 25px);
	line-height: 1.4;
	color: #000;
}
.home-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 142px;
	height: 52px;
	margin-block-start: clamp(14px, 1.2vw, 23px);
	border: 1px solid #000;
	border-radius: 8px;
	background: #000;
	font-family: var(--font-body);
	font-size: 18px;
	color: #fff;
	transition: opacity .2s var(--ease);
}
.home-hero__btn:hover { opacity: .85; }

/* 넘김 화살표 40×40 : 기획안 x 357 · 1562 (1920 중) */
.home-hero__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	line-height: 0;
}
.home-hero__arrow img { width: 40px; height: 40px; }
.home-hero__arrow::after { content: ""; position: absolute; inset: -8px; }   /* 누르는 영역을 조금 넓게 */
.home-hero__arrow--prev { left: 18.59%; }
.home-hero__arrow--prev img { transform: rotate(180deg); }   /* 기획안도 같은 화살표를 뒤집어 쓴다 */
.home-hero__arrow--next { right: 16.56%; }

/* ---- ② 브랜드 소개 : 왼쪽 493 · 오른쪽 692 (폭 1185) ---- */

.home-about {
	display: grid;
	grid-template-columns: 493fr 692fr;
	max-width: calc(1185px + var(--page-margin) * 2);
	margin-block-start: 126px;
}
.home-about__label {
	margin: 0;
	font-family: var(--font-body);
	font-size: 12px;
	line-height: 24px;
	color: #9c9a9a;
	text-transform: uppercase;
}
.home-about__title {
	margin: 32px 0 0;
	font-family: var(--font-point);
	font-weight: 800;
	font-size: 40px;
	line-height: normal;
	color: #14160d;
	text-transform: uppercase;
}
.home-about__body {
	margin-block-start: 38px;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 24px;
	color: var(--fg);
}
.home-about__q {
	margin: 0 0 24px;
	font-family: var(--font-point);
	font-weight: 800;
	font-size: 25px;
	line-height: 24px;
	color: var(--fg);
}
.home-about__body p { margin: 0; }

/* ---- ③ 큰 이미지 카드 1303×594 · 모서리 45 ---- */

.home-freedom {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1303 / 594;
	margin-block-start: 125px;
	border-radius: 45px;
	background: #c4c4c4;
	isolation: isolate;
}
/* 사진은 30% 만 보이고 그 위에 검정 60% (기획안 Background-Image) */
.home-freedom__bg {
	position: absolute;
	left: 0;
	top: -57.07%;
	width: 100%;
	height: 292.52%;
	max-width: none;
	object-fit: fill;
	opacity: .3;
	z-index: -2;
}
.home-freedom::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .6); z-index: -3; }
.home-freedom__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 12.74% var(--sp-md) 0;      /* 제목 위 166 / 1303 (폭 기준) */
	text-align: center;
	color: #fff;
}
.home-freedom__title {
	margin: 0;
	font-family: var(--font-point);
	font-weight: 800;
	font-size: 45px;
	line-height: normal;
	text-transform: capitalize;
}
.home-freedom__text { margin: 12px 0 0; font-family: var(--font-body); font-size: 16px; line-height: 24px; }
.home-freedom__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 246px;
	height: 52px;
	margin-block-start: 22px;
	border-radius: 8px;
	background: var(--brand);
	font-family: var(--font-body);
	font-size: 18px;
	color: #fff;
	transition: background-color .2s var(--ease);
}
.home-freedom__btn:hover { background: var(--brand-hover); }

/* ---- ④ 베스트셀러 ---- */

.home-best { margin-block-start: 141px; }
.home-best__title {
	margin: 0 0 63px;
	font-family: var(--font-point);
	font-weight: 800;
	font-size: 45px;
	line-height: normal;
	color: #14160d;
	text-align: center;
	text-transform: uppercase;
}

/* ---- ⑤ efilow 글자 띠 (PC) · 주황 문구 띠 (모바일) ---- */

.home-band { margin-block-start: 269px; line-height: 0; }
.home-band img { width: 100%; height: auto; }
.home-ribbon { display: none; }

/* ---- 중간 폭 (900 ~ 1279) : 배너 글이 사진 위로 넘치지 않게 ---- */
@media (max-width: 1279px) and (min-width: 900px) {
	.home-hero__body { left: 52%; width: 40%; }
	.home-hero__arrow--prev { left: 3%; }
	.home-hero__arrow--next { right: 3%; }
	.home-about { gap: 40px; }
}

/* =================================================================
 * 모바일 (기획안 HOME-mobile 850 폭) : 값 × 100vw / 850
 * ================================================================= */
@media (max-width: 899px) {
	/* 배너 : 사진 850×750, 글은 왼쪽 아래 (x 89 · 사진 위에서 469), 버튼이 사진 아래로 25 나온다 */
	.home-hero { aspect-ratio: auto; min-height: 0; height: calc(775 * 100vw / 850); background: none; overflow: visible; }
	.home-hero__slides { position: relative; height: 100%; }
	.home-hero__media { bottom: calc(25 * 100vw / 850); background: #c4c4c4; }
	.home-hero__media--design img { left: 0; top: -12.89%; width: 100%; height: 151.13%; }
	.home-hero__body { top: calc(469 * 100vw / 850); left: calc(89 * 100vw / 850); transform: none; width: calc(460 * 100vw / 850); min-width: 220px; }
	.home-hero__title { font-size: calc(59 * 100vw / 850); }
	.home-hero__text { margin-top: calc(10 * 100vw / 850); font-size: max(14px, calc(25 * 100vw / 850)); line-height: 1.4; }
	.home-hero__btn { width: max(96px, calc(142 * 100vw / 850)); height: max(36px, calc(52 * 100vw / 850)); margin-top: calc(18 * 100vw / 850); font-size: max(13px, calc(18 * 100vw / 850)); }
	.home-hero__arrow { top: calc(375 * 100vw / 850); width: max(28px, calc(40 * 100vw / 850)); height: max(28px, calc(40 * 100vw / 850)); }
	.home-hero__arrow img { width: 100%; height: 100%; }
	.home-hero__arrow--prev { left: calc(114 * 100vw / 850); }
	.home-hero__arrow--next { right: calc(76 * 100vw / 850); }

	/* 소개 : 가운데 정렬로 쌓는다 */
	.home-about { display: block; margin-block-start: calc(138 * 100vw / 850); text-align: center; }
	.home-about__title { margin-top: calc(6 * 100vw / 850); font-size: max(22px, calc(40 * 100vw / 850)); }
	.home-about__br { display: none; }
	.home-about__body { margin-top: calc(60 * 100vw / 850); font-size: max(13px, calc(16 * 100vw / 850)); line-height: 1.5; }
	.home-about__q { margin-bottom: calc(24 * 100vw / 850); font-size: max(16px, calc(25 * 100vw / 850)); line-height: 1.3; }

	/* 큰 카드 700×594 */
	.home-freedom { aspect-ratio: 700 / 594; margin-block-start: calc(115 * 100vw / 850); border-radius: calc(45 * 100vw / 850); }
	.home-freedom__bg { left: -1.71%; top: -15.5%; width: 103.41%; height: 161.35%; }
	.home-freedom__body { padding-top: calc(166 * 100vw / 850); }
	.home-freedom__title { font-size: max(22px, calc(45 * 100vw / 850)); }
	.home-freedom__text { font-size: max(12px, calc(16 * 100vw / 850)); line-height: 1.5; }
	.home-freedom__btn { width: max(160px, calc(246 * 100vw / 850)); height: max(38px, calc(52 * 100vw / 850)); margin-top: calc(22 * 100vw / 850); font-size: max(14px, calc(18 * 100vw / 850)); }

	/* 베스트셀러 : 옆으로 넘기는 카드 (기획안처럼 화면 밖으로 이어진다) */
	.home-best { margin-block-start: calc(126 * 100vw / 850); padding-inline: 0; }
	.home-best__title { margin-bottom: calc(63 * 100vw / 850); font-size: max(24px, calc(45 * 100vw / 850)); }
	.home-best__grid {
		display: flex;
		gap: calc(8 * 100vw / 850);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-inline: calc(46 * 100vw / 850);
		scroll-padding-inline: calc(46 * 100vw / 850);
		scrollbar-width: none;
	}
	.home-best__grid::-webkit-scrollbar { display: none; }
	/* 옆으로 넘기는 줄에서는 퍼센트 여백이 줄 전체 폭 기준이 되므로, 카드 폭(--cw)으로 직접 계산한다 */
	.home-best__grid .shop-card {
		--cw: max(170px, calc(314 * 100vw / 850));
		flex: 0 0 var(--cw);
		width: var(--cw);
		padding: calc(var(--cw) * 0.1497) calc(var(--cw) * 0.1115) 44px;
		scroll-snap-align: start;
	}
	.home-best__grid .shop-card__like { right: calc(var(--cw) * 0.1115); }

	/* 띠 : 글자 띠 대신 주황 문구 띠 (높이 100, 글자 25, 아이콘 24.5) — 천천히 흐른다 */
	.home-band { display: none; }
	.home-ribbon {
		display: block;
		overflow: hidden;
		margin-block-start: calc(126 * 100vw / 850);
		background: var(--brand);
		white-space: nowrap;
	}
	.home-ribbon__track {
		display: inline-flex;
		align-items: center;
		height: max(44px, calc(100 * 100vw / 850));
		animation: home-ribbon 30s linear infinite;
	}
	.home-ribbon__track span {
		display: inline-flex;
		align-items: center;
		gap: calc(10 * 100vw / 850);
		padding-inline: calc(12 * 100vw / 850) calc(48 * 100vw / 850);
		font-family: var(--font-point);
		font-weight: 800;
		font-size: max(14px, calc(25 * 100vw / 850));
		color: #fff;
	}
	.home-ribbon__track img { width: max(14px, calc(24.53 * 100vw / 850)); height: auto; transform: rotate(2.13deg); }

}
@keyframes home-ribbon { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .home-ribbon__track { animation: none; } }
