/* 상품 카드 썸네일·상품 상세. app.css 변수만 쓴다(색 hex 없음). 간격 4·8·12·16·24·32·48·64 만. */

/* 목록 카드 썸네일(카드 패딩 안쪽 1:1) */
.product-thumb-link { display: block; }
/* 카드 가격: 단가와 예시 총액을 줄로 나눈다(글자 크기·색은 app.css .price-unit/.price-example, UX 줄) */
.product .price { display: grid; gap: 4px; }
.product-thumb { aspect-ratio: 1 / 1; width: 100%; height: auto; border-radius: var(--radius-sm, 12px); border: 1px solid var(--line); display: block; object-fit: cover; margin-bottom: 16px; background: var(--bg); }
.product h3 a { color: var(--text-strong); text-decoration: none; }
.product h3 a:hover { text-decoration: underline; }

/* 상세 첫 화면 */
.product-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 48px; align-items: start; }
.product-hero-thumb { aspect-ratio: 1 / 1; width: 100%; height: auto; border-radius: var(--radius-sm, 12px); border: 1px solid var(--line); display: block; object-fit: cover; background: var(--surface); }
.product-summary { display: grid; gap: 16px; min-width: 0; }
.product-summary h1 { overflow-wrap: anywhere; }
.product-headline { font-size: 18px; color: var(--text); }
.product-buy { margin-top: 8px; }
/* 가격 면: 첫 화면에서 가격·작업 시작·주 버튼을 한 면으로 세운다. 가격 글자 크기는 app.css(.price-unit, UX 줄) */
.product-price-panel { display: grid; gap: 8px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-card, 20px); background: var(--bg); }
.product-price-panel .price { display: grid; gap: 4px; }
.product-price-panel .price-unit { font-size: var(--price-size, 24px); font-weight: var(--price-weight, 700); color: var(--text-strong); }
.product-buy [data-state="ready"] { display: grid; gap: 8px; }
.product-buy [data-state="ready"][hidden] { display: none; }
.product-buy .actions { margin-top: 16px; }
.product-buy .state h2 { font-size: 20px; margin-bottom: 8px; }
.product-buy .state p + p { margin-top: 8px; }
.product-buy .state .actions { margin-top: 16px; }
.product-buy .eta { color: var(--text-strong); }

/* 주문 전 고지(ready 블록 안, #order-top 바로 아래, 접지 않는다). 흰 바탕 --text 대비 7.4:1 */
.product-notice { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm, 12px); display: grid; gap: 8px; scroll-margin-top: 16px; }
.product-buy .product-notice h2 { font-size: 16px; margin-bottom: 0; color: var(--text-strong); }
.product-notice-list { margin: 0; padding-left: 24px; display: grid; gap: 4px; font-size: 14px; color: var(--text); }
.product-notice-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }

/* 아래 섹션 */
.product-section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); display: grid; gap: 16px; }
.product-section h2 { font-size: 24px; }
.product-receives, .product-links { margin: 0; padding-left: 24px; display: grid; gap: 8px; }
.product-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); counter-reset: step; }
.product-steps li { counter-increment: step; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm, 12px); }
.product-steps h3 { font-size: 20px; margin-bottom: 8px; }
.product-steps h3::before { content: counter(step) ". "; color: var(--text-muted); }
.product-grade-guide { margin: 0; display: grid; gap: 8px; }
.product-grade-guide div { display: flex; gap: 12px; flex-wrap: wrap; }
.product-grade-guide dt { color: var(--text-muted); min-width: 80px; }
.product-grade-guide dd { margin: 0; color: var(--text-strong); flex: 1 1 200px; }
.product-grade-guide div[hidden], [data-grade-claim][hidden] { display: none; }
.product-faq { display: grid; gap: 8px; }
.product-faq details { border: 1px solid var(--line); border-radius: var(--radius-sm, 12px); padding: 12px 16px; }
.product-faq summary { cursor: pointer; color: var(--text-strong); font-weight: 400; min-height: 24px; }
.product-faq summary:focus-visible { border-radius: var(--radius-xs, 8px); }
.product-faq details p { margin-top: 8px; }
.product-faq-more { border: 0 !important; padding: 0 !important; }
.product-faq-more > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue-strong); }
.product-faq-more > .product-faq { margin-top: 8px; }

