/* HL3C Product Layout V8：修正商品頁「規格與應用」跑版 */

/* 商品頁主版型穩定 */
.product-v2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.product-v2-main {
  min-width: 0;
}

.product-v2-side {
  min-width: 0;
}

/* 商品介紹區：避免舊 HTML、iframe、圖片撐爆 */
.product-v2-content {
  max-width: 100%;
  overflow: hidden;
  line-height: 1.85;
  font-size: 18px;
  color: #1f2937;
}

.product-v2-content p,
.product-v2-content div {
  max-width: 100%;
}

.product-v2-content iframe {
  display: block;
  max-width: 100% !important;
  width: min(100%, 552px) !important;
  margin: 18px auto;
}

.product-v2-content img {
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain;
}

/* 規格與應用：改成清楚的資料列，不再像文字跑掉 */
.product-v2-spec-table {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.product-v2-spec-table > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(15,23,42,.04);
}

.product-v2-spec-table > div strong {
  display: block;
  color: #0f172a;
  font-weight: 900;
  line-height: 1.6;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafc;
  text-align: center;
  white-space: nowrap;
}

.product-v2-spec-table > div span {
  display: block;
  min-width: 0;
  color: #475569;
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 長服務地區文字不要把版面撐開 */
.product-v2-spec-table > div span,
.product-v2-section,
.product-v2-side-card {
  max-width: 100%;
}

/* 相關案例不要擠壓規格區 */
.product-related-cases {
  max-width: 100%;
  overflow: hidden;
}

.product-related-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-related-case-card {
  min-width: 0;
}

.product-related-case-card h3,
.product-related-case-card p {
  overflow-wrap: anywhere;
}

/* 商品頁上方主圖與文字欄位 */
.product-v2-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 34px;
  align-items: center;
}

.product-v2-copy,
.product-v2-image {
  min-width: 0;
}

/* 舊資料若有 h3 開頭，避免標題太突兀 */
.product-v2-content h3 {
  font-size: 22px;
  line-height: 1.45;
  margin: 16px 0 10px;
}

/* 手機與窄版 */
@media (max-width: 1100px) {
  .product-v2-layout,
  .product-v2-hero {
    grid-template-columns: 1fr;
  }

  .product-related-cases-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .product-v2-spec-table > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .product-v2-spec-table > div strong {
    text-align: left;
    width: fit-content;
    white-space: normal;
  }

  .product-related-cases-grid {
    grid-template-columns: 1fr;
  }
}
