/* ═══════════════════════════════════════════════════
   옷결 OTT_GYEOL — Product Detail Styles
   ═══════════════════════════════════════════════════ */

/* ─── LOADING ─── */
.product-loading {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-spinner {
  width: 36px; height: 36px;
  border: 2px solid var(--beige);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─── NOT FOUND ─── */
.product-not-found {
  min-height: 60vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px;
  color: var(--taupe);
}
.product-not-found svg { opacity: 0.25; margin-bottom: 20px; }
.not-found-title { font-family: var(--font-serif-kr); font-size: 1rem; color: var(--charcoal); margin-bottom: 8px; }
.not-found-desc { font-size: 0.8rem; font-weight: 300; }

/* ─── PAGE ─── */
.product-main { background: var(--white); }

/* ─── BREADCRUMB ─── */
.pd-breadcrumb-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 20px 40px 0;
}

/* ─── PRODUCT SECTION ─── */
.pd-section {
  max-width: 1200px; margin: 0 auto;
  padding: 32px 40px 60px;
}
.pd-layout {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 60px;
  align-items: flex-start;
}

/* ─── GALLERY ─── */
.pd-gallery { position: sticky; top: 100px; }
.pd-img-frame {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--cream);
  aspect-ratio: 3/4;
}
.pd-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.pd-img-frame:hover .pd-img { transform: scale(1.04); }

