/*
Theme Name: 方升科技 Fangsheng
Description: 方升轴承外贸站主题，支持中英文产品目录、应用案例与采购询价。
Version: 1.4.25
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: fangsheng
*/

.detail-body {
  margin-block-start: 24px;
}

.detail-body .wp-block-table {
  overflow-x: auto;
}

.detail-body .wp-block-table th {
  width: auto;
}

/* Fixed layout collapses the individual columns under merged headers. */
.detail-body .wp-block-table table:has([colspan]) {
  table-layout: auto;
}

.detail-body .wp-block-table table:has([colspan]) :is(th, td) {
  overflow-wrap: normal;
  word-break: normal;
}

.page-hero.news-detail-hero {
  min-height: clamp(168px, 17vw, 232px);
  padding-block: clamp(24px, 3vw, 38px);
  --library-shade: linear-gradient(90deg, #20201f 30%, #20201fe6 66%, #20201f66);
}

.news-detail-hero h1 {
  max-width: 1100px;
  font-size: clamp(27px, 4vw, 48px);
  overflow-wrap: anywhere;
}

.news-detail-hero .wrap > p:last-child {
  max-width: 72ch;
  overflow-wrap: anywhere;
}

:is(.news-article, article.prose:has(.news-article-content)) {
  margin-block: clamp(18px, 3.2vw, 44px);
  padding: clamp(20px, 4vw, 54px);
  border: 1px solid var(--line);
  background: #fff;
}

.news-article-content {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.85;
  overflow-wrap: anywhere;
  margin-block-end: 24px;
}

.news-article-content > * + * {
  margin-block-start: 1.2rem;
}

.news-article-content > :is(h2, h3, h4):not(:first-child) {
  margin-block-start: 1.65rem;
}

.news-article-content a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: .15em;
}

.news-article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-block-start: 20px;
  margin-block: 24px;
}

.news-article-nav a {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  overflow-wrap: anywhere;
}

.news-article-nav a:only-child {
  grid-column: 1 / -1;
}

.news-article-nav a[rel="next"] {
  text-align: end;
}

.news-article-nav a:is(:hover, :focus-visible) {
  border-color: var(--accent-ink);
}

.news-article-nav-label {
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 750;
}

.news-article-nav-title {
  font-weight: 750;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .news-article-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-article-nav a[rel="next"] {
    text-align: start;
  }
}

.news-article-cover {
  margin-block: 0 clamp(20px, 3vw, 32px);
}

.news-article-content figure.wp-block-image {
  padding-block: clamp(16px, 2vw, 28px);
}

