/*
 * 상품 상세(2026-11-16 리뉴얼). 배치는 11/13 시안 #v-detail, 값은 기준표 이름만. 주황은 '앞부분 무료로 보기' 면 하나, 주황 테두리 없음.
 */
.pd-page {
  margin: 0;
  background: var(--umsh-color-bg);
}

.pd {
  width: min(100%, var(--umsh-page-width));
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 0 calc(var(--umsh-tab-space) + var(--umsh-cta-h) + var(--umsh-space-6));
  background: var(--umsh-page-glow), var(--umsh-color-bg);
  color: var(--umsh-ink);
  font-family: var(--umsh-font-sans);
}

.pd *,
.pd *::before,
.pd *::after {
  box-sizing: border-box;
}

/* 위: 흐린 바탕 + 가운데 세로 표지(시안 .dhero) */
.pd-hero {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--umsh-pd-hero-h);
  overflow: hidden;
  isolation: isolate;
}

.pd-blur {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--umsh-pd-blur);
  opacity: var(--umsh-disabled-opacity);
}

.pd-cover {
  width: var(--umsh-pd-cover-w);
  aspect-ratio: var(--umsh-vault-cover-ratio);
  overflow: hidden;
  border-radius: var(--umsh-radius-3xl);
  box-shadow: var(--umsh-glass-edge);
}

.pd-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-body {
  display: grid;
  gap: var(--umsh-space-3);
  padding: var(--umsh-space-3) var(--umsh-space-gutter) 0;
}

.pd-bar[hidden],
.pd-tags .umsh-tag[hidden] {
  display: none;
}

.pd-body[hidden] {
  display: none;
}

.pd-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--umsh-space-2);
  margin: 0;
  padding: var(--umsh-space-5) var(--umsh-space-gutter) 0;
  color: var(--umsh-ink-2);
  font: var(--umsh-font-caption-strong);
}

.pd-title {
  margin: 0;
  padding: var(--umsh-space-2) var(--umsh-space-gutter) 0;
  font: var(--umsh-font-name-sm);
  letter-spacing: var(--umsh-tracking-snug);
}

.pd-lead {
  margin: 0;
  color: var(--umsh-ink-2);
  font: var(--umsh-font-body);
  word-break: keep-all;
}

.pd-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--umsh-space-3);
  margin-top: var(--umsh-space-3);
}

.pd-head h2 {
  margin: 0;
  font: var(--umsh-font-section);
}

.pd-head span {
  color: var(--umsh-muted);
  font: var(--umsh-font-caption-strong);
}

.pd-main,
.pd-pair > div {
  border-radius: var(--umsh-radius-card);
  padding: var(--umsh-space-4);
}

.pd-main {
  display: flex;
  align-items: center;
  gap: var(--umsh-space-4);
}

.pd-main > span {
  display: grid;
  min-width: 0;
}

.pd :is(.pd-main, .pd-pair) b {
  font: var(--umsh-font-count);
  font-variant-numeric: tabular-nums;
}

.pd-main > b {
  font: var(--umsh-font-name);
}

.pd :is(.pd-main, .pd-pair) b small {
  margin-left: var(--umsh-space-1);
  font: var(--umsh-font-meta);
}

.pd :is(.pd-main, .pd-pair) strong {
  font: var(--umsh-font-item);
}

.pd :is(.pd-main, .pd-pair) > * small,
.pd .pd-pair > div > small {
  color: var(--umsh-muted);
  font: var(--umsh-font-caption);
  word-break: keep-all;
}

.pd-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--umsh-space-3);
}

.pd-pair > div {
  display: grid;
  gap: var(--umsh-space-1);
}

.pd-note,
.pd-state {
  margin: var(--umsh-space-2) var(--umsh-space-gutter) 0;
  color: var(--umsh-muted);
  font: var(--umsh-font-caption);
}

.pd-body .pd-note {
  margin: 0;
}

.pd-state[hidden] {
  display: none;
}

/* 아래 두 버튼(시안 .dbar): 하단 메뉴 위 */
.pd-bar {
  position: fixed;
  right: 0;
  bottom: var(--umsh-tab-space);
  left: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--umsh-space-3);
  width: min(100%, var(--umsh-page-width));
  margin: 0 auto;
  padding: var(--umsh-space-3) var(--umsh-space-gutter);
  background: linear-gradient(180deg, transparent, var(--umsh-color-bg) 40%);
}

