@charset "utf-8";


.pd-page { padding-top: 0; }
@media (max-width: 960px) {
  main:has(> .pd-page) { margin-top: var(--gutter); }
}

.pd-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 44px; }
.pd-hero > * { min-width: 0; }
@media (max-width: 860px) { .pd-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

.pd-main-image { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg-soft); }
.pd-main-image img { width: 100%; height: 100%; object-fit: cover; }

.pd-title { font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; line-height: 1.35; }

.pd-price { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pd-rate { font-size: clamp(22px, 2.2vw, 26px); font-weight: 800; color: var(--danger); }
.pd-final { font-size: clamp(26px, 2.6vw, 30px); font-weight: 800; }
.pd-base { font-size: 16px; color: var(--text-5); text-decoration: line-through; }

.pd-meta {
  margin: 22px 0 0; padding-top: 22px; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 88px 1fr; row-gap: 16px; column-gap: 28px; font-size: 13px;
}
.pd-meta dt { color: var(--text-4); }
.pd-meta dd { margin: 0; color: var(--text-2); font-weight: 600; }


.pd-option-box { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border); }
.pd-option-box--compact { margin-top: 0; padding-top: 0; border-top: none; }
.pd-option-box--base { padding-top: 16px; }
.pd-option-box--base .pd-picked:first-child { margin-top: 0; }
.pd-option-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }

.pd-picked { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.pd-picked-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; background: #f7f7f7; border-radius: 8px; font-size: 13px;
}
.pd-picked-item strong { font-weight: 700; white-space: nowrap; }
.pd-picked-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-picked-del { border: none; background: none; color: var(--text-4); font-size: 15px; cursor: pointer; padding: 0 2px; }

.pd-bundle {
  display: flex; align-items: center; gap: 7px;
  margin-top: 12px; padding: 10px 12px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12.5px; font-weight: 600; line-height: 1.5;
}
.pd-bundle[hidden] { display: none; }
.pd-bundle svg { flex-shrink: 0; }
.pd-bundle.is-applied { background: #fdeced; color: var(--danger); }

.pd-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px;
}
.pd-total strong { font-size: 18px; font-weight: 800; }
.pd-total strong.is-discounted { color: var(--danger); }
.pd-total-price { display: flex; align-items: baseline; gap: 8px; }
.pd-total-before { color: var(--text-5); text-decoration: line-through; font-size: 13px; }
.pd-total-before[hidden] { display: none; }

