/* ==========================================================================
   小树之家科技 —— 产品详情页样式（清新浅色风）
   ========================================================================== */

/* --------------------------------------------------------------------------
   面包屑
   -------------------------------------------------------------------------- */
.breadcrumb {
  margin-top: var(--header-height);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  font-size: 13.5px;
  color: var(--text-dim);
  background: var(--bg-soft);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 9px;
  color: var(--border-strong);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb [aria-current="page"] {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   产品头部
   -------------------------------------------------------------------------- */
.product-hero {
  padding: 60px 0 84px;
  background: var(--bg-base);
}

.product-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 60px;
  align-items: start;
}

/* 图集：白底产品图靠边框和阴影划边界 */
.gallery__main {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.gallery__thumb {
  aspect-ratio: 4 / 3;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  padding: 0;
  opacity: 0.62;
  transition: opacity var(--transition), border-color var(--transition);
}

.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__thumb:hover {
  opacity: 0.9;
}

.gallery__thumb.is-active {
  border-color: var(--accent-bright);
  opacity: 1;
}

/* 摘要 */
.product-hero__title {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.22;
  margin-bottom: 16px;
}

.product-hero__tagline {
  font-size: 16.5px;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 22px;
}

.product-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 30px;
}

.tag {
  padding: 5px 14px;
  border-radius: 40px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* 卖点列表 */
.highlights {
  margin-bottom: 34px;
}

.highlights li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-base);
}

.highlights li:last-child {
  border-bottom: none;
}

.highlights .icon {
  font-size: 18px;
  color: var(--accent-bright);
  margin-top: 3px;
}

.product-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

/* 购买提示条 */
.buy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

.buy-note .icon {
  color: var(--accent);
  font-size: 17px;
  margin-top: 2px;
}

.buy-note a {
  color: var(--accent);
  font-weight: 600;
}

.buy-note a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   内容区块
   -------------------------------------------------------------------------- */
.block {
  padding: 84px 0;
}

.block--raised {
  background: var(--bg-soft);
}

.block__title {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 16px;
}

.block__lead {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 52px;
}

.block__head--center {
  text-align: center;
}

.block__head--center .block__lead {
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   核心特性
   -------------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
}

.feature__icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  margin-bottom: 18px;
}

.feature__title {
  font-size: 16.5px;
  margin-bottom: 11px;
}

.feature__text {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.88;
  text-align: justify;
}

/* --------------------------------------------------------------------------
   规格参数表
   -------------------------------------------------------------------------- */
.spec-wrap {
  max-width: 980px;
  /* 上边距 34px：与标题拉开距离。有 caption 的页面也一样，
     caption 只是表格内部的第一行，不影响这里的留白。 */
  margin: 34px auto 0;
}

.spec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 14px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.spec-table th,
.spec-table td {
  padding: 15px 22px;
  text-align: left;
  vertical-align: top;
  font-size: 14.8px;
  border-bottom: 1px solid var(--border);
}

.spec-table tbody tr:last-child th,
.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table tbody th {
  width: 200px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-soft);
  white-space: nowrap;
}

.spec-table td {
  color: var(--text-base);
}

/* 分组标题行 */
.spec-table .spec-group th {
  width: auto;
  padding: 13px 22px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  white-space: normal;
  border-bottom: 1px solid var(--accent-line);
}

/* --------------------------------------------------------------------------
   应用场景
   -------------------------------------------------------------------------- */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.usecase {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}

.usecase:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
}

.usecase__icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.usecase__title {
  font-size: 15.5px;
  margin-bottom: 9px;
}

.usecase__text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   接口一览：示意图 + 编号图例
   -------------------------------------------------------------------------- */
