/* ═══════════════════════════════════════════════════════════════════════════
   5230 PRODUCT DETAIL — 상세 전용 스타일 (T-002)
   공통 룩앤필(--ink/--bg/--accent, 헤더·드로어·토스트·푸터·카드)은
   css/main5230.css 를 그대로 재사용하고, 여기에는 상세 전용만 둔다.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 레이아웃 ─────────────────────────────── */
.pd { padding: 0 30px 80px; }

.pd-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 22px 0 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--grey);
}
.pd-crumb a:hover { color: var(--ink); }

.pd-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: 48px;
  align-items: start;
  padding-bottom: 76px;
  border-bottom: 1px solid var(--line);
}

/* ── 갤러리 ───────────────────────────────── */
.pd-gallery { position: sticky; top: 88px; }
/* S21-05 (2026-09-25) — 상품 사진 원본이 2:3 이다. 3:4 틀 + cover 로 위아래가 11%씩 잘렸다. */
.pd-stage {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #fff;
  overflow: hidden;
}
.pd-stage img {
  width: 100%; height: 100%;
  object-fit: cover;
  animation: pdFade 0.45s ease both;
}
@keyframes pdFade { from { opacity: 0; } to { opacity: 1; } }

.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pd-thumb {
  position: relative;
  width: 88px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color 0.25s;
}
.pd-thumb img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.pd-thumb span {
  display: block;
  padding: 6px 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--grey);
  background: var(--bg);
}
.pd-thumb:hover { border-color: var(--ink); }
.pd-thumb--on { border-color: var(--ink); }
.pd-thumb--on span { background: var(--ink); color: var(--bg); }

/* ── 구매 정보 ─────────────────────────────── */
.pd-info { padding-top: 4px; }
.pd-badges { margin-bottom: 14px; }
.pd-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 6px 13px;
  background: var(--ink);
  color: var(--bg);
}
.pd-badge--best { background: var(--accent); }

