/**
 * Gosmooth - Product Detail Page CSS
 * 桌面：grid 兩欄 50%/50%（左=圖片+長描述，右=sticky產品資訊），全寬 #F6F6F6
 * 手機：flex column（圖片 → 產品資訊 → 長描述）
 * 黃色：#EEB21B
 */
.product-detail-page {
  --gs-yellow: #EEB21B;
  --gs-yellow-hover: #ffc42e;
  --gs-yellow-dark: #C19616;
  --gs-green: #35C17D;
  --gs-green-dark: #2ea85e;
  --gs-blue: #2185D0;
  --gs-blue-dark: #1a6db8;
  --gs-text: #333333;
  --gs-text-light: #7A7A7A;
  --gs-bg: #F6F6F6;
  --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;
}

/* ═══════════════════════════════════════════════════════════
   分類下拉選單（已移至 main.css 共用）
   ═══════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════
   共用外框 class：代號 1 和代號 2 上邊框 / 下邊框 / 圓角
   ═══════════════════════════════════════════════════════════ */
.product-detail-top-frame {
  background: #ffffff;
  border-top: 5px solid #EEB21B;
  border-bottom: 3px solid #EEB21B;
  border-radius: 10px;
  position: relative;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════
   主結構 .product-detail-stage（全寬 #F6F6F6）
   ═══════════════════════════════════════════════════════════ */
.product-detail-stage,
.product-detail-layout,
.product-detail-left,
.product-detail-right {
  box-sizing: border-box;
  overflow: visible !important;
}

.product-detail-stage {
  width: 100%; max-width: none; margin: 0; padding: 0;
  background: #F6F6F6;
  font-family: var(--gs-font-sans);
  color: var(--gs-text);
}

.product-detail-layout {
  width: 100%; max-width: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0; align-items: start;
}

.product-detail-left {
  width: 100%; max-width: none; min-width: 0; margin: 0; padding: 0;
  background: transparent;
}

/* ═══════════════════════════════════════════════════════════
   代號 1：產品圖片展示區（縮小 gallery 內部寬度）
   ═══════════════════════════════════════════════════════════ */
.pd-gallery-section {
  background: transparent;
  margin: 0;
  padding: 36px 0 0 0;
}

/* gallery 區保持 100% 寬（不縮部分1），只縮內部主圖框架 */
#gs-product-gallery {
  width: 100%;
}

.pd-gallery.product-detail-top-frame {
  background: #ffffff;
  border-radius: 10px 10px 0 0;
  padding: 24px;
}

/* ── Grid 佈局：縮圖 72px + 48px gap + 主圖 620px，整體居中 ── */
#gs-product-gallery .pd-gallery {
  display: grid !important;
  grid-template-columns: 72px 580px;
  column-gap: 48px;
  justify-content: center;
  align-items: start !important;
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* ── 左側縮圖欄 ── */
.pd-gallery__thumbs {
  width: 72px !important;
  min-width: 72px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px;
  margin: 0 !important;
  padding: 0 !important;
}

.pd-gallery__thumb {
  width: 68px; height: 68px; flex: 0 0 68px;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden; padding: 0; cursor: pointer;
  background: #fff; transition: border-color 0.3s ease;
}
.pd-gallery__thumb:hover { border-color: var(--gs-yellow); }
.pd-gallery__thumb.is-active { border: 2px solid #EEB21B !important; opacity: 1 !important; }

/* ── 右側主圖顯示區（固定 620px + 左右淡灰細線）── */
.pd-gallery__main {
  position: relative;
  width: 580px !important;
  max-width: 580px !important;
  min-width: 0;
  height: 500px;
  overflow: hidden;
  background: #fff !important;
  border-top: 15px solid #EEB21B !important;
  border-bottom: 15px solid #EEB21B !important;
  border-left: 1px solid rgba(0,0,0,0.08) !important;
  border-right: 1px solid rgba(0,0,0,0.08) !important;
  cursor: zoom-in;
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  margin: 0;
}

/* 主圖：高級淡入切換動畫（無平移） */
#gs-product-gallery .pd-gallery__image {
  width: 100%; height: 480px;
  object-fit: contain !important;
  object-position: center center !important;
  background-color: transparent !important;
  display: block;
  transition: opacity 0.24s ease, transform 0.24s ease, filter 0.24s ease;
  will-change: opacity, transform, filter;
}

