/**
 * Gosmooth - Product Detail Page CSS
 * 設計參考：舊站 ShopLentor 產品詳情頁
 * 黃色主題：#EEB21B / #E8B20A
 * 命名空間：.product-detail-page
 * 不污染首頁、分類頁、品牌頁、後台
 */
.product-detail-page {
  --gs-yellow: #EEB21B;
  --gs-yellow-hover: #ffc42e;
  --gs-yellow-dark: #C19616;
  --gs-green: #35C17D;
  --gs-blue: #2185D0;
  --gs-text: #333333;
  --gs-text-light: #7A7A7A;
  --gs-bg-light: #F9F9F9;
  --gs-bg-lighter: #F2F2F2;
  --gs-border: #EEEEEE;
  --gs-font-sans: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  --gs-font-serif: "Noto Serif TC", "Microsoft JhengHei", "PingFang TC", serif;
  --gs-max-width: 1280px;
}

/* ── 主容器 ─────────────────────────────────────────────── */
.product-detail {
  max-width: var(--gs-max-width);
  margin: 0 auto;
  padding: 30px 20px 60px;
  font-family: var(--gs-font-sans);
  color: var(--gs-text);
}

.product-detail__container { width: 100%; }

/* ═══════════════════════════════════════════════════════════
   第一屏：product-hero（圖左文右）
   ═══════════════════════════════════════════════════════════ */
.product-hero {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  border-top: 3px solid var(--gs-yellow);
  padding-top: 24px;
}

/* 左欄：圖片區 ~48% */
.product-hero__gallery {
  flex: 0 0 48%;
  max-width: 48%;
  min-width: 0;
}

.product-hero__main-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--gs-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--gs-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-hero__main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-hero__placeholder {
  color: #9ca3af;
  font-size: 16px;
}

/* 左右箭頭 */
.product-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--gs-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gs-text);
  z-index: 2;
  transition: background 0.2s;
  padding: 0;
  line-height: 1;
}
.product-hero__arrow:hover { background: #fff; color: var(--gs-yellow); }
.product-hero__arrow--prev { left: 10px; }
.product-hero__arrow--next { right: 10px; }

/* 縮略圖 */
.product-hero__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.product-hero__thumb {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border: 2px solid var(--gs-border);
  border-radius: 4px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--gs-bg-light);
  transition: border-color 0.2s;
}
.product-hero__thumb:hover { border-color: var(--gs-yellow); }
.product-hero__thumb.is-active {
  border-color: var(--gs-yellow);
  box-shadow: 0 0 0 2px rgba(238,178,27,0.3);
}
.product-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 右欄：產品摘要卡 ~52% */
.product-hero__summary {
  flex: 1;
  min-width: 0;
}

/* ═══════════════════════════════════════════════════════════
   產品摘要卡（product-summary-card）
   參考舊站：白色背景、黃線上下裝飾
   ═══════════════════════════════════════════════════════════ */
.product-summary-card {
  position: relative;
  background: #fff;
  border-radius: 6px;
  padding: 24px 24px 28px;
  border: 1px solid var(--gs-border);
  border-top: 4px solid var(--gs-yellow);
}

/* 熱銷角標 */
.product-summary-card__badge {
  position: absolute;
  top: -1px;
  left: -1px;
  background: var(--gs-yellow);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 0 0 8px 0;
  z-index: 2;
  text-transform: uppercase;
}

/* 產品名稱 */
.product-summary-card__title {
  font-family: var(--gs-font-serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 6px;
  color: var(--gs-text);
}

/* 英文副標題 */
.product-summary-card__subtitle {
  font-family: var(--gs-font-sans);
  font-size: 14px;
  color: var(--gs-text-light);
  margin: 0 0 14px;
  line-height: 1.5;
}

/* 品牌 / 分類 */
.product-summary-card__meta {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  font-size: 13px;
}
.product-summary-card__meta-label { color: var(--gs-text-light); }
.product-summary-card__meta-value { color: var(--gs-text); font-weight: 500; }

/* Section 標題：[ 產品簡介 ] / [ 即時報價 ] */
.product-summary-card__section-title {
  font-family: var(--gs-font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--gs-yellow);
  margin: 0 0 12px;
  border-bottom: 1px solid var(--gs-border);
  padding-bottom: 6px;
}
.product-summary-card__section {
  margin-bottom: 20px;
}

/* 產品簡介文字 */
.product-summary-card__intro {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--gs-text);
}
.product-summary-card__intro p { margin: 0 0 8px; }

