/* ============================================================
   product-detail.html 产品详情页 独立样式文件
   存放位置：css 文件夹
   说明：本文件仅包含产品详情页主体内容样式
   ============================================================ */

/* ---------- 产品主区：左图轮播 + 右信息 ---------- */
.pd_hero_box {
  gap: 44px;
  padding: 24px;
  background-color: #fff;
  border-radius: 10px;
  display: flex;
}
/* ---------- 图片轮播 ---------- */
.pd_gallery_main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 50%;
  /* 允许左栏被压缩，否则右栏按钮的固定宽度会把图库挤成一条缝 */
  min-width: 0;
}
/* 大图容器：相对定位，所有子图叠在一起；正方形自适应，桌面端最大 400px */
.pd_gallery_big_box {
  position: relative;
  width: 100%;
  /* max-width: 400px; */
  max-height: 400px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
/* 大图项：绝对定位铺满容器，互相重叠 */
.pd_gallery_big_img {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.pd_gallery_big_img.active {
  opacity: 1;
  z-index: 1;
}
/* contain：容器变窄时完整展示产品图，不再被裁掉左右两侧 */
.pd_gallery_big_img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 下方缩略区域：图片多时横向滚动，避免被 flex 挤成细条 */
.pd_gallery_small_box {
  display: flex;
  justify-content: safe center;
  gap: 10px;
  margin: 20px 0 0;
  padding-bottom: 2px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pd_gallery_small_box::-webkit-scrollbar {
  display: none;
}
.pd_gallery_small_img {
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
  padding: 10px;
  display: flex;
  border: 1px solid #fff;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.pd_gallery_small_img img {
  height: 100%;
  object-fit: contain;
}
.pd_gallery_small_img.active {
  border: 1px solid var(--text-active-color);
}

.pd_gallery_prev,
.pd_gallery_next {
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  /* 箭头已放进大图容器，按大图垂直居中，不再依赖固定的 -95px 偏移 */
  transform: translateY(-50%);
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: #0e53a1;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition:
    background 0.2s,
    transform 0.2s;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd_gallery_prev {
  left: 12px;
}
.pd_gallery_next {
  right: 12px;
}
.pd_gallery_prev:hover,
.pd_gallery_next:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}
.pd_hero_xinxi {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
}
/* 右侧信息 */
.pd_info_top {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.pd_series {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  background: #0e53a1;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.pd_name {
  margin: 14px 0 8px;
  font-size: 30px;
  line-height: 1.3;
  color: #111;
}
.pd_slogan {
  margin: 0 0 20px;
  font-size: 15px;
  color: #333;
  letter-spacing: 1px;
}
.pd_slogan span:first-child {
  display: none;
}
.pd_points {
  list-style: none;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid #d9e9f6;
  border-radius: 10px;
  overflow: hidden;
  padding: 25px 55px;
}
.pd_points li {
  display: flex;
  gap: 6px;
  padding: 5px 0px;
  font-size: 14px;
  color: #000000;
  text-align: left;
}
.pd_points li .iconfont {
  font-size: 20px;
  color: var(--text-active-color);
}
.pd_points li:nth-child(even) {
  border-left: 1px solid #d9e9f6;
  padding-left: 27px;
}
.pd_params {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.pd_params li {
  border-top: 2px solid #0e53a1;
  background: #fbfdfe;
  border-left: 1px solid #eef4fa;
  border-right: 1px solid #eef4fa;
  border-bottom: 1px solid #eef4fa;
  border-radius: 0 0 8px 8px;
  padding: 10px 8px;
  font-size: 13px;
  color: #333;
  text-align: center;
}

.pd_actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  border-top: 1px solid #f2f3f5;
  padding: 25px 0 20px;
}
/* 按钮等分自适应：一行放不下自动换行，不再靠固定 120px 撑开最小宽度 */
.pd_buy_wrap,
.pd_act {
  flex: 1 1 110px;
  max-width: 150px;
  min-width: 0;
}
.pd_act {
  width: 100%;
  padding: 6px 0;
  border: 1px solid #0e53a1;
  border-radius: 25px;
  background: #fff;
  color: #0e53a1;
  font-size: 15px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.pd_act:hover {
  background: #0e53a1;
  color: #fff;
}
.pd_act:active {
  background: #0e53a1;
  border-color: #0e53a1;
  color: #fff;
}
/* .pd_act_buy {
  background: #0e53a1;
  border-color: #0e53a1;
  color: #fff;
}
.pd_act_buy:hover {
  background: #0e53a1;
  border-color: #0e53a1;
} */

/* ---------- 选项卡 ---------- */
.pd_tabs {
  border-top: 1px solid #ececec;
  margin-bottom: 20px;
}
.pd_tab_bar {
  display: flex;
  gap: 34px;
  border-bottom: 3px solid #ffffff;
}
.pd_tab {
  flex: 1;
  position: relative;
  padding: 16px 2px;
  background: none;
  border: none;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  transition: color 0.2s;
}
.pd_tab:hover {
  color: #0e53a1;
}
.pd_tab.active {
  color: #0e53a1;
  border-bottom: #0e53a1;
  font-weight: 700;
}
.pd_tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: #0e53a1;
}
.pd_tab_panel {
  /* display: none; */
  padding: 30px 12px 30px;
  /* 富文本里的宽表格在窄屏横向滚动，而不是把页面撑出横向滚动条 */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pd_tab_desc {
  padding: 30px 12px 30px;
  background: #fff;
  border-radius: 10px;
  min-height: 300px;
}
.pd_tab_desc img {
  margin: 0 auto;
  object-fit: contain;
  height: auto;
}

/* 视频介绍 */
.pd_video_box {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #0f1f2e;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 10px;
}
.pd_video_box video {
  width: 99%;
  border-radius: 20px;
}
.pd_video_play {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0e53a1;
  font-size: 26px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}
.pd_video_play .iconfont {
  font-size: 30px;
}
.pd_video_title {
  margin: 14px 0 0;
  color: #cfe3f4;
  font-size: 15px;
}

/* 产品参数表 */
.pd_spec_table {
  width: 100%;
  border-collapse: collapse;
}
.pd_spec_table th,
.pd_spec_table td {
  padding: 8px 18px;
  border-right: 1px solid #f2f3f5;
  border-bottom: 4px solid #f2f3f5;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.pd_spec_table th {
  width: 220px;
  background: #ffffff;
  color: #444;
}
.pd_spec_table td {
  color: #333;
  background: #ffffff;
  border-right: 0;
  font-weight: 400;
}

/* ---------- 弹窗 ---------- */
.pd_mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd_mask[hidden] {
  display: none;
}
.pd_modal {
  width: 420px;
  max-width: 90%;
  background: #fff;
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
}
.pd_modal_title {
  margin: 0 0 12px;
  font-size: 18px;
  color: #111;
}
.pd_modal_text {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.8;
  color: #555;
}
.pd_modal_textarea {
  width: 100%;
  height: 96px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d5e3ef;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 16px;
}
.pd_modal_textarea:focus {
  outline: none;
  border-color: #0e53a1;
}
.pd_modal_btn {
  width: 100%;
  padding: 11px 0;
  border: none;
  border-radius: 8px;
  background: #0e53a1;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 10px;
}
.pd_modal_btn:hover {
  background: #256aa4;
}
.pd_modal_close {
  width: 100%;
  padding: 10px 0;
  border: 1px solid #d5e3ef;
  border-radius: 8px;
  background: #fff;
  color: #666;
  font-size: 14px;
  cursor: pointer;
}
.pd_modal_close:hover {
  border-color: #0e53a1;
  color: #0e53a1;
}
/* ---------- 响应式 ---------- */

/* 1100 以下：两栏间距与优势点内边距收紧，给内容留出空间 */
@media (max-width: 1100px) {
  .pd_hero_box {
    gap: 28px;
  }
  .pd_points {
    padding: 20px 24px;
  }
  .pd_points li:nth-child(even) {
    padding-left: 18px;
  }
}

/* 992 以下：改为上下堆叠，图库铺满整行、大图居中 */
@media (max-width: 992px) {
  .pd_hero_box {
    flex-direction: column;
    gap: 20px;
  }
  .pd_gallery_main {
    width: 100%;
  }
  .pd_hero_xinxi {
    flex-direction: column;
    gap: 20px;
  }
  .pd_info_top {
    width: 100%;
  }
  .pd_name {
    font-size: 28px;
  }
  .pd_gallery_small_img {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    padding: 8px;
  }
  .pd_actions {
    padding: 18px 0 6px;
  }
}

/* 767 以下：缩略图与左右箭头缩小，选项卡改为横向滚动 */
@media (max-width: 767px) {
  .pd_gallery_small_box {
    gap: 8px;
    margin-top: 14px;
  }
  .pd_gallery_small_img {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    padding: 6px;
  }
  .pd_gallery_prev,
  .pd_gallery_next {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  .pd_gallery_prev {
    left: 6px;
  }
  .pd_gallery_next {
    right: 6px;
  }
  /* 选项卡：英文标题（Detailed description / Video introduction…）比中文长，
     平板上就改为横向滚动，避免被 flex 均分后换行挤成两行 */
  .pd_tab_bar {
    gap: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pd_tab_bar::-webkit-scrollbar {
    display: none;
  }
  .pd_tab {
    flex: 0 0 auto;
    padding: 14px 16px;
    font-size: 14px;
    white-space: nowrap;
  }
  .pd_tab.active::after {
    bottom: 0;
    height: 2px;
  }
}

@media (max-width: 640px) {
  .pd_hero_box {
    padding: 16px 14px;
  }
  .pd_name {
    font-size: 23px;
    margin: 12px 0 6px;
  }
  .pd_slogan {
    margin-bottom: 14px;
    font-size: 14px;
  }
  .pd_points,
  .pd_params {
    grid-template-columns: repeat(2, 1fr);
    margin: 0 0 14px;
    padding: 14px 16px;
  }
  .pd_points li {
    font-size: 13px;
  }
  .pd_points li:nth-child(even) {
    padding-left: 12px;
  }
  .pd_actions {
    gap: 8px;
    padding: 14px 0 4px;
  }
  .pd_act {
    font-size: 14px;
  }
  .pd_tab_panel,
  .pd_tab_desc {
    padding: 18px 4px;
  }
  .pd_tab_desc {
    min-height: 200px;
  }
  .pd_video_box {
    border-radius: 14px;
    padding: 6px;
  }
  .pd_video_title {
    margin-top: 10px;
    font-size: 13px;
  }
}

@media (max-width: 450px) {
  .pd_hero_box {
    padding: 8px 10px 10px;
    gap: 16px;
  }
  .pd_series {
    padding: 2px 10px;
    font-size: 12px;
  }
  .pd_name {
    font-size: 20px;
    margin: 10px 0 6px;
  }
  .pd_points {
    padding: 10px 8px;
  }
  .pd_points li {
    gap: 4px;
    padding: 4px 0;
    font-size: 12px;
    line-height: 1.5;
  }
  .pd_points li .iconfont {
    font-size: 16px;
  }
  .pd_points li:nth-child(even) {
    padding-left: 8px;
  }
  .pd_act {
    font-size: 13px;
    padding: 6px 0;
  }
  .pd_tab {
    padding: 12px;
    font-size: 13px;
  }
  .pd_spec_table th {
    width: auto;
  }
  .pd_spec_table td {
    font-size: 12px;
    font-weight: 500;
  }
  .pd_gallery_small_img {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    padding: 4px;
  }
  .pd_tab_panel,
  .pd_tab_desc {
    padding: 4px;
  }
}

/* 购买弹窗（点击购买按钮弹出） */
.pd_buy_wrap {
  position: relative;
  display: flex;
}
.pd_buy_pop {
  position: absolute;
  bottom: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
}
.pd_buy_pop[hidden] {
  display: none;
}
.pd_buy_pop_card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(10, 22, 40, 0.16);
  width: 310px;
}
.pd_buy_arr {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 4px 4px 8px rgba(10, 22, 40, 0.1);
}
.pd_buy_icon {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  cursor: pointer;
}

/* 按钮点击选中态：蓝底白字 */
.pd_act.active {
  background: #0e53a1;
  border-color: #0e53a1;
  color: #fff;
}

/* 手机端：购买弹层改为居中弹窗，避免靠左对齐时卡片超出屏幕 */
@media (max-width: 640px) {
  .pd_buy_pop {
    position: fixed;
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
  }
  .pd_buy_pop_card {
    width: min(310px, calc(100vw - 40px));
  }
  .pd_buy_arr {
    display: none;
  }
}