.pd-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.pd-actions .btn { height: 46px; border-radius: var(--radius-sm); }
.pd-option-box:not(.pd-option-box--compact) .pd-actions .btn { height: 50px; }
.pd-option-box:not(.pd-option-box--compact) .pd-actions-sub { grid-template-columns: 50px 1fr 1fr; }
@media (min-width: 861px) {
  .pd-option-box:not(.pd-option-box--compact) .pd-actions .btn { height: 54px; font-size: 16px; }
  .pd-option-box:not(.pd-option-box--compact) .pd-actions-sub .btn { font-size: 15px; }
  .pd-option-box:not(.pd-option-box--compact) .pd-actions-sub { grid-template-columns: 54px 1fr 1fr; }
}
.pd-actions-sub { display: grid; grid-template-columns: 46px 1fr 1fr; gap: 10px; }
.pd-actions-sub--no-share { grid-template-columns: 1fr 1fr; }
.pd-actions--split { flex-direction: row; }
.pd-actions--split .btn { flex: 1 1 0; min-width: 0; height: 50px; padding: 0 6px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.pd-actions-sub .btn { padding: 0 6px; white-space: nowrap; }
.pd-kakao { background: var(--kakao); color: #191919; border-color: var(--kakao); }
.pd-kakao:hover { color: #191919; }
.pd-kakao-full { margin-right: 4px; }
@media (max-width: 860px) { .pd-kakao-full { display: none; } }
.pd-share { padding: 0; color: var(--text-2); }


.pp {
  --pp-accent: #003377;
  container: preview-player / inline-size;
  background: #fafafa; border: 1px solid #e8e8e8; border-radius: 12px;
  padding: 24px; color: #333;
}
.pp-body { display: flex; align-items: center; gap: 22px; }
.pp-play {
  width: 46px; height: 46px; flex: 0 0 46px; border: none; border-radius: 50%;
  background: var(--pp-accent); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.15s;
}
@media (hover: hover) and (pointer: fine) {
  .pp-play:hover { background: #00285e; }
}
.pp-play:active { transform: scale(0.95); }
/* Center the triangle's visual mass within its 24-unit viewBox. */
.pp-icon-play { transform: translateX(0.25px); }
.pp-play, .pp-key-btn, .pp-option { touch-action: manipulation; }
.pp-progress { flex: 1; min-width: 120px; }
.pp-track {
  position: relative; height: 28px; cursor: pointer; touch-action: none; user-select: none;
}
.pp-track-bg {
  position: absolute; left: 0; right: 0; top: 12px; height: 4px;
  border-radius: 4px; overflow: hidden; background: #dedede;
}
.pp-ranges { position: absolute; inset: 0; }
.pp-range { position: absolute; top: 0; bottom: 0; background: var(--pp-accent); opacity: 0.4; }
.pp-fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--pp-accent); width: 0; }
.pp-head-dot {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px;
  transform: translate(-50%, -50%); border-radius: 50%; background: var(--pp-accent);
  cursor: grab;
  transition: width 0.15s, height 0.15s;
}
@media (hover: hover) and (pointer: fine) {
  .pp-track:hover .pp-head-dot { width: 16px; height: 16px; }
}
.pp-head-dot.is-dragging { width: 16px; height: 16px; }
.pp-head-dot.is-dragging { cursor: grabbing; }
.pp-time {
  display: flex; justify-content: space-between; margin-top: 1px;
  font-size: 11px; line-height: 1.4; color: #777; font-variant-numeric: tabular-nums;
}
.pp-key {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  padding: 3px; border-radius: 8px; background: #eee;
}
.pp-key-btn {
  width: 36px; height: 36px; border: none; border-radius: 6px;
  background: transparent; color: #555; font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
@media (hover: hover) and (pointer: fine) {
  .pp-key-btn:hover:not(:disabled) { background: #fff; color: var(--pp-accent); }
}
.pp-key-btn:active:not(:disabled) { background: #fff; color: var(--pp-accent); }
.pp-key-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pp-key-label { min-width: 46px; text-align: center; font-size: 13px; font-weight: 600; color: var(--pp-accent); }
.pp-options {
  display: flex; gap: 4px; min-width: 0; max-width: 45%; overflow-x: auto;
  padding: 4px; border-radius: 8px; background: #eee;
}
.pp-option {
  flex: 0 0 auto; padding: 9px 12px; border: none; border-radius: 6px;
  background: transparent; font-size: 12px; color: #666; white-space: nowrap; cursor: pointer;
}
.pp-option:hover:not(:disabled) { color: var(--pp-accent); }
.pp-option.is-active { background: #fff; color: var(--pp-accent); font-weight: 600; box-shadow: 0 0 0 1px rgba(0, 51, 119, 0.18); }
.pp-option:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.pp-play:focus-visible, .pp-track:focus-visible, .pp-key-btn:focus-visible, .pp-option:focus-visible {
  outline: 2px solid var(--pp-accent); outline-offset: 4px;
}
@container preview-player (max-width: 560px) {
  .pp-body { flex-wrap: wrap; gap: 18px 14px; }
  .pp-progress { order: -1; flex: 0 0 100%; min-width: 0; }
  .pp-key, .pp-options { margin-left: auto; }
  .pp-options { max-width: calc(100% - 60px); }
}
@media (max-width: 640px) {
  .pp { padding: 18px 20px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-play, .pp-head-dot { transition: none; }
}
.pp-notice { margin-top: 14px; font-size: 12px; color: var(--danger); }


.pd-tabs {
  margin-top: clamp(40px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: calc(var(--header-h, 0px) - 1px);
  padding-top: 17px; background: #fff; z-index: 40;
}
.pd-tabs.is-stuck::before {
  content: ''; position: absolute; left: 0; right: 0; top: -50px; height: 50px;
  background: #fff;
}
.pd-tabs-scroll {
  display: flex; flex-wrap: nowrap; gap: clamp(16px, 5vw, 32px);
  overflow-x: auto; overscroll-behavior-x: contain; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
}
.pd-tabs-scroll::-webkit-scrollbar { display: none; }
.pd-tabs a {
  position: relative; flex: 0 0 auto;
  padding-bottom: 16px; font-size: 14px; font-weight: 600; color: var(--text-4);
}
.pd-tabs a.is-active { color: var(--text); font-weight: 700; }
.pd-tabs a.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: #111;
}

.pd-section { padding-top: clamp(64px, 7vw, 88px); }
.pd-section .section-title { margin-bottom: 26px; }

/* 자주묻는질문 아코디언은 게시판과 같은 .faq-* 를 쓰되, 상품 상세에서는 다른 섹션처럼
   제목 아래 굵은 가로선을 두지 않고, 리뷰처럼 좌우 여백 없이 왼쪽에 붙여 굵기도 주지 않는다 */
#faq .faq-list { border-top: none; }
#faq .faq-item summary { padding-inline: 0; font-weight: 400; }
#faq .faq-body { padding-inline: 0; }

/* 관련상품/추천상품 가로 슬라이드.
   카드 너비를 "몇 개 + 반 개"가 들어가는 비율로 잡아, 마지막 카드가 늘 오른쪽 끝에
   반쯤 걸쳐 보이게 한다. 더 넘길 게 있다는 걸 잘림 자체로 알려주기 위한 것이다.
   (--pd-related-gap/--pd-related-per 를 바꾸면 노출 개수가 바뀐다) */
.pd-related {
  --pd-related-gap: 18px;
  --pd-related-per: 5.5;
  --pd-related-gaps: 5;
  display: flex; overflow-x: auto; gap: var(--pd-related-gap);
  scroll-snap-type: x mandatory; padding-bottom: 4px;
  cursor: grab; user-select: none;
}
.pd-related.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.pd-related-item {
  /* --pd-related-gaps 는 온전히 보이는 카드 사이의 간격 수 = ceil(per) - 1 */
  flex: 0 0 calc((100% - var(--pd-related-gaps) * var(--pd-related-gap)) / var(--pd-related-per));
  scroll-snap-align: start; display: flex; flex-direction: column;
}
.pd-related-item .product-name { margin-top: 10px; }
.pd-related-item:hover .product-thumb img { transform: scale(1.03); }
@media (max-width: 1080px) { .pd-related { --pd-related-per: 4.5; --pd-related-gaps: 4; } }
@media (max-width: 860px)  { .pd-related { --pd-related-per: 2.2; --pd-related-gaps: 2; --pd-related-gap: 14px; } }

.pd-description { margin-top: 20px; line-height: 1.8; font-size: 14px; color: var(--text-2); }
.pd-description img { max-width: 100%; height: auto; margin: 8px 0; display: block; }


.pd-detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.pd-detail-grid > * { min-width: 0; }
@media (max-width: 1080px) {
  .pd-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .pd-order-panel { display: none; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .pd-detail-grid { max-width: 791px; margin-left: auto; margin-right: auto; }
  .pd-tabs {
    margin-left: calc(395.5px - 46vw); margin-right: calc(395.5px - 46vw);
    padding-left: calc(46vw - 395.5px); padding-right: calc(46vw - 395.5px);
  }
}

.pd-order-panel {
  position: sticky; top: calc(var(--header-h, 0px) + 16px);
  margin-top: clamp(40px, 5vw, 56px);
  border: 1px solid var(--border); border-radius: 14px; padding: 24px;
}


.pd-rating {
  display: flex; gap: 48px; flex-wrap: wrap; padding: 28px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.pd-rating-score { text-align: center; flex-shrink: 0; }
.pd-rating-num { font-size: 40px; font-weight: 800; }
.pd-stars { font-size: 15px; letter-spacing: 1px; }
.star-rating { position: relative; display: inline-block; white-space: nowrap; }
.star-rating__bg { color: var(--text-5); }
.star-rating__fill {
  position: absolute; top: 0; left: 0; overflow: hidden;
  white-space: nowrap; color: var(--warning);
}
.pd-rating-bars { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.pd-bar { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-4); }
.pd-bar > span { width: 32px; flex-shrink: 0; }
.pd-bar-track { flex: 1; height: 6px; border-radius: 3px; background: #f0f0f0; overflow: hidden; }
.pd-bar-fill { height: 100%; background: var(--warning); }
@media (max-width: 860px) {
  .pd-rating { gap: 22px; flex-wrap: nowrap; align-items: center; padding: 22px 0; }
  .pd-rating-score { min-width: 0; }
  .pd-rating-num { font-size: 34px; }
  .pd-rating-bars { min-width: 0; gap: 6px; }
  .pd-bar { gap: 8px; font-size: 11px; }
  .pd-bar > span { width: 26px; }
  .pd-bar-track { height: 5px; }
}

.pd-review { display: flex; flex-direction: column; gap: 8px; padding: 22px 0; border-bottom: 1px solid var(--border-2); }
.pd-review-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.pd-review-head > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.pd-review-head strong { font-size: 12px; font-weight: 400; color: var(--text-4); }
.pd-review-body { font-size: 14px; color: var(--text-2); line-height: 1.6; overflow-wrap: break-word; }

.pd-review-score { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.pd-review-score-star { color: var(--warning); }

.pd-review-sort { display: flex; justify-content: flex-end; gap: 6px; margin: 24px 0 12px; }
.pd-review-sort button {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 13px; font-weight: 400; color: var(--text-4);
}
.pd-review-sort button.is-active { color: var(--primary); font-weight: 600; }
.pd-review-sort button:not(:first-child)::before { content: '·'; margin-right: 6px; color: var(--text-5); }

.pd-review-all-btn,
.pd-qna-all-btn { display: block; width: fit-content; min-width: 33%; padding-left: 50px; padding-right: 50px; margin: 16px auto 0; }

.pd-reply {
  display: flex; gap: 10px; margin-top: 6px; padding: 14px 16px;
  background: var(--bg-admin); border-radius: 10px; font-size: 13px; line-height: 1.6;
}
.pd-reply strong { color: var(--primary); flex-shrink: 0; }


.pd-qna { padding: 22px 0; border-bottom: 1px solid var(--border-2); }
.pd-qna-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.pd-qna-head > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.pd-qna-head strong { font-size: 12px; font-weight: 400; color: var(--text-4); }
.pd-qna-body { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.pd-qna-secret { display: inline-flex; align-items: center; gap: 5px; color: var(--text-4); margin-top: 12px; }
.qna-secret-tag { display: inline-flex; align-items: center; gap: 4px; line-height: 1; vertical-align: middle; position: relative; top: -1px; color: var(--text-5); font-size: 12px; font-weight: 500; margin-right: 6px; }
.pd-qna-body-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 12px; }
.pd-qna-body-row .pd-qna-body { flex: 1; min-width: 0; }
.pd-qna-actions { display: flex; gap: 8px; flex-shrink: 0; }


.pd-modal {
  position: fixed; inset: 0; z-index: 300; padding: 24px;
  background: rgba(17, 17, 17, 0.45); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.pd-modal[hidden] { display: none; }
.pd-modal-panel {
  background: #fff; border-radius: 18px; width: 100%; max-width: 520px;
  max-height: 86vh; overflow-y: auto; padding: 28px;
}
.pd-modal-panel--wide { max-width: 760px; }

.pd-modal-panel--flex { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: 86vh; }
.pd-modal-head-fixed { position: relative; flex: 0 0 auto; padding: 26px 28px 0; border-bottom: 1px solid var(--border-2); }
.pd-modal-head-title { margin: 0 20px 16px 0; font-size: 20px; }
.pd-modal-close {
  position: absolute; top: 24px; right: 24px; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: none; padding: 0; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--text-4);
}
.pd-modal-head-fixed .pd-review-sort { margin: 0; padding-bottom: 14px; }

.pd-modal-head-fixed--qna.is-form .pd-modal-head-title { text-align: center; margin: 0 40px 16px; }
.pd-modal-back {
  position: absolute; top: 24px; left: 24px; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: none; padding: 0; cursor: pointer; color: var(--text-4);
}
.pd-modal-back[hidden] { display: none; }
.pd-modal-body-scroll { flex: 1 1 auto; overflow-y: auto; padding: 0 28px 28px; }
.pd-modal-body-scroll--form { padding-top: 28px; }

.pd-modal-foot-fixed { flex: 0 0 auto; padding: 0 28px 28px; }

#qnaContent { min-height: 200px; }

@media (max-width: 860px) {
  .pd-modal { padding: 0; background: #fff; backdrop-filter: none; }
  .pd-modal-panel { max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; padding: 32px 20px; }
  .pd-modal-panel--flex { padding: 0; }
  .pd-modal-head-fixed { padding: 24px 20px 0; }
  .pd-modal-foot-fixed { padding: 0 20px 28px; }
  .pd-modal-close { top: 22px; right: 20px; }
  .pd-modal-back { top: 22px; left: 20px; }
  .pd-modal-body-scroll { padding: 0 20px 28px; }
  .pd-modal-body-scroll--form { padding-top: 20px; }
}


.pd-sheet-backdrop {
  position: fixed; inset: 0; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: center; z-index: 300;
}
.pd-sheet-backdrop[hidden] { display: none; }
.pd-sheet-panel {
  pointer-events: auto; background: #fff; width: 100%; max-height: 80vh; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: 20px 20px 0 0; padding: 20px; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  /* 옵션 드롭다운을 펼칠 때 자리가 모자라면 product-detail.js 가 height 를
     인라인으로 잡아 늘렸다 줄인다 (transition 도 그때 함께 넣는다) */
}
.pd-sheet-panel > .pd-sheet-handle { flex: 0 0 auto; }
.pd-sheet-panel .pd-option-box { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.pd-sheet-panel .pd-picked { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.pd-sheet-panel .pd-option-label,
.pd-sheet-panel .select,
.pd-sheet-panel .pd-bundle,
.pd-sheet-panel .pd-total,
.pd-sheet-panel .pd-actions { flex: 0 0 auto; }
.pd-sheet-handle { width: 100%; padding: 0 0 16px; display: flex; justify-content: center; cursor: grab; touch-action: none; }
.pd-sheet-handle span { width: 40px; height: 5px; background: var(--border-input); border-radius: 3px; }


.pd-mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: #fff; border-top: 1px solid var(--border);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); gap: 10px; align-items: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(100%); transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  display: none;
}
@media (max-width: 1080px) { .pd-mobile-bar { display: flex; } }
.pd-mobile-bar.is-visible { transform: translateY(0); }
.pd-mobile-bar .btn { height: 50px; font-size: 16px; font-weight: 600; }
.pd-mobile-kakao {
  width: 50px; height: 50px; flex-shrink: 0; border-radius: 10px; background: var(--kakao);
  display: flex; align-items: center; justify-content: center;
}
