/* Local prelaunch polish. Home layout, media dimensions and section order are unchanged. */
:root {
  --cm-page-title: 2.375rem;
  --cm-section-title: 1.75rem;
  --cm-card-radius: 12px;
  --cm-copy: #526174;
}
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
body:not(.home) h1,
body.category-news .category-header h1,
body:not(.home) .chimiao-resource-heading h1,
body:not(.home) .banner-section .slide-title {
  font-size: var(--cm-page-title) !important;
  line-height: 1.35 !important;
  font-weight: 650;
  letter-spacing: 0 !important;
}
body:not(.home) :is(.module-title,.product-section-title h2,.product-catalogue-heading h2,.product-list-head h2,.product-catalogue-cta h2,.sensor-section-heading h2,.sensor-products__head h2,.solutions-section-heading h2,.solutions-heading h2,.solutions-cta h2,.solution-detail-content h2,.solution-detail-contact h2,.contact-section-heading h2,.contact-direct__intro h2,.contact-final__inner h2,.support-hub-heading h2,.support-hub-contact h2,.chimiao-news-related h2) {
  font-size: var(--cm-section-title) !important;
  line-height: 1.4 !important;
  font-weight: 650;
  letter-spacing: 0 !important;
}
body:not(.home) :is(.product-tab-richtext,.post-content,.product-summary-panel,.solution-detail-content) {
  font-size: 1rem;
  line-height: 1.8;
}
body:not(.home) :is(.product-tab-richtext p,.post-content p,.solution-detail-content p,.module-subtitle,.product-section-title p,.support-hub-hero__copy > p,.product-catalogue-heading p,.sensor-section-heading p) {
  font-size: 1rem !important;
  line-height: 1.8;
}
body:not(.home) :is(.product-tab-richtext h3,.solution-detail-content h3) {
  font-size: 1.25rem !important;
  line-height: 1.5;
  font-weight: 650;
}
body:not(.home) :is(.product-catalogue-card,.solution-card,.chimiao-resource-card,.contact-path-card,.product-feature-card,.product-resource-card,.product-purchase-card,.product-channel-card,.home-capability-card) {
  border-radius: var(--cm-card-radius) !important;
  box-shadow: 0 3px 14px rgb(18 54 95 / 4%) !important;
}
body:not(.home) :is(.product-catalogue-card,.solution-card,.chimiao-resource-card,.contact-path-card,.product-feature-card,.product-resource-card,.product-purchase-card,.product-channel-card,.home-capability-card):hover {
  transform: none !important;
  box-shadow: 0 5px 18px rgb(18 54 95 / 7%) !important;
}
body:not(.home) :is(.product-catalogue-card__body,.solution-card__body,.chimiao-resource-content,.contact-path-card,.product-feature-card) { padding: 20px !important; }
body:not(.home) :is(.product-catalogue-card__media,.solution-card__media,.product-detail-image-grid img,.product-selection-note,.product-tab-richtext table) { border-radius: 10px !important; }
body:not(.home) :is(.product-catalogue-grid,.solutions-grid,.chimiao-resource-grid,.product-feature-grid,.contact-paths__grid) { gap: 20px; }
body:not(.home) :is(.product-catalogue-card p,.solution-card p,.chimiao-resource-content p,.item-desc,.item-excerpt,.product-feature-card p) {
  font-size: .875rem !important;
  line-height: 1.75 !important;
  color: var(--cm-copy);
}
body:not(.home) :is(.product-catalogue-card h3,.solution-card h3,.chimiao-resource-content h2) { font-size: 1.125rem !important; line-height: 1.5; }
body:not(.home) :is(.chimiao-resource-action,.product-resource-card small,.product-channel-card small,.product-service-row) { font-size: .875rem !important; line-height: 1.65; }
body:not(.home) .product-section-title { margin-bottom: 24px; }
body:not(.home) .product-tab-panels { padding-top: 40px; }
body:not(.home) .module-header { margin-bottom: 28px; }
body:not(.home) .solutions-method h2 { font-size: var(--cm-section-title) !important; line-height: 1.4; }
body:not(.home) .banner-section .slide-slogan { font-size: 1rem !important; font-weight: 400; line-height: 1.8; }
body .chimiao-news-excerpt { font-size: .875rem !important; line-height: 1.75 !important; color: var(--cm-copy); }

/* Home: type only, plus restrained borders/shadows. No grid, padding or media changes. */
/* Compact home section rhythm; leave the opening slideshow untouched. */
body.home .module-section-3 .block-media-wrapper,
.page-id-8 .module-section-1 .about-image { position:relative; }
.cm-company-image-logo { position:absolute; left:52%; top:51%; transform:translate(-50%,-50%); width:18%; aspect-ratio:3.5; background-repeat:no-repeat; background-position:center; background-size:contain; pointer-events:none; }
body.home .module-section:not(.slogan-section) { padding-top:48px !important; padding-bottom:40px !important; }
body.home .module-section.slogan-section { min-height:320px; padding-top:56px !important; padding-bottom:56px !important; }
@media(max-width:767px) {
  body.home .module-section:not(.slogan-section) { padding-top:32px !important; padding-bottom:28px !important; }
  body.home .module-section.slogan-section { min-height:280px; padding-top:40px !important; padding-bottom:40px !important; }
}
/* Keep background pictures out of the flex layout so the shared container
   aligns with the navbar instead of being pushed toward the centre. */