.pd-brand { font-size: 12px; letter-spacing: 0.22em; color: #b3aca0; margin-bottom: 10px; }
.pd-name {
  font-size: clamp(22px, 2.4vw, 31px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.pd-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.pd-price .price-original { font-size: 14px; }
.pd-price-sale { font-size: 25px; font-weight: 800; letter-spacing: -0.01em; }
.pd-price-rate { font-size: 16px; font-weight: 800; color: var(--accent); }

.pd-opt { padding: 24px 0 0; }
.pd-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--grey);
  margin-bottom: 11px;
}

.size-grid { display: flex; flex-wrap: wrap; gap: 8px; }
/* S21-06 — COLOR 줄(SIZE 위). 버튼은 사이즈와 같은 .size-btn 을 쓰고, 라벨 옆에 고른 색상을 적는다. */
.pd-color { margin-bottom: 20px; }
.pd-label-val { margin-left: 8px; color: var(--ink); letter-spacing: 0.04em; }
.size-btn {
  min-width: 62px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--grey);
  transition: all 0.2s;
}
.size-btn:hover { border-color: var(--ink); color: var(--ink); }
/* S21-05 — 선택 상태는 hover 중에도 유지한다. `.x:hover`(클래스+가상클래스)가 `.x--on` 보다 특이도가 높아, 터치 기기에서 탭 후 hover 가 남으면 어두운 배경에 어두운 글자가 됐다(사이즈 선택 시 글자 사라짐). */
.size-btn--on, .size-btn--on:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.size-grid--warn .size-btn { border-color: #b4553f; }

.pd-note { font-size: 12.5px; color: var(--grey); margin-top: 10px; line-height: 1.6; }
.pd-guard {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #b4553f;
}

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.stepper-btn {
  width: 40px; height: 40px;
  font-size: 15px;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.stepper-btn:hover:not(:disabled) { background: var(--card); }
.stepper-btn:disabled { color: #cdc6ba; cursor: not-allowed; }
.stepper-num {
  min-width: 46px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  line-height: 40px;
}

.pd-buy { display: flex; gap: 10px; margin-top: 30px; }
.pd-btn {
  flex: 1;
  display: inline-block;
  text-align: center;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 17px 20px;
  border: 1px solid var(--ink);
  transition: background 0.25s, opacity 0.25s;
}
.pd-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.pd-btn--line { background: transparent; color: var(--ink); }
.pd-btn--line:hover:not(:disabled) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pd-btn:disabled { opacity: 0.45; cursor: progress; }
.pd-btn--wide { flex: none; min-width: 220px; }

.pd-meta { list-style: none; margin-top: 30px; border-top: 1px solid var(--line); padding-top: 20px; }
.pd-meta li { font-size: 13px; color: var(--grey); line-height: 1.9; }
.pd-meta b { color: var(--ink); font-weight: 700; margin-right: 8px; letter-spacing: 0.04em; }

/* ── 섹션 공통 ─────────────────────────────── */
.pd-sec { padding: 62px 0 0; }
.pd-sec-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.pd-sec-head h2 { font-size: 15px; font-weight: 800; letter-spacing: 0.2em; }
.pd-sec-sub { font-size: 12.5px; color: var(--grey); letter-spacing: 0.1em; }
.pd-empty { font-size: 14px; color: var(--grey); padding: 42px 0; text-align: center; }

/* ── 상품 설명 (T-011 · SSG 정적 본문 — /p/pN.html 에서만 렌더된다) ── */
.pd-seo-text {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink);
  max-width: 760px;
  margin-bottom: 12px;
}
.pd-seo-spec {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 0;
  margin: 26px 0 20px;
  border-top: 1px solid var(--line);
  max-width: 620px;
}
.pd-seo-spec dt,
.pd-seo-spec dd {
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.5;
}
.pd-seo-spec dt { color: var(--grey); letter-spacing: 0.08em; }
.pd-seo-spec dd { font-weight: 500; }
.pd-seo-spec dd s { color: var(--grey); font-weight: 400; margin-left: 6px; }
.pd-seo-links { font-size: 13px; color: var(--grey); letter-spacing: 0.02em; line-height: 2; }
.pd-seo-links a { text-decoration: underline; text-underline-offset: 3px; }
.pd-seo-links a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .pd-seo-spec { grid-template-columns: 88px minmax(0, 1fr); }
}

/* ── 상품정보고시 (T-013 · 전 90종 공통 고지) ── */
.pd-notice {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 0;
  margin: 4px 0 18px;
  border-top: 1px solid var(--line);
  max-width: 820px;
}
.pd-notice dt,
.pd-notice dd {
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.6;
}
.pd-notice dt { color: var(--grey); letter-spacing: 0.04em; }
.pd-notice dd { color: #4a443c; }
.pd-notice-foot {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--grey);
  max-width: 820px;
}
.pd-notice-foot a { text-decoration: underline; text-underline-offset: 3px; }
.pd-notice-foot a:hover { color: var(--ink); }

/* DETAILS 탭 안의 상품별 고시 (8종) */
.dt-notice .dt-foot { margin-top: 10px; }
.dt-notice .dt-foot a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 640px) {
  .pd-notice { grid-template-columns: 1fr; }
  .pd-notice dt { padding-bottom: 0; border-bottom: none; }
  .pd-notice dd { padding-top: 4px; }
}

/* ── 리뷰 ─────────────────────────────────── */
.rv-summary {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  background: var(--card);
  padding: 28px 30px;
}
.rv-score { text-align: center; }
.rv-score strong { display: block; font-size: 42px; font-weight: 900; line-height: 1; }
.rv-score-stars { display: block; font-size: 16px; color: var(--accent); letter-spacing: 3px; margin: 8px 0 4px; }
.rv-score-count { font-size: 12.5px; color: var(--grey); }