/* 分享按鈕 */
.product-summary-card__share { margin-bottom: 16px; }
.gs-share-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--gs-border);
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--gs-text-light);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--gs-font-sans);
}
.gs-share-trigger:hover {
  border-color: var(--gs-yellow);
  color: var(--gs-yellow);
}
.gs-share-icon { font-size: 16px; }

/* ── 屬性表（參考舊站規格表） ────────────────────────── */
.product-summary-card__attributes { margin-bottom: 18px; }

.product-attr-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gs-border);
  font-size: 14px;
}

.product-attr-table th,
.product-attr-table td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--gs-border);
}

.product-attr-table tr:last-child th,
.product-attr-table tr:last-child td {
  border-bottom: none;
}

.product-attr-table th {
  width: 30%;
  background: var(--gs-bg-lighter);
  font-weight: 600;
  color: var(--gs-text);
  border-right: 1px solid var(--gs-border);
}

.product-attr-table td {
  background: var(--gs-bg-light);
  color: var(--gs-text);
}

/* ── 即時報價按鈕 ────────────────────────────────────── */
.product-summary-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 通用按鈕 .gs-btn */
.gs-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--gs-font-sans);
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  color: #fff;
  white-space: nowrap;
}
.gs-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.gs-btn--whatsapp { background: var(--gs-green); }
.gs-btn--whatsapp:hover { background: #2ea85e; color: #fff; text-decoration: none; }
.gs-btn--phone { background: var(--gs-yellow); color: var(--gs-text); }
.gs-btn--phone:hover { background: var(--gs-yellow-hover); color: var(--gs-text); text-decoration: none; }
.gs-btn--email { background: var(--gs-blue); }
.gs-btn--email:hover { background: #1a6db8; color: #fff; text-decoration: none; }
.gs-btn--report { background: #6b7280; }
.gs-btn--report:hover { background: #4b5563; color: #fff; text-decoration: none; }

/* ═══════════════════════════════════════════════════════════
   產品詳情內容區
   ═══════════════════════════════════════════════════════════ */
.product-detail__content {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 3px solid var(--gs-yellow);
}

.product-detail__content-inner {
  font-size: 15px;
  line-height: 1.9;
  color: var(--gs-text);
  max-width: 100%;
  overflow-wrap: break-word;
}
.product-detail__content-inner p { margin: 0 0 14px; }
.product-detail__content-inner h2,
.product-detail__content-inner h3,
.product-detail__content-inner h4 {
  font-family: var(--gs-font-serif);
  margin: 28px 0 14px;
  color: var(--gs-text);
}
.product-detail__content-inner h2 { font-size: 22px; }
.product-detail__content-inner h3 { font-size: 18px; }
.product-detail__content-inner h4 { font-size: 16px; }
.product-detail__content-inner ul,
.product-detail__content-inner ol {
  padding-left: 22px;
  margin: 0 0 14px;
}
.product-detail__content-inner li { margin-bottom: 6px; }
.product-detail__content-inner img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.product-detail__content-inner a {
  color: var(--gs-yellow-dark);
  text-decoration: underline;
}
.product-detail__content-inner a:hover { color: var(--gs-yellow); }
.product-detail__content-inner table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 14px;
}
.product-detail__content-inner th,
.product-detail__content-inner td {
  padding: 8px 12px;
  border: 1px solid var(--gs-border);
  text-align: left;
}
.product-detail__content-inner th {
  background: var(--gs-bg-lighter);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   索取報告區（參考舊站 gs-report-section）
   ═══════════════════════════════════════════════════════════ */
.product-detail__reports {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 2px solid var(--gs-yellow);
}

.gs-report-container {
  max-width: 500px;
}

.gs-report-desc {
  color: var(--gs-text);
  font-size: 16px;
  margin-bottom: 18px;
}

.gs-report-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gs-report-btn {
  display: flex;
  align-items: stretch;
  background: var(--gs-yellow);
  border: none;
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  height: 80px;
}
.gs-report-btn:hover {
  background: #F1C43F;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transform: translateY(-1px);
  text-decoration: none;
}

.gs-report-btn__icon {
  background: var(--gs-yellow-dark);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 20px;
  flex-shrink: 0;
}

.gs-report-btn__text {
  padding: 14px 18px;
  color: var(--gs-text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.3;
}
.gs-report-btn__text strong {
  font-size: 15px;
  display: block;
  margin-bottom: 2px;
}
.gs-report-btn__text span {
  font-size: 14px;
  font-weight: 400;
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   相關產品區
   ═══════════════════════════════════════════════════════════ */
.product-detail__related {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 3px solid var(--gs-yellow);
}

.product-detail__related-title {
  font-family: var(--gs-font-sans);
  font-size: 20px;
  font-weight: 600;
  color: var(--gs-yellow);
  margin: 0 0 20px;
}

.product-detail__related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* ═══════════════════════════════════════════════════════════
   產品卡片 .gs-product-card（相關產品）
   ═══════════════════════════════════════════════════════════ */
.gs-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gs-border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--gs-text);
  background: #fff;
  transition: box-shadow 0.2s, transform 0.1s;
}
.gs-product-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  color: var(--gs-text);
  text-decoration: none;
}

.gs-product-card__badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: var(--gs-yellow);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0 0 6px 0;
}

.gs-product-card__img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--gs-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gs-product-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.gs-product-card__img-placeholder {
  color: #9ca3af;
  font-size: 13px;
}

.gs-product-card__info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gs-product-card__name {
  font-family: var(--gs-font-serif);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.gs-product-card__cat {
  font-size: 12px;
  color: var(--gs-text-light);
  margin: 0 0 10px;
}

.gs-product-card__more {
  margin-top: auto;
  display: inline-block;
  background: var(--gs-yellow);
  color: var(--gs-text);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 4px;
  text-align: center;
  transition: background 0.2s;
}
.gs-product-card:hover .gs-product-card__more {
  background: var(--gs-yellow-hover);
}


/* ═══════════════════════════════════════════════════════════
   手機端響應式（最大 767px）
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .product-detail {
    padding: 0 0 40px;
  }

  /* Hero 改縱向 */
  .product-hero {
    flex-direction: column;
    gap: 0;
    border-top: none;
    padding-top: 0;
  }

  /* 圖片區全寬 */
  .product-hero__gallery {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .product-hero__main-image-wrap {
    aspect-ratio: 1 / 1;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .product-hero__thumb {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
  }

  /* 右欄摘要卡 */
  .product-hero__summary {
    padding: 0 12px;
    margin-top: 16px;
  }

  .product-summary-card {
    border-top: 3px solid var(--gs-yellow);
    padding: 16px 14px 20px;
    border-radius: 4px;
  }

  .product-summary-card__title {
    font-size: 22px;
  }

  .product-summary-card__subtitle {
    font-size: 13px;
  }

  .product-summary-card__section-title {
    font-size: 15px;
  }

  .product-summary-card__intro {
    font-size: 14px;
    line-height: 1.9;
  }

  .product-summary-card__actions {
    flex-direction: column;
  }
  .gs-btn {
    justify-content: center;
    width: 100%;
  }

  /* 屬性表手機適配 */
  .product-attr-table th {
    width: 35%;
    padding: 10px 12px;
    font-size: 13px;
  }
  .product-attr-table td {
    padding: 10px 12px;
    font-size: 13px;
  }

  /* 產品描述 */
  .product-detail__content {
    margin-top: 28px;
    padding: 24px 12px 0;
  }

  /* 報告區 */
  .product-detail__reports {
    padding: 20px 12px 0;
  }
  .gs-report-container { max-width: 100%; }
  .gs-report-btn { height: 72px; }

  /* 相關產品：兩欄 */
  .product-detail__related {
    padding: 20px 12px 0;
  }
  .product-detail__related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gs-product-card__name { font-size: 13px; }
  .gs-product-card__more { font-size: 12px; padding: 5px 10px; }
}

/* ═══════════════════════════════════════════════════════════
   平板端響應式（768px ~ 1024px）
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1024px) {
  .product-detail { padding: 24px 16px 48px; }
  .product-hero { gap: 24px; }
  .product-hero__gallery { flex: 0 0 44%; max-width: 44%; }
  .product-summary-card { padding: 18px 16px 22px; }
  .product-summary-card__title { font-size: 23px; }
  .product-detail__related-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}