/* 产品详情页专属样式 */

.product-detail-page {
  background: #f0f4f8;
  min-height: 100vh;
  padding-bottom: 80px;
}

/* 面包屑 */
.breadcrumb {
  padding: 18px 0 10px;
  color: #94a3b8;
  font-size: 0.9rem;
}
.breadcrumb a { color: #2563eb; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* 主布局 */
.pd-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  margin-top: 20px;
}

/* ── 左侧主区域 ── */
.pd-main {}

/* 顶部卡片：图片 + 基本信息 */
.pd-hero {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  overflow: hidden;
  margin-bottom: 24px;
}
.pd-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}
.pd-cover-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-hero-info {
  padding: 28px 32px 24px;
}
.pd-category-badge {
  display: inline-block;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: 0.03em;
}
.pd-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 8px;
  line-height: 1.3;
}
.pd-subtitle {
  font-size: 1.05rem;
  color: #64748b;
  margin-bottom: 20px;
}

/* 价格区 */
.pd-price-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 12px;
  padding: 14px 20px;
  margin-top: 4px;
  flex-wrap: wrap;
}
/* 价格展示列：标签 + 金额 + 备注 垂直排列 */
.pd-price-display {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
/* 标签：起售价格 / 已选：XXX */
.pd-price-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #b45309;
  letter-spacing: 0.02em;
}
.pd-price-main {
  font-size: 1.6rem;
  font-weight: 800;
  color: #92400e;
}
.pd-price-note {
  font-size: 0.9rem;
  color: #b45309;
}
.pd-price-bar .btn {
  padding: 10px 24px;
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s;
  white-space: nowrap;
}
.pd-price-bar .btn:hover { background: #1d4ed8; }

/* 内容卡片通用 */
.pd-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.pd-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pd-card h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: #2563eb;
  border-radius: 3px;
}
.pd-card p {
  color: #475569;
  line-height: 1.85;
  font-size: 1rem;
}
.pd-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.pd-card ul li {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 8px 14px;
  color: #334155;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pd-card ul li::before {
  content: '✓';
  color: #2563eb;
  font-weight: 700;
  font-size: 0.85rem;
}



/* ── 规格按钮组 ── */
.pd-spec-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

/* 每个规格标签 */
.pd-spec-btn {
  position: relative;
  padding: 10px 24px;
  border: 1.5px solid #e2e8f0;
  border-radius: 40px;           /* 胶囊形 */
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  transition: border-color 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.pd-spec-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #2563eb;
  box-shadow: 0 3px 10px rgba(37,99,235,0.12);
  transform: translateY(-1px);
}

/* 选中态 */
.pd-spec-btn.active {
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(37,99,235,0.30);
  transform: translateY(-1px);
}

/* 选中后右上角对勾角标 */
.pd-spec-btn.active::after {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 18px;
  height: 18px;
  background: #22c55e url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px no-repeat;
  border-radius: 0 40px 0 8px;
}

/* ── 选中规格后的价格详情提示条 ── */
.pd-spec-detail {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border-radius: 14px;
  padding: 14px 20px;
  border: 1px solid #bfdbfe;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(37,99,235,0.07);
  animation: specDetailIn 0.22s ease;
}

@keyframes specDetailIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pd-spec-detail-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pd-spec-detail-name {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.95rem;
  background: #dbeafe;
  padding: 3px 12px;
  border-radius: 20px;
}

.pd-spec-selected-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #dc2626;
  letter-spacing: -0.02em;
}

.pd-spec-detail-note {
  color: #64748b;
  font-size: 0.88rem;
  flex: 1;
}


  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.pd-specs-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}
