/* ==========================================================================
   메인 페이지 전용 레이아웃
   page-main.css · components.css 다음에 로드한다.

   이 파일은 디자인 시스템 토큰만 조합한다. 새 색·폰트·간격을 만들지 않는다.
   ========================================================================== */

/* 스프라이트 정의는 화면에 그리지 않는다 */
.mp-sprite { display: none; }

/* 아이콘 — 24 그리드, 선 1.5px, currentColor 상속 */
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: butt; stroke-linejoin: miter; }
.ic--12 { width: 12px; height: 12px; stroke-width: 2; }
.ic--16 { width: 16px; height: 16px; }
.ic--20 { width: 20px; height: 20px; }
.ic--24 { width: 24px; height: 24px; }
.ic--fill { fill: currentColor; stroke: none; }

/* --------------------------------------------------------------------------
   상품 이미지 영역
   실제 촬영 이미지가 들어오면 .mp-shot__art를 <img>로 교체한다.
   비율(1:1)과 배경(surface)은 그대로 유지한다.
   -------------------------------------------------------------------------- */
.mp-shot { display: flex; align-items: center; justify-content: center; background: var(--surface); }
.mp-shot__art {
  width: 82%; height: 82%;
  fill: none;
  stroke: var(--text-sub);
  stroke-width: 2.4;
  stroke-linejoin: round;
}
.ds-card--soldout .mp-shot__art { opacity: 0.5; }

/* --------------------------------------------------------------------------
   3. 메인 비주얼
   -------------------------------------------------------------------------- */
.mp-hero { padding-top: var(--space-4); }
.mp-shot--hero { background: var(--bg-sunken); }
.mp-shot--hero .mp-shot__art { width: 58%; height: 58%; stroke-width: 2; }
.mp-self-start { align-self: flex-start; }

/* --------------------------------------------------------------------------
   4. 인기 카테고리 — 모바일 4열 2행 / PC 7열
   -------------------------------------------------------------------------- */
.mp-cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}
.mp-cat {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  min-height: 96px;
  padding-block: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-strong);
  text-align: center;
  transition: border-color var(--dur-state) var(--ease), box-shadow var(--dur-state) var(--ease);
}
.mp-cat__ic { width: 40px; height: 40px; fill: none; stroke: var(--text-strong); stroke-width: 2.6; stroke-linejoin: round; }
.mp-cat:active { opacity: var(--press-opacity); }
@media (hover: hover) and (pointer: fine) {
  .mp-cat:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card-hover); }
}

/* --------------------------------------------------------------------------
   5. 베스트 — 오늘의 특가 블록
   메인에서 바로 구매로 이어지는 유일한 자리. 상품 카드에는 구매 버튼을 두지 않는다.
   -------------------------------------------------------------------------- */
.mp-feature {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-8);
}
.mp-feature__media { position: relative; aspect-ratio: var(--card-media-ratio); background: var(--bg-sunken); }
.mp-feature__media .mp-shot__art { width: 70%; height: 70%; }
.mp-feature__body { padding: var(--space-4); }
.mp-feature__brand { margin-top: var(--space-3); }
.mp-feature__price { margin-top: var(--space-4); }
.mp-feature__benefit { margin-top: var(--space-4); display: grid; gap: var(--space-2); }
.mp-feature__stock { margin-top: var(--space-4); }
.mp-feature__actions { margin-top: var(--space-5); }
.mp-feature__actions .ds-btn--secondary,
.mp-feature__actions .ds-btn--primary { flex: 1; padding-inline: var(--space-4); }

/* --------------------------------------------------------------------------
   7. 종목별 추천 — 탭 패널
   -------------------------------------------------------------------------- */
.mp-tabs { position: static; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.mp-panel { padding-top: var(--space-6); }

/* --------------------------------------------------------------------------
   8. 브랜드 소개 + 신뢰 블록
   -------------------------------------------------------------------------- */
.mp-brand { background: var(--brand-800); color: var(--text-on-dark); }
.mp-brand__inner { display: flex; flex-direction: column; gap: var(--space-8); padding-block: var(--space-12); }
.mp-brand__copy { display: flex; flex-direction: column; }
.mp-brand__lead { margin-top: var(--space-4); opacity: 0.8; max-width: 52ch; }
.mp-brand__points {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--brand-700);
}
.mp-brand__points li { display: flex; flex-direction: column; gap: var(--space-1); }
.mp-brand__points .t-caption { opacity: 0.72; }
.mp-brand__copy .ds-btn { margin-top: var(--space-8); }
.mp-brand__shot { aspect-ratio: 16 / 10; background: var(--brand-900); border-radius: var(--radius-lg); }
.mp-brand__shot .mp-shot__art { width: 58%; height: 58%; stroke: var(--text-on-dark); opacity: 0.72; stroke-width: 2; }

.mp-trust__list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--space-4);
  padding-block: var(--space-8);
}
.mp-trust__list li { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); text-align: center; color: var(--text-strong); }
.mp-trust__list .ic { margin-bottom: var(--space-1); }

/* --------------------------------------------------------------------------
   푸터 · 기타
   -------------------------------------------------------------------------- */
.mp-cs-actions { display: flex; gap: var(--space-2); }
.mp-footer-logo { padding-left: 0; }
.mp-escrow { margin-top: var(--space-2); }
.mp-cart { position: relative; }
.mp-cart .ds-count { position: absolute; top: 2px; right: 2px; }

/* ==========================================================================
   1024px 이상
   ========================================================================== */
@media (min-width: 1024px) {
  .mp-hero { padding-top: var(--space-10); }
  .mp-hero + .ds-section { padding-top: var(--space-30); }

  .mp-cats { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-6); }
  .mp-cat { min-height: 128px; padding-block: var(--space-5); gap: var(--space-3); }

  /* 특가 블록 : 좌 이미지 1:1 + 우 정보 */
  .mp-feature { display: grid; grid-template-columns: 420px minmax(0, 1fr); margin-bottom: var(--space-10); }
  .mp-feature__body { padding: var(--space-10); display: flex; flex-direction: column; justify-content: center; }
  .mp-feature__benefit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-feature__actions { max-width: 560px; }

  .mp-brand__inner { flex-direction: row; align-items: center; gap: var(--space-16); padding-block: var(--space-24); }
  .mp-brand__copy { flex: 1; }
  .mp-brand__shot { flex: 0 0 440px; aspect-ratio: 4 / 3; }

  .mp-trust__list { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: var(--space-10); }
  .mp-trust__list li { flex-direction: row; align-items: center; gap: var(--space-3); text-align: left; flex-wrap: wrap; }
  .mp-trust__list li .ic { margin-bottom: 0; flex: 0 0 24px; }
  .mp-trust__list li .t-caption { flex-basis: 100%; padding-left: calc(24px + var(--space-3)); }
}