/* 淡入切換：舊圖輕微縮小 + 模糊 + 淡出 */
#gs-product-gallery .pd-gallery__image.is-fading {
  opacity: 0;
  transform: scale(0.985);
  filter: blur(1px);
}

/* 桌面 hover zoom */
@media (min-width: 769px) {
  .pd-gallery__main:hover .pd-gallery__image {
    transform: scale(1.06);
    transition: transform 0.18s ease-out;
  }
}

.pd-gallery__image--empty {
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af; font-size: 16px; height: 100%; width: 100%;
  background: #fff;
}

/* ── 左右箭頭（相對主圖框架定位，貼近圖片）── */
.pd-gallery__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.85) !important;
  border-radius: 50% !important;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
  border: 0; padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 0; color: transparent;
  transition: all 0.3s ease;
}
.pd-gallery__arrow:hover {
  background: #fff !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.pd-gallery__arrow::after {
  content: '';
  display: block;
  width: 10px; height: 10px;
  border-top: 2px solid #333;
  border-right: 2px solid #333;
}
.pd-gallery__arrow--prev { left: 18px; }
.pd-gallery__arrow--prev::after { transform: rotate(-135deg); margin-left: 4px; }
.pd-gallery__arrow--next { right: 18px; }
.pd-gallery__arrow--next::after { transform: rotate(45deg); margin-right: 4px; }

/* ═══════════════════════════════════════════════════════════
   代號 3：產品詳情長描述區
   ═══════════════════════════════════════════════════════════ */
