/* ===================================================================
   JNM Industrial Theme  —  jinanmake.com
   作用：给页面区块提供工业风样式（白底 / 大留白 / 大写小标题 / 卡片网格）
   依赖：Astra 主题；通过 mu-plugin 加载，不受主题切换影响
   =================================================================== */

:root {
    --jnm-ink: #0f1720;
    --jnm-muted: #5b6773;
    --jnm-line: #e5e8ec;
    --jnm-bg: #f6f7f9;
    --jnm-accent: #c8102e;
    --jnm-max: 1180px;
}

/* ---------- 容器 & 区块 ---------- */
.jnm {
    max-width: var(--jnm-max);
    margin: 0 auto;
    padding: 0 24px;
}

.jnm-section {
    padding: 88px 0;
}
.jnm-section--tight { padding: 56px 0; }
.jnm-section--bg { background: var(--jnm-bg); }
.jnm-section--dark { background: var(--jnm-ink); color: #fff; }
.jnm-section--dark .jnm-eyebrow,
.jnm-section--dark h2,
.jnm-section--dark h3,
.jnm-section--dark p { color: #fff; }
.jnm-section--dark p { color: rgba(255,255,255,.75); }

/* ---------- 排版 ---------- */
.jnm-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--jnm-accent);
    margin: 0 0 14px;
}

.jnm h1, .jnm h2, .jnm h3, .jnm h4 {
    font-family: inherit;
    color: var(--jnm-ink);
    line-height: 1.18;
    letter-spacing: -.01em;
    margin-top: 0;
}

.jnm h1 { font-size: clamp(32px, 4.2vw, 52px); font-weight: 700; margin-bottom: 18px; }
.jnm h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 700; margin-bottom: 16px; }
.jnm h3 { font-size: clamp(18px, 2vw, 22px); font-weight: 600; margin-bottom: 10px; }
.jnm h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }

.jnm p {
    font-size: 16px;
    line-height: 1.75;
    color: var(--jnm-muted);
    margin: 0 0 16px;
}

.jnm-lead {
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.6;
    color: var(--jnm-muted);
    max-width: 760px;
}

.jnm-hr {
    height: 1px;
    background: var(--jnm-line);
    border: 0;
    margin: 0;
}

/* ---------- Hero ---------- */
.jnm-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    background: #0b1218;
    overflow: hidden;
}
.jnm-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .55;
}
.jnm-hero__inner {
    position: relative;
    z-index: 2;
    padding: 96px 0;
    color: #fff;
    max-width: 780px;
}
.jnm-hero h1 { color: #fff; }
.jnm-hero p { color: rgba(255,255,255,.82); font-size: 18px; }
.jnm-hero .jnm-eyebrow { color: #ff6b7a; }

/* ---------- 数据条 ---------- */
.jnm-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--jnm-line);
    border-top: 1px solid var(--jnm-line);
    border-bottom: 1px solid var(--jnm-line);
}
.jnm-stat {
    background: #fff;
    padding: 34px 24px;
    text-align: center;
}
.jnm-stat__num {
    display: block;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 700;
    color: var(--jnm-ink);
    line-height: 1;
    margin-bottom: 8px;
}
.jnm-stat__label {
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--jnm-muted);
}

/* ---------- 卡片网格 ---------- */
.jnm-grid {
    display: grid;
    gap: 28px;
}
.jnm-grid--3 { grid-template-columns: repeat(3, 1fr); }
.jnm-grid--4 { grid-template-columns: repeat(4, 1fr); }
.jnm-grid--2 { grid-template-columns: repeat(2, 1fr); }

.jnm-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--jnm-line);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}
.jnm-card:hover {
    box-shadow: 0 18px 40px rgba(15,23,32,.10);
    transform: translateY(-2px);
}
.jnm-card__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--jnm-bg);
}
.jnm-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.jnm-card__body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.jnm-card__tag {
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--jnm-accent);
    margin-bottom: 10px;
}
.jnm-card__title {
    font-size: 17px;
    font-weight: 600;
    color: var(--jnm-ink);
    line-height: 1.35;
    margin: 0 0 10px;
}
.jnm-card__desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--jnm-muted);
    margin: 0 0 16px;
    flex: 1;
}
.jnm-card__link {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--jnm-ink);
    text-decoration: none;
    border-bottom: 1px solid var(--jnm-ink);
    align-self: flex-start;
    padding-bottom: 2px;
}
.jnm-card__link:hover { color: var(--jnm-accent); border-color: var(--jnm-accent); }

/* ---------- 两栏图文 ---------- */
.jnm-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.jnm-split--reverse .jnm-split__media { order: 2; }
.jnm-split__media img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* ---------- 列表 ---------- */
.jnm-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.jnm-list li {
    position: relative;
    padding: 14px 0 14px 30px;
    border-bottom: 1px solid var(--jnm-line);
    font-size: 15px;
    color: var(--jnm-ink);
}
.jnm-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    width: 12px;
    height: 2px;
    background: var(--jnm-accent);
}