.pd-specs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}
.pd-specs-table tr:last-child td { border-bottom: none; }
.pd-specs-table tr:hover td { background: #f8faff; }
.pd-spec-price {
  font-weight: 700;
  color: #dc2626;
  font-size: 1.05rem;
}
.pd-spec-note {
  color: #94a3b8;
  font-size: 0.88rem;
}

/* 产品详情富文本区 */
.pd-richtext {
  color: #374151;
  line-height: 1.9;
  font-size: 1rem;
}
.pd-richtext h1,.pd-richtext h2,.pd-richtext h3 { color:#1e293b; margin:1.5em 0 0.6em; font-weight:700; }
.pd-richtext h2 { font-size:1.25rem; border-left:4px solid #2563eb; padding-left:12px; }
.pd-richtext h3 { font-size:1.1rem; }
.pd-richtext p { margin-bottom:1em; }
.pd-richtext img { max-width:100%; border-radius:10px; margin:12px 0; box-shadow:0 2px 12px rgba(0,0,0,.1); display:block; }
.pd-richtext ul,.pd-richtext ol { padding-left:1.6em; margin-bottom:1em; }
.pd-richtext li { margin-bottom:0.4em; }

/* ── 右侧侧边栏 ── */
.pd-sidebar-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
  padding: 22px;
  margin-bottom: 22px;
}
.pd-sidebar-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

/* 更多产品列表（卡片式） */
.pd-more-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.pd-more-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #334155;
  font-size: 0.93rem;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
  line-height: 1.4;
}
.pd-more-list li a:hover { background:#eff6ff; border-color:#bfdbfe; color:#2563eb; }
.pd-more-thumb { width:44px; height:44px; border-radius:8px; object-fit:cover; flex-shrink:0; }
.pd-more-thumb-ph {
  width:44px; height:44px; border-radius:8px;
  background:linear-gradient(135deg,#dbeafe,#eff6ff);
  flex-shrink:0; display:flex; align-items:center; justify-content:center;
}
.pd-more-info { flex:1; min-width:0; }
.pd-more-name { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pd-more-price { font-size:0.82rem; color:#dc2626; margin-top:2px; }

/* CTA 咨询卡片 */
.pd-cta-card {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  border-radius: 16px;
  padding: 24px 22px;
  color: #fff;
  text-align: center;
  margin-bottom: 22px;
}
.pd-cta-card h3 { color:#fff; border:none; font-size:1.1rem; margin-bottom:8px; padding:0; }
.pd-cta-card p { color:rgba(255,255,255,.85); font-size:0.9rem; margin-bottom:16px; }
.pd-cta-card .btn-white {
  display:block; background:#fff; color:#2563eb; font-weight:700;
  padding:10px 0; border-radius:10px; text-decoration:none;
  font-size:0.95rem; transition:all 0.2s;
}
.pd-cta-card .btn-white:hover { background:#dbeafe; }

/* 响应式 */
@media (max-width: 900px) {
  .pd-layout { grid-template-columns:1fr; }
  .pd-title { font-size:1.5rem; }
  .pd-sidebar { order: -1; } /* 侧边栏移到顶部 */
}

@media (max-width: 768px) {
  .breadcrumb { font-size: 0.85rem; padding: 12px 0 8px; }

  .pd-price-bar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }

  .pd-price-display {
    text-align: center;
  }

  .pd-price-bar .btn {
    width: 100%;
    text-align: center;
  }

  .pd-spec-btns {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .pd-more-list li a {
    padding: 10px;
  }

  .pd-more-name {
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }

  .pd-hero-info { padding:18px 18px 16px; }
  .pd-card { padding:18px 16px; }
  .pd-card ul { grid-template-columns:1fr; }
  .pd-card h2 { font-size: 1.1rem; }

  .pd-title { font-size: 1.3rem; line-height: 1.4; }
  .pd-subtitle { font-size: 0.9rem; }

  .pd-price-main { font-size: 1.6rem; }

  .pd-spec-btns {
    grid-template-columns: 1fr;
  }

  .pd-spec-btn {
    padding: 12px 16px;
  }

  .breadcrumb {
    font-size: 0.8rem;
    overflow-x: auto;
    white-space: nowrap;
  }

  .pd-sidebar-card, .pd-cta-card {
    padding: 18px;
  }
}

/* 始终为滚动条保留位置，防止跨页跳转时 navbar 抖动 */
html { overflow-y: scroll; }

