/* 상품 상세 + 문구 넣기(product.js). 접두어 pd-.
   PC = 사진(왼쪽) · 이름 · 값 · 사이즈 · 단추(오른쪽) → 문구 넣기(왼쪽 고르기 · 칸 / 오른쪽 따라오는 미리 보기 · 주문).
   폰 = 사진 → 정보 → 상황 → 예문 → 미리 보기 → 칸 → 주문, 아래에 값 · 주문하기 고정 줄(시안 띠 위). */
.pd { padding: 36px 0 56px; }
.pd-g { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.pd-main { position: relative; aspect-ratio: 1; overflow: hidden; background: #46607F; border-radius: 2px; max-height: calc(100vh - var(--hd-h, 120px) - 140px); max-height: calc(100svh - var(--hd-h, 120px) - 140px); margin: 0 auto; }
.pd-main-im { width: 100%; height: 100%; object-fit: cover; }
.pd-main-none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 10% 26% 8%; background: linear-gradient(180deg, #5C7698 0%, #3D5577 70%, #2E4161 100%); }
.pd-main-none .plq { width: 100%; }
.pd-main-none small { color: rgba(255, 255, 255, .8); font-size: 13px; }
.pd-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.pd-tb { padding: 0; aspect-ratio: 1; overflow: hidden; border: 2px solid transparent; background: #E9EDF3; border-radius: 2px; }
.pd-tb img { width: 100%; height: 100%; object-fit: cover; }
.pd-tb.is-on, .pd-tb[aria-checked="true"] { border-color: var(--navy); }
.pd-tb-n { margin-top: 8px; color: var(--ink3); font-size: 12.5px; }
.pd-info { position: sticky; top: calc(var(--hd-h, 120px) + 24px); display: flex; flex-direction: column; gap: 14px; }
.pd-kind { color: var(--gold-d); font-size: 14px; font-weight: 700; }
.pd-h1 { font-size: 36px; line-height: 1.25; font-weight: 800; color: var(--navy); }
.pd-pr .pr-off { font-size: 18px; }
.pd-pr .pr-now { font-size: 30px; }
.pd-pr .pr-list { font-size: 15px; }
.pd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--ink2); font-size: 14px; }
.pd-meta i { width: 1px; height: 12px; background: var(--line-2); }
.pd-size { padding-top: 14px; border-top: 1px solid var(--line); }
.pd-k0 { margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.pd-k0 small { margin-left: 6px; color: var(--ink3); font-weight: 500; }
.pd-sz { gap: 6px; border-radius: var(--r); min-height: 44px; }
.pd-sz b { font-weight: 800; }
.pd-sz small { margin-left: 0; }
.pd-acts { display: flex; gap: 8px; padding-top: 4px; }
.pd-go { flex: 1 1 auto; min-height: 56px; font-size: 17px; }
.pd-info .ship { align-self: flex-start; }
.pd-pts { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink2); font-size: 14px; }
.pd-pts li { padding-left: 14px; position: relative; }
.pd-pts li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; background: var(--gold); }
.pd-pts b { color: var(--ink); }

/* 문구 넣기 */
.pd-cp { padding: 64px 0 72px; background: var(--wash); scroll-margin-top: calc(var(--hd-h, 120px) + 8px); }
.pd-cp-g { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.pd-cp-l { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.pd-cp-r { position: sticky; top: calc(var(--hd-h, 120px) + 20px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pd-k { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: 17px; font-weight: 800; color: var(--navy); }
.pd-k i { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--gold-l); font: 800 13px/1 var(--f); font-style: normal; }
.pd-k small { color: var(--ink2); font-size: 13.5px; font-weight: 500; }
.pd-sg { display: flex; gap: 0; margin-bottom: 12px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.pd-sg::-webkit-scrollbar { display: none; }
.pd-sg-b { flex: none; height: 42px; padding: 0 14px; border: 0; background: none; color: var(--ink2); font-size: 15px; font-weight: 700; position: relative; }
.pd-sg-b[aria-selected="true"] { color: var(--navy); }
.pd-sg-b[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--gold); }
.pd-sits .chip:not([aria-pressed="true"]) { background: #fff; }
.pd-exs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pd-ex { display: grid; width: 100%; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--line-2); background: #fff; text-align: left; border-radius: 2px; }
.pd-ex:hover { border-color: var(--line-2); border-left-color: var(--navy); }
.pd-ex[aria-pressed="true"] { border-color: var(--navy); border-left-color: var(--gold); box-shadow: 0 0 0 1px var(--navy) inset; }
.pd-ex b { font-size: 15px; font-weight: 800; color: var(--navy); }
.pd-ex em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--ink); }
.pd-ex span { color: var(--ink2); font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pd-ex small { color: var(--ink3); font-size: 12.5px; }
.pd-ex-n, .pd-ex-none { margin-top: 8px; color: var(--ink2); font-size: 13px; }
.pd-fs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; }
.pd-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pd-f-body, .pd-f-title { grid-column: 1 / -1; }
.pd-f label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; }
.pd-f label b { font-weight: 700; }
.pd-f label small { color: var(--ink3); font-size: 12.5px; }
.pd-in { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; font-size: 16px; line-height: 1.5; resize: vertical; }
textarea.pd-in[data-f="to"] { resize: none; overflow: hidden; }
.pd-in:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(27, 36, 54, .12); }
.pd-pv { padding: 28px 12% 22px; background: linear-gradient(180deg, #DDE4EE 0%, #CBD5E2 100%); border-radius: 2px; }
.pd-pv .plq { max-width: 380px; margin: 0 auto; }
.pd-pv .plq[data-shape="name"] { max-width: none; }
.pd-pv .plq-in { max-height: 52vh; }
.pd-pv-n { color: var(--ink2); font-size: 13.5px; line-height: 1.5; padding-left: 12px; border-left: 2px solid var(--gold); }
.pd-rest { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); }
.pd-logo { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pd-logo-b { cursor: pointer; }
.pd-logo-b input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pd-logo-b:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.pd-logo-n { color: var(--ink2); font-size: 13px; }
.pd-logo-n.is-warn { color: var(--red); }
.pd-chk { padding-top: 12px; border-top: 1px solid var(--line); }
.pd-chk-h { margin-bottom: 6px; font-size: 13.5px; font-weight: 700; }
.pd-chk li { position: relative; padding-left: 12px; color: var(--ink2); font-size: 13px; line-height: 1.55; }
.pd-chk li::before { content: "·"; position: absolute; left: 2px; color: var(--gold-d); font-weight: 800; }
.pd-sum { padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.pd-order { width: 100%; min-height: 56px; font-size: 17px; }
.pd-err { color: var(--red); font-size: 14px; font-weight: 600; }
.pd-err:empty { display: none; }
.pd-no-pay { color: var(--ink3); font-size: 12.5px; }

/* 안내 */
.pd-gl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.pd-gl div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.pd-gl dt { color: var(--navy); font-size: 14px; font-weight: 800; }
.pd-gl dd { color: var(--ink2); font-size: 14px; }

/* 폰 아래 고정 줄 */
.pd-buy { display: none; }
@media (max-width: 959px) {
  .pd { padding: 0 0 32px; }
  .pd-g { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 0; }
  .pd-media { margin: 0; }
  .pd-main { max-height: none; border-radius: 0; }
  .pd-thumbs { padding: 0 var(--mx); grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .pd-tb-n { padding: 0 var(--mx); }
  .pd-info { position: static; padding: 0 var(--mx); gap: 12px; }
  .pd-h1 { font-size: 25px; }
  .pd-pr .pr-now { font-size: 25px; }
  .pd-pr .pr-off { font-size: 16px; }
  .pd-sz { min-height: 42px; padding: 0 12px; font-size: 13.5px; }
  .pd-go { min-height: 52px; font-size: 16px; }
  .pd-cp { padding: 40px 0 48px; }
  .pd-cp-g { display: flex; flex-direction: column; align-items: stretch; gap: 22px; }
  .pd-cp-g [data-sit-box], .pd-cp-g [data-ex-box], .pd-cp-g .pd-st, .pd-pv, .pd-rest { min-width: 0; }
  .pd-cp-l, .pd-cp-r { display: contents; }
  .pd-cp-l [data-sit-box] { order: 1; } .pd-cp-l [data-ex-box] { order: 2; } .pd-pv { order: 3; } .pd-pv-n { order: 4; margin-top: -12px; } .pd-cp-l [data-block="fields"] { order: 5; } .pd-rest { order: 6; }
  .pd-pv { padding: 22px 14% 18px; margin: 0 calc(var(--mx) * -1); }
  .pd-pv .plq-in { max-height: none; }
  .pd-sg { margin: 0 calc(var(--mx) * -1) 12px; padding: 0 calc(var(--mx) - 10px); }
  .pd-sits { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--mx) * -1); padding: 0 var(--mx) 4px; scrollbar-width: none; }
  .pd-sits::-webkit-scrollbar { display: none; }
  .pd-fs { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pd-rest { padding: 16px; }
  .pd-gl { grid-template-columns: minmax(0, 1fr); }
  .pd-gl div { grid-template-columns: 84px minmax(0, 1fr); }
  .pd-buy { position: fixed; left: 0; right: 0; bottom: var(--tour-bar, 0px); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px var(--mx); background: #fff; border-top: 1px solid var(--line-2); box-shadow: 0 -6px 18px rgba(27, 36, 54, .08); }
  .pd-buy-p { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 1.35; }
  .pd-buy-p span { display: block; color: var(--ink2); }
  .pd-buy-p b.num { display: block; font-size: 17px; }
  .pd-buy .btn { flex: none; min-height: 48px; padding: 0 26px; }
  html.pd-on.pd-on body { padding-bottom: calc(var(--tour-bar, 0px) + 70px); }
}
@media (min-width: 600px) and (max-width: 959px) { .pd-media { width: min(100%, 560px, 64vh); margin: 0 auto; padding-top: 16px; } .pd-thumbs, .pd-tb-n { padding: 0; } }
