/* ============================================
   Product Detail Page – Premium E-commerce
   /assets/css/product-page.css
   ============================================ */

/* --- Breadcrumb --- */
.pdp-breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 76px 18px 0; /* 62px sticky header + spacing */
  font-size: 13px;
  color: var(--muted);
  display: flex !important;
  position: static !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  z-index: auto !important;
}
.pdp-breadcrumb a {
  color: var(--muted);
  transition: color .2s;
  width: auto !important;
  padding: 0 !important;
  font-size: 13px !important;
}
.pdp-breadcrumb a:hover { color: var(--accent); }
.pdp-breadcrumb .sep {
  margin: 0 6px;
  color: #ccc;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.pdp-breadcrumb .sep svg {
  display: block;
}
.pdp-breadcrumb .current {
  color: var(--ink);
  font-weight: 600;
}
/* 有公告條時多推 36px */
html.show-announce .pdp-breadcrumb {
  padding-top: 112px; /* 62px header + 36px announce + 14px */
}
@media (max-width: 768px) {
  html.show-announce .pdp-breadcrumb {
    padding-top: 106px; /* 62px header + 32px announce + 12px */
  }
}

/* --- Main Layout --- */
.pdp-main {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 860px) {
  .pdp-main {
    grid-template-columns: 55% 45%;
    gap: 48px;
    margin-top: 32px;
  }
}

/* --- Gallery (Left) --- */
.pdp-gallery {
  position: relative;
}
@media (min-width: 860px) {
  .pdp-gallery { position: sticky; top: 90px; align-self: start; }
}

.pdp-img-main {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: radial-gradient(circle at center, #fff 0%, #f9f7f4 100%);
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: zoom-in;
}
.pdp-img-main img {
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
  transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.pdp-img-main:hover img {
  transform: scale(1.06);
}

/* 圖片切換箭頭 */
.pdp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(180,138,99,.15);
  background: rgba(255,255,255,.92);
  color: var(--accent);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  transition: all .25s cubic-bezier(.16,1,.3,1);
  z-index: 5;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.pdp-arrow:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 20px rgba(180,138,99,.25);
}
.pdp-arrow.left { left: 14px; }
.pdp-arrow.right { right: 14px; }

/* 縮圖列 */
.pdp-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: center;
}
.pdp-thumb {
  width: 72px;
  height: 90px;
  border-radius: 12px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: #f9f7f4;
  transition: all .25s ease;
  flex-shrink: 0;
}
.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pdp-thumb:hover {
  border-color: var(--accent2);
  transform: translateY(-2px);
}
.pdp-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(180,138,99,.2);
}

/* --- Info (Right) --- */
.pdp-info {
  padding: 8px 0 40px;
}
@media (min-width: 860px) {
  .pdp-info { padding: 0 0 40px; }
}

/* 標籤列 */
.pdp-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pdp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: .04em;
}
.pdp-badge--award {
  background: linear-gradient(135deg, #fdf6ec, #f9ead4);
  color: #8a5e16;
  border: 1px solid #e8d2a8;
}
.pdp-badge--category {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent2);
}
.pdp-badge--recommend {
  background: #2d1f0e;
  color: #f5e0c0;
  border: 1.5px solid #c9a87a;
}

/* 品名 */
.pdp-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.35;
  margin: 0 0 6px;
}
@media (min-width: 860px) {
  .pdp-title { font-size: 32px; }
}

.pdp-subtitle {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 20px;
}

/* 價格區 */
.pdp-price-box {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.pdp-price-now {
  font-size: 32px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -.02em;
}
.pdp-price-origin {
  font-size: 16px;
  color: #bbb;
  text-decoration: line-through;
}
.pdp-price-save {
  font-size: 12px;
  font-weight: 700;
  color: #c0392b;
  background: #fdecea;
  padding: 3px 10px;
  border-radius: 999px;
}

/* 分隔線 */
.pdp-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

/* CTA 按鈕區 */
.pdp-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.pdp-btn-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: all .25s ease;
}
.pdp-btn-cart:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow2);
}

/* 信任指標條（同系列推薦上方） */
.pdp-trust-strip {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 0 18px;
}
.pdp-trust-strip-inner {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pdp-trust-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #f9f7f4;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  letter-spacing: .03em;
  white-space: nowrap;
}

