/* ==========================================================================
   产品详情页视觉升级（覆盖层，不改原 style.css）
   只作用于 body[data-page="product"]，其它页面零影响
   ========================================================================== */

body[data-page="product"] {
  background: #fff;
}

/* 顶部留白与容器 */
body[data-page="product"] .section {
  padding-top: clamp(28px, 4vw, 56px);
}
body[data-page="product"] #productDetail {
  max-width: 1320px;
}

/* ---------- 两栏骨架 ---------- */
body[data-page="product"] .detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

/* ---------- 左侧画廊 ---------- */
body[data-page="product"] .detail-media {
  position: sticky;
  top: 104px;
}
body[data-page="product"] .detail-main {
  position: relative;
  background: linear-gradient(158deg, #f8faf9 0%, #eef4f1 58%, #e9f0ec 100%);
  border: 1px solid #e6eeea;
  border-radius: 26px;
  padding: clamp(14px, 2vw, 26px);
  overflow: hidden;
}
body[data-page="product"] .detail-main::after {
  content: "";
  position: absolute;
  inset: auto -12% -32% -12%;
  height: 46%;
  background: radial-gradient(60% 100% at 50% 0%, rgba(31, 107, 79, 0.07), transparent 70%);
  pointer-events: none;
}
body[data-page="product"] .detail-main img#detailMainImg {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 44px -28px rgba(20, 46, 38, 0.4);
  display: block;
}
body[data-page="product"] .detail-main .tag {
  display: none; /* 分类已在 eyebrow 显示，避免重复 */
  position: absolute;
  top: clamp(20px, 2.6vw, 34px);
  left: clamp(20px, 2.6vw, 34px);
  background: rgba(255, 255, 255, 0.95);
  color: #1f6b4f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #dbe9e2;
  box-shadow: 0 6px 18px -12px rgba(20, 46, 38, 0.5);
  z-index: 3;
}
body[data-page="product"] .zoom-hint svg {
  width: 20px;
  height: 20px;
  stroke: #2d4a3f;
  stroke-width: 1.9;
  fill: none;
}
body[data-page="product"] .zoom-hint {
  right: clamp(20px, 2.4vw, 30px);
  bottom: clamp(20px, 2.4vw, 30px);
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e0ebe5;
  color: #2d4a3f;
  box-shadow: 0 8px 22px -16px rgba(20, 46, 38, 0.7);
}

/* 缩略图：统一 88px、选中描边 */
body[data-page="product"] .detail-thumbs {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
body[data-page="product"] .detail-thumbs .thumb {
  width: 88px;
  height: 88px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid #e2ebe6;
  background: #f8faf9;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
body[data-page="product"] .detail-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}
body[data-page="product"] .detail-thumbs .thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -18px rgba(20, 46, 38, 0.8);
}
body[data-page="product"] .detail-thumbs .thumb.active {
  border-color: #1f6b4f;
  box-shadow: 0 0 0 3px rgba(31, 107, 79, 0.14);
}

/* ---------- 右侧信息 ---------- */
body[data-page="product"] .detail-info {
  padding-top: 6px;
}
body[data-page="product"] .detail-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5c7a6d;
  margin: 0 0 16px;
}
body[data-page="product"] .detail-eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: #1f6b4f;
  border-radius: 2px;
}
body[data-page="product"] .detail-info h1 {
  font-size: clamp(26px, 3.1vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.022em;
  font-weight: 800;
  color: #14261f;
  margin: 0 0 14px;
}
body[data-page="product"] .detail-info .short-desc {
  font-size: 16.5px;
  line-height: 1.68;
  color: #5a6a63;
  max-width: 52ch;
  margin: 0 0 26px;
}

/* 规格表：去斑马、改成分隔线 + 小标签 */
body[data-page="product"] .spec-table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
  background: transparent;
  margin: 0 0 8px;
}
body[data-page="product"] .spec-table tr {
  background: transparent;
}
body[data-page="product"] .spec-table td {
  padding: 13px 0;
  border-bottom: 1px solid #eaf1ed;
  vertical-align: top;
  font-size: 15px;
  color: #21342c;
  line-height: 1.5;
}
body[data-page="product"] .spec-table tr:first-child td {
  border-top: 1px solid #eaf1ed;
}
body[data-page="product"] .spec-table td:first-child {
  width: 38%;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7d8f88;
  padding-right: 18px;
  white-space: nowrap;
}

/* CTA 区 */
body[data-page="product"] .detail-ctas {
  display: flex;
  gap: 12px;
  margin: 28px 0 16px;
  flex-wrap: wrap;
}
body[data-page="product"] .detail-ctas .btn {
  border-radius: 999px;
  padding: 15px 30px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
body[data-page="product"] .detail-ctas .btn-accent {
  box-shadow: 0 14px 26px -18px rgba(31, 107, 79, 0.9);
}
body[data-page="product"] .detail-ctas .btn-outline {
  border: 1.5px solid #cfded7;
  color: #1c3a2f;
  background: #fff;
}
body[data-page="product"] .detail-ctas .btn-outline:hover {
  border-color: #1f6b4f;
  color: #1f6b4f;
}

body[data-page="product"] .price-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.62;
  color: #77877f;
  background: #f7faf8;
  border: 1px solid #e9f1ed;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0;
}
body[data-page="product"] .price-note svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: #1f6b4f;
}

