/* Batch 2 — product page & tables */
/* 关键参数条：允许 3/4 格自动铺满，杜绝空白灰块（按现有条目数自动铺满） */
.gs-product-key-strip{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
.gs-spec-on-request{color:var(--gs-blue,#1769e0);font-weight:700;text-decoration:underline;text-underline-offset:3px}
/* 统一产品按钮外观（不同模板大小写不一致的问题以文案统一为准，这里统一样式） */
.gs-product-detail-hero .gs-actions{display:flex;flex-wrap:wrap;gap:10px}
.gs-product-detail-hero .rank-math-breadcrumb{font-size:13px;margin:0 0 10px;color:var(--gs-muted,#5d6875)}
.gs-product-detail-hero .rank-math-breadcrumb a{color:inherit}
.gs-product-gallery-thumb img[src=""],.gs-product-gallery-thumb:empty{display:none}
/* Match the adjacent Get Selection Help control in the desktop header. */
.site-header #site-navigation .gs-af-header-quote{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:42px;min-height:42px;min-width:186px;padding:0 16px;border:1px solid transparent;border-radius:8px;font-family:inherit;font-size:14px;font-weight:850;line-height:1;vertical-align:middle;white-space:nowrap}
@media (max-width:768px){
  /* The site's existing theme CSS hides this pseudo-element on mobile. */
  .site-header .site-branding{grid-template-columns:38px minmax(0,auto);column-gap:12px}
  .site-header .site-branding::before{display:grid}
  /* The bottom bar already provides WhatsApp; avoid a duplicate floating bubble. */
  .ht-ctc.ht-ctc-chat{display:none !important}
  /* 规格表：两列不截断 */
  .gs-spec-table{width:100%;table-layout:fixed}
  .gs-spec-table th,.gs-spec-table td{word-break:break-word;white-space:normal;padding:10px 8px;font-size:14px}
  .gs-spec-table th{width:42%}
  /* 产品中心对比表：保持横向滚动，但首列（型号）固定 + 可见滚动提示 */
  .gs-comparison,.gs-products-browser{overflow:visible;max-width:100%}
  .gs-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;position:relative}
  .gs-compare-table{min-width:640px;border-collapse:separate;border-spacing:0}
  .gs-compare-table th:first-child,.gs-compare-table td:first-child{position:sticky;left:0;z-index:1;background:#fff;box-shadow:2px 0 4px rgba(7,17,31,.06)}
  .gs-table-scroll::after{content:"Swipe →";position:sticky;left:calc(100% - 70px);bottom:0;display:block;width:70px;font-size:12px;color:#5d6875;padding:4px 0}
  .gs-product-key-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:769px){
  /* The desktop Click to Chat icon is 50px; keep its entry animation from shrinking it. */
  .ht-ctc.ht-ctc-chat.ctc_wp_desktop{animation:none !important;transform:none !important;min-width:50px;min-height:50px}
  .ht-ctc.ht-ctc-chat.ctc_wp_desktop svg{width:50px !important;height:50px !important;min-width:50px;min-height:50px}
}

/* Batch17: article/table, gallery-below, directory and small-screen form layout. */
/* Article grid: the local markup uses .gs-article-main, not
   .gs-article-layout. Let grid children shrink below intrinsic table widths. */
.gs-article-main > *,
.gs-article-content-card,
.gs-article-content-card .entry-content {
  min-width: 0;
  max-width: 100%;
}

/* Ordinary article/product tables fit their content area. Exclude comparison
   tables and everything inside their existing horizontal scroll regions. */
:is(.gs-article-content-card .entry-content, .gs-owned-content)
  table:not(.gs-compare-table):not(.gs-table-scroll *):not(.gs-compare-table *) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
}

:is(.gs-article-content-card .entry-content, .gs-owned-content)
  table:not(.gs-compare-table):not(.gs-table-scroll *):not(.gs-compare-table *)
  :is(th, td) {
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Keep long preformatted examples scrollable within their own boxes. */
:is(.gs-article-content-card .entry-content, .gs-owned-content) pre {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
}

:is(.gs-article-content-card .entry-content, .gs-owned-content) code {
  max-width: 100%;
  overflow-x: auto;
}

:is(.gs-article-content-card .entry-content, .gs-owned-content)
  code:not(pre code) {
  display: inline-block;
  vertical-align: baseline;
  white-space: pre;
}

/* Retain the owned-content 28px minimum side gutters via its existing
   centered width, and 40px block padding (including below the gallery).
   At a 390px viewport the outer content width is at most 334px. */
.gs-owned-product .gs-owned-content {
  box-sizing: border-box;
  width: min(calc(100% - 56px), var(--gs-container, 1200px));
  max-width: calc(100% - 56px);
  min-width: 0;
  margin-inline: auto;
  padding-block: 40px;
}

/* Comparison table sizing/whitespace remain governed by existing rules;
   only constrain their scroll containers so scrolling stays local. */
:is(.gs-article-content-card .entry-content, .gs-owned-content) .gs-table-scroll {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.entry-content > #gs-b10-hub-guide {
  box-sizing: border-box;
  width: min(1200px, calc(100% - 56px));
  margin: 32px auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

#gs-b13-sizing {
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
}

#gs-b13-sizing label,
#gs-b13-sizing input {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#gs-b13-sizing input {
  width: 100%;
}

#gs-b13-sizing label {
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .gs-contact-page-v3 .gs-contact-section-head {
    display: block;
    min-width: 0;
  }

  .gs-contact-page-v3 .gs-contact-section-head > * {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .gs-contact-page-v3 .gs-contact-section-head > p {
    margin-top: 16px;
  }
}