/* --- Tabs --- */
.pdp-tabs {
  display: flex;
  border-bottom: 2px solid var(--line);
  margin-bottom: 0;
  gap: 0;
}
.pdp-tab {
  flex: 1;
  padding: 14px 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .2s ease;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  letter-spacing: .06em;
  font-family: inherit;
}
.pdp-tab:hover { color: var(--ink); }
.pdp-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.pdp-tab-panel {
  display: none;
  padding: 24px 0;
}
.pdp-tab-panel.active {
  display: block;
}

/* Tab: 酒款特色 */
.pdp-feature-text {
  white-space: pre-line;
  line-height: 1.95;
  color: #555;
  font-size: 15px;
}

/* Tab: 風味刻度 */
.pdp-scales {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.pdp-scale-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pdp-scale-label {
  width: 48px;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
}
.pdp-scale-track {
  flex: 1;
}
.pdp-scale-bars {
  display: flex;
  gap: 6px;
}
.pdp-scale-bars span {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: #eee;
  transition: background .3s;
}
.pdp-scale-bars span.on {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.pdp-scale-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #aaa;
  margin-top: 6px;
}

/* Tab: 產品規格 */
.pdp-spec-table {
  width: 100%;
  border-collapse: collapse;
}
.pdp-spec-table tr + tr td {
  border-top: 1px solid var(--line);
}
.pdp-spec-table td {
  padding: 12px 0;
  font-size: 14px;
  vertical-align: top;
}
.pdp-spec-table td:first-child {
  width: 100px;
  color: var(--muted);
  font-weight: 500;
  padding-right: 16px;
}
.pdp-spec-table td:last-child {
  color: var(--ink);
  font-weight: 600;
}

/* --- 推薦商品區 --- */
.pdp-related {
  max-width: 1200px;
  margin: 48px auto 32px;
  padding: 0 18px;
}
.pdp-related-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.pdp-related-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .04em;
}
.pdp-related-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  transition: color .2s;
}
.pdp-related-link:hover { color: var(--ink); }

/* 覆蓋 style.css 的 .grid 預設 repeat(5, minmax(220px,1fr)) 以防溢出 */
.pdp-related-grid,
#pdpRelatedGrid,
#pdpRelatedGrid.grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 24px !important;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 860px) {
  .pdp-breadcrumb { padding-top: 72px; font-size: 12px; }
  html.show-announce .pdp-breadcrumb { padding-top: 104px; }
  .pdp-main { gap: 24px; margin-top: 16px; }
  .pdp-gallery { position: static; }
  .pdp-img-main { border-radius: 16px; }
  .pdp-title { font-size: 24px; }
  .pdp-price-now { font-size: 26px; }
  .pdp-thumb { width: 60px; height: 75px; border-radius: 10px; }
  .pdp-cta { flex-direction: column; }
  .pdp-btn-cart { justify-content: center; }

  /* 信任指標條手機 */
  .pdp-trust-strip { margin-top: 20px; }
  .pdp-trust-chip { font-size: 11px; padding: 5px 10px; }

  /* 推薦商品：手機改單欄，配合 style.css 的水平卡片佈局 */
  .pdp-related {
    overflow: hidden;
  }
  .pdp-related-grid,
  .pdp-related-grid.grid,
  #pdpRelatedGrid,
  #pdpRelatedGrid.grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    overflow: hidden !important;
  }
}
@media (max-width: 520px) {
  .pdp-breadcrumb { padding-top: 68px; font-size: 11px; }
  .pdp-breadcrumb a { font-size: 11px !important; }
  html.show-announce .pdp-breadcrumb { padding-top: 100px; }
  .pdp-arrow { width: 36px; height: 36px; font-size: 20px; }
  .pdp-arrow.left { left: 8px; }
  .pdp-arrow.right { right: 8px; }
  .pdp-badges { gap: 6px; }
  .pdp-badge { font-size: 10px; padding: 4px 10px; }
  .pdp-tab { font-size: 13px; padding: 12px 8px; }
  .pdp-related-grid,
  .pdp-related-grid.grid {
    grid-template-columns: 1fr !important;
  }
}
