/* REWORK — 상품 상세 */

/* ---------- 상단 ---------- */
.pdp-grid { display: grid; }
@media (min-width: 960px) {
  .pdp-grid { grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr); }
}

/* 이미지 */
.gallery { min-width: 0; }
.stage { position: relative; aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
@media (min-width: 960px) { .stage { aspect-ratio: auto; height: calc(100svh - var(--header-h) - 31px); min-height: 560px; } }
.stage-img { width: 100%; height: 100%; object-fit: cover; }
.stage-3d, .stage-drawing { position: absolute; inset: 0; }
.stage-3d { touch-action: none; cursor: grab; }
.stage-3d canvas { display: block; width: 100% !important; height: 100% !important; }
.stage-hint { position: absolute; left: 16px; top: 14px; font-size: 12px; color: var(--muted); pointer-events: none; z-index: 1; }
.stage-drawing { display: grid; place-items: center; padding: 10%; }
.stage-drawing svg { width: 100%; height: auto; max-height: 100%; }
.stage-note { position: absolute; right: 12px; bottom: 10px; font-size: 11px; color: rgba(255,255,255,.85); pointer-events: none; }
.stage-note.is-dark { color: var(--muted); }

.thumbs { display: flex; gap: 6px; padding: 8px var(--gutter) 0; overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .thumbs { padding: 8px 0 0 var(--gutter); } }
.thumb { flex: none; width: 72px; height: 72px; background: var(--surface); position: relative; overflow: hidden; outline: 1px solid transparent; outline-offset: -1px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 80%; height: 80%; margin: 10%; }
.thumb span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.thumb[aria-selected="true"] { outline: 2px solid var(--ink); }

/* 구매 정보 */
.buy-inner { padding: 28px var(--gutter) 48px; display: grid; gap: 0; }
@media (min-width: 960px) {
  .buy { border-left: 1px solid var(--line); }
  .buy-inner { position: sticky; top: calc(var(--header-h) + 31px); padding: 40px clamp(32px, 4vw, 64px) 56px; }
}
.buy .breadcrumb { margin-bottom: 20px; }
.buy .tag { justify-self: start; }
.buy-title { font-size: clamp(28px, 3vw, 40px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.2; margin-top: 10px; }
.buy-en { font-size: 13px; color: var(--muted); margin-top: 2px; }
.buy-desc { margin-top: 18px; color: var(--ink-2); }
.buy-spec { margin-top: 24px; border-top: 1px solid var(--ink); }
.buy-spec div { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.buy-spec dt { color: var(--muted); }
.buy-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.buy-row-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 12px; }
.buy-row-head span { color: var(--muted); }
.buy-row-head b { font-weight: 500; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); position: relative; }
.swatch-btn[aria-checked="true"]::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid var(--ink); }
.qty { display: inline-grid; grid-template-columns: 40px 56px 40px; height: 40px; border: 1px solid var(--line); }
.qty button { font-size: 18px; }
.qty button:hover { background: var(--surface); }
.qty input { border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: inherit; font-weight: 500; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 24px; }
.buy-actions .btn { height: 54px; font-size: 15px; }
.buy-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.buy-info { margin-top: 24px; font-size: 13px; display: grid; gap: 8px; }
.buy-info li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; color: var(--ink-2); }
.buy-info span { color: var(--muted); }

/* ---------- 상세 탭 ---------- */
.detail-tabs { position: sticky; top: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: top .35s var(--ease); }
.detail-tabs .container { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; height: 48px; align-items: center; }
.detail-tabs .container::-webkit-scrollbar { display: none; }
.detail-tabs a { flex: none; font-size: 14px; color: var(--muted); }
.detail-tabs a:hover, .detail-tabs a.is-active { color: var(--ink); font-weight: 500; }
body:has(.site-top:not(.is-hidden)) .detail-tabs { top: var(--top-h, 0px); }

/* ---------- 상세 섹션 ---------- */
.d-sec { padding: 64px 0; scroll-margin-top: 120px; }
@media (min-width: 768px) { .d-sec { padding: 104px 0; } }
.d-gray { background: var(--surface); }
.d-dark { background: #000; color: #fff; }
.d-dark .d-text { color: #bdbdbd; }
.d-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .d-grid { grid-template-columns: 5fr 7fr; gap: 72px; } }
.d-head { display: grid; gap: 12px; align-content: start; }
.d-text { color: var(--ink-2); max-width: 34em; }
.d-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.d-figure figcaption { margin-top: 8px; }
.drawing { background: var(--surface); padding: 6% 6% 4%; }
.drawing svg { width: 100%; height: auto; }
.steps { list-style: none; display: grid; gap: 10px; margin-top: 16px; font-size: 14px; }
.steps li { display: flex; gap: 12px; align-items: center; }
.steps b { display: grid; place-items: center; width: 26px; height: 26px; background: var(--accent); color: #fff; font-size: 12px; }
.d-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.d-numbers div { background: var(--surface); padding: 24px 16px; }
.d-numbers dt { font-size: 12px; color: var(--muted); }
.d-numbers dd { font-size: clamp(40px, 6vw, 80px); font-weight: 700; letter-spacing: -0.05em; line-height: 1.1; margin-top: 8px; }
.d-numbers small { font-size: .32em; font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.mag-numbers { margin-top: 20px; }
.mag-numbers div { background: #fff; }
.mag-numbers dd { font-size: clamp(32px, 4vw, 56px); }
#mag-drawing { background: #fff; }
.color-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.color-list li { display: grid; gap: 8px; font-size: 13px; }
.color-list i { display: block; aspect-ratio: 1 / 2.2; border: 1px solid rgba(0,0,0,.08); position: relative; }
.color-list i::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 9px; background: repeating-linear-gradient(to right, #c9b08a 0 1px, #e8d8bb 1px 2px); }
.box-list { border-top: 1px solid var(--ink); }
.box-list div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid #dcdcdc; }
.box-list dt { font-weight: 500; }
.use-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.use-list li { background: #fff; padding: 24px 20px; }
.use-list p { color: var(--ink-2); margin-top: 6px; font-size: 14px; }
@media (min-width: 768px) { .use-list { grid-template-columns: repeat(3, 1fr); } }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; border-top: 1px solid var(--ink); }
.spec-table th, .spec-table td { text-align: left; padding: 14px 0; border-bottom: 1px solid #dcdcdc; vertical-align: top; }
.spec-table th { width: 120px; font-weight: 500; }
.spec-table td { color: var(--ink-2); }

.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.link-more { font-size: 14px; white-space: nowrap; }
.link-more:hover { color: var(--accent); }
.more-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.more-list a { display: block; }
.more-fig { aspect-ratio: 1 / 1; background: var(--surface); display: flex; align-items: flex-end; justify-content: center; padding: 14% 12% 12%; transition: background .3s; }
.more-list a:hover .more-fig { background: #ebebeb; }
.more-fig svg { max-width: 100%; max-height: 100%; }
.more-list p { font-size: 15px; margin-top: 10px; }
.more-list span { font-size: 13px; color: var(--muted); }

/* ---------- 모바일 하단 구매 바 ---------- */
.buy-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line);
  transform: translateY(100%); transition: transform .3s var(--ease);
}
.buy-bar.is-shown { transform: none; }
.buy-bar b { display: block; font-size: 14px; font-weight: 600; }
.buy-bar span { font-size: 12px; color: var(--muted); }
.buy-bar .btn { height: 44px; padding: 0 28px; }
@media (min-width: 960px) { .buy-bar { display: none; } }
@media (max-width: 959px) { body { padding-bottom: 72px; } }