.rv-dist { display: flex; flex-direction: column; gap: 7px; }
.rv-dist-row { display: flex; align-items: center; gap: 10px; }
.rv-dist-key { font-size: 12px; color: var(--grey); width: 26px; }
.rv-dist-bar { flex: 1; height: 6px; background: #e0d9cc; overflow: hidden; }
.rv-dist-bar i { display: block; height: 100%; background: var(--accent); transition: width 0.5s ease; }
.rv-dist-num { font-size: 12px; color: var(--grey); width: 22px; text-align: right; }

.rv-sort { display: flex; gap: 8px; margin: 22px 0 4px; }
.rv-sort-btn {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 8px 18px;
  border: 1px solid var(--line);
  color: var(--grey);
  transition: all 0.2s;
}
.rv-sort-btn:hover { border-color: var(--ink); color: var(--ink); }
.rv-sort--on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.rv-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.rv-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rv-item-stars { font-size: 13.5px; color: var(--accent); letter-spacing: 2px; }
.rv-item-author { font-size: 13px; font-weight: 700; }
.rv-item-date { font-size: 12px; color: #b3aca0; margin-left: auto; }
.rv-item-text { font-size: 14.5px; line-height: 1.75; color: #4a443c; }
.rv-item-photo { margin-top: 12px; width: 120px; height: 150px; object-fit: cover; background: var(--card); }

/* 구매 확인 뱃지 (T-003) */
.rv-item-verified {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  white-space: nowrap;
}

/* ── 리뷰 쓰기 버튼 / 작성 모달 (T-003) ───── */
.rv-write {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 9px 20px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 0.25s, color 0.25s;
}
.rv-write:hover { background: var(--ink); color: var(--bg); }

.rvf-dim {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(30, 26, 21, 0.42);
  backdrop-filter: blur(2px);
  animation: rvfDim 0.25s ease both;
}
@keyframes rvfDim { from { opacity: 0; } to { opacity: 1; } }

.rvf-modal {
  position: fixed;
  z-index: 221;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 36px));
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(43, 38, 32, 0.22);
  animation: rvfPop 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes rvfPop {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
body.rvf-open { overflow: hidden; }

.rvf-form { padding: 26px 28px 28px; }
.rvf-head { display: flex; align-items: center; gap: 12px; }
.rvf-title { font-size: 14px; font-weight: 800; letter-spacing: 0.2em; }
.rvf-close { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; color: var(--grey); }
.rvf-close svg { width: 17px; height: 17px; }
.rvf-close:hover { color: var(--ink); }
.rvf-close:disabled { opacity: 0.4; cursor: progress; }
.rv-origin-notice {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--card);
  color: var(--grey);
  font-size: 12.5px;
  line-height: 1.65;
}
.rv-item-origin {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid #8b6b3f;
  color: #6d4d25;
  background: #fbf3e6;
  font-size: 11px;
  font-weight: 700;
}
.rvf-subject {
  margin-top: 6px;
  font-size: 13px;
  color: var(--grey);
  line-height: 1.6;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.rvf-field { padding-top: 20px; }
.rvf-fieldset { border: 0; }
.rvf-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--grey);
  margin-bottom: 10px;
  padding: 0;
}
.rvf-req { color: var(--accent); }
.rvf-opt { font-weight: 400; letter-spacing: 0.04em; color: #b3aca0; }
.rvf-help { margin-top: 6px; font-size: 12px; color: #b3aca0; line-height: 1.6; }
.rvf-size { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.rvf-size summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.rvf-size-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.rvf-size-grid label { display: grid; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--grey); }
.rv-fit-summary { color: var(--accent); font-size: 13px; font-weight: 700; }
.rv-item-size { margin: 8px 0; color: var(--grey); font-size: 12px; }
.rv-item-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-item-actions { display: flex; gap: 10px; margin-top: 10px; }
.rv-item-actions button { font: inherit; font-size: 12px; color: var(--grey); background: none; border: 0; cursor: pointer; }
.rv-item-reply { margin: 12px 0 0 18px; padding: 10px 12px; border-left: 2px solid var(--accent); font-size: 12px; }
.rv-item-reply time { margin-left: 8px; color: var(--grey); }
.rvf-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 별점 radio 그룹 — 입력은 화면에서 숨기되 포커스는 살린다 */
.rvf-stars { display: inline-flex; align-items: center; gap: 2px; position: relative; }
.rvf-star-input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.rvf-star {
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  padding: 2px 3px;
  color: #ddd5c7;
  transition: color 0.15s, transform 0.15s;
}
.rvf-star:hover { transform: translateY(-1px); }
.rvf-stars[data-rating="1"] .rvf-star:nth-of-type(-n+1) .rvf-star-icon,
.rvf-stars[data-rating="2"] .rvf-star:nth-of-type(-n+2) .rvf-star-icon,
.rvf-stars[data-rating="3"] .rvf-star:nth-of-type(-n+3) .rvf-star-icon,
.rvf-stars[data-rating="4"] .rvf-star:nth-of-type(-n+4) .rvf-star-icon,
.rvf-stars[data-rating="5"] .rvf-star:nth-of-type(-n+5) .rvf-star-icon { color: var(--accent); }
.rvf-star-input:focus-visible + .rvf-star {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.rvf-out { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }

.rvf-input,
.rvf-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px 13px;
  transition: border-color 0.2s;
}
.rvf-textarea { resize: vertical; min-height: 104px; }
.rvf-input:focus,
.rvf-textarea:focus { outline: none; border-color: var(--ink); }
.rvf-input::placeholder,
.rvf-textarea::placeholder { color: #c3bbae; }

.rvf-file { font-size: 13px; color: var(--grey); max-width: 100%; }
.rvf-file::file-selector-button {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  margin-right: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.rvf-file::file-selector-button:hover { border-color: var(--ink); }
.rvf-photo-info { margin-top: 7px; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.rvf-photo-wrap { display: flex; align-items: flex-end; gap: 10px; }
.rvf-preview {
  margin-top: 10px;
  width: 96px; height: 120px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--card);
}
.rvf-photo-clear {
  font-size: 12px;
  color: var(--grey);
  text-decoration: underline;
  padding: 4px 0;
}
.rvf-photo-clear:hover { color: #b4553f; }

.rvf-error {
  margin-top: 18px;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  color: #b4553f;
  background: #f6ece7;
  border: 1px solid #e6cfc4;
}

.rvf-actions { display: flex; gap: 10px; margin-top: 24px; }
.rvf-actions .pd-btn { padding: 15px 20px; font-size: 13.5px; }

/* ── 이 상품이 담긴 룩 ─────────────────────── */
.look-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 20px; }
.look-card { display: block; }
.look-card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #fff;
}
.look-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.look-card:hover .look-card-media img { transform: scale(1.05); }
.look-card-flag {
  position: absolute;
  top: 0; left: 0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 6px 11px;
  background: var(--accent);
  color: #fff;
}
.look-card-info { padding: 11px 2px 0; }
.look-card-creator { font-size: 13.5px; font-weight: 700; margin-bottom: 3px; }
.look-card-tags { font-size: 12px; color: var(--grey); line-height: 1.5; }

/* ── 관련 상품 (main5230.css 의 .grid/.card 재사용) ── */
#relGrid .card-media .card-link { position: absolute; inset: 0; }
#relGrid .card-name a:hover { color: var(--accent); }

/* ── 오류 화면 ─────────────────────────────── */
.pd-error { padding: 90px 30px 120px; display: grid; place-items: center; }
/* 2026-09-25 — display 를 지정한 순간 [hidden] 이 무력해진다(작성자 규칙이 UA 의 [hidden]{display:none} 을 이긴다).
   그래서 오류 상자가 숨김인데도 빈 상자로 떠 상세 위쪽에 큰 빈칸이 생겼고, 사이즈 가이드 창이 X 로 닫히지 않았다. */
.pd-error[hidden], .sg-modal[hidden], .sg-dim[hidden] { display: none; }
.pd-error-box { text-align: center; max-width: 520px; }
.pd-error-code {
  font-size: 74px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #ddd5c7;
  line-height: 1;
  margin-bottom: 14px;
}
.pd-error-title { font-size: 21px; font-weight: 800; margin-bottom: 10px; }
.pd-error-desc { font-size: 14.5px; color: var(--grey); line-height: 1.75; margin-bottom: 28px; }
.pd-error-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── 카트 드로어 사이즈 태그 ───────────────── */
.cart-item-size {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 1px 6px;
  vertical-align: 1px;
}

/* ── 반응형 ───────────────────────────────── */
@media (max-width: 1100px) {
  .look-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .pd-top { grid-template-columns: 1fr; gap: 30px; padding-bottom: 50px; }
  .pd-gallery { position: static; }
}
@media (max-width: 820px) {
  .pd { padding: 0 18px 60px; }
  .pd-error { padding: 60px 18px 90px; }
  .rv-summary { grid-template-columns: 1fr; gap: 20px; padding: 22px; }
  .look-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-buy { flex-direction: column; }
  .pd-btn--wide { min-width: 0; width: 100%; }
  .rvf-modal { width: calc(100vw - 24px); max-height: calc(100vh - 32px); }
  .rvf-form { padding: 22px 20px 24px; }
  .rvf-star { font-size: 26px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   T-009 (r4) · 마뗑킴식 상세 레이아웃 — p1~p8 전용
   js/detail-enhance.js 가 #pd 에 .pd--stream 을 붙일 때만 활성화된다.
     좌: 이미지 6컷 연속 세로 컬럼(썸네일 없음)
     우: 구매 정보 + 그 아래 탭 3종(DELIVERY/DETAILS/SIZE GUIDE) — 컬럼 폭 전용 스타일
         데스크톱(≥901px)에서는 이 컬럼 전체가 position:sticky 로 따라다니고,
         컬럼이 뷰포트를 넘지 않도록 탭 패널만 max-height + 내부 스크롤을 갖는다.
     하단: 고정 구매바 — 모바일(≤820px) 전용 (데스크톱 CTA 는 sticky 컬럼이 담당)
   비확장 상품(p9~p90)에는 .pd--stream 이 붙지 않으므로 기존 레이아웃 그대로.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── ① 좌측: 썸네일·스테이지 폐지 → 세로 이미지 컬럼 ── */
.pd--stream .pd-gallery { position: static; top: auto; }
.pd--stream .pd-stage,
.pd--stream .pd-thumbs { display: none; }

.dt-col { display: flex; flex-direction: column; gap: 4px; }
.dt-cut {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--card);
}
/* 2026-10-05 상품 영상(유튜브 쇼츠) — 사진 칸과 같은 2:3 칸을 영상이 꽉 채운다.
   쇼츠 원본이 사진과 같은 2:3 이라 YouTube 9:16 플레이어 안에서 위아래 7.7%씩 검은 띠가 생긴다(영상 3개 실측).
   플레이어를 칸 폭 그대로, 높이 16/9 ÷ 3/2 = 118.519% 로 키우고 위로 9.259% 올리면 띠가 칸 밖으로 나가
   2:3 영상이 칸에 딱 맞는다(위쪽 제목줄도 대부분 칸 밖). 9:16 원본이면 위아래가 조금 잘린다(cover). */
.pd-video {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--card);
  overflow: hidden;
}
.pd-video iframe {
  position: absolute;
  left: 0;
  top: -9.259%;
  width: 100%;
  height: 118.519%;
  border: 0;
  /* 장식용 자동재생 — 마우스·터치를 받지 않아야 YouTube 의 버튼이 덮이지 않는다 */
  pointer-events: none;
}

/* ── ② 우측 컬럼: 구매 정보 아래 탭 (컬럼 폭에 맞춘 축소 스케일) ── */
.dt-tabs { margin-top: 34px; }
.dt-tablist {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.dt-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 13px 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--grey);
  background: transparent;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.22s, border-color 0.22s;
}
.dt-tab:hover { color: var(--ink); }
.dt-tab--on { color: var(--ink); border-bottom-color: var(--ink); }
.dt-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: -5px; }

.dt-panels { padding-top: 24px; }
.dt-panel { animation: pdFade 0.4s ease both; }
.dt-panel:focus { outline: none; }
.dt-panel-inner { display: flex; flex-direction: column; gap: 24px; }

.dt-lead { font-size: 14px; line-height: 1.9; color: #4a443c; }
.dt-foot { font-size: 12.5px; line-height: 1.8; color: var(--grey); }

.dt-dl { border-top: 1px solid var(--line); }
.dt-dl-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.dt-dl dt {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--grey);
  padding-top: 3px;
}
.dt-dl dd { font-size: 13.5px; line-height: 1.8; color: #4a443c; }
.dt-sub { display: block; margin-top: 6px; font-size: 12.5px; color: var(--grey); line-height: 1.7; }
.dt-dl--split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* 특성 4아이콘 — 좁은 컬럼이므로 2×2 */
.dt-traits {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.dt-trait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 18px 10px;
  background: var(--card);
}
.dt-trait-ico { display: grid; place-items: center; color: var(--accent); }
.dt-ico { width: 22px; height: 22px; }
.dt-trait-key { font-size: 10px; letter-spacing: 0.14em; color: var(--grey); }
.dt-trait-val { font-size: 13px; font-weight: 700; line-height: 1.5; }

.dt-h3 { font-size: 12px; font-weight: 800; letter-spacing: 0.16em; margin-bottom: 12px; }
.dt-care { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.dt-care li {
  position: relative;
  padding-left: 14px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #4a443c;
}
.dt-care li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 6px; height: 1px;
  background: var(--grey);
}

/* 치수표 — 컬럼 폭에 맞춰 축소, 넘치면 가로 스크롤 */
.dt-table-wrap { overflow-x: auto; }
.dt-table { width: 100%; min-width: 340px; border-collapse: collapse; }
.dt-caption {
  caption-side: bottom;
  text-align: left;
  padding-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--grey);
}
.dt-table th,
.dt-table td {
  padding: 10px 5px;
  font-size: 12.5px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.dt-table thead th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--grey);
  background: var(--card);
}
.dt-table tbody th { font-weight: 800; letter-spacing: 0.04em; }
.dt-note { font-size: 13px; line-height: 1.8; color: var(--grey); }

.dt-model { background: var(--card); padding: 20px; }
.dt-model-text { font-size: 13.5px; line-height: 1.85; color: #4a443c; }
.dt-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.dt-chips li {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--grey);
}

/* ── ③ 데스크톱(2컬럼): 우측 컬럼 전체 sticky ──
   sticky 성립 조건 점검
     · 부모 .pd-top 은 grid + align-items:start → 아이템이 늘어나지 않는다
       (혹시 모를 stretch 대비로 align-self 를 명시)
     · 조상(#pd, .pd-top)에 overflow:hidden/auto 없음 → sticky 무력화 요인 없음
     · top = 헤더 높이 66px + 여백 22px = 88px
   컬럼이 뷰포트를 넘지 않도록 "탭 패널만" 높이를 제한하고 내부 스크롤을 준다.
   → 구매 정보와 탭 버튼 3개는 스크롤과 무관하게 항상 보인다. */
@media (min-width: 901px) {
  .pd--stream .pd-info {
    position: sticky;
    top: 88px;
    align-self: start;
  }
  .pd--stream .dt-panel {
    /* 상한 38vh. 다만 구매부(약 560px) + 탭바·여백(약 140px)을 빼고도 뷰포트에
       들어오도록 calc 로 낮춰 잡고, 너무 납작해지지 않게 180px 하한을 둔다.
       → 컬럼 총높이 ≤ 뷰포트 이므로 sticky 가 잘리지 않고 온전히 동작한다. */
    max-height: clamp(180px, calc(100vh - 700px), 38vh);
    overflow-y: auto;
    padding-right: 8px;
  }

  /* 2026-10-03 — 왼쪽 사진 컬럼에 따로 스크롤(디스코드 요청). 스크롤이 화면 맨 오른쪽 하나뿐이라
     사진을 보려면 페이지 전체를 내려야 했다. 사진 컬럼을 화면 높이의 상자로 만들어 사진만 내려 보게 한다.
     · 우측 컬럼과 같은 top(88px)에 붙는다. 높이는 첫 화면에서 상자 아래 끝까지 보이도록
       헤더 · 경로(약 121px) + 아래 여백을 뺀 calc(100vh - 136px).
     · 사진 끝까지 내리면 다음 휠은 페이지로 넘어간다(overscroll 기본값) — 리뷰 · 관련 상품으로 이어진다.
     · 1열(≤900px)에는 없다 — 휴대폰은 지금처럼 사진이 페이지와 함께 흐른다.
     · 사진이 많으면(16장 · 약 17,000px) 손잡이가 아주 작아져 안 보인다 → 트랙을 깔고 손잡이 최소 길이를 준다.
       표준 scrollbar-color 를 주면 크롬이 ::-webkit-scrollbar 를 무시해 최소 길이를 못 주므로, 표준 속성은
       ::-webkit-scrollbar 를 모르는 브라우저(파이어폭스)에만 준다. */
  .pd--stream .pd-gallery {
    position: sticky;
    top: 88px;
    align-self: start;
    max-height: calc(100vh - 136px);
    overflow-y: auto;
    padding-right: 8px;
  }
  /* 2026-10-05 — 두께 · 색은 사이트 공통 스크롤바(main5230.css 끝, 4px)를 따른다. 사진이 많아도 손잡이가
     보이게 하던 장치(최소 길이 · 옅은 트랙)만 여기 남긴다. */
  .pd--stream .pd-gallery::-webkit-scrollbar-thumb { min-height: 64px; }
  .pd--stream .pd-gallery::-webkit-scrollbar-track { background: var(--line); border-radius: 999px; }
  @supports not selector(::-webkit-scrollbar) {
    .pd--stream .pd-gallery { scrollbar-color: rgba(43, 38, 32, 0.28) var(--line); }
  }
}

/* ── ④ 하단 고정 구매바 — 모바일(≤820px) 전용 ──
   기본 숨김. 데스크톱에는 display 를 켜는 규칙이 아예 없다(스티키 컬럼이 CTA 담당).
   모바일에서 JS(IntersectionObserver)가 .dt-buybar--on 으로 노출하고,
   IO 미지원 브라우저는 .dt-buybar--watch 가 없으므로 상시 노출로 폴백한다. */
.dt-buybar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(247, 244, 238, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  animation: pdFade 0.25s ease both;
}
.dt-buybar-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dt-buybar-name {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 34vw;
}
.dt-buybar-price { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.dt-buybar-btns { display: flex; gap: 8px; margin-left: auto; }
.dt-buybar .pd-btn {
  flex: none;
  padding: 13px 15px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* ── ⑤ 반응형 — 1열(≤900px)에서 이미지 → 구매 정보 → 탭 순서 유지 ── */
@media (max-width: 900px) {
  .pd--stream .pd-top { gap: 26px; }
  .dt-col { gap: 3px; }
  /* 1열에서는 sticky 도, 패널 높이 제한도 없다 — 탭 내용이 그대로 흐른다 */
  .pd--stream .pd-info { position: static; }
  .pd--stream .dt-panel { max-height: none; overflow-y: visible; padding-right: 0; }
}

@media (max-width: 820px) {
  .dt-buybar--on { display: flex; }                      /* IO 제어 (모바일 한정) */
  .dt-buybar:not(.dt-buybar--watch) { display: flex; }   /* IO 미지원 폴백 */
  .pd.pd--stream { padding-bottom: 108px; }              /* 구매바 가림 방지 */

  .dt-tabs { margin-top: 28px; }
  .dt-tab { font-size: 10px; padding: 13px 3px; }
  .dt-panels { padding-top: 22px; }
  .dt-panel-inner { gap: 22px; }
  .dt-dl-row { grid-template-columns: 78px minmax(0, 1fr); gap: 10px; }
  .dt-dl--split { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   S3-04 — 옵션·품절 UX / 재입고 알림 / 사이즈 가이드 모달 / 최근 본 상품
   기존 규칙은 건드리지 않고 새 클래스만 추가한다 (전 상품 공통 · 확장 상품 무관).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 품절 사이즈 (데모 · 상품 id 해시 결정) ── */
.size-btn--out {
  color: #bdb6aa;
  border-style: dashed;
  background:
    linear-gradient(to top left, transparent calc(50% - 0.5px), #d8d1c5 50%, transparent calc(50% + 0.5px));
}
.size-btn--out:hover { border-color: var(--grey); color: var(--grey); }
.size-btn--out.size-btn--on {
  background: #ded7cb;
  border-color: var(--grey);
  border-style: solid;
  color: #6f685d;
}

/* ── 사이즈 가이드 링크 줄 ── */
.sg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.sg-link {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sg-link:hover { color: var(--accent); }
.sg-out { font-size: 12px; color: #b3aca0; letter-spacing: 0.02em; }

/* ── 재입고 알림 ── */
.rs-box {
  margin-top: 14px;
  padding: 16px 16px 18px;
  border: 1px solid var(--line);
  background: var(--card);
}
.rs-msg { font-size: 13px; color: var(--grey); line-height: 1.6; margin-bottom: 12px; }
.rs-msg b { color: var(--ink); font-weight: 700; }
.rs-btn {
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 13px 0;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background 0.2s, color 0.2s;
}
.rs-btn:hover { background: var(--ink); color: var(--bg); }
.rs-done { font-size: 13px; line-height: 1.6; color: var(--ink); font-weight: 600; }

/* ── 사이즈 가이드 모달 ── */
.sg-dim {
  position: fixed; inset: 0;
  background: rgba(43,38,32,0.45);
  z-index: 500;
}
.sg-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 92vw);
  max-height: min(80vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(43,38,32,0.28);
  z-index: 501;
}
.sg-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.sg-modal-title { font-size: 14px; font-weight: 800; letter-spacing: 0.18em; }
.sg-close { width: 30px; height: 30px; display: grid; place-items: center; }
.sg-close svg { width: 18px; height: 18px; }
.sg-modal-body { padding: 20px; overflow-y: auto; }
.sg-subject { font-size: 13.5px; font-weight: 600; margin-bottom: 14px; line-height: 1.5; }
.sg-table-wrap { overflow-x: auto; }
.sg-table { width: 100%; min-width: 340px; border-collapse: collapse; font-size: 12.5px; }
.sg-caption {
  caption-side: bottom;
  text-align: left;
  font-size: 11.5px;
  color: var(--grey);
  padding-top: 10px;
  line-height: 1.6;
}
.sg-table th, .sg-table td {
  border: 1px solid var(--line);
  padding: 9px 8px;
  text-align: center;
  white-space: nowrap;
}
.sg-table thead th { background: var(--card); font-weight: 700; letter-spacing: 0.06em; }
.sg-table tbody th { background: #fbf9f5; font-weight: 700; }
.sg-note { font-size: 12.5px; color: var(--grey); line-height: 1.7; margin-top: 14px; }
.sg-model { font-size: 12.5px; line-height: 1.7; margin-top: 14px; }
.sg-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sg-chips li {
  font-size: 11.5px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--grey);
}
.sg-source { font-size: 11.5px; color: #b3aca0; margin-top: 16px; line-height: 1.6; }
body.sg-open { overflow: hidden; }

/* ── 상세 하단 최근 본 상품 (스트립 카드 스타일은 main5230.css 공용) ── */
.pd-sec--recent { padding-top: 56px; }

@media (max-width: 820px) {
  .sg-modal { width: 94vw; max-height: 86vh; }
  .sg-modal-body { padding: 16px; }
  .rs-box { padding: 14px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   S6-02 — 사이즈 재고 상태 (실데이터). 품절(.size-btn--out)은 S3-04 규칙을 그대로 쓰고
   여기서는 **품절 임박**(0 < 잔여 <= 안전재고)만 더한다.
   ═══════════════════════════════════════════════════════════════════════════ */
.size-btn--low { border-color: var(--accent); }
.size-btn--low .sz-low {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: 4px;
  padding: 1px 4px;
  border-radius: 2px;
  background: var(--accent);
  color: var(--bg);
  vertical-align: middle;
}
.rs-low {
  font-size: 13px;
  line-height: 1.6;
  color: var(--accent);
  font-weight: 600;
}
.rs-low b { font-weight: 700; }