/* 하단 메뉴를 끈 상세(product.html 의 data-umsh-bottom-nav="off", 시안 #v-detail): 두 버튼을 화면 맨 아래로, 아래 여백도 버튼 자리만 */
body.umsh-no-bottom-nav .pd {
  padding-bottom: calc(var(--umsh-cta-h) + var(--umsh-space-6) + env(safe-area-inset-bottom));
}

body.umsh-no-bottom-nav .pd-bar {
  bottom: 0;
  padding-bottom: calc(var(--umsh-space-3) + env(safe-area-inset-bottom));
}

/* 출시 기념: 태그 줄의 정가 작은 줄(시안 v33 .was) */
.pd-was {
  color: var(--umsh-muted-2);
  font: var(--umsh-font-caption);
  font-variant-numeric: tabular-nums;
}

.pd-was[hidden] {
  display: none;
}

/* 목차(시안 v33 ol.toc): 부 제목 줄 + 장 번호 줄, 줄 사이 가는 선 */
.pd-toc {
  margin: 0;
  padding: 0;
  border-top: var(--umsh-hairline) solid var(--umsh-line);
  list-style: none;
  counter-reset: pd-toc;
}

.pd-toc li {
  display: grid;
  grid-template-columns: var(--umsh-space-8) minmax(0, 1fr);
  align-items: center;
  padding: var(--umsh-space-3) 0;
  border-bottom: var(--umsh-hairline) solid var(--umsh-line);
  color: var(--umsh-ink);
  font: var(--umsh-font-item);
}

.pd-toc li::before {
  counter-increment: pd-toc;
  content: counter(pd-toc, decimal-leading-zero);
  color: var(--umsh-muted);
  font: var(--umsh-font-caption-strong);
  font-variant-numeric: tabular-nums;
}

.pd-toc li.is-part {
  display: block;
  padding: var(--umsh-space-4) 0 var(--umsh-space-1);
  border-bottom: 0;
  color: var(--umsh-ink-2);
  font: var(--umsh-font-caption-strong);
}

.pd-toc li.is-part::before {
  content: none;
  counter-increment: none;
}

/* 값 칸(시안 v33 .price): 한 번 결제 · 운명록에 계속 보관 */
.pd-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--umsh-space-3);
  padding: var(--umsh-space-4);
  border-radius: var(--umsh-radius-card);
}

.pd-price > span {
  display: grid;
  min-width: 0;
}

.pd-price strong {
  font: var(--umsh-font-item);
}

.pd-price small {
  color: var(--umsh-muted);
  font: var(--umsh-font-caption);
}

.pd-price b {
  font: var(--umsh-font-name);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pd-price b s {
  margin-right: var(--umsh-space-1);
  color: var(--umsh-muted-2);
  font: var(--umsh-font-caption);
}

/* 2026-11-18 rn37-c(리뉴얼 화면 Version 40): 패키지 · 광고 제거 · 신년운세 상세의 세 칸(시안 .dben — 숫자 · 단위 · 이름 · 한 줄) */
.pd-ben {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--umsh-space-2);
}
.pd-ben > div {
  display: grid;
  align-content: start;
  gap: var(--umsh-space-1);
  padding: var(--umsh-space-3);
  border-radius: var(--umsh-radius-card);
}
.pd-ben b {
  font: var(--umsh-font-count);
  font-variant-numeric: tabular-nums;
}
.pd-ben b small {
  margin-left: var(--umsh-hairline);
  font: var(--umsh-font-meta);
}
.pd-ben strong {
  font: var(--umsh-font-item);
}
.pd-ben > div > small {
  color: var(--umsh-muted);
  font: var(--umsh-font-caption);
  word-break: keep-all;
}
.pd-ben[hidden],
.pd-head[hidden],
.pd-toc[hidden],
.pd-note[hidden],
[data-pd-only][hidden] {
  display: none;
}
[data-pd-only="cmdg"] {
  display: grid;
  gap: var(--umsh-space-3);
}
/* 이미 가진 상품 · 광고 없이 보는 중 한 줄 */
.pd-owned {
  color: var(--umsh-ink-2);
  font: var(--umsh-font-caption-strong);
}
/* 팔기 전(준비 중) · 살 수 없는 버튼 */
.pd-bar .umsh-cta.is-off {
  opacity: var(--umsh-disabled-opacity);
  pointer-events: none;
}
/* 2026-11-18 rn37-c: 값 칸 글이 큰 값에 눌려 세 줄로 접히지 않게 — 좁으면 큰 값이 다음 줄 오른쪽으로 내려간다 */
.pd-price {
  flex-wrap: wrap;
}
.pd-price > span {
  flex: 1 1 60%;
}
.pd-price b {
  margin-left: auto;
}