.news-article-cover img,
.news-article-content .wp-block-image img {
  width: auto;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

.news-article-cover img {
  max-height: clamp(220px, 33vw, 360px);
  object-fit: contain;
}

body:not(.elementor-editor-active) .contact-item:has(.fs-contact-channel-empty){display:none}
.fs-quick-actions {
  --quick-right: max(10px, env(safe-area-inset-right));
  --quick-bottom: max(14px, env(safe-area-inset-bottom));
  position: fixed;
  right: var(--quick-right);
  bottom: var(--quick-bottom);
  z-index: 20;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #fff4;
  border-radius: 8px;
  background: var(--night);
  box-shadow: 0 6px 22px #0003;
}
.fs-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 76px;
  min-height: 62px;
  padding: 6px 4px;
  color: #fff;
  text-align: center;
  font: 750 11px/1.2 Manrope, "Noto Sans SC Variable", sans-serif;
  overflow-wrap: anywhere;
}
.fs-quick-action + .fs-quick-action { border-top: 1px solid #fff3; }
.fs-quick-action:is(:hover, :focus-visible) { background: #333; color: #fff; }
.fs-quick-action-primary { background: var(--accent); color: var(--ink); }
.fs-quick-action-primary:is(:hover, :focus-visible) { background: #ff783d; color: var(--ink); }
.fs-quick-action:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
@media (max-width: 1100px), (max-height: 480px) {
  .fs-quick-actions {
    --quick-bottom: max(10px, env(safe-area-inset-bottom));
    flex-direction: row;
    max-width: calc(100% - var(--quick-right) - max(10px, env(safe-area-inset-left)));
  }
  .fs-quick-action {
    width: clamp(54px, 17vw, 66px);
    min-width: 0;
    min-height: 48px;
    padding: 5px 3px;
    font-size: 10px;
  }
  .fs-quick-action + .fs-quick-action { border-top: 0; border-left: 1px solid #fff3; }
  .fs-quick-action svg { width: 19px; height: 19px; }
  body > footer:has(+ .fs-quick-actions) { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}
@media print {
  .fs-quick-actions { display: none; }
}
.fs-custom-logo{width:auto;height:auto;max-width:70px;max-height:42px}
.admin-bar .site-header.over-hero{top:var(--wp-admin--admin-bar--height,32px)}
.prose figure img{height:auto}
.rfq-file-control{margin-block-start:4px}
.rfq-attachment.is-enhanced .rfq-file-control{display:flex;align-items:center;min-height:40px;border:1px solid #c1bfba;background:#fff;color:var(--ink);font-size:13px}
.rfq-attachment.is-enhanced .rfq-file-trigger{position:relative;display:grid;align-self:stretch;flex:none}
.rfq-attachment.is-enhanced input[type="file"]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.rfq-file-caption{display:flex;align-items:center;padding:8px 10px;border-inline-end:1px solid #c1bfba;background:var(--band);font-weight:700}
.rfq-file-trigger:hover .rfq-file-caption{background:#e8e5e0}
.rfq-file-trigger:focus-within .rfq-file-caption{outline:2px solid var(--accent-ink);outline-offset:-2px}
.rfq-file-status{flex:1;min-width:0;padding:4px 8px;overflow-wrap:anywhere}
@media(max-width:480px){form.rfq .fields{grid-template-columns:minmax(0,1fr)}}
.hero.has-custom-image::before{display:none}
.hero .fs-hero-picture{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover}
.hero :is(h1,h2){overflow-wrap:anywhere}
.hero h2{font-size:var(--page-title);font-weight:900;line-height:1.12;text-shadow:0 2px 18px #1119}
.hero h2>span{display:inline-block}
.hero .actions a{white-space:normal;overflow-wrap:anywhere;min-width:0;max-width:100%}
.hero .actions svg{flex:none}
.fs-hero-carousel{position:relative}
.fs-hero-carousel.is-ready .hero-bottom{min-height:44px;padding-inline-start:min(144px,47%);overflow-wrap:anywhere}
.fs-hero-toolbar{position:absolute;inset:auto 0 0;margin-inline:auto;pointer-events:none}
.fs-hero-controls{display:inline-flex;align-items:center;gap:4px;color:#fff;pointer-events:auto}
.fs-hero-controls button{display:grid;place-items:center;flex:none;width:44px;height:44px;color:#fff;background:#141414c9;border:1px solid #ffffff70;cursor:pointer}
.fs-hero-controls button:is(:hover,:focus-visible){background:#262625}
.fs-hero-controls button:focus-visible{outline:2px solid #fff;outline-offset:-4px}
.fs-hero-controls svg{width:18px;height:18px}
.fs-hero-prev svg{transform:rotate(90deg)}
.fs-hero-next svg{transform:rotate(-90deg)}
.fs-hero-count{min-width:36px;font-size:12px;font-variant-numeric:tabular-nums}
.foot-bottom:has(.foot-icp){display:flex;flex-wrap:wrap}
.foot-bottom:has(.foot-icp) .foot-country{margin-inline-start:auto}
.foot-bottom .foot-icp{color:inherit;text-decoration:underline;text-underline-offset:3px}
.foot-company-name,.foot-top p,.foot-bottom span{overflow-wrap:anywhere}
.home-about-copy>p{white-space:pre-line}
:is(.hero-content,.section-head,.home-about-heading,.callout-intro,.foot-company):has(>.customize-partial-edit-shortcut){position:relative}
.customize-partial-edit-shortcut-fs_home_slides{inset-inline-start:var(--gutter);top:108px}
.hero-content .customize-partial-edit-shortcut-fs_home_slides{inset-inline-start:0;top:98px}
.customize-partial-edit-shortcut-fs_home_slides button{left:0}
@media(max-width:760px){
  .hero-content .customize-partial-edit-shortcut-fs_home_slides{top:80px}
  :is(.section-head,.home-about-heading,.callout-intro,.foot-company)>.customize-partial-edit-shortcut{inset-inline-end:0;top:0}
}
@media(max-width:760px){.hero h2>span{display:block}}
