/* ================================================================
   ShopLux · 商品详情页 (PDP) 样式
   ================================================================ */

/* ── PDP Grid ── */
.pdp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  padding: 32px 0 64px;
  align-items: start;
}

/* ================================================================
   GALLERY
   ================================================================ */
.pdp-gallery { position: sticky; top: 80px; }

.gallery-main {
  position: relative;
  border-radius: var(--r3);
  overflow: hidden;
  background: var(--cream2);
  aspect-ratio: 1/1;
  cursor: zoom-in;
}
.gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .25s ease;
}
.gallery-badge-sale {
  position: absolute; top: 16px; left: 16px;
  background: var(--rose); color: #fff;
  font-size: .82rem; font-weight: 700;
  padding: 6px 14px; border-radius: 20px;
  letter-spacing: .04em;
}
.gallery-zoom-hint {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(22,20,30,.5); color: rgba(255,255,255,.8);
  font-size: .72rem; padding: 5px 10px; border-radius: 20px;
  opacity: 0; transition: opacity var(--t);
  pointer-events: none;
}
.gallery-main:hover .gallery-zoom-hint { opacity: 1; }

.gallery-thumbs {
  display: flex; gap: 10px;
  margin-top: 14px; flex-wrap: wrap;
}
.gallery-thumb {
  width: 72px; height: 72px; border-radius: var(--r);
  overflow: hidden; border: 2px solid var(--border);
  background: var(--cream2); padding: 0; flex-shrink: 0;
  transition: border-color var(--t), transform var(--t);
}
.gallery-thumb img { width: 100%; height: 100%; }
.gallery-thumb:hover { border-color: var(--ink3); transform: scale(1.04); }
.gallery-thumb.act { border-color: var(--gold); }

.gallery-dots {
  display: none; justify-content: center; gap: 6px; margin-top: 12px;
}
.gallery-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border2); transition: all var(--t);
}
.gallery-dot.act { background: var(--gold); width: 16px; border-radius: 3px; }

/* ================================================================
   INFO PANEL
   ================================================================ */
.pdp-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.tag-outline {
  background: transparent; border: 1px solid var(--border2);
  color: var(--ink3); font-size: .72rem; padding: 3px 10px; border-radius: 20px;
}

.pdp-title {
  font-family: var(--serif);
  font-size: 1.7rem; font-weight: 700;
  line-height: 1.3; color: var(--ink);
  margin-bottom: 14px; letter-spacing: -.01em;
}