/* ---------- 按钮 ---------- */
.jnm-btns { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.jnm-btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .04em;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .18s ease;
}
.jnm-btn--primary { background: var(--jnm-accent); color: #fff; }
.jnm-btn--primary:hover { background: #a30d26; color: #fff; }
.jnm-btn--ghost { border-color: var(--jnm-ink); color: var(--jnm-ink); background: transparent; }
.jnm-btn--ghost:hover { background: var(--jnm-ink); color: #fff; }
.jnm-btn--light { border-color: rgba(255,255,255,.5); color: #fff; }
.jnm-btn--light:hover { background: #fff; color: var(--jnm-ink); }

/* ---------- 产品详情 ---------- */
.jnm-product-head {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: start;
}
.jnm-product-hero img { width: 100%; display: block; }
.jnm-spec-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 1px;
    background: var(--jnm-line);
    border: 1px solid var(--jnm-line);
    margin: 22px 0 28px;
}
.jnm-spec {
    background: #fff;
    padding: 14px 16px;
}
.jnm-spec dt { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--jnm-muted); margin-bottom: 4px; }
.jnm-spec dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--jnm-ink); }

/* ---------- CTA 条 ---------- */
.jnm-cta {
    background: var(--jnm-ink);
    color: #fff;
    padding: 64px 0;
    text-align: center;
}
.jnm-cta h2 { color: #fff; margin-bottom: 12px; }
.jnm-cta p { color: rgba(255,255,255,.75); max-width: 640px; margin: 0 auto 26px; }

/* ---------- 面包屑 ---------- */
.jnm-crumb {
    font-size: 13px;
    color: var(--jnm-muted);
    padding: 18px 0;
    border-bottom: 1px solid var(--jnm-line);
}
.jnm-crumb a { color: var(--jnm-muted); text-decoration: none; }
.jnm-crumb a:hover { color: var(--jnm-accent); }

/* ---------- 页头 ---------- */
.jnm-pagehead {
    background: var(--jnm-bg);
    padding: 72px 0 64px;
    border-bottom: 1px solid var(--jnm-line);
}
.jnm-pagehead h1 { margin-bottom: 14px; }

/* ---------- 全宽：跳出主题容器 ---------- */
.jnm-hero,
.jnm-section,
.jnm-pagehead,
.jnm-cta,
.jnm-stats-wrap {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
}
body { overflow-x: hidden; }

/* 隐藏主题自带的页面标题（我们有自己的 pagehead） */
body.page .entry-header,
body.page .ast-article-post .entry-header,
body.page .ast-single-entry-header {
    display: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .jnm-grid--3, .jnm-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .jnm-split { gap: 40px; }
    .jnm-product-head { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 720px) {
    .jnm-section { padding: 56px 0; }
    .jnm-grid--3, .jnm-grid--4, .jnm-grid--2 { grid-template-columns: 1fr; }
    .jnm-stats { grid-template-columns: repeat(2, 1fr); }
    .jnm-split { grid-template-columns: 1fr; }
    .jnm-split--reverse .jnm-split__media { order: 0; }
    .jnm-hero { min-height: 420px; }
    .jnm-hero__inner { padding: 72px 0; }
    .jnm-spec-list { grid-template-columns: 1fr; }
}

/* ===================================================================
   区块版页面（首页）+ WooCommerce 样式
   =================================================================== */

/* ---------- 区块容器 ---------- */
.wp-block-group.jnm-section { padding: 88px 0; }
.wp-block-group.jnm-section > *,
.wp-block-group.jnm-cta-block > * {
    max-width: 1132px;
    margin-left: auto;
    margin-right: auto;
}
.wp-block-group.jnm-bg { background: var(--jnm-bg); }

/* ---------- Hero（cover 区块） ---------- */
.wp-block-cover.jnm-cover { min-height: 560px; }
.wp-block-cover.jnm-cover .wp-block-cover__inner-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}
.wp-block-cover.jnm-cover h1 {
    color: #fff;
    font-size: clamp(32px, 4vw, 54px);
    max-width: 780px;
    margin-bottom: 18px;
}
.wp-block-cover.jnm-cover p { color: rgba(255,255,255,.86); max-width: 680px; font-size: 18px; }
.wp-block-cover.jnm-cover .jnm-eyebrow { color: #ff8a95; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }

/* ---------- 按钮 ---------- */
.wp-block-buttons { gap: 14px; }
.jnm-btn-primary .wp-block-button__link { background: var(--jnm-accent); color: #fff; border-radius: 0; padding: 14px 30px; font-size: 14px; font-weight: 600; }
.jnm-btn-primary .wp-block-button__link:hover { background: #a30d26; color: #fff; }
.jnm-btn-light .wp-block-button__link { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 0; padding: 14px 30px; }
.jnm-btn-light .wp-block-button__link:hover { background: #fff; color: var(--jnm-ink); }

/* ---------- 数据条 ---------- */
.jnm-stats-row { margin: 0; border-top: 1px solid var(--jnm-line); border-bottom: 1px solid var(--jnm-line); }
.jnm-stats-row .wp-block-column { padding: 30px 12px; text-align: center; border-right: 1px solid var(--jnm-line); }
.jnm-stats-row .wp-block-column:last-child { border-right: 0; }
.jnm-stats-row h3 { font-size: clamp(24px, 2.6vw, 34px); margin: 0 0 6px; }
.jnm-stats-row p { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin: 0; }

/* ---------- 区块内标题排版 ---------- */
.wp-block-group.jnm-section h2 { font-size: clamp(26px, 3vw, 38px); margin: 0 0 14px; }
.wp-block-group.jnm-section h3 { font-size: 18px; margin: 0 0 8px; }
.wp-block-group.jnm-section > p { max-width: 760px; color: var(--jnm-muted); }
.wp-block-column h3 { margin-top: 6px; }
.wp-block-column img { margin-bottom: 14px; }

/* ---------- CTA 区块 ---------- */
.wp-block-group.jnm-cta-block { background: var(--jnm-ink); padding: 72px 0; text-align: center; }
.jnm-cta-block h2 { color: #fff; }
.jnm-cta-block p { color: rgba(255,255,255,.75); max-width: 640px; margin: 0 auto 24px; }
.jnm-cta-block .wp-block-buttons { justify-content: center; }

/* ---------- WooCommerce 产品列表 ---------- */
.woocommerce ul.products { display: grid; gap: 28px; grid-template-columns: repeat(3, minmax(0,1fr)); margin: 32px 0 0; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product {
    width: 100% !important; margin: 0 !important; padding: 0 0 22px;
    background: #fff; border: 1px solid var(--jnm-line); text-align: left;
}
.woocommerce ul.products li.product a img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 0 16px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px; font-weight: 600; padding: 0 20px; margin: 0 0 8px; color: var(--jnm-ink);
}
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart,
.woocommerce ul.products li.product .price { display: none; }
.woocommerce ul.products li.product .jnm-card__link { margin: 0 20px; }

/* ---------- WooCommerce 产品详情 ---------- */
.single-product .site-content .ast-container { max-width: 1180px; }
.woocommerce div.product div.images img { border: 1px solid var(--jnm-line); }
.woocommerce div.product .product_title { font-size: clamp(24px, 2.6vw, 34px); margin-bottom: 12px; }
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--jnm-muted); font-size: 16px; line-height: 1.7; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; margin: 40px 0 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border: 1px solid var(--jnm-line); background: #fff; border-radius: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--jnm-ink); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: #fff; }
.woocommerce table.shop_attributes { border: 1px solid var(--jnm-line); }
.woocommerce table.shop_attributes th { background: var(--jnm-bg); font-weight: 600; }
.jnm-product-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 10px; }
.jnm-product-cta .jnm-btn { padding: 14px 28px; }
.woocommerce .woocommerce-breadcrumb { font-size: 12px; color: var(--jnm-muted); }

@media (max-width: 900px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
    .woocommerce ul.products { grid-template-columns: 1fr; }
    .wp-block-group.jnm-section { padding: 56px 0; }
    .jnm-stats-row .wp-block-column { border-right: 0; border-bottom: 1px solid var(--jnm-line); }
}
/* ---------- 字体与细节优化 ---------- */
body, .wp-block-group, .woocommerce, input, button, textarea, select {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, .wp-block-heading { letter-spacing: -.012em; }
a { transition: color .15s ease, background-color .15s ease; }

/* 图片统一质感 */
img { max-width: 100%; height: auto; }
.wp-block-image img { border-radius: 0; }

/* 产品卡悬停 */
.woocommerce ul.products li.product { transition: box-shadow .2s ease, transform .2s ease; }
.woocommerce ul.products li.product:hover { box-shadow: 0 18px 40px rgba(15,23,32,.10); transform: translateY(-2px); }

/* 页脚留白 */
.site-footer { border-top: 1px solid var(--jnm-line); background: #fff; }
.site-footer .ast-container { max-width: 1180px; }

/* 移动端 hero */
@media (max-width: 720px) {
    .wp-block-cover.jnm-cover { min-height: 480px; }
    .wp-block-cover.jnm-cover h1 { font-size: 30px; }
    .wp-block-cover.jnm-cover p { font-size: 16px; }
}