.product-long-detail-section {
  background: transparent; border: none; box-shadow: none;
  padding: 30px 24px 40px;
}
.product-long-detail-content {
  font-size: 15px; line-height: 1.9; color: var(--gs-text); overflow-wrap: break-word;
  background: transparent; border: none; box-shadow: none;
}
.product-long-detail-content p { margin: 0 0 14px; }
.product-long-detail-content h2,
.product-long-detail-content h3,
.product-long-detail-content h4 { font-family: var(--gs-font-serif); margin: 28px 0 28px; color: var(--gs-text); }
.product-long-detail-content h2 { font-size: 22px; }
.product-long-detail-content h3 { font-size: 18px; }
.product-long-detail-content h4 { font-size: 16px; }
.product-long-detail-content ul,
.product-long-detail-content ol { padding-left: 22px; margin: 0 0 14px; }
.product-long-detail-content li { margin-bottom: 6px; }
.product-long-detail-content img { max-width: 100%; height: auto; border-radius: 4px; }
.product-long-detail-content a { color: var(--gs-yellow-dark); text-decoration: underline; }
.product-long-detail-content table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 14px; }
.product-long-detail-content th,
.product-long-detail-content td { padding: 8px 12px; border: 1px solid var(--gs-border); text-align: left; }
.product-long-detail-content th { background: var(--gs-bg-lighter); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   代號 2：產品資訊區（sticky）
   ═══════════════════════════════════════════════════════════ */
.product-detail-right {
  background: transparent; position: relative; align-self: stretch;
  width: 100%; max-width: none; min-width: 0; margin: 0; padding: 0;
}
.product-summary-sticky {
  position: sticky; top: 110px; align-self: start; z-index: 5;
}
.product-summary-panel {
  padding: 40px 48px 52px;
  margin: 36px 0 0 0;
  width: 100%; max-width: none;
  font-family: var(--gs-font-sans);
}

.product-summary-name {
  font-family: "Noto Serif TC", serif;
  font-size: 30px; font-weight: 800; line-height: 1.3;
  margin: 0 0 6px; color: #2A2A2A;
  font-synthesis: none;
}
.product-summary-subtitle {
  font-family: "Noto Serif TC", serif;
  font-size: 14px; font-weight: 600; color: var(--gs-text-light);
  margin: 0 0 14px; letter-spacing: 0.5px; line-height: 1.5;
  font-synthesis: none;
}
.product-share-btn {
  position: absolute; top: 44px; right: 50px;
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, #FFE8AB 0%, #FFB000 100%);
  border: none; border-radius: 6px;
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  color: #333; cursor: pointer; font-family: var(--gs-font-sans);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15); white-space: nowrap;
}
.product-share-btn:hover { background: linear-gradient(180deg, #ffe08a 0%, #e6a000 100%); transform: translateY(-1px); }
.product-share-btn__icon { display: flex; align-items: center; }

.product-summary-meta { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; font-size: 13px; }
.product-summary-meta__label { color: var(--gs-text-light); }
.product-summary-meta__value { color: var(--gs-text); font-weight: 500; }

.product-intro-section { margin-top: 4px; margin-bottom: 18px; }
.product-intro-label {
  font-family: "Noto Serif TC", serif;
  font-size: 17px; font-weight: 700;
  background-image: linear-gradient(180deg, #FFC127 0%, #DB7F21 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: block;
  margin: 0 0 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--gs-border);
  font-synthesis: none;
}
.product-intro-content { font-size: 14.5px; line-height: 1.8; color: var(--gs-text); }
.product-intro-content p { margin: 0 0 8px; }
.product-intro-content ul,
.product-intro-content ol { padding-left: 20px; margin: 0 0 8px; }
.product-intro-content li { margin-bottom: 4px; }

/* ── 產品屬性表格（前台詳情頁）── */
.product-detail-page .product-detail-attributes {
  width: 100%;
  margin: 18px 0 20px;
}

.product-detail-page .product-detail-attributes__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 6px;
  overflow: hidden;
  font-size: 14px;
  font-family: "Noto Sans TC", sans-serif;
  color: #333333;
}

.product-detail-page .product-detail-attributes__table tr + tr .product-detail-attributes__name,
.product-detail-page .product-detail-attributes__table tr + tr .product-detail-attributes__value {
  border-top: 1px solid #e5e5e5;
}

.product-detail-page .product-detail-attributes__name {
  width: 220px;
  max-width: 220px;
  padding: 14px 16px;
  background: #f2f2f2;
  color: #333333;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  border-bottom: 1px solid #e5e5e5;
}

.product-detail-page .product-detail-attributes__value {
  padding: 14px 16px;
  background: #f9f9f9;
  color: #333333;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
  border-bottom: 1px solid #e5e5e5;
}

.product-detail-page .product-detail-attributes__value--full {
  width: 100%;
  text-align: left;
}

.product-detail-page .product-detail-attributes__table tr:last-child .product-detail-attributes__name,
.product-detail-page .product-detail-attributes__table tr:last-child .product-detail-attributes__value {
  border-bottom: none;
}

.product-detail-page .product-detail-attributes__table tr:first-child .product-detail-attributes__name {
  border-top-left-radius: 6px;
}

.product-detail-page .product-detail-attributes__table tr:first-child .product-detail-attributes__value {
  border-top-right-radius: 6px;
}

.product-detail-page .product-detail-attributes__table tr:last-child .product-detail-attributes__name {
  border-bottom-left-radius: 6px;
}

.product-detail-page .product-detail-attributes__table tr:last-child .product-detail-attributes__value {
  border-bottom-right-radius: 6px;
}

.product-action-area { display: flex; gap: 24px; margin-top: 4px; }
.product-quote-area { flex: 1; min-width: 0; }
.product-quote-area__title {
  font-family: "Noto Serif TC", serif;
  font-size: 17px; font-weight: 700;
  background-image: linear-gradient(180deg, #63C17A 0%, #288443 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: block;
  margin: 0 0 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--gs-border);
  font-synthesis: none;
}

/* ── 即時報價：新版 gs-action-btn ── */
.gs-action-btn {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 48px;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.gs-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.gs-action-btn__iconbox {
  width: 54px;
  height: 54px;
  min-width: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-right: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.gs-action-btn__iconbox i,
.gs-action-btn__iconbox svg {
  font-size: 22px;
}
.gs-action-btn__label {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: #3A3A3A;
}
.gs-action-btn--wa {
  background: linear-gradient(180deg, #63C17A 0%, #288443 100%);
  border-color: #4AAE64;
}
.gs-action-btn--wa .gs-action-btn__iconbox {
  color: #36A852;
}
.gs-action-btn--call {
  background: linear-gradient(180deg, #FFE8AB 0%, #FFB000 100%);
  border-color: #E0AE15;
}
.gs-action-btn--call .gs-action-btn__iconbox {
  color: #D9A000;
}
.gs-action-btn--mail {
  background: linear-gradient(180deg, #6AB5EE 0%, #2185D0 100%);
  border-color: #3A8FDD;
}
.gs-action-btn--mail .gs-action-btn__iconbox {
  color: #3B78C8;
}

.product-quick-quote .gs-action-btn + .gs-action-btn {
  margin-top: 12px;
}

.product-report-area { flex: 1; min-width: 0; }

/* ── 索取報告區塊 ── */
.product-report-title {
  font-family: "Noto Serif TC", serif;
  font-size: 17px; font-weight: 700;
  background-image: linear-gradient(180deg, #6AB5EE 0%, #2185D0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: block;
  margin: 0 0 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--gs-border);
  font-synthesis: none;
}
.product-report-desc {
  color: #4b4b4b;
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 18px;
}
.product-report-form {
  margin-bottom: 18px;
}
.product-report-form input[type="email"],
.product-report-form input[type="text"],
.product-report-form input[type="file"] {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  min-height: 42px;
  box-sizing: border-box;
  margin-bottom: 14px;
  background: #fff;
}
.product-report-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.gs-report-card {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 70px;
  border: none;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(180deg, #F5D97E 0%, #FFB700 100%);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  text-align: left;
  text-decoration: none;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.gs-report-card:hover {
  background: linear-gradient(180deg, #F8E5A8 0%, #FFBE1A 100%);
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
  transform: translateY(-2px);
  text-decoration: none;
}
.gs-report-card__iconbox {
  width: 76px;
  min-width: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e3b602;
  color: #FFF8E0;
}
.gs-report-card__iconbox i,
.gs-report-card__iconbox svg {
  font-size: 27px;
}
.gs-report-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 22px;
  color: #2f2f2f;
}
.gs-report-card__content strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}
.gs-report-card__content em {
  display: block;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.35;
  color: #2A2A2A;
}

.gs-action-btn--report-empty {
  background: linear-gradient(180deg, #B0B3B7 0%, #73767C 100%);
  border-color: #7A7D83;
}
.gs-action-btn--report-empty .gs-action-btn__iconbox {
  color: #6D7076;
}

/* ═══════════════════════════════════════════════════════════
   相關產品區
   ═══════════════════════════════════════════════════════════ */
.product-detail__related {
  background: #ffffff;
  padding: 36px 20px 48px;
  border-top: 3px solid var(--gs-yellow);
}
.product-detail__related-title {
  font-family: var(--gs-font-sans);
  max-width: var(--gs-max-width); margin: 0 auto 20px;
  font-size: 20px; font-weight: 600; color: var(--gs-yellow);
}
.product-detail__related-grid {
  max-width: var(--gs-max-width); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.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; line-clamp: 2; -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; }
.gs-product-card:hover .gs-product-card__more { background: var(--gs-yellow-hover); }


/* ═══════════════════════════════════════════════════════════
   手機端（最大 767px）
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .product-category-dropdown { padding: 0; position: relative; z-index: 90; }
  .product-category-dropdown__toggle { font-size: 13px; padding: 12px 12px; width: 100%; }
  .product-category-dropdown__menu {
    position: absolute;
    top: calc(100% + 0px);
    left: 0; right: 0;
    width: 100%;
    min-width: 0; max-width: none;
    display: flex; flex-direction: column; flex-wrap: nowrap;
    gap: 0; padding: 0;
    background: rgba(15,15,15,0.98);
    border: none; border-radius: 0;
    box-shadow: 0 18px 38px rgba(0,0,0,0.32);
    overflow: hidden;
  }
  .product-category-dropdown__item {
    width: 100%; min-height: 56px; padding: 0 24px;
    justify-content: flex-start;
    border: none; border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.92);
    font-size: 16px; font-weight: 600;
  }
  .product-category-dropdown__item:hover,
  .product-category-dropdown__item.is-active,
  .product-category-dropdown__item[aria-current="page"] {
    color: #f4bd22; background: rgba(244,189,34,0.12);
  }

  .product-detail-stage { width: 100%; max-width: none; background: #F6F6F6; }
  .product-detail-layout { display: flex; flex-direction: column; width: 100%; }
  .product-detail-left { display: contents; }
  .pd-gallery-section { order: 1; flex: none; padding-top: 0; }
  .product-detail-right { order: 2; flex: none; width: 100%; }
  .product-long-detail-section { order: 3; flex: none; background: transparent; }

  /* 手機端 gallery width 復原 */
  #gs-product-gallery {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  /* 手機端 gallery：主圖在上，縮圖在下 */
  #gs-product-gallery .pd-gallery {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    gap: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    border-top: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  .pd-gallery__main {
    order: 1;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto;
    aspect-ratio: 1/1;
    cursor: default;
    margin: 0;
  }
  .pd-gallery__image { height: 100%; max-height: 72vh; }

  /* 手機端禁用 hover zoom */
  .pd-gallery__main:hover .pd-gallery__image {
    transform: none !important;
  }

  .pd-gallery__thumbs {
    order: 2;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 16px !important;
    margin-bottom: 18px !important;
    padding: 12px 16px !important;
    overflow: visible;
  }
  .pd-gallery__thumb {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
  }

  .pd-gallery__arrow { width: 36px; height: 36px; }
  .pd-gallery__arrow::after { width: 8px; height: 8px; }

  .product-summary-sticky { position: static; top: auto; }
  .product-summary-panel.product-detail-top-frame {
    margin: 0;
    border-top: 3px solid var(--gs-yellow);
    border-bottom: none;
    border-radius: 0;
    padding: 20px 14px 28px;
    width: 100%;
  }
  .product-summary-name { font-family: "Noto Serif TC", serif; font-size: 22px; font-weight: 800; padding-right: 100px; font-synthesis: none; }
  .product-summary-subtitle { font-family: "Noto Serif TC", serif; font-size: 13px; font-weight: 600; margin-bottom: 12px; padding-right: 100px; font-synthesis: none; }
  .product-share-btn { top: 14px; right: 10px; font-size: 12px; padding: 6px 12px; }
  .product-intro-label { font-family: "Noto Serif TC", serif; font-size: 15px; font-weight: 700; font-synthesis: none; display: block; border-bottom: 1px solid var(--gs-border); padding-bottom: 6px; }
  .product-intro-content { font-size: 14px; line-height: 1.9; }
  .product-detail-page .product-detail-attributes__table {
    table-layout: fixed;
  }
  .product-detail-page .product-detail-attributes__name {
    width: 34%;
    max-width: 34%;
    min-width: 0;
    padding: 12px 10px;
    font-size: 14px;
    line-height: 1.55;
  }
  .product-detail-page .product-detail-attributes__value {
    width: 66%;
    padding: 12px 10px;
    font-size: 14px;
    line-height: 1.55;
    word-break: break-word;
  }
  .product-action-area { flex-direction: column; gap: 18px; }
  .product-quote-area__title { font-family: "Noto Serif TC", serif; font-size: 15px; font-weight: 700; font-synthesis: none; display: block; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--gs-border); }

  .product-long-detail-section { padding: 24px 12px 32px; background: transparent; }
  .product-long-detail-content { background: transparent; }

  .product-detail__related { padding: 24px 12px 36px; background: #ffffff; }
  .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; }

  /* 手機端 Lightbox 適配 */
  .pd-lightbox__image {
    max-width: 94vw;
    max-height: 78vh;
  }

  .pd-lightbox__count {
    top: 14px;
    left: 14px;
    font-size: 13px;
  }

  .pd-lightbox__close {
    top: 12px;
    right: 14px;
    font-size: 30px;
  }

  .pd-lightbox__arrow {
    width: 42px;
    height: 42px;
  }

  .pd-lightbox__arrow--prev {
    left: 10px;
  }

  .pd-lightbox__arrow--next {
    right: 10px;
  }
}

/* 觸控裝置：禁用 hover zoom */
@media (hover: none), (pointer: coarse) {
  #gs-product-gallery .pd-gallery__main {
    cursor: default;
  }

  #gs-product-gallery .pd-gallery__image {
    transform: none !important;
  }

  #gs-product-gallery .pd-gallery__main:hover .pd-gallery__image {
    transform: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
    平板端（768px ~ 1024px）
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1024px) {
  .product-category-dropdown__menu { left: 0; min-width: 580px; max-width: calc(100vw - 32px); }
  .product-detail-stage { width: 100%; max-width: none; }
  .product-detail-layout { width: 100%; }

  .pd-gallery.product-detail-top-frame { padding: 16px; }
  #gs-product-gallery .pd-gallery { gap: 30px; }
  .pd-gallery__thumb { width: 56px; height: 56px; flex: 0 0 56px; }
  .pd-gallery__arrow { width: 38px; height: 38px; }
  .product-summary-panel { margin: 24px 0 0 0; padding: 24px 20px 24px; }
  .product-summary-name { font-size: 24px; }
  .product-long-detail-section { padding: 24px 16px 36px; }
  .product-detail__related-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

/* ═══════════════════════════════════════════════════════════
    桌面端（1025px 以上）：部分1和部分2緊貼，上邊框還原舊版
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
  /* ── 外層父容器只負責 50%/50% 排版，不畫任何線 ── */
  .product-detail-layout {
    display: grid !important;
    grid-template-columns: 50% 50% !important;
    gap: 0 !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
    align-items: start !important;
    background: #F6F6F6 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* ── 取消外層偽元素黃線（如有） ── */
  .product-detail-layout::before,
  .product-detail-layout::after {
    content: none !important;
    display: none !important;
  }

  /* ── 左欄 / 右欄無間隙 ── */
  .product-detail-left {
    margin-right: 0 !important;
    padding-right: 0 !important;
  }

  /* ── 部分1：產品圖片區（border 在 .pd-gallery-section 自身）── */
  .pd-gallery-section {
    margin-top: 26px !important;
    margin-right: 0 !important;
    background: #fff !important;
    border-style: solid !important;
    border-color: #EEB21B !important;
    border-width: 5px 0 3px 0 !important;
    border-radius: 10px 10px 0 0 !important;
    padding-top: 15px !important;
    box-sizing: border-box !important;
  }

  /* 部分1 內層 frame 不重複邊框 */
  .product-detail-left .pd-gallery.product-detail-top-frame {
    border: none !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
  }

  /* ── 部分2：右側產品資訊卡（border 在 .product-detail-right 自身）── */
  .product-detail-right {
    margin-top: 26px !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    background: #fff !important;
    border-style: solid !important;
    border-color: #EEB21B !important;
    border-width: 5px 0 5px 0 !important;
    border-radius: 10px 10px 10px 10px !important;
    padding-top: 5px !important;
    padding-bottom: 38px !important;
    margin-bottom: 42px !important;
    box-sizing: border-box !important;
  }

  /* 部分2 內層 panel 不重複邊框 */
  .product-detail-right .product-summary-panel.product-detail-top-frame {
    border: none !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
  }

  /* 部分2 sticky 容器恢復原定位 */
  .product-summary-sticky {
    position: sticky !important;
    top: 70px !important;
  }

  /* ── 相關產品區：獨立頂部黃色粗線 ── */
  .product-detail__related {
    margin-top: 0 !important;
    background: #fff !important;
    border-top: 14px solid #E8B20A !important;
    padding-top: 42px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   分享彈窗
   ═══════════════════════════════════════════════════════════ */
#share_btn01 { cursor: pointer !important; transition: all 0.2s ease-in-out; }
#share_btn01:hover { transform: translateY(-2px); }

#gsShareOverlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6); z-index: 2147483646 !important;
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease; backdrop-filter: blur(2px);
}

#gsShareModal {
  background: #ffffff; width: 90%; max-width: 420px; border-radius: 12px;
  padding: 25px; box-shadow: 0 15px 40px rgba(0,0,0,0.3);
  box-sizing: border-box; transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative; font-family: "Noto Sans TC", sans-serif;
}

.gs-modal-title { font-size: 18px; font-weight: 600; color: #333; text-align: center; margin-top: 0; margin-bottom: 20px; }
.gs-share-options { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.gs-opt-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: #F9F9F9; border: 1px solid #EDEDED; border-radius: 8px; padding: 20px 10px;
  cursor: pointer; transition: all 0.2s;
}
.gs-opt-btn:hover { background: #FFFDF6; border-color: #EEB21B; }
.gs-opt-btn svg { color: #EEB21B; width: 32px; height: 32px; }
.gs-opt-btn span { font-size: 14px; font-weight: 500; color: #444; }

#gsQrPanel { display: none; text-align: center; flex-direction: column; align-items: center; }

.gs-qr-img-container {
  width: 100%; max-width: 280px; aspect-ratio: auto;
  margin: 0 auto 20px auto; border: 1px solid #EEE; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border-radius: 6px; overflow: hidden; background: #fff;
}
#gsFinalQrImg { width: 100%; height: auto; display: block; }

.gs-action-btns { display: flex; gap: 10px; width: 100%; justify-content: center; margin-top: 18px; }
.gs-action-btn { flex: 1; height: 52px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid #E4B000; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.gs-btn-copy { background: #ffffff; color: #E4B000; }
.gs-btn-copy:hover { background: #FFFDF6; }
.gs-btn-save { background: #E4B000; color: #ffffff; }
.gs-btn-save:hover { background: #d4a000; }

.gs-toast {
  position: fixed; bottom: 15%; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.8);
  color: #fff; padding: 10px 24px; border-radius: 30px; font-size: 14px; z-index: 2147483647 !important;
  display: none; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#gsHiddenQr { display: none; }

/* ═══════════════════════════════════════════════════════════
   產品圖片 Lightbox（桌面端放大查看）
   ═══════════════════════════════════════════════════════════ */
.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pdLightboxFadeIn 0.22s ease;
}

.pd-lightbox[hidden] {
  display: none;
}

@keyframes pdLightboxFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pd-lightbox__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pd-lightbox__image {
  position: relative;
  z-index: 1;
  max-width: min(82vw, 1100px);
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-user-drag: none;
}

/* 關閉按鈕 X */
.pd-lightbox__close {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 10;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease, transform 0.2s ease;
}
.pd-lightbox__close:hover {
  color: #fff;
  transform: scale(1.12);
}

/* 張數計數器 */
.pd-lightbox__count {
  position: fixed;
  top: 24px;
  left: 28px;
  z-index: 10;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-family: var(--gs-font-sans);
  letter-spacing: 0.5px;
}

/* Lightbox 左右箭頭 */
.pd-lightbox__arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.pd-lightbox__arrow:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

.pd-lightbox__arrow--prev { left: 28px; }
.pd-lightbox__arrow--next { right: 28px; }

/* 單箭頭 ::after */
.pd-lightbox__arrow-icon {
  display: block;
  width: 12px;
  height: 12px;
}

.pd-lightbox__arrow--prev .pd-lightbox__arrow-icon {
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
  margin-right: -4px;
}

.pd-lightbox__arrow--next .pd-lightbox__arrow-icon {
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
  margin-left: -4px;
}

/* ═══════════════════════════════════════════════════════════
   QR 卡片底部：左標題 + 右縮圖
   ═══════════════════════════════════════════════════════════ */
.gs-qr-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eeeeee;
}

.gs-qr-card-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #333333;
  line-height: 1.4;
}

.gs-qr-card-thumb-wrap {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border: 1px solid #e9e9e9;
  background: #ffffff;
  overflow: hidden;
}

.gs-qr-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   索取報告表單欄位（高端 UI）
   ═══════════════════════════════════════════════════════════ */
.gs-report-form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0 22px;
}

.gs-report-field {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: stretch;
  border: 1px solid #D8DDE3;
  border-radius: 6px;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.045);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.gs-report-field:focus-within {
  border-color: #E0B300;
  box-shadow: 0 6px 18px rgba(224, 179, 0, 0.16);
}

.gs-report-field__icon {
  width: 58px;
  min-width: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #FAFAFA 0%, #F0F2F4 100%);
  color: #3A3A3A;
  font-size: 22px;
  border-right: 1px solid #E2E5E8;
}

.gs-report-field__icon svg {
  display: block;
  margin: auto;
  pointer-events: none;
}

.gs-report-email-input {
  flex: 1;
  width: 100%;
  border: 0;
  outline: none;
  padding: 0 18px;
  font-size: 16px;
  color: #333333;
  background: transparent;
  font-family: var(--font-sans, "Noto Sans TC", sans-serif);
}

.gs-report-email-input::placeholder {
  color: #9AA0A6;
}

.gs-report-file-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.gs-report-file-label {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: stretch;
  cursor: pointer;
  background: #FFFFFF;
}

.gs-report-file-label__text {
  min-width: 150px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 700;
  color: #3A3A3A;
  border-right: 1px solid #E7E7E7;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8F8F8 100%);
}

.gs-report-file-name {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 15px;
  color: #777777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-report-field--file:hover {
  border-color: #E0B300;
  box-shadow: 0 6px 18px rgba(224, 179, 0, 0.14);
}

.gs-report-field--file:hover .gs-report-file-label__text {
  color: #2F2F2F;
}

@media (max-width: 768px) {
  .gs-report-form-fields {
    gap: 12px;
    margin: 16px 0 20px;
  }

  .gs-report-field,
  .gs-report-file-label {
    min-height: 50px;
  }

  .gs-report-field__icon {
    width: 52px;
    min-width: 52px;
    font-size: 20px;
  }

  .gs-report-email-input,
  .gs-report-file-label__text {
    font-size: 15px;
  }

  .gs-report-file-label__text {
    min-width: 128px;
    padding: 0 14px;
  }

  .gs-report-file-name {
    font-size: 14px;
    padding: 0 14px;
  }
}

/* ==================================================
    Product Detail Entry Animation
    輕量 slide in up，無外部依賴
================================================== */

@keyframes gsSlideInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.gs-pd-animate {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  will-change: opacity, transform;
}

.gs-pd-animate.is-visible {
  animation-name: gsSlideInUp;
  animation-duration: 680ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: both;
}

.gs-pd-animate[data-gs-delay="1"].is-visible {
  animation-delay: 90ms;
}

.gs-pd-animate[data-gs-delay="2"].is-visible {
  animation-delay: 160ms;
}

.gs-pd-animate[data-gs-delay="3"].is-visible {
  animation-delay: 230ms;
}

.gs-pd-animate[data-gs-delay="4"].is-visible {
  animation-delay: 300ms;
}

.gs-pd-animate[data-gs-delay="5"].is-visible {
  animation-delay: 370ms;
}

@media (max-width: 1024px) {
  @keyframes gsSlideInUp {
    from {
      opacity: 0;
      transform: translate3d(0, 20px, 0);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
  }

  .gs-pd-animate {
    transform: translate3d(0, 20px, 0);
  }

  .gs-pd-animate.is-visible {
    animation-duration: 580ms;
  }
}

@media (max-width: 768px) {
  @keyframes gsSlideInUp {
    from {
      opacity: 0;
      transform: translate3d(0, 14px, 0);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
  }

  .gs-pd-animate {
    transform: translate3d(0, 14px, 0);
  }

  .gs-pd-animate.is-visible {
    animation-duration: 420ms;
  }

  .gs-pd-animate[data-gs-delay="1"].is-visible,
  .gs-pd-animate[data-gs-delay="2"].is-visible,
  .gs-pd-animate[data-gs-delay="3"].is-visible,
  .gs-pd-animate[data-gs-delay="4"].is-visible,
  .gs-pd-animate[data-gs-delay="5"].is-visible {
    animation-delay: 55ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gs-pd-animate,
  .gs-pd-animate.is-visible {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    will-change: auto !important;
  }
}