/* HL3C Product Layout V9：恢復商品頁整體版面與規格卡片 */

/* 避免 header 後內容貼齊左邊或跑到奇怪位置 */
.product-v2-hero,
.product-v2-layout {
  width: min(1360px, calc(100% - 56px));
  margin-left: auto;
  margin-right: auto;
}

/* 商品主視覺區恢復成完整白色卡片感 */
.product-v2-hero {
  margin-top: 38px;
  margin-bottom: 34px;
  padding: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  gap: 38px;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 32px;
  box-shadow: 0 18px 56px rgba(15, 23, 42, .06);
  overflow: hidden;
}

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

.product-v2-breadcrumb {
  display: inline-block;
  margin-bottom: 18px;
  color: #64748b;
  font-weight: 800;
}

.product-v2-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 4.2vw, 64px);
  line-height: 1.16;
  letter-spacing: .01em;
  color: #111827;
}

.product-v2-copy p {
  max-width: 680px;
  font-size: 20px;
  line-height: 1.75;
  color: #475569;
}

.product-v2-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.product-v2-image {
  min-width: 0;
  border-radius: 28px;
  background: #f8fafc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-v2-image img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}

/* 主內容版型恢復：左內容右諮詢卡 */
.product-v2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  align-items: start;
  margin-bottom: 64px;
}

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

/* 每個區塊都變成卡片，不要文字直接貼在頁面上 */
.product-v2-section,
.product-related-cases {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 32px;
  padding: 38px;
  margin-bottom: 28px;
  box-shadow: 0 16px 52px rgba(15, 23, 42, .055);
}

.product-v2-section h2,
.product-related-cases h2 {
  margin: 0 0 24px;
  font-size: clamp(32px, 3vw, 48px);
  line-height: 1.2;
  color: #111827;
}

.product-v2-content {
  max-width: 100%;
  overflow: hidden;
  color: #1f2937;
  font-size: 19px;
  line-height: 1.9;
}

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

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

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

/* 規格與應用恢復成圖3那種大卡片內表格，而不是整頁橫列 */
.product-v2-spec-table {
  display: grid;
  gap: 0;
  width: 100%;
  max-width: 920px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 32px rgba(15,23,42,.04);
}

.product-v2-spec-table > div {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  border-bottom: 1px solid #e5e7eb;
  min-height: 74px;
  background: #fff;
}

.product-v2-spec-table > div:last-child {
  border-bottom: 0;
}

.product-v2-spec-table > div strong {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
  background: #f8fafc;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
  border-right: 1px solid #e5e7eb;
  white-space: normal;
}

.product-v2-spec-table > div span {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 18px 22px;
  color: #475569;
  font-size: 18px;
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 右側諮詢卡固定卡片感，不要跑到頁面中間 */
.product-v2-side {
  position: sticky;
  top: 96px;
}

.product-v2-side-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 16px 52px rgba(15, 23, 42, .055);
}

.product-v2-side-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
  color: #111827;
}

.product-v2-side-card p {
  color: #475569;
  font-size: 17px;
  line-height: 1.75;
}

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

.product-related-cases-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

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

/* 長標題或舊內容不要衝出版面 */
.product-v2-section,
.product-v2-content,
.product-v2-spec-table,
.product-related-cases {
  max-width: 100%;
}

@media (max-width: 1100px) {
  .product-v2-hero,
  .product-v2-layout {
    width: min(100% - 36px, 920px);
  }

  .product-v2-hero,
  .product-v2-layout {
    grid-template-columns: 1fr;
  }

  .product-v2-side {
    position: static;
  }

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

@media (max-width: 720px) {
  .product-v2-hero,
  .product-v2-layout {
    width: min(100% - 24px, 100%);
  }

  .product-v2-hero,
  .product-v2-section,
  .product-related-cases {
    padding: 24px;
    border-radius: 24px;
  }

  .product-v2-spec-table > div {
    grid-template-columns: 1fr;
  }

  .product-v2-spec-table > div strong {
    justify-content: flex-start;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .product-related-cases-head {
    display: block;
  }

  .product-related-cases-head .btn {
    margin-top: 14px;
  }

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