.product-grade-compare { width: 100%; margin-top: 16px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.product-grade-compare caption { text-align: left; color: var(--text-muted); font-size: 14px; padding-bottom: 8px; }
.product-grade-compare th, .product-grade-compare td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.product-grade-compare thead th { color: var(--text-muted); font-weight: 400; }
.product-grade-compare thead th[aria-current] { color: var(--text-strong); font-weight: 700; }
.product-grade-compare td { color: var(--text-strong); }

/* 홈 첫 화면 — 모바일은 그림을 빼고 가격 2개가 첫 화면에 들게 한다 */
.home-hero { display: grid; gap: 16px; align-items: center; margin-bottom: 16px; }
.home-hero h1 { font-size: 24px; }
.home-hero-text { display: grid; gap: 12px; }
.home-hero .actions { margin: 0; }
/* 모바일은 목록이 바로 아래라 버튼을 빼고 가격 2개를 첫 화면에 넣는다 */
.home-hero .actions { display: none; }
.home-hero-text p { margin: 0; font-size: 16px; }
.home-hero-art { display: block; }
.home-hero-art img { display: block; width: 100%; height: auto; border-radius: var(--radius-card, 20px); }
/* 플랫폼 칩 — 390 은 그림 아래 한 줄 가로 스크롤(칩이 그림을 밀어내지 않게), 넓은 화면은 글 아래 줄바꿈 */
.home-list-title { margin-bottom: 12px; font-size: 20px; }
.home-list-title:focus { outline: none; }
.home-steps { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.home-steps ol { list-style: none; counter-reset: step; display: grid; gap: 16px; margin: 16px 0 0; padding: 0; }
.home-steps li { counter-increment: step; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; }
.home-steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); color: var(--text-strong); font-weight: 700; }
.home-steps h3 { font-size: 18px; }
@media (min-width: 641px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
  .home-hero { margin-bottom: 48px; }
  .home-hero h1 { font-size: 40px; }
  .home-hero-text { gap: 16px; }
  .home-hero-text p { font-size: 18px; }
  .home-hero .actions { display: flex; }
  .home-hero-art { grid-column: 2; grid-row: 1; }
    .home-steps ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}

@media (max-width: 640px) {
  .product-top { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* 390 첫 화면(844px) 안에 가격·작업 시작 문구가 들어오게 그림을 줄인다(벤치마킹 3차-2). 비제휴 고지는 첫 화면 유지(법무 조건 4) */
  .product-hero-thumb { max-width: 200px; }
  .product-summary { gap: 12px; }
  .product-section { margin-top: 32px; padding-top: 24px; }
}

/* 플랫폼 공식 아이콘(platform-brand.js) — 원본 비율 그대로 높이 18px, 둘레 여백은 글자와 6px. 크기는 그림과 무관하게 고정 */
.meta:has(> .platform-icon) { display: flex; align-items: center; gap: 6px; }
.platform-icon { flex: none; width: auto; height: 18px; }
/* 비제휴 고지 — 상세 요약 안, 접지 않고 본문 크기 */
.platform-disclaimer { margin: 8px 0 0; font-size: 16px; color: var(--text-muted); }

/* 문구 최소선(2026-11-18): 주문 전 안내는 접어 두고 필요할 때만 연다. 손가락 영역 44px 이상. */
.product-notice > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-size: 15px; font-weight: 700; color: var(--text-strong); }
.product-notice:not([open]) { gap: 0; }
.product-notice .platform-disclaimer { font-size: 14px; margin: 0; }

/* home-hero-fold: 첫 상품 카드 단추가 390·360 첫 화면에 들게(성장 16:04 F-1, 코디 16:22 판정) */
/* ⓐ 홈 로그인 안내는 한 줄 띠 — 글 + 오른쪽 로그인 링크(터치 44) */
#checkout-notice.home-notice:not([hidden]) { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px; }
.home-notice-text { min-width: 0; }
.home-notice-link { display: inline-flex; flex: none; align-items: center; min-height: 44px; padding: 0 4px; color: var(--text-strong); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.home-notice-link[hidden] { display: none; }
/* ⓑ 정렬·등급은 개수 줄 오른쪽 「정렬·등급 ▾」 하나(성장 mobile-home-rework C 작은 판) — 펼치면 줄 아래 전체 폭 */
.list-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 12px 0; }
.list-meta .list-count { margin: 0; }
.list-filter[hidden] { display: none; }
.list-filter { display: contents; }
.list-filter > summary { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px; margin-left: auto; cursor: pointer; list-style: none; color: var(--text-strong); font-size: 14px; font-weight: 700; }
.list-filter > summary::-webkit-details-marker { display: none; }
.list-filter > summary::after { content: "▾"; font-weight: 400; }
.list-filter[open] > summary::after { content: "▴"; }
.list-filter-body { flex-basis: 100%; display: grid; gap: 12px; }
.list-filter-body .tier-chips, .list-filter-body .list-sort { margin: 0; }
.list-filter-body .list-sort { margin-left: 0; }
/* G: 선 대신 여백·무게 — 종류 칩은 테두리 없이 글자, 고른 것만 굵게+밑줄(색만으로 말하지 않는다). 탭은 원래 고른 것 밑줄만 */
.category-chips:not(.tier-chips) .chip { border: 0; padding: 0 8px; background: none; }
.category-chips:not(.tier-chips) .chip[aria-pressed="true"] { border: 0; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 480px) {
  /* I: 탭과 종류 칩 사이 16→4 */
  .category-chips:not(.tier-chips) { margin-top: 4px; }
  /* D: 제목 22px·줄간 1.3 */
  .home-hero h1 { font-size: 22px; line-height: 1.3; }
  /* G: 카드는 테두리 없이 옅은 회색 바탕 */
  .product-list .product.card { border: 0; background: #f6f7f9; }
  /* E: 카드 안 알약 → 회색 글자 한 줄 「표준 · 프리미엄 · …」 */
  .product-list .option-chips-line { gap: 0; }
  .product-list .opt-chip { padding: 0; border: 0; color: var(--text-muted); font-size: 13px; line-height: 20px; }
  .product-list .opt-chip + .opt-chip::before { content: " · "; white-space: pre; }
}
@media (max-width: 480px) {
  /* ⓒ 목록 카드의 「입금 확인 후 순차 시작」은 상세·주문·홈 세 단계에 있어 좁은 화면 목록에서는 뺀다 */
  .product-list .start-chip, .skeleton .start-chip { display: none; }
  /* ⓓ 그림은 낮은 띠(72 — 96 이면 390 단추 아래 끝 841/844 로 여유 3)로 자른다(승인 디자인 AC-17 — 그림은 남긴다) */
  .home-hero-art img { height: 72px; object-fit: cover; }
}
@media (max-width: 374px) { .home-hero-art { display: none; } }
/* 상세 첫 화면(성장 mobile-home-rework §3, 기준 높이 411×796·390×664·360×620) */
.eta-detail { margin: 0; font-size: 14px; color: var(--text); }
.eta-detail[hidden] { display: none; }
@media (max-width: 480px) {
  /* ㉰ 그림 200→120(모든 폭 ≤480) */
  .product-hero-thumb { max-width: 120px; }
  /* ㉱ 제목 22px·줄간 1.3 */
  .product-summary h1 { font-size: 22px; line-height: 1.3; }
  .product-price-panel { padding: 16px; }
  /* ㉳ 이동 경로 줄 바깥 여백만 줄인다 — 링크 자체는 누르는 높이 44 그대로(T-3) */
  main > .breadcrumb ol { margin-top: -6px; margin-bottom: 0; }
  .product-top { gap: 12px; }
}