body.home .banner-section .slide-content > picture { position:absolute; inset:0; }
body.home .banner-section .slide-content > .container { margin-left:auto; margin-right:auto; }
body.home .banner-section .slide-title,
body.home .banner-section .slide-slogan { margin-left:0 !important; margin-right:0 !important; }
body.home .banner-section .slide-actions { justify-content:flex-start; }
@media (min-width: 768px) {
  body.home .banner-section .slide-content .slide-product .slide-title { white-space:normal; }
}
body.home .banner-section .slide-title { font-size: clamp(2rem,3.1vw,2.75rem) !important; font-weight:600 !important; line-height: 1.35 !important; letter-spacing: 0; }
body.home .banner-section .slide-slogan { font-size: 1.125rem !important; font-weight: 400 !important; line-height: 1.8 !important; }
body.home .module-title { font-size: 2rem !important; line-height: 1.4; }
body.home .module-subtitle { font-size: 1rem !important; font-weight: 400; }
body.home .home-featured-products .item-title h3 { font-size: 1.25rem !important; line-height: 1.5; }
body.home .home-featured-products .item-desc { font-size: .875rem !important; }
body.home .home-featured-products .item { border-radius: 12px; box-shadow: 0 3px 14px rgb(18 54 95 / 4%); }
/* Shared price typography across product cards, detail and selector views. */
body .item-footer .font-number:not(.text-muted),
body .product-catalogue-card__price strong,
body .product-price-row strong,
body .cm-price strong { font-size:1.375rem !important; line-height:1.4; font-weight:700; font-variant-numeric:tabular-nums; }
body.home .home-featured-products .item .item-title .item-icon,
.product-catalogue-card__media,
.product-related-card .product-related-card__image { background:#fff !important; }

/* Search: compact product-first lists. */
.cm-site-search { max-width:1180px; padding-top:40px; padding-bottom:56px; min-height:65vh; }
.cm-search-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.cm-search-heading h1 { margin:0; }
.cm-search-heading > a,.cm-search-action { color:#1265de; font-size:14px; white-space:nowrap; }
.cm-site-search-form { display:flex; gap:12px; }
.cm-site-search-form input { flex:1; min-width:0; border:1px solid #cad6e5; border-radius:8px; padding:12px 16px; font-size:16px; background:#fff; }
.cm-site-search-form button { border:0; border-radius:8px; padding:12px 26px; background:#1265de; color:#fff; font-size:16px; }
.cm-search-summary { display:flex; justify-content:space-between; gap:12px; margin:20px 0 12px; color:#526174; font-size:14px; }
.cm-search-results { border-top:1px solid #e0e7f0; }
.cm-search-result { display:grid; grid-template-columns:112px minmax(0,1fr) 80px; align-items:center; gap:24px; padding:20px 0; border-bottom:1px solid #e0e7f0; }
.cm-search-image { display:block; height:96px; background:#f7f9fc; border-radius:8px; overflow:hidden; }
.cm-search-image img { width:100%; height:100%; object-fit:contain; }
.cm-search-kind { color:#526174; font-size:13px; }
[data-kind="产品"] .cm-search-kind { color:#1265de; }
body.search .cm-search-copy h2 { font-size:18px; line-height:1.5; margin:4px 0 6px; font-weight:600; }
.cm-search-copy p { font-size:14px; line-height:1.7; color:#526174; margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.cm-search-action { text-align:right; }
.cm-search-empty { padding:40px 0; }
@media(max-width:767px) {
  .cm-site-search { padding-top:24px; padding-bottom:36px; }
  .cm-search-heading { align-items:flex-start; flex-direction:column; gap:8px; }
  .cm-search-result { grid-template-columns:76px minmax(0,1fr); gap:8px 14px; padding:16px 0; }
  .cm-search-image { height:76px; }
  .cm-search-action { grid-column:2; text-align:left; }
  body.search .cm-search-copy h2 { font-size:16px; }
  .cm-search-summary { flex-wrap:wrap; }
}

/* Grouped search uses the same content width as the product selector. */
.cm-site-search { width:100%; max-width:1440px; margin:0 auto; padding:44px 32px 72px; }
.cm-search-layout { display:grid; grid-template-columns:200px minmax(0,1fr); gap:32px; }
.cm-search-categories { border-right:1px solid #e0e7f0; padding-right:22px; }
.cm-search-categories h2 { font-size:18px; margin:0 0 16px; }
.cm-search-categories a { display:flex; justify-content:space-between; gap:10px; padding:12px; margin:4px 0; color:#526174; font-size:15px; border-radius:7px; }
.cm-search-categories a[aria-current] { background:#1265de; color:white; }
.cm-search-panels { min-width:0; }
.cm-search-panel { margin-bottom:32px; }
.cm-search-panel-heading { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #dae3ee; padding-bottom:12px; gap:16px; }
.cm-search-panel-heading h2 { font-size:22px; margin:0; font-weight:600; }
.cm-search-panel-heading small { font-size:14px; color:#63758b; margin-left:8px; font-weight:400; }
.cm-search-panel-heading>a { font-size:14px; color:#1265de; }
.cm-search-result { grid-template-columns:112px minmax(0,1fr); gap:22px; }
.cm-search-text-result { display:block; padding:16px 0; }
.cm-search-copy h3 { font-size:18px; line-height:1.5; font-weight:600; margin:0 0 8px; overflow-wrap:anywhere; }
.cm-search-action { display:inline-block; text-align:left; margin-top:8px; }
.cm-search-pagination { display:flex; flex-wrap:wrap; gap:12px; margin-top:24px; }
.cm-search-pagination .page-numbers { padding:6px 10px; }
.cm-search-pagination .current { background:#1265de; color:white; border-radius:5px; }
@media(max-width:1000px) {
  .cm-site-search { padding:28px 20px; }
  .cm-search-layout { grid-template-columns:170px minmax(0,1fr); gap:20px; }
}
@media(max-width:650px) {
  .cm-site-search { padding:22px 16px 48px 14px; }
  .cm-search-layout { display:block; }
  .cm-search-categories { display:flex; gap:6px; overflow-x:auto; border:0; padding:0 0 12px; margin-bottom:18px; }
  .cm-search-categories h2 { display:none; }
  .cm-search-categories a { flex-shrink:0; padding:9px 12px; font-size:14px; background:#f3f6fa; }
  .cm-search-result { grid-template-columns:76px minmax(0,1fr); gap:14px; }
  .cm-search-copy h3 { font-size:16px; }
  .cm-search-panel-heading h2 { font-size:20px; }
}

/* News covers match the white product and resource image surfaces. */
.chimiao-news-thumb,
.chimiao-news-related .media { background: #fff; }

/* Support categories: blend white-backed images into their cards. */
body:is(.category-zhichi,.category-ziliao,.category-zhengshu) .chimiao-resource-preview {
  background: #fff;
}

/* Homepage news: show the full cover without cropping, including on hover. */
body.home .home-news-list .media-content {
  background: #fff;
  padding: 28px 12px 4px;
}
body.home .home-news-list .media-content img {
  object-fit: contain;
  object-position: center;
  transform: none;
}

/* Catalogue: tighten the transition from category cards to the product list. */
.product-catalogue .product-catalogue-directions { padding-bottom: 28px; }
.product-catalogue .product-catalogue-list { padding-top: 32px; }

/* Selector: stable action column, matching header and numeric alignment. */
body:not(.home) .cm-intro h1 { font-size: 2rem !important; line-height: 1.4; }
.cm-columns,.cm-row { grid-template-columns: minmax(0,1.1fr) minmax(0,1.2fr) 112px; }
.cm-columns > :last-child { text-align: right; }
.cm-price { display: grid; grid-template-rows: auto auto auto; justify-items: end; gap: 6px; min-width: 0; }
.cm-price strong { font-size: 1.125rem; line-height: 1.5; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cm-price a { display: inline-block; padding: 3px 0; line-height: 1.5; font-size: .875rem; }
.cm-price a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cm-row { padding-top: 20px; padding-bottom: 20px; }
.cm-model { font-weight: 650; }
.cm-searchbar { border-radius: 10px; }
.cm-results-top span { font-size: .875rem !important; }
@media (max-width: 1000px) {
  .cm-row { grid-template-columns: minmax(0,1fr) 100px; }
}
@media (max-width: 767px) {
  .product-catalogue .product-catalogue-directions { padding-bottom: 20px; }
  .product-catalogue .product-catalogue-list { padding-top: 24px; }
  :root { --cm-page-title: 1.75rem; --cm-section-title: 1.5rem; }
  body:not(.home) :is(.product-catalogue-card__body,.solution-card__body,.chimiao-resource-content,.contact-path-card,.product-feature-card) { padding: 16px !important; }
  body:not(.home) :is(.product-catalogue-grid,.solutions-grid,.chimiao-resource-grid,.product-feature-grid,.contact-paths__grid) { gap: 16px; }
  body:not(.home) .product-tab-panels { padding-top: 28px; }
  body:not(.home) .module-header { margin-bottom: 24px; }
  body.home .module-title { font-size: 1.5rem !important; }
  body.home .banner-section .slide-title { font-size: 1.875rem !important; }
  body.home .banner-section .slide-slogan { font-size: 1rem !important; }
  body.home .home-featured-products .item-title h3 { font-size: 1.125rem !important; }
  body:not(.home) .cm-intro h1 { font-size: 1.625rem !important; }
}
@media (max-width: 650px) {
  .cm-row { grid-template-columns: minmax(0,1fr) 90px; padding: 18px 0; }
  .cm-price strong { font-size: 1rem; }
}