.connector-figure {
  /* 上边距 34px：区块没有引导语时，标题与内容之间靠它留白 */
  margin: 34px auto 26px;
  max-width: 880px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.connector-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.connector-figure figcaption {
  padding: 13px 20px;
  font-size: 13.2px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

/* 图例按「列」排布：1-9 在第一列、10-18 在第二列、19-26 在第三列，
   这样读下来的顺序和图中编号一致。 */
.connector-legend {
  display: grid;
  grid-template-rows: repeat(9, auto);
  grid-auto-flow: column;
  gap: 1px;
  max-width: 880px;
  margin: 0 auto;
  padding: 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.connector-legend li {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #fff;
  padding: 10px 18px;
  font-size: 14.2px;
  color: var(--text-base);
  line-height: 1.45;
}

.connector-legend .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  flex: none;
}

/* --------------------------------------------------------------------------
   系统与资料下载
   -------------------------------------------------------------------------- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}

.resource {
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}

.resource:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.resource__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex: none;
}

.resource__title {
  font-size: 16.5px;
  margin: 0;
}

.resource__text {
  flex: 1;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

.resource__go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* 把目标网址露出来，用户点之前就知道会去哪里 */
.resource__url {
  font-size: 12.5px;
  color: var(--text-dim);
  word-break: break-all;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   购买 / 咨询区
   -------------------------------------------------------------------------- */
.action-band {
  position: relative;
  padding: 68px 0;
  background: var(--bg-tint);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.action-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%,
    rgba(20, 184, 166, 0.14), transparent 60%);
  pointer-events: none;
}

.action-band__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.action-band__text h2 {
  font-size: clamp(22px, 2.7vw, 30px);
  margin-bottom: 10px;
}

.action-band__text p {
  color: var(--text-muted);
  font-size: 15.5px;
  margin: 0;
  max-width: 560px;
}

.action-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

/* 次级渠道：电话 / 邮件 */
.action-band__alt {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--accent-line);
  width: 100%;
}

.action-band__alt a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.action-band__alt a:hover {
  color: var(--accent);
}

.action-band__alt .icon {
  color: var(--accent-bright);
  font-size: 17px;
}

/* --------------------------------------------------------------------------
   相关产品
   -------------------------------------------------------------------------- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.related-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
}

.related-card__media {
  aspect-ratio: 16 / 9;
  background: #fff;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.related-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.related-card__title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 6px;
}

.related-card__text {
  display: block;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

.related-card__buy {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   上一页 / 下一页
   -------------------------------------------------------------------------- */
.product-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 38px 0 0;
  flex-wrap: wrap;
}

.product-nav a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-muted);
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: all var(--transition);
}

.product-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.product-nav__label {
  color: var(--text-dim);
  font-size: 12.5px;
  display: block;
}

.product-nav__next {
  margin-left: auto;
  text-align: right;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .product-hero__layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .usecase-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 相关产品：1024 以下仍保持两列。
     如果直接掉到单列，卡片会拉满整屏宽，一张缩略图占满一屏，非常突兀。 */
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .connector-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .product-hero {
    padding: 36px 0 56px;
  }

  .gallery__thumbs {
    gap: 8px;
    margin-top: 10px;
  }

  .product-hero__actions .btn {
    flex: 1;
  }

  .block {
    padding: 56px 0;
  }

  .block__lead {
    margin-bottom: 34px;
  }

  .feature-grid,
  .usecase-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature,
  .usecase {
    padding: 24px 20px;
  }

  .spec-table th,
  .spec-table td {
    padding: 12px 15px;
    font-size: 14px;
  }

  .spec-table tbody th {
    width: 38%;
    white-space: normal;
  }

  .spec-table .spec-group th {
    width: auto;
  }

  /* 手机端才降到单列 */
  .related-grid {
    grid-template-columns: 1fr;
  }

  /* 窄屏改成单列、按行排，否则三列会挤成一团 */
  .connector-legend {
    grid-template-rows: none;
    grid-auto-flow: row;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .action-band {
    padding: 48px 0;
  }

  .action-band__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 26px;
  }

  .action-band__actions {
    flex-direction: column;
  }

  .action-band__actions .btn {
    width: 100%;
  }

  .product-nav {
    flex-direction: column;
  }

  .product-nav__next {
    margin-left: 0;
    text-align: left;
  }
}