/* ---------- 下半部分：描述 / 亮点 / 参数 ---------- */
body[data-page="product"] .detail-body,
body[data-page="product"] .detail-attributes {
  max-width: 1180px;
  margin-top: clamp(48px, 6vw, 78px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid #eef3f0;
}
body[data-page="product"] .detail-body h2,
body[data-page="product"] .detail-attributes h2 {
  position: relative;
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #14261f;
  margin: 0 0 18px;
  padding-left: 16px;
}
body[data-page="product"] .detail-body h2::before,
body[data-page="product"] .detail-attributes h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 4px;
  border-radius: 4px;
  background: #1f6b4f;
}
body[data-page="product"] .detail-body h2 + h2,
body[data-page="product"] .detail-body ul.highlight-list + h2 {
  margin-top: 40px;
}
body[data-page="product"] .detail-body p {
  font-size: 16px;
  line-height: 1.78;
  color: #4d5f57;
  max-width: 74ch;
  margin: 0 0 14px;
}

/* 亮点：两列卡片 */
body[data-page="product"] .highlight-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
body[data-page="product"] .highlight-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f8fbf9;
  border: 1px solid #eaf2ee;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.55;
  color: #26433a;
  font-weight: 500;
}
body[data-page="product"] .highlight-list li svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: #1f6b4f;
}

/* 参数表沿用规格表样式 */
body[data-page="product"] .attr-table {
  width: 100%;
  border-collapse: collapse;
}
body[data-page="product"] .attr-table td {
  padding: 12px 0;
  border-bottom: 1px solid #eaf1ed;
  font-size: 15px;
  color: #21342c;
}
body[data-page="product"] .attr-table td:first-child {
  width: 34%;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7d8f88;
}

/* 信任条：工厂直供 / 免费样品 / 24 小时回复 */
body[data-page="product"] .detail-assurance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}
body[data-page="product"] .detail-assurance .assure {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #f7faf8;
  border: 1px solid #e8f1ec;
  border-radius: 14px;
  padding: 14px 16px;
}
body[data-page="product"] .detail-assurance .assure b {
  font-size: 13.5px;
  font-weight: 700;
  color: #1c3a2f;
  letter-spacing: -0.01em;
}
body[data-page="product"] .detail-assurance .assure span {
  font-size: 12.5px;
  color: #7b8b84;
  line-height: 1.45;
}


/* ---------- 小屏：规格表改成上下两行，避免横向溢出 ---------- */
@media (max-width: 720px) {
  body[data-page="product"] {
    overflow-x: hidden;
  }
  body[data-page="product"] .detail-grid,
  body[data-page="product"] .detail-media,
  body[data-page="product"] .detail-info {
    min-width: 0;
  }
  body[data-page="product"] .detail-info h1 {
    font-size: 26px;
    line-height: 1.2;
  }
  body[data-page="product"] .spec-table,
  body[data-page="product"] .spec-table tbody,
  body[data-page="product"] .spec-table tr,
  body[data-page="product"] .spec-table td {
    display: block;
    width: 100%;
  }
  body[data-page="product"] .spec-table tr {
    padding: 12px 0;
    border-bottom: 1px solid #eaf1ed;
  }
  body[data-page="product"] .spec-table tr:first-child {
    border-top: 1px solid #eaf1ed;
  }
  body[data-page="product"] .spec-table td {
    border: 0;
    padding: 0;
    white-space: normal;
  }
  body[data-page="product"] .spec-table td:first-child {
    width: auto;
    padding: 0 0 4px;
  }
  body[data-page="product"] .detail-assurance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-page="product"] .detail-assurance .assure:last-child {
    grid-column: 1 / -1;
  }
  /* 询盘表单在窄屏压成一列，避免撑宽整页 */
  body[data-page="product"] .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-page="product"] .form-grid .form-field,
  body[data-page="product"] .form-grid input,
  body[data-page="product"] .form-grid textarea,
  body[data-page="product"] .form-grid select {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }
  body[data-page="product"] .quote-card {
    padding: 22px 18px;
  }
  body[data-page="product"] .attr-table,
  body[data-page="product"] .attr-table tbody,
  body[data-page="product"] .attr-table tr,
  body[data-page="product"] .attr-table td {
    display: block;
    width: 100%;
  }
  body[data-page="product"] .attr-table td:first-child {
    padding-bottom: 4px;
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  body[data-page="product"] .detail-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  body[data-page="product"] .detail-media {
    position: static;
  }
  body[data-page="product"] .highlight-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  body[data-page="product"] .detail-main {
    border-radius: 20px;
    padding: 12px;
  }
  body[data-page="product"] .detail-thumbs .thumb {
    width: 68px;
    height: 68px;
  }
  body[data-page="product"] .detail-ctas .btn {
    width: 100%;
    text-align: center;
  }
}