.pd-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pd-thumb {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

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

.pd-thumb.active,
.pd-thumb:hover {
  border-color: var(--gold);
}

.pd-img-badge {
  position: absolute;
  top: 16px; left: 16px;
  padding: 5px 12px;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  border-radius: 2px;
  background: var(--charcoal);
  color: var(--white);
}
.pd-img-badge.best { background: var(--gold); }
.pd-img-badge.sale { background: var(--rose); }

/* ─── INFO PANEL ─── */
.pd-info { padding-top: 8px; }

.pd-category {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.pd-title {
  font-family: var(--font-serif-kr);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.35;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.pd-price {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.pd-price .price-original {
  font-size: 0.85rem;
  color: var(--sand);
  text-decoration: line-through;
  margin-right: 10px;
  font-weight: 300;
}
.pd-price .price-sale { color: var(--rose); }

.pd-free-ship {
  font-size: 0.7rem;
  color: #7a9e6e;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.pd-desc {
  font-size: 0.84rem;
  font-weight: 300;
  color: var(--taupe);
  line-height: 1.8;
  margin-bottom: 0;
}
.pd-divider {
  height: 1px;
  background: var(--beige);
  margin: 28px 0;
}

/* ─── OPTIONS ─── */
.pd-option-block { margin-bottom: 24px; }
.pd-option-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pd-option-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--brown);
  font-weight: 500;
  text-transform: uppercase;
}
.pd-size-guide {
  background: none; border: none;
  font-size: 0.68rem;
  color: var(--taupe);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  letter-spacing: 0.03em;
  padding: 0;
  transition: color 0.2s;
}
.pd-size-guide:hover { color: var(--gold); }

/* Size buttons */
.size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.size-btn {
  min-width: 48px; height: 48px;
  border: 1px solid var(--beige-dark);
  background: none;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--charcoal);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
  padding: 0 12px;
}
.size-btn:hover { border-color: var(--charcoal); }
.size-btn.selected {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
}
.size-btn.out-of-stock {
  color: var(--taupe);
  background: var(--beige-soft, #f5f1ea);
  border-color: var(--beige);
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: 0.55;
}
.size-btn.out-of-stock:hover {
  border-color: var(--beige);
}
.btn.sold-out,
.btn-add-cart.sold-out,
.btn-buy-now.sold-out {
  background: var(--taupe);
  border-color: var(--taupe);
  color: var(--white);
  cursor: not-allowed;
  opacity: 0.85;
}
.btn.sold-out:hover { background: var(--taupe); }
.size-warning {
  font-size: 0.7rem;
  color: var(--rose);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* ─── PRODUCT OPTIONS ─── */
.pd-select-opt-block { margin-bottom: 20px; }

.pd-option-select {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 36px 0 14px;
  margin-top: 8px;
  border: 1px solid var(--brown);
  border-radius: 4px;
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--charcoal);
  letter-spacing: 0.02em;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239e8e7e' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.25s ease;
}
.pd-option-select:focus { border-color: var(--gold); }
.pd-option-select:hover { border-color: var(--brown); }

.option-warning {
  font-size: 0.7rem;
  color: var(--rose);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* Qty */
.pd-qty-block { display: flex; align-items: center; gap: 20px; }
.pd-qty {
  display: flex; align-items: center;
  border: 1px solid var(--beige-dark);
  border-radius: 2px;
}
.pd-qty-btn {
  width: 36px; height: 36px;
  background: none; border: none;
  font-size: 1.1rem; color: var(--charcoal);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s;
}
.pd-qty-btn:hover { color: var(--gold); }
.pd-qty-num {
  min-width: 40px; text-align: center;
  font-size: 0.85rem; color: var(--charcoal);
  border-left: 1px solid var(--beige-dark);
  border-right: 1px solid var(--beige-dark);
  line-height: 36px;
}

/* ─── CTA BUTTONS ─── */
.pd-cta { display: flex; gap: 10px; margin-bottom: 16px; }
.pd-cart-btn { flex: 1; padding: 15px; font-size: 0.82rem; letter-spacing: 0.08em; }
.pd-wish-btn {
  width: 50px; height: 50px;
  border: 1px solid var(--beige-dark);
  background: none;
  border-radius: 2px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--charcoal);
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.pd-wish-btn:hover { border-color: var(--rose); color: var(--rose); }
.pd-wish-btn.wishlisted { background: var(--rose); border-color: var(--rose); color: var(--white); }
.pd-wish-btn.wishlisted svg path { fill: currentColor; }
.pd-buynow-btn { width: 100%; padding: 15px; font-size: 0.82rem; letter-spacing: 0.08em; margin-bottom: 16px; }

/* Message */
.pd-msg {
  font-size: 0.76rem;
  min-height: 0;
  transition: all 0.25s ease;
  margin-bottom: 0;
}
.pd-msg.show {
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 4px;
}
.pd-msg.success { background: rgba(122,158,110,0.1); color: #5a7e4e; border: 1px solid rgba(122,158,110,0.2); }
.pd-msg.error   { background: rgba(196,146,138,0.1); color: #a0534b; border: 1px solid rgba(196,146,138,0.2); }

/* 공유 (카카오톡 / 링크복사) */
.pd-share { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.pd-share-label { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--taupe); margin-right: 2px; }
.pd-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line, #e5ddd2);
  border-radius: 20px;
  background: #fff;
  color: var(--ink, #4a4039);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.pd-share-btn:hover { border-color: var(--gold); background: #faf6f0; }
.pd-share-btn svg { flex: 0 0 auto; }
#btn-share-kakao { color: #3c1e1e; border-color: #f4d618; background: #FEE500; }
#btn-share-kakao:hover { background: #f5dd00; border-color: #f5dd00; }
.pd-share-btn.copied { color: var(--gold); border-color: var(--gold); background: #faf6f0; }
.pd-meta {
  list-style: none; padding: 0; margin: 20px 0 0;
  border-top: 1px solid var(--beige);
  padding-top: 20px;
}
.pd-meta li {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.74rem;
  font-weight: 300;
  color: var(--taupe);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.pd-meta li svg { flex-shrink: 0; color: var(--gold); }

/* ─── ACCORDION ─── */
.pd-details-section {
  background: var(--cream);
  border-top: 1px solid var(--beige);
  border-bottom: 1px solid var(--beige);
}
.pd-details-wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

.accordion-item { border-bottom: 1px solid var(--beige); }
.accordion-item:first-child { border-top: none; }

.accordion-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
  background: none; border: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--charcoal);
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
}
.accordion-trigger:hover { color: var(--gold); }
.accordion-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--taupe);
}
.accordion-item.open .accordion-icon { transform: rotate(180deg); }

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.accordion-item.open .accordion-body { max-height: 400px; }
.accordion-content { padding: 0 0 24px; }

.detail-table { width: 100%; border-collapse: collapse; }
.detail-table tr { border-bottom: 1px solid rgba(200,185,165,0.2); }
.detail-table td {
  padding: 10px 0;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1.6;
}
.detail-table td:first-child {
  width: 100px;
  color: var(--taupe);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.detail-list {
  list-style: none; padding: 0; margin: 0;
}
.detail-list li {
  font-size: 0.78rem; font-weight: 300;
  color: var(--charcoal); line-height: 1.6;
  padding: 6px 0;
  border-bottom: 1px solid rgba(200,185,165,0.15);
}
.detail-list li:last-child { border-bottom: none; }

/* ─── PRODUCT DETAIL DESCRIPTION ─── */
.pd-detail-desc-section {
  border-top: 1px solid var(--beige);
  padding: 60px 40px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.pd-detail-desc-inner {
  max-width: 860px;
  margin: 0 auto;
}

.pd-detail-desc-header {
  text-align: center;
  margin-bottom: 48px;
}

.pd-detail-text {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--charcoal);
  line-height: 2;
  margin-bottom: 40px;
  white-space: pre-wrap;
}

.pd-detail-images img {
  display: block;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.pd-detail-images img + img {
  margin-top: 2px;
}

/* ─── RELATED ─── */
.related-section { padding: 60px 40px 80px; max-width: 1200px; margin: 0 auto; }
.related-header { margin-bottom: 40px; }
.related-title { font-family: var(--font-serif-kr); font-size: 1.4rem; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.related-card-wrap {
  position: relative;
}
.related-card {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.related-card:hover .related-img { transform: scale(1.04); }

.related-wish-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--beige-dark, #e0d7c8);
  background: rgba(255, 255, 255, 0.92);
  color: var(--brown-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  padding: 0;
}
.related-wish-btn:hover {
  background: var(--white);
  color: var(--rose, #b66d6d);
}
.related-wish-btn.wishlisted {
  background: var(--gold, #b8956a);
  color: var(--white);
  border-color: var(--gold, #b8956a);
}
.related-wish-btn.wishlisted:hover {
  background: var(--gold, #b8956a);
  color: var(--white);
}
.related-img-wrap {
  overflow: hidden;
  border-radius: 3px;
  background: var(--cream);
  aspect-ratio: 3/4;
  margin-bottom: 12px;
  position: relative;
}
.related-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.related-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 9px;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  background: var(--charcoal);
  color: var(--white);
  border-radius: 2px;
}
.related-badge.best { background: var(--gold); }

.related-sold-out-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(60, 50, 40, 0.45);
  color: var(--white);
  font-size: 1rem;
  letter-spacing: 0.08em;
  font-weight: 300;
  z-index: 2;
  pointer-events: none;
}

.related-card.is-sold-out .related-img {
  filter: grayscale(35%);
}

.related-card.is-sold-out .related-name,
.related-card.is-sold-out .related-price {
  color: var(--taupe);
}

.related-category {
  font-size: 0.62rem;
  color: var(--taupe);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.related-name {
  font-family: var(--font-serif-kr);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 6px;
  line-height: 1.4;
}
.related-price {
  font-size: 0.8rem;
  color: var(--charcoal);
}
.related-price .price-original {
  font-size: 0.72rem; color: var(--sand);
  text-decoration: line-through; margin-right: 6px;
}
.related-price .price-sale { color: var(--rose); }

/* ─── SIZE GUIDE MODAL ─── */
.size-guide-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.8rem;
}
.size-guide-table th {
  font-size: 0.68rem; letter-spacing: 0.08em;
  color: var(--taupe); text-align: center;
  padding: 8px; border-bottom: 1px solid var(--beige);
  font-weight: 400; text-transform: uppercase;
}
.size-guide-table td {
  text-align: center; padding: 10px 8px;
  border-bottom: 1px solid rgba(200,185,165,0.2);
  font-weight: 300; color: var(--charcoal);
}
.size-guide-table td:first-child { font-weight: 500; }

/* ─── MODAL (shared) ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,23,20,0.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; padding: 20px;
}
.modal-card {
  background: var(--white);
  border-radius: 12px;
  width: 100%; max-width: 460px;
  box-shadow: 0 16px 48px rgba(26,23,20,0.18);
  overflow: hidden;
  animation: fadeUp 0.3s ease-out both;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--beige);
}
.modal-header h2 {
  font-family: var(--font-serif-kr);
  font-size: 0.95rem; font-weight: 500; color: var(--charcoal);
}
.modal-close {
  background: none; border: none;
  font-size: 1.4rem; color: var(--taupe); cursor: pointer;
  line-height: 1; padding: 0 4px; transition: color 0.2s;
}
.modal-close:hover { color: var(--charcoal); }
.modal-body { padding: 20px 24px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .pd-layout { grid-template-columns: 1fr; gap: 36px; }
  .pd-gallery { position: static; }
  .pd-section { padding: 24px 24px 48px; }
  .pd-breadcrumb-wrap { padding: 16px 24px 0; }
  .pd-details-wrap { padding: 0 24px; }
  .pd-detail-desc-section { padding: 48px 24px 64px; }
  .related-section { padding: 48px 24px 64px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 480px) {
  .pd-option-select { height: 42px; font-size: 0.82rem; }

  .pd-title { font-size: 1.3rem; }
  .pd-section { padding: 20px 16px 40px; }
  .pd-breadcrumb-wrap { padding: 14px 16px 0; }
  .pd-details-wrap { padding: 0 16px; }
  .pd-detail-desc-section { padding: 40px 16px 56px; }
  .related-section { padding: 40px 16px 56px; }
  .related-grid { gap: 12px; }
  .pd-wish-btn { width: 50px; flex-shrink: 0; }

  /* 사이즈 가이드 모달 */
  .modal-overlay { padding: 12px; }
  .modal-card { border-radius: 8px; }
  .modal-body { padding: 16px; }
  .size-guide-table th, .size-guide-table td { padding: 8px 6px; font-size: 0.75rem; }

  /* 바로 구매하기 */
  .pd-buynow-btn { padding: 13px; font-size: 0.8rem; }
}