.pdp-rating-row {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.pdp-stars { color: var(--gold); font-size: 1rem; letter-spacing: 2px; }
.pdp-rating-num { font-weight: 700; font-size: .95rem; color: var(--ink); }
.pdp-review-link { font-size: .83rem; color: var(--gold); border-bottom: 1px solid rgba(184,151,58,.3); }
.pdp-review-link:hover { border-color: var(--gold); }
.pdp-sep { color: var(--border2); }
.pdp-sold { font-size: .83rem; color: var(--ink3); }
.pdp-sold strong { color: var(--ink2); }

/* Price */
.pdp-price-block { margin-bottom: 14px; }
.pdp-price-main {
  font-family: var(--serif);
  font-size: 2rem; font-weight: 700;
  color: var(--rose); line-height: 1.1; margin-bottom: 4px;
}
.pdp-price-main span { font-size: 2.2rem; }
.pdp-price-ori {
  font-size: .92rem; color: var(--ink4);
  text-decoration: line-through; display: inline-block; margin-right: 8px;
}
.pdp-price-save {
  display: inline-block; font-size: .8rem; font-weight: 600;
  background: #fdf2f5; color: var(--rose);
  padding: 3px 10px; border-radius: 20px;
}

/* Meta row */
.pdp-meta-row {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.pdp-sku { font-size: .78rem; color: var(--ink4); }
.pdp-stock { font-size: .82rem; font-weight: 600; }
.pdp-stock.in-stock  { color: var(--green); }
.pdp-stock.low-stock { color: var(--gold); }
.pdp-stock.out-stock { color: var(--rose); }

.pdp-divider {
  height: 1px; background: var(--border);
  margin: 18px 0;
}

/* Option Groups */
.pdp-option-group { margin-bottom: 18px; }
.pdp-option-label {
  font-size: .82rem; font-weight: 600; color: var(--ink2);
  margin-bottom: 10px;
}
.pdp-option-selected { color: var(--ink); font-weight: 500; }

/* Color */
.pdp-color-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-color-btn {
  padding: 7px 16px; border-radius: 40px;
  border: 2px solid var(--border); background: var(--white);
  font-size: .82rem; color: var(--ink2);
  transition: all var(--t); cursor: pointer;
}
.pdp-color-btn:hover { border-color: var(--ink3); color: var(--ink); }
.pdp-color-btn.act {
  border-color: var(--ink); background: var(--ink); color: #fff;
}

/* Size */
.pdp-size-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-size-btn {
  min-width: 48px; height: 44px; padding: 0 14px;
  border-radius: var(--r); border: 2px solid var(--border);
  background: var(--white); font-size: .88rem; font-weight: 500;
  color: var(--ink2); transition: all var(--t); cursor: pointer;
}
.pdp-size-btn:hover { border-color: var(--ink3); }
.pdp-size-btn.act { border-color: var(--ink); background: var(--ink); color: #fff; }
.pdp-size-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Qty */
.pdp-qty-row { display: flex; align-items: center; gap: 14px; }
.pdp-qty-ctrl {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: var(--r);
  overflow: hidden; background: var(--white);
}
.pdp-qty-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 400; color: var(--ink2);
  transition: background var(--t);
}
.pdp-qty-btn:hover { background: var(--cream2); color: var(--ink); }
.pdp-qty-input {
  width: 56px; text-align: center; border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  font-size: .95rem; font-weight: 600; color: var(--ink);
  padding: 0; height: 44px; background: var(--white);
  outline: none; -moz-appearance: textfield;
}
.pdp-qty-input::-webkit-inner-spin-button,
.pdp-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.pdp-stock-hint { font-size: .78rem; color: var(--ink4); }

/* Actions */
.pdp-actions {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap;
}
.pdp-actions .btn { flex: 1; min-width: 140px; justify-content: center; }
.pdp-wish-btn {
  width: 48px; height: 48px; border-radius: var(--r);
  border: 1.5px solid var(--border); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
  transition: all var(--t);
}
.pdp-wish-btn:hover { border-color: var(--rose2); background: #fdf2f5; }
.pdp-wish-btn.wished { border-color: var(--rose); background: #fdf2f5; }

/* Assurance */
.pdp-assurance {
  background: var(--cream); border-radius: var(--r2);
  padding: 16px; display: flex; flex-direction: column;
  gap: 10px; margin-bottom: 16px;
  border: 1px solid var(--border);
}
.pdp-assurance-item {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .82rem; color: var(--ink2); line-height: 1.5;
}
.pdp-assurance-item span:first-child { flex-shrink: 0; margin-top: 1px; }
.pdp-assurance-item strong { color: var(--ink); }

/* Share LINE */
.pdp-share-line { width: 100%; justify-content: center; }

/* ================================================================
   TABS
   ================================================================ */
.pdp-tabs-wrap {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 64px; z-index: 50;
  margin-bottom: 0;
}
.pdp-tabs {
  display: flex; gap: 0; overflow-x: auto;
  scrollbar-width: none;
}
.pdp-tabs::-webkit-scrollbar { display: none; }
.pdp-tab {
  padding: 16px 24px; font-size: .88rem; font-weight: 500;
  color: var(--ink3); border-bottom: 2.5px solid transparent;
  white-space: nowrap; transition: all var(--t);
  background: none;
}
.pdp-tab:hover { color: var(--ink); }
.pdp-tab.act { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }

.pdp-tab-panel {
  display: none; padding: 40px 0 64px;
}
.pdp-tab-panel.act { display: block; }

/* Desc */
.pdp-desc-body { max-width: 800px; }
.pdp-desc-content {
  font-size: .95rem; line-height: 1.9; color: var(--ink2);
}
.pdp-desc-content h2,.pdp-desc-content h3 { font-family: var(--serif); margin: 24px 0 10px; color: var(--ink); }
.pdp-desc-content p { margin-bottom: 14px; }
.pdp-desc-content img { border-radius: var(--r2); margin: 16px 0; max-width: 100%; }
.pdp-desc-content ul, .pdp-desc-content ol { padding-left: 20px; margin-bottom: 14px; }
.pdp-desc-content li { margin-bottom: 6px; }

/* Spec */
.pdp-spec-table { max-width: 700px; border: 1px solid var(--border); border-radius: var(--r2); overflow: hidden; }
.spec-row { display: flex; }
.spec-row + .spec-row { border-top: 1px solid var(--border); }
.spec-label {
  width: 140px; flex-shrink: 0; padding: 14px 18px;
  background: var(--cream2); font-size: .83rem; font-weight: 600;
  color: var(--ink2); border-right: 1px solid var(--border);
}
.spec-val { padding: 14px 18px; font-size: .85rem; color: var(--ink2); flex: 1; }

/* Reviews */
.review-summary {
  display: flex; gap: 40px; align-items: center;
  background: var(--cream); border-radius: var(--r2);
  padding: 28px 32px; margin-bottom: 28px;
  border: 1px solid var(--border);
}
.review-big-score { text-align: center; flex-shrink: 0; }
.review-score-num {
  font-family: var(--serif); font-size: 3.5rem;
  font-weight: 700; color: var(--ink); line-height: 1;
}
.review-score-stars { color: var(--gold); font-size: 1.1rem; letter-spacing: 2px; margin: 6px 0 4px; }
.review-score-count { font-size: .78rem; color: var(--ink3); }
.review-bars { flex: 1; display: flex; flex-direction: column; gap: 7px; }

.review-list { display: flex; flex-direction: column; gap: 0; }
.review-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.review-item:last-child { border-bottom: none; }
.review-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.review-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: var(--gold3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1rem; font-weight: 700;
  flex-shrink: 0;
}
.review-user { font-weight: 600; font-size: .88rem; margin-bottom: 3px; }
.review-stars-date { display: flex; align-items: center; gap: 8px; }
.review-date { font-size: .75rem; color: var(--ink4); }
.review-variant { font-size: .78rem; color: var(--ink3); margin-bottom: 8px; }
.review-body { font-size: .88rem; color: var(--ink2); line-height: 1.75; margin-bottom: 10px; }
.review-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.review-imgs img {
  width: 80px; height: 80px; border-radius: var(--r);
  object-fit: cover; border: 1px solid var(--border);
  cursor: zoom-in; transition: transform var(--t);
}
.review-imgs img:hover { transform: scale(1.04); }
.review-reply {
  background: var(--cream); border-radius: var(--r);
  padding: 12px 16px; margin-top: 12px;
  font-size: .82rem; color: var(--ink3); line-height: 1.7;
  border-left: 3px solid var(--gold);
}
.review-reply-label { font-weight: 600; color: var(--gold); font-size: .75rem; display: block; margin-bottom: 4px; }

.write-review {
  margin-top: 32px; padding-top: 32px;
  border-top: 1px solid var(--border);
}
.write-review-title {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
  margin-bottom: 20px;
}
.star-picker { display: flex; gap: 6px; margin-bottom: 4px; }
.star-pick {
  font-size: 1.6rem; color: var(--gold);
  background: none; border: none; cursor: pointer;
  transition: transform var(--t);
}
.star-pick:hover { transform: scale(1.2); }

/* Shipping */
.ship-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 16px;
}
.ship-card {
  background: var(--white); border-radius: var(--r2);
  padding: 24px 20px; border: 1px solid var(--border);
  text-align: center;
  transition: all var(--t);
}
.ship-card:hover { box-shadow: var(--s2); transform: translateY(-2px); }
.ship-ico { font-size: 2rem; margin-bottom: 12px; }
.ship-title { font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.ship-desc { font-size: .8rem; color: var(--ink3); line-height: 1.7; }

/* ================================================================
   STICKY BAR (mobile)
   ================================================================ */
.pdp-sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; box-shadow: 0 -8px 24px rgba(22,20,30,.08);
  transform: translateY(100%); transition: transform var(--t);
}
.pdp-sticky-bar.show { transform: translateY(0); }
.pdp-sticky-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pdp-sticky-img {
  width: 44px; height: 44px; border-radius: var(--r);
  object-fit: cover; flex-shrink: 0; border: 1px solid var(--border);
}
.pdp-sticky-name { font-size: .82rem; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.pdp-sticky-price { font-size: .88rem; font-weight: 700; color: var(--rose); }

/* ================================================================
   LIGHTBOX
   ================================================================ */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(10,9,15,.95);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all .25s ease;
  cursor: zoom-out;
}
.lightbox-overlay.open { opacity: 1; visibility: visible; }
.lightbox-img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain; border-radius: var(--r2);
  box-shadow: var(--s4);
  animation: lightboxIn .25s ease;
}
@keyframes lightboxIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff;
  font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: background var(--t);
}
.lightbox-close:hover { background: rgba(255,255,255,.2); }
.lightbox-prev,
.lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff;
  font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
  transition: background var(--t);
}
.lightbox-prev:hover,.lightbox-next:hover { background: rgba(255,255,255,.22); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .pdp-grid { grid-template-columns: 1fr; gap: 32px; }
  .pdp-gallery { position: static; }
  .ship-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .gallery-thumbs { display: none; }
  .gallery-dots { display: flex; }
  .pdp-title { font-size: 1.4rem; }
  .pdp-price-main { font-size: 1.6rem; }
  .review-summary { flex-direction: column; gap: 20px; text-align: center; }
  .review-bars { width: 100%; }
  .ship-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .pdp-actions { flex-direction: column; }
  .pdp-actions .btn { min-width: unset; }
  .pdp-wish-btn { width: 100%; }
}
@media (max-width: 480px) {
  .pdp-tab { padding: 12px 16px; font-size: .82rem; }
  .spec-label { width: 100px; }
  .ship-grid { grid-template-columns: 1fr 1fr; }
  .review-big-score { display: flex; align-items: center; gap: 12px; text-align: left; }
  .review-score-num { font-size: 2.5rem; }
}

/* ── 新 table 式规格表 (v10 COS/Phone) ── */
table.pdp-spec-table {
  width: 100%;
  max-width: 700px;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  font-size: .85rem;
  margin-bottom: 20px;
}
table.pdp-spec-table td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.pdp-spec-table tr:last-child td { border-bottom: none; }
table.pdp-spec-table td:first-child {
  width: 38%;
  color: var(--ink3);
  font-weight: 500;
  background: var(--cream2);
}
table.pdp-spec-table td:last-child {
  color: var(--ink);
  font-weight: 600;
}
