/* ============================================================
   产品详情页 专用样式
   ============================================================ */

/* ---- 面包屑条 ---- */
.pd-breadcrumb-bar {
  background: #fff;
  border-bottom: 1px solid #eee;
}

.pd-breadcrumb-bar .container {
  padding-top: 16px;
  padding-bottom: 16px;
}

/* ---- 主内容区 ---- */
.pd-main {
  background: #f9f9f9;
  padding: 48px 0 80px;
}

.pd-card {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0px 40px 40px -20px rgba(0, 0, 0, 0.06);
  padding: 49px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* ---- 书籍主信息网格 ---- */
.pd-info-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 32px;
  align-items: flex-start;
}

.pd-cover-col {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.pd-cover-wrap {
  width: 100%;
  max-width: 448px;
  aspect-ratio: 448 / 600;
  overflow: hidden;
  box-shadow: 0px 30px 60px -12px rgba(0, 0, 0, 0.15), 0px 18px 36px -18px rgba(0, 0, 0, 0.2);
}

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

.pd-detail-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pd-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 8px;
}

.pd-badge {
  display: inline-block;
  background: var(--red-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  line-height: 18px;
  padding: 4px 12px;
  width: fit-content;
}

.pd-book-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.48px;
  line-height: 56px;
  margin: 0;
}

/* ---- Meta 信息表格 ---- */
.pd-meta-table {
  border-top: 1px solid #eee;
  padding-top: 17px;
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pd-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pd-meta-label {
  font-size: 14px;
  font-weight: 500;
  color: #5f5e5e;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  line-height: 20px;
}

.pd-meta-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  line-height: 26px;
}

/* ---- 内容简介 ---- */
.pd-synopsis {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pd-synopsis-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  line-height: 32px;
  margin: 0;
}

.pd-synopsis-text {
  font-size: 16px;
  font-weight: 400;
  color: #5f5e5e;
  line-height: 26px;
  margin: 0;
}

/* ---- Tab 切换 ---- */
.pd-tabs-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.pd-tabs {
  display: flex;
  align-items: center;
  background: #f3f3f4;
  border-radius: 8px;
  padding: 4px;
  width: fit-content;
}

.pd-tab {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-warm);
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px 32px;
  cursor: pointer;
  letter-spacing: 0.7px;
  line-height: 20px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.pd-tab.active {
  background: var(--red-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
}

.pd-tab-panel {
  display: block;
}

.pd-tab-panel.hidden {
  display: none;
}

/* ---- 功能特点列表 ---- */
.pd-features {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 896px;
}

.pd-feature-item {
  border-left: 3px solid var(--red-primary);
  padding: 8px 0 8px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pd-feature-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  line-height: 32px;
  margin: 0;
}

.pd-feature-desc {
  font-size: 16px;
  font-weight: 400;
  color: #5f5e5e;
  line-height: 26px;
  margin: 0;
}

.pd-rich-content h4 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  line-height: 32px;
  margin: 0 0 8px;
  border-left: 3px solid var(--red-primary);
  padding: 8px 0 8px 24px;
}

.pd-rich-content p {
  font-size: 16px;
  font-weight: 400;
  color: #5f5e5e;
  line-height: 26px;
  margin: 0 0 24px;
  border-left: 3px solid var(--red-primary);
  padding: 0 0 8px 24px;
}

.pd-rich-content p:last-child {
  margin-bottom: 0;
}

/* ---- 相关推荐 ---- */
.pd-related {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.pd-related-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.pd-related-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.48px;
  line-height: 56px;
  margin: 0;
}

.pd-related-empty {
  font-size: 16px;
  color: #5f5e5e;
  margin: 0;
}

.pd-related-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.pd-nav-btn {
  width: 48px;
  height: 48px;
  border: 1px solid #eee;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.pd-nav-btn:hover {
  background: var(--red-primary);
  border-color: var(--red-primary);
}

.pd-nav-btn:hover img {
  filter: brightness(0) invert(1);
}

.pd-nav-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.pd-nav-btn--disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.pd-nav-btn:focus-visible {
  outline: 2px solid var(--red-primary);
  outline-offset: 2px;
}

/* ---- Related Swiper ---- */
.pd-related-swiper {
  width: 100%;
  overflow: visible;
  clip-path: inset(-40px -8px -16px -8px);
  padding-bottom: 8px;
}

.pd-related-swiper .swiper-wrapper {
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pd-related-swiper .swiper-slide {
  height: auto;
  box-sizing: border-box;
  opacity: 1;
  transform: none;
}

.pd-related-swiper.swiper-ready .swiper-slide {
  opacity: 1;
  transform: translateY(0);
}

.pd-related-swiper.swiper-ready .swiper-slide:nth-child(1) { transition-delay: 0.05s; }
.pd-related-swiper.swiper-ready .swiper-slide:nth-child(2) { transition-delay: 0.10s; }
.pd-related-swiper.swiper-ready .swiper-slide:nth-child(3) { transition-delay: 0.15s; }
.pd-related-swiper.swiper-ready .swiper-slide:nth-child(4) { transition-delay: 0.20s; }

.pd-related-book {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.pd-related-cover-wrap {
  width: 100%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 5px rgba(0, 0, 0, 0.08), 0 20px 13px rgba(0, 0, 0, 0.03);
  aspect-ratio: 3 / 4;
  transition: box-shadow 0.3s ease, transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pd-related-book:hover .pd-related-cover-wrap {
  transform: translateY(-4px);
  box-shadow: 0 12px 8px rgba(0, 0, 0, 0.1), 0 24px 16px rgba(0, 0, 0, 0.04);
}

.pd-related-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.pd-related-book:hover .pd-related-cover {
  transform: scale(1.02);
}

.pd-related-book:hover .pd-related-book-title {
  color: var(--red-primary);
}

.pd-related-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pd-related-cat {
  font-size: 14px;
  font-weight: 700;
  color: var(--red-primary);
  letter-spacing: -0.6px;
  text-transform: uppercase;
  line-height: 16px;
}

.pd-related-book-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  line-height: 32px;
  margin: 0;
  transition: color 0.2s ease;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .pd-info-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pd-book-title {
    font-size: 36px;
    line-height: 46px;
  }
}

@media (max-width: 900px) {
  .pd-card {
    padding: 32px;
    gap: 48px;
  }
  .pd-info-grid {
    grid-template-columns: 1fr;
  }
  .pd-cover-wrap {
    max-width: 280px;
  }
  .pd-book-title {
    font-size: 28px;
    line-height: 38px;
  }
  .pd-related-title {
    font-size: 32px;
    line-height: 42px;
  }
}

@media (max-width: 600px) {
  .pd-card {
    padding: 24px 16px;
    gap: 40px;
  }
  .pd-meta-table {
    grid-template-columns: 1fr;
  }
  .pd-book-title {
    font-size: 22px;
    line-height: 32px;
  }
  .pd-feature-title {
    font-size: 20px;
  }
  .pd-tabs {
    width: 100%;
  }
  .pd-tab {
    flex: 1;
    text-align: center;
  }
  .pd-related-title {
    font-size: 26px;
    line-height: 36px;
  }
}

@media (max-width: 480px) {
  .pd-related-swiper {
    clip-path: inset(-24px -4px -12px -4px);
  }

  .pd-related-book-title {
    font-size: 18px;
  }
  .pd-main {
    padding: 24px 0 48px;
  }
}
