/*
Theme Name: JHD Foundry
Theme URI: http://www.jhdccc.com/
Author: JHD Web Team
Description: 青岛金海德铸造材料（Qingdao Jinhai De Foundry Materials Co., Ltd.）英文外贸独立站主题。包含首页轮播、产品自定义类型与分类、博客、关于我们、在线询盘表单、SEO 结构化数据、响应式适配。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: jhd
Tags: business, portfolio, custom-colors, responsive-layout, translation-ready
*/

/* ==========================================================================
   1. Reset（替代外链 meyer-reset，避免第三方 CDN 拖慢首屏）
   ========================================================================== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body { line-height: 1; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after { content: ''; content: none; }
table { border-collapse: collapse; border-spacing: 0; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

/* ==========================================================================
   2. JHD 品牌变量与基础排版
   ========================================================================== */
:root {
  --jhd-navy:      #0c1a2e;
  --jhd-navy-2:    #12294a;
  --jhd-primary:   #235A90;
  --jhd-primary-d: #1a4470;
  --jhd-primary-l: #235A90;
  --jhd-accent:    #d9641f;   /* 熔融铁水橙，用于强调/CTA 悬停 */
  --jhd-steel:     #62748e;
  --jhd-line:      #e2e8f0;
  --jhd-bg-soft:   #f8fafc;
  --jhd-radius:    10px;
  --jhd-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
              "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC",
              "Microsoft YaHei", sans-serif;
}

body {
  font-family: var(--jhd-font);
  color: #0c1a2e;
  background: #fff;
  -webkit-text-size-adjust: 100%;
}

/* 参考模板内所有 "Noto Sans SC", Helvetica 声明统一走本地字体栈 */
.screen, .screen *,
.header, .header *,
.footer, .footer * {
  font-family: var(--jhd-font);
}

strong, b { font-weight: 700; }
em, i { font-style: italic; }

/* 无障碍：屏幕阅读器专用文本 */
.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute; width: 1px;
  word-wrap: normal !important;
}
.skip-link:focus {
  position: absolute; left: 8px; top: 8px; z-index: 100000;
  background: #fff; color: var(--jhd-primary); padding: 12px 20px;
  clip-path: none; width: auto; height: auto; border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

/* ==========================================================================
   3. JHD 覆盖样式（在参考版式之上做行业化调整）
   ========================================================================== */

/* 3.1 Header：logo 采用「徽标 + 文字」锁定组合 */
.header-logo .logo-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-logo .logo-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
}
.header-logo .logo-text { display: flex; flex-direction: column; gap: 3px; }
.header-logo .logo-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--jhd-navy);
  line-height: 1;
}
.header-logo .logo-tagline {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--jhd-steel);
  line-height: 1.2;
  white-space: nowrap;
}

/* 3.2 询盘表单反馈 */
.jhd-form-message {
  margin-bottom: 22px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.6;
}
.jhd-form-message.is-success {
  background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0;
}
.jhd-form-message.is-error {
  background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
}
.jhd-honeypot { position: absolute !important; left: -9999px !important; }

/* 3.3 产品详情：图库缩略图 + 参数表 + 资料下载 */
.jhd-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.jhd-gallery-thumbs button {
  width: 74px; height: 74px; padding: 0;
  border: 2px solid var(--jhd-line); border-radius: 8px;
  overflow: hidden; background: #fff; transition: border-color .2s ease;
}
.jhd-gallery-thumbs button.is-active,
.jhd-gallery-thumbs button:hover { border-color: var(--jhd-primary); }
.jhd-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.jhd-downloads {
  margin-top: 26px;
  padding: 20px 22px;
  border: 1px dashed var(--jhd-line);
  border-radius: var(--jhd-radius);
  background: var(--jhd-bg-soft);
}
.jhd-downloads h3 {
  font-size: 13px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--jhd-steel); margin-bottom: 12px;
}
.jhd-downloads ul { display: flex; flex-wrap: wrap; gap: 10px; }
.jhd-downloads a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; background: #fff;
  border: 1px solid var(--jhd-line); color: var(--jhd-primary);
  font-size: 14px; font-weight: 600; transition: all .2s ease;
}
.jhd-downloads a:hover {
  border-color: var(--jhd-primary); background: var(--jhd-primary); color: #fff;
}
.jhd-downloads .jhd-download-empty {
  font-size: 14px; color: var(--jhd-steel); line-height: 1.6;
}

/* 3.4 产品正文富文本 */
.jhd-rich-text { font-size: 16px; line-height: 1.9; color: #334155; }
.jhd-rich-text > * + * { margin-top: 16px; }
.jhd-rich-text h2 {
  font-size: 24px; font-weight: 700; color: var(--jhd-navy);
  margin-top: 34px; line-height: 1.4;
}
.jhd-rich-text h3 {
  font-size: 19px; font-weight: 700; color: var(--jhd-navy); margin-top: 26px;
}
.jhd-rich-text ul, .jhd-rich-text ol { padding-left: 22px; }
.jhd-rich-text ul { list-style: disc; }
.jhd-rich-text ol { list-style: decimal; }
.jhd-rich-text li { margin-top: 8px; }
.jhd-rich-text a { color: var(--jhd-primary); text-decoration: underline; }
.jhd-rich-text table {
  width: 100%; font-size: 15px; border: 1px solid var(--jhd-line);
}
.jhd-rich-text th, .jhd-rich-text td {
  padding: 10px 14px; border: 1px solid var(--jhd-line); text-align: left;
}
.jhd-rich-text th { background: var(--jhd-bg-soft); font-weight: 700; }
.jhd-rich-text img { border-radius: 8px; }

/* 3.5 通用内页（page.php / 404 / search） */
.jhd-basic-page { padding: 140px 5% 90px; max-width: 900px; margin: 0 auto; }
.jhd-basic-page .jhd-page-title {
  font-size: 40px; font-weight: 800; color: var(--jhd-navy);
  line-height: 1.25; margin-bottom: 28px;
}
.jhd-basic-page .jhd-page-sub {
  font-size: 17px; color: var(--jhd-steel); margin-bottom: 34px; line-height: 1.7;
}

/* 3.6 分页 */
.jhd-pagination {
  display: flex; justify-content: center; gap: 8px;
  flex-wrap: wrap; margin: 50px auto 0;
}
.jhd-pagination .page-numbers {
  min-width: 42px; height: 42px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--jhd-line); border-radius: 8px;
  color: var(--jhd-navy); font-size: 15px; font-weight: 600;
  background: #fff; transition: all .2s ease;
}
.jhd-pagination .page-numbers:hover,
.jhd-pagination .page-numbers.current {
  background: var(--jhd-primary); border-color: var(--jhd-primary); color: #fff;
}

/* 3.7 浮动联系条（WhatsApp / 邮件 / 回顶） */
.jhd-float-bar {
  position: fixed; right: 18px; bottom: 22px; z-index: 900;
  display: flex; flex-direction: column; gap: 10px;
}
.jhd-float-bar a, .jhd-float-bar button {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--jhd-primary); color: #fff;
  box-shadow: 0 8px 22px rgba(12, 26, 46, .25);
  transition: transform .2s ease, background .2s ease;
}
.jhd-float-bar a:hover, .jhd-float-bar button:hover {
  transform: translateY(-3px); background: var(--jhd-primary-d);
}
.jhd-float-bar .is-whatsapp { background: #25d366; }
.jhd-float-bar .is-whatsapp:hover { background: #1da851; }
.jhd-float-bar svg { width: 24px; height: 24px; }
.jhd-float-bar .jhd-float-label {
  position: absolute; right: 58px; white-space: nowrap;
  background: var(--jhd-navy); color: #fff; font-size: 13px;
  padding: 6px 12px; border-radius: 6px; opacity: 0;
  pointer-events: none; transition: opacity .2s ease;
}
.jhd-float-bar > *:hover .jhd-float-label { opacity: 1; }

/* 3.8 首页「定制流程」区块 */
.jhd-process { padding: 80px 5%; background: var(--jhd-bg-soft); }
.jhd-process-inner { max-width: 1280px; margin: 0 auto; }
.jhd-process-head { text-align: center; margin-bottom: 44px; }
.jhd-process-eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .16em;
  color: var(--jhd-primary); text-transform: uppercase;
}
.jhd-process-title {
  font-size: 36px; font-weight: 800; color: var(--jhd-navy);
  margin-top: 12px; line-height: 1.3;
}
.jhd-process-desc {
  margin-top: 14px; font-size: 16px; color: var(--jhd-steel); line-height: 1.7;
}
.jhd-process-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px;
}
.jhd-process-banner {
  margin: 0 0 30px;
  border-radius: var(--jhd-radius);
  overflow: hidden;
  border: 1px solid var(--jhd-line);
  background: #0c1a2e;
  line-height: 0;
}
.jhd-process-banner img { width: 100%; height: auto; display: block; }
.jhd-process-step {
  background: #fff; border: 1px solid var(--jhd-line);
  border-radius: var(--jhd-radius); padding: 24px 18px; text-align: center;
  position: relative; transition: transform .25s ease, box-shadow .25s ease;
}
.jhd-process-step:hover {
  transform: translateY(-4px); box-shadow: 0 14px 30px rgba(12,26,46,.08);
}
.jhd-process-num {
  width: 34px; height: 34px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--jhd-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.jhd-process-step h3 {
  font-size: 15px; font-weight: 700; color: var(--jhd-navy);
  line-height: 1.45; margin-bottom: 8px;
}
.jhd-process-step p { font-size: 13.5px; color: var(--jhd-steel); line-height: 1.65; }

/* 3.9 关于页：能力数据 & 认证 */
.jhd-stats-section { padding: 76px 5%; background: var(--jhd-navy); }
.jhd-stats-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.jhd-stat { text-align: center; color: #fff; }
.jhd-stat-num {
  font-size: 44px; font-weight: 800; line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #c9d9ee 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.jhd-stat-label {
  margin-top: 12px; font-size: 13.5px; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.72);
}

/* 3.10 联系页附加信息（微信/地图说明） */
.jhd-contact-extra {
  max-width: 1280px; margin: 0 auto 70px; padding: 0 5%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.jhd-contact-extra .jhd-extra-card {
  background: #fff; border: 1px solid var(--jhd-line);
  border-radius: var(--jhd-radius); padding: 28px;
}
.jhd-contact-extra h3 {
  font-size: 18px; font-weight: 700; color: var(--jhd-navy); margin-bottom: 12px;
}
.jhd-contact-extra p { font-size: 15px; color: var(--jhd-steel); line-height: 1.8; }
.jhd-contact-extra .jhd-map {
  margin-top: 16px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--jhd-line);
}
.jhd-contact-extra iframe { display: block; width: 100%; height: 260px; border: 0; }

/* ==========================================================================
   4. 响应式
   ========================================================================== */
@media (max-width: 1024px) {
  .jhd-process-grid { grid-template-columns: repeat(3, 1fr); }
  .jhd-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .jhd-contact-extra { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-logo .logo-tagline { display: none; }
  .header-logo .logo-name { font-size: 19px; }
  .header-logo .logo-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .jhd-process { padding: 56px 5%; }
  .jhd-process-title { font-size: 27px; }
  .jhd-process-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .jhd-stat-num { font-size: 34px; }
  .jhd-basic-page { padding: 110px 5% 60px; }
  .jhd-basic-page .jhd-page-title { font-size: 29px; }
  .jhd-float-bar { right: 12px; bottom: 14px; }
  .jhd-float-bar a, .jhd-float-bar button { width: 44px; height: 44px; }
  .jhd-gallery-thumbs button { width: 60px; height: 60px; }
}
@media (max-width: 480px) {
  .jhd-process-grid { grid-template-columns: 1fr; }
  .jhd-stats-grid { grid-template-columns: 1fr; }
}
