/*
 * Bongywood V79 — 表单/组件适配
 */

/* 全站统一主内容宽度与两侧留白（与 Header / Footer 对齐） */
:root {
    --bw-container: 1440px;
    --bw-gutter: 52px;
}

@media (max-width: 900px) {
    :root {
        --bw-gutter: 24px;
    }
}

@media (max-width: 480px) {
    :root {
        --bw-gutter: 20px;
    }
}

.wrap {
    width: min(var(--bw-container), calc(100% - (var(--bw-gutter) * 2))) !important;
    max-width: var(--bw-container) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body > .top,
body > header.nav {
    padding-left: max(var(--bw-gutter), calc((100vw - var(--bw-container)) / 2)) !important;
    padding-right: max(var(--bw-gutter), calc((100vw - var(--bw-container)) / 2)) !important;
}

#home .home-slide .hero-copy {
    left: max(var(--bw-gutter), calc((100vw - var(--bw-container)) / 2)) !important;
}

#home .home-carousel-controls {
    right: max(var(--bw-gutter), calc((100vw - var(--bw-container)) / 2)) !important;
}

/* 自定义顶部菜单：普通下拉面板 */
@media (min-width: 821px) {
    body > header.nav .links .nav-product-menu {
        top: calc(100% + 32px) !important;
    }

    /* 菜单项与下方面板之间的透明悬停区，避免鼠标经过空隙时面板关闭 */
    body > header.nav .links .nav-product-group::after {
        content: "";
        position: absolute;
        top: 100%;
        left: -8px;
        right: auto;
        width: var(--bw-menu-panel-width, 260px);
        height: 32px;
    }

    body > header.nav .links .nav-product-menu.bw-dropdown-panel {
        width: 260px !important;
        min-width: 260px !important;
        left: 50% !important;
        transform: translateX(-50%);
        grid-template-columns: 1fr !important;
        padding: 8px 0 !important;
    }

    .bw-dropdown-panel .brand-menu-group {
        padding: 4px 14px !important;
    }

    .bw-dropdown-panel .brand-menu-item a {
        min-height: 36px !important;
        padding: 7px 10px !important;
    }
}

/* 自定义顶部菜单 Mega 面板 */
@media (min-width: 821px) {
    body > header.nav .links .nav-product-menu.bw-mega-panel {
        width: var(--bw-mega-width, 560px) !important;
        min-width: var(--bw-mega-width, 560px) !important;
        left: 0 !important;
        transform: none;
        grid-template-columns: repeat(var(--bw-mega-cols, 2), minmax(0, 1fr)) !important;
    }

    .bw-mega-panel .bw-mega-intro {
        grid-column: 1 / -1;
        padding: 0 16px 14px;
        border-bottom: 1px solid #e5e7e6;
        margin-bottom: 4px;
    }

    .bw-mega-panel .bw-mega-intro strong,
    .bw-mega-panel .bw-mega-intro span {
        display: block;
    }

    .bw-mega-panel .bw-mega-intro strong {
        color: #252b30;
        font-size: 14px;
    }

    .bw-mega-panel .bw-mega-intro span {
        margin-top: 3px;
        color: #7e858a;
        font-size: 11px;
    }

    .bw-mega-panel .bw-mega-promo {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
        padding: 7px 16px;
        color: #252b30;
    }

    .bw-mega-panel .bw-mega-promo img {
        display: block;
        width: 100%;
        height: 96px;
        object-fit: cover;
        margin-bottom: 5px;
        background: #f4f5f4;
    }

    .bw-mega-panel .bw-mega-promo strong {
        font-size: 14px;
    }

    .bw-mega-panel .bw-mega-promo span {
        color: #7e858a;
        font-size: 11px;
        line-height: 1.5;
    }

    .bw-mega-panel .bw-mega-promo em {
        margin-top: 3px;
        color: #4A4F54;
        font-size: 11px;
        font-style: normal;
    }
}

/* 自定义顶部菜单：手机端 Mega 折叠 */
.mobile-nav .mobile-mega {
    border-bottom: 1px solid #e5e7e6;
}

.mobile-nav .mobile-mega > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    cursor: pointer;
    list-style: none;
    font-size: inherit;
}

.mobile-nav .mobile-mega > summary::-webkit-details-marker {
    display: none;
}

.mobile-nav .mobile-mega > summary::after {
    content: "+";
    color: #707675;
    font-size: 18px;
    line-height: 1;
}

.mobile-nav .mobile-mega[open] > summary::after {
    content: "−";
}

.mobile-nav .mobile-mega-panel {
    padding: 0 0 12px;
}

.mobile-nav .mobile-mega-parent {
    display: block;
    padding: 7px 0;
    font-weight: 600;
}

.mobile-nav .mobile-brand-menu-group {
    padding: 9px 0 4px;
}

.mobile-nav .mobile-brand-menu-heading {
    color: #252b30;
    font-size: 13px;
    font-weight: 600;
}

.mobile-nav .mobile-brand-menu-tagline {
    margin: 2px 0 5px;
    color: #7e858a;
    font-size: 11px;
}

.mobile-nav .mobile-mega-panel a:not(.mobile-mega-parent) {
    display: block;
    padding: 7px 0;
    font-size: 13px;
}

/* 案例分类 Banner 文字颜色/对齐 */
.case-category-hero.is-dark-text .overlay h1,
.case-category-hero.is-dark-text .overlay p {
    color: #171918;
}

.case-category-hero.is-center .case-category-hero-copy {
    text-align: center;
}

.case-category-hero.is-center .case-category-hero-copy p {
    margin-left: auto;
    margin-right: auto;
}

.case-category-hero.is-right .case-category-hero-copy {
    text-align: right;
}

.case-category-hero.is-right .case-category-hero-copy p {
    margin-left: auto;
}

/* 案例分类菜单 */
.case-category-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 30px;
    padding-bottom: 0;
    border-bottom: 0;
}

.case-category-menu a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 9px 23px;
    color: #252b30;
    background: #fff;
    border: 1px solid #dfe3e4;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.case-category-menu a:hover {
    border-color: #9ea5a6;
    color: #171918;
}

.case-category-menu a.is-active {
    color: #fff;
    background: #4A4F54;
    border-color: #4A4F54;
    font-weight: 400;
}

.case-category-menu a span {
    color: #4A4F54;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
}

.case-category-menu a.is-active span {
    color: #fff;
}

@media (max-width: 760px) {
    .case-category-menu {
        gap: 9px;
        margin-bottom: 22px;
    }

    .case-category-menu a {
        min-height: 40px;
        padding: 8px 18px;
        font-size: 12px;
    }

    .case-category-menu a span {
        font-size: 12px;
    }
}

/* 联系页地图：延迟加载，避免 iframe 抢焦点导致页面自动滚动 */
.location-map {
    position: relative;
}

.location-map-placeholder {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 24px;
    color: #4A4F54;
    background: #f1f2f0;
    cursor: pointer;
    text-align: center;
    transition: background 0.18s ease;
}

.location-map-placeholder:hover,
.location-map-placeholder:focus-visible {
    background: #e9ebe8;
    outline: none;
}

.location-map-placeholder strong {
    font-size: 17px;
    font-weight: 500;
}

.location-map-placeholder span {
    color: #7a817e;
    font-size: 12px;
}

.location-map.is-loaded .location-map-placeholder {
    display: none;
}

/* 其他页面底部 CTA：同步首页合作伙伴 CTA 样式 */
.cta,
body > section.cta {
    background: #fbfbf5 !important;
    color: #171918 !important;
    padding: 78px 0 !important;
    border-top: 0 !important;
}

body > section.cta::after {
    display: none !important;
}

body > section.cta h2 {
    color: #171918 !important;
    font-size: clamp(27px, 2.5vw, 36px) !important;
}

.cta .cta-wrap {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 0 !important;
}

.cta h2 {
    margin: 0 0 10px;
    color: #171918 !important;
    font-size: clamp(27px, 2.5vw, 36px) !important;
    font-weight: 450;
    line-height: 1.25;
    letter-spacing: -0.018em;
}

.cta p {
    margin: 0;
    color: #62686b !important;
    font-size: 15px;
    line-height: 1.7;
}

.cta .divider {
    display: none !important;
}

.cta .pill,
.cta .pill.light {
    background: #4A4F54 !important;
    border-color: #4A4F54 !important;
    color: #fff !important;
    padding: 12px 24px;
}

.cta .pill:hover {
    background: #3D4246 !important;
    border-color: #3D4246 !important;
}

@media (max-width: 760px) {
    .cta {
        padding: 52px 0 !important;
    }

    .cta .cta-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .cta h2 {
        font-size: 29px !important;
    }
}

/* 分页导航 */
.news-v41-pagination,
.bw-pagination,
.navigation.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 38px auto 0;
    padding-top: 26px;
    border-top: 0;
    text-align: center;
}

.news-v41-pagination .nav-links,
.bw-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.news-v41-pagination .page-numbers,
.bw-pagination .page-numbers,
.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 15px;
    color: #4A4F54;
    background: #fff;
    border: 1px solid #dfe3e4;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.news-v41-pagination a.page-numbers:hover,
.bw-pagination a.page-numbers:hover,
.navigation.pagination a.page-numbers:hover {
    color: #171918;
    border-color: #9ea5a6;
}

.news-v41-pagination .page-numbers.current,
.bw-pagination .page-numbers.current,
.navigation.pagination .page-numbers.current {
    color: #fff;
    background: #4A4F54;
    border-color: #4A4F54;
}

.news-v41-pagination .page-numbers.dots,
.bw-pagination .page-numbers.dots,
.navigation.pagination .page-numbers.dots {
    min-width: auto;
    padding: 0 6px;
    border-color: transparent;
    background: transparent;
}

@media (max-width: 760px) {
    .news-v41-pagination,
    .bw-pagination,
    .navigation.pagination {
        gap: 6px;
        margin-top: 28px;
        padding-top: 20px;
    }

    .news-v41-pagination .nav-links,
    .bw-pagination .nav-links {
        gap: 6px;
    }

    .news-v41-pagination .page-numbers,
    .bw-pagination .page-numbers,
    .navigation.pagination .page-numbers {
        min-width: 38px;
        height: 38px;
        padding: 0 11px;
        font-size: 12px;
    }
}

/* 案例卡片文字区间距 */
.grid > .tile {
    padding-bottom: 18px;
}

.grid > .tile > .meta {
    margin-top: 14px;
    padding-left: 18px;
    padding-right: 18px;
}

.grid > .tile > h3 {
    margin: 8px 0 4px;
    padding-left: 18px;
    padding-right: 18px;
}

.grid > .tile > p {
    margin: 0;
    padding-left: 18px;
    padding-right: 18px;
}

@media (max-width: 760px) {
    .grid > .tile {
        padding-bottom: 15px;
    }

    .grid > .tile > .meta,
    .grid > .tile > h3,
    .grid > .tile > p {
        padding-left: 14px;
        padding-right: 14px;
    }

    .grid > .tile > .meta {
        margin-top: 12px;
    }
}

/* 顶部菜单：链接留空时显示为纯文本 */
.nav .links > .nav-text,
.nav .links .nav-parent-text {
    display: inline-flex;
    align-items: center;
    color: inherit;
    cursor: default;
}

.nav .links > .nav-text.active,
.nav .links .nav-parent-text.active {
    font-weight: 700;
}

.mobile-nav .nav-text,
.mobile-nav .mobile-mega-parent {
    display: block;
    color: inherit;
    cursor: default;
}

/* 新闻详情「更多资讯」与底部 CTA 拉开背景层次 */
body.single-post .news-v41-related {
    background: #f1f3ef;
}

/* 新闻列表卡片标题：使用 div，保持原 h3 视觉样式 */
.news-v41-row .news-v41-title {
    margin: 6px 0;
    color: #202528;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
}

.news-v41-row .news-v41-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

@media (max-width: 600px) {
    .news-v41-row .news-v41-title {
        font-size: 15px;
    }
}

/* 键盘跳转链接 */
.skip-link:focus {
    position: fixed !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 99999;
    width: auto !important;
    height: auto !important;
    padding: 10px 16px;
    clip-path: none !important;
    color: #171918;
    background: #fff;
    border: 1px solid #4A4F54;
    font-size: 14px;
}

/* 页脚栏目标题：使用 div，保持原 h4 视觉样式 */
.footer .footergrid .footer-column-title {
    margin: 0 0 17px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

/* 页脚版权行居中，备案号不加下划线 */
.footer .footbottom {
    text-align: center;
}

.footer .footbottom a {
    display: inline;
    color: inherit;
    text-decoration: none;
}

.footer .footbottom a:hover {
    text-decoration: none;
}

/* 页脚社媒二维码 */
.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 22px;
}

.footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 76px;
}

.footer-social-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    padding: 4px;
    background: #fff;
    border-radius: 4px;
}

.footer-social-qr img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-social-name {
    color: #d8dbe0;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

/* 顶部 Banner 最小高度 */
@media (min-width: 821px) {
    main > .banner {
        min-height: 350px;
    }
}

/* 产品分类 Banner 与列表 */
.product-category-hero {
    position: relative;
    overflow: hidden;
}

.product-category-hero > picture,
.product-category-hero > picture > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.product-category-hero > .overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    color: #fff;
}

.product-category-hero > .overlay .wrap {
    width: 100%;
}

.product-category-hero > .overlay h1 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(29px, 2.75vw, 40px);
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -0.015em;
}

.product-category-hero > .overlay p {
    max-width: 640px;
    margin: 0;
    color: #f4f4f4;
    font-size: 15px;
    line-height: 1.55;
}

.product-category-hero.is-dark-text > .overlay h1,
.product-category-hero.is-dark-text > .overlay p {
    color: #171918;
}

.product-category-hero.is-center .product-category-hero-copy {
    text-align: center;
}

.product-category-hero.is-center .product-category-hero-copy p {
    margin-left: auto;
    margin-right: auto;
}

.product-category-hero.is-right .product-category-hero-copy {
    text-align: right;
}

.product-category-hero.is-right .product-category-hero-copy p {
    margin-left: auto;
}

.product-category-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7e6;
}

.product-category-head h2 {
    margin: 0;
    font-size: clamp(28px, 2.5vw, 36px);
    font-weight: 450;
    line-height: 1.25;
}

.product-category-head p {
    margin: 7px 0 0;
    color: #7a817e;
    font-size: 12px;
}

.product-category-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-left: 0;
    margin-right: auto;
}

.product-category-nav a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 9px 23px;
    color: #252b30;
    background: #fff;
    border: 1px solid #dfe3e4;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.product-category-nav a:hover {
    border-color: #9ea5a6;
    color: #171918;
}

.product-category-nav a.is-active {
    color: #fff;
    background: #4A4F54;
    border-color: #4A4F54;
    font-weight: 400;
}

.product-category-nav a span {
    color: #4A4F54;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
}

.product-category-nav a.is-active span {
    color: #fff;
}

.product-category-head .pd-btn-secondary {
    flex: 0 0 auto;
    padding: 10px 18px;
    color: #4A4F54;
    border: 1px solid #cfd4d2;
    border-radius: 999px;
    font-size: 12px;
    text-decoration: none;
}

.product-category-head .pd-btn-secondary:hover {
    border-color: #4A4F54;
}

@media (max-width: 760px) {
    .product-category-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .product-category-nav {
        margin-left: 0;
        gap: 14px;
    }
}

/* 案例详情 */
.case-detail-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 64px;
    align-items: start;
    max-width: 1120px !important;
    padding-top: 36px;
    padding-bottom: 52px;
}

.case-single-head {
    max-width: none;
    margin: 0;
    padding: 0 0 20px;
}

.case-single-head h1 {
    margin: 0 0 12px;
    color: #111;
    font-size: clamp(32px, 3.3vw, 46px);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.case-single-meta {
    color: #777;
    font-size: 12px;
}

.case-single-meta a {
    color: #4A4F54;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.case-single-content {
    max-width: none;
    margin: 0;
    padding: 24px 0 0;
    border-top: 1px solid #e5e7e6;
    color: #333;
    font-size: 15px;
    line-height: 1.9;
}

.case-single-content > p:first-child {
    margin-top: 0;
    color: #333;
    font-size: 17px;
    line-height: 1.85;
}

.case-single-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 22px 0;
}

.case-detail-aside {
    position: sticky;
    top: 120px;
}

.case-aside-card {
    padding: 24px 22px;
    background: #fbfbf5;
    border: 1px solid #e6e8e8;
    border-radius: 6px;
}

.case-aside-eyebrow {
    color: #8a8f8d;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.case-aside-card h2 {
    margin: 9px 0 10px;
    color: #171918;
    font-size: 23px;
    font-weight: 450;
    line-height: 1.35;
}

.case-aside-card p {
    margin: 0 0 18px;
    color: #666c69;
    font-size: 13px;
    line-height: 1.75;
}

.case-aside-card .pill {
    padding: 10px 20px;
    font-size: 12px;
}

.case-aside-back {
    display: inline-block;
    margin-top: 22px;
    color: #4A4F54;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (max-width: 1100px) {
    .case-detail-wrap {
        grid-template-columns: 1fr;
        gap: 36px;
        max-width: 820px !important;
    }

    .case-detail-aside {
        position: static;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 24px;
    }

    .case-aside-card {
        flex: 1;
    }

    .case-aside-back {
        margin-top: 6px;
        white-space: nowrap;
    }
}

.case-related-grid > .tile {
    background: #fff;
}

.case-single-related .case-related-cat {
    display: block;
    margin-top: 5px;
    color: #80878b;
    font-size: 11px;
}

@media (max-width: 760px) {
    .case-detail-wrap {
        padding-top: 26px;
        padding-bottom: 34px;
    }

    .case-single-head {
        padding-bottom: 16px;
    }

    .case-single-head h1 {
        font-size: 28px;
    }

    .case-single-content {
        padding-top: 20px;
    }

    .case-single-content > p:first-child {
        font-size: 16px;
    }

    .case-detail-aside {
        display: block;
    }

    .case-aside-back {
        display: block;
        margin-top: 18px;
    }
}

/* 产品详情无 Hero，为固定导航留出高度 */
.product-detail-main {
    padding-top: 96px;
}

@media (max-width: 820px) {
    .product-detail-main {
        padding-top: 76px;
    }
}

/* 产品详情正文：古腾堡常用排版规范 */
.pd-product-content {
    padding: 0 0 64px;
    background: #fff;
}

.pd-product-content + .pd-related-section {
    padding-top: 60px;
}

.product-content {
    width: min(100%, 1000px);
    margin: 0 auto;
    color: #3f474b;
    font-size: 16px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.product-content > *:first-child {
    margin-top: 0;
}

.product-content > *:last-child {
    margin-bottom: 0;
}

.product-content p {
    margin: 0 0 1.1em;
}

.product-content h1,
.product-content h2,
.product-content h3,
.product-content h4,
.product-content h5,
.product-content h6 {
    margin: 1.55em 0 0.6em;
    color: #202528;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.product-content h1 {
    font-size: clamp(28px, 2.8vw, 38px);
}

.product-content h2 {
    font-size: clamp(24px, 2.2vw, 31px);
}

.product-content h3 {
    font-size: clamp(20px, 1.8vw, 25px);
}

.product-content h4 {
    font-size: 19px;
}

.product-content h5 {
    font-size: 17px;
}

.product-content h6 {
    font-size: 15px;
}

.product-content strong {
    color: #202528;
    font-weight: 600;
}

.product-content a {
    color: #3f5d52;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-content a:hover {
    color: #202528;
}

.product-content ul,
.product-content ol {
    margin: 0 0 1.2em;
    padding-left: 1.5em;
}

.product-content li {
    margin: 0.35em 0;
}

.product-content li > ul,
.product-content li > ol {
    margin: 0.35em 0;
}

.product-content blockquote,
.product-content .wp-block-quote {
    margin: 1.6em 0;
    padding: 4px 0 4px 22px;
    color: #596267;
    border-left: 3px solid #4A4F54;
}

.product-content blockquote p:last-child,
.product-content .wp-block-quote p:last-child {
    margin-bottom: 0;
}

.product-content cite {
    color: #858c8a;
    font-size: 13px;
    font-style: normal;
}

.product-content hr,
.product-content .wp-block-separator {
    margin: 2.2em auto;
    border: 0;
    border-top: 1px solid #e2e5e2;
}

.product-content img {
    max-width: 100%;
    height: auto;
}

.product-content figure,
.product-content .wp-block-image {
    margin: 1.8em 0;
}

.product-content figure img,
.product-content .wp-block-image img {
    display: block;
    height: auto;
    border-radius: 2px;
}

.product-content figcaption,
.product-content .wp-block-image figcaption,
.product-content .wp-element-caption {
    margin-top: 9px;
    color: #8a918e;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.product-content .alignleft {
    float: left;
    margin: 0 1.5em 1em 0;
}

.product-content .alignright {
    float: right;
    margin: 0 0 1em 1.5em;
}

.product-content .aligncenter {
    margin-left: auto;
    margin-right: auto;
}

.product-content .alignwide {
    width: min(1200px, calc(100vw - 104px));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.product-content .alignfull {
    width: 100vw;
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.product-content .wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 1.8em 0;
    padding: 0;
    list-style: none;
}

.product-content .wp-block-gallery .wp-block-image {
    margin: 0;
}

.product-content .wp-block-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content .wp-block-columns {
    display: flex;
    gap: 28px;
    margin: 1.6em 0;
}

.product-content .wp-block-column {
    flex: 1 1 0;
    min-width: 0;
}

.product-content .wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1.6em 0;
}

.product-content .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    color: #fff;
    background: #4A4F54;
    border: 1px solid #4A4F54;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
}

.product-content .wp-block-button__link:hover {
    color: #fff;
    background: #3D4246;
    border-color: #3D4246;
}

.product-content .wp-block-button.is-style-outline .wp-block-button__link {
    color: #3f474b;
    background: transparent;
    border-color: #aeb5b2;
}

.product-content table,
.product-content .wp-block-table table {
    width: 100%;
    margin: 1.6em 0;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.65;
}

.product-content th,
.product-content td {
    padding: 10px 12px;
    border: 1px solid #e1e4e1;
    text-align: left;
    vertical-align: top;
}

.product-content th {
    color: #202528;
    background: #f6f7f4;
    font-weight: 600;
}

.product-content .wp-block-table {
    overflow-x: auto;
}

.product-content code {
    padding: 2px 5px;
    color: #343b3f;
    background: #f3f4f2;
    font-size: 0.9em;
}

.product-content pre {
    margin: 1.4em 0;
    padding: 16px;
    overflow-x: auto;
    color: #f4f5f4;
    background: #2c3236;
    font-size: 13px;
    line-height: 1.7;
}

.product-content pre code {
    padding: 0;
    color: inherit;
    background: transparent;
}

.product-content iframe,
.product-content video {
    max-width: 100%;
    border: 0;
}

.product-content .wp-block-embed {
    margin: 1.8em 0;
}

.product-content .has-text-align-center {
    text-align: center;
}

.product-content .has-text-align-right {
    text-align: right;
}

@media (max-width: 760px) {
    .pd-product-content {
        padding: 0 0 44px;
    }

    .pd-product-content + .pd-related-section {
        padding-top: 48px;
    }

    .product-content {
        font-size: 15px;
        line-height: 1.85;
    }

    .product-content h2 {
        font-size: 24px;
    }

    .product-content h3 {
        font-size: 21px;
    }

    .product-content .wp-block-columns {
        display: block;
    }

    .product-content .wp-block-column + .wp-block-column {
        margin-top: 20px;
    }

    .product-content .alignwide,
    .product-content .alignfull {
        width: 100%;
        margin-left: 0;
        transform: none;
    }

    .product-content .alignleft,
    .product-content .alignright {
        float: none;
        margin: 1.2em 0;
    }

    .product-content .wp-block-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

/* 首页应用场景卡片白底 */
#applications .app {
    background: #fff;
}

/* 产品相册：大图 + 小图导航 */
.pd-gallery-stage {
    position: relative;
}

.pd-gallery-main {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.pd-gallery-main:focus-visible {
    outline: 2px solid #4A4F54;
    outline-offset: -4px;
}

body.pd-lightbox-open {
    overflow: hidden;
}

.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: rgba(15, 18, 20, 0.9);
}

.pd-lightbox[hidden] {
    display: none;
}

.pd-lightbox img {
    display: block;
    max-width: min(1120px, 92vw);
    max-height: 86vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.pd-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.pd-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.pd-lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 1;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.pd-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.6);
}

.pd-lightbox-nav[hidden] {
    display: none;
}

.pd-lightbox-nav.is-prev {
    left: 24px;
}

.pd-lightbox-nav.is-next {
    right: 24px;
}

@media (max-width: 720px) {
    .pd-lightbox {
        padding: 58px 16px 24px;
    }

    .pd-lightbox img {
        max-width: 100%;
        max-height: 78vh;
    }

    .pd-lightbox-close {
        top: 12px;
        right: 14px;
        width: 40px;
        height: 40px;
    }

    .pd-lightbox-nav {
        top: auto;
        bottom: 22px;
        width: 42px;
        height: 42px;
        margin-top: 0;
        font-size: 26px;
    }

    .pd-lightbox-nav.is-prev {
        left: 16px;
    }

    .pd-lightbox-nav.is-next {
        right: 16px;
    }
}

.pd-gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-top: -19px;
    padding: 0;
    color: #2c3236;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e0e4e2;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.pd-gallery-nav:hover {
    background: #fff;
    border-color: #aeb6b4;
}

.pd-gallery-nav.is-prev {
    left: 12px;
}

.pd-gallery-nav.is-next {
    right: 12px;
}

.pd-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 2px;
    overflow-x: auto;
}

.pd-gallery-thumb {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    padding: 3px;
    background: #fff;
    border: 1px solid #e1e5e3;
    cursor: pointer;
    transition: border-color 0.18s ease;
}

.pd-gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pd-gallery-thumb:hover,
.pd-gallery-thumb.is-active {
    border-color: #4A4F54;
}

@media (max-width: 720px) {
    .pd-gallery-nav {
        width: 34px;
        height: 34px;
        margin-top: -17px;
        font-size: 21px;
    }

    .pd-gallery-nav.is-prev {
        left: 8px;
    }

    .pd-gallery-nav.is-next {
        right: 8px;
    }

    .pd-gallery-thumb {
        flex-basis: 56px;
        width: 56px;
        height: 56px;
    }
}

/* 产品卡片：间距与悬停动效 */
.product-grid .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-grid .card-media img {
    transition: transform 0.35s ease;
}

.product-grid .card:hover {
    transform: translateY(-4px);
    border-color: #d4d9d6;
    box-shadow: 0 16px 34px rgba(20, 24, 22, 0.09);
}

.product-grid .card:hover .card-media img {
    transform: scale(1.035);
}

.product-grid .card:hover h3 a,
.product-grid .card:hover .card-title a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-grid .card .card-title {
    margin: 0;
    color: #252b30;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .product-grid .card .card-title {
        font-size: 14px;
        line-height: 1.45;
    }
}

@media (max-width: 560px) {
    .product-grid .card .card-title {
        font-size: 13px;
        line-height: 1.5;
    }
}

.product-grid .card-body {
    padding: 20px 20px 21px;
    gap: 9px;
}

.product-grid .card .meta {
    margin-top: 7px;
    padding-top: 13px;
    border-top: 1px solid #f0f1ee;
}

.product-grid .card .meta span {
    color: #6f7773;
    font-size: 11px;
}

@media (max-width: 560px) {
    .product-grid .card-body {
        padding: 12px 11px 14px;
        gap: 7px;
    }

    .product-grid .card .meta {
        padding-top: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-grid .card,
    .product-grid .card-media img {
        transition: none;
    }

    .product-grid .card:hover {
        transform: none;
    }

    .product-grid .card:hover .card-media img {
        transform: none;
    }
}

/* 公司介绍：仓储版块底部贴近图片 */
.factory-logistics {
    padding-bottom: 0 !important;
}

.factory-logistics .factory-warehouse-image {
    margin-bottom: 0;
}

/* 公司介绍：生产流程主图铺满容器 */
.factory-process-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 公司介绍：产品系统卡片外侧边框与内间距 */
@media (min-width: 761px) {
    .factory-systems-grid a:first-child {
        border-left: 1px solid #e6e8e8;
        padding-left: 33px;
    }

    .factory-systems-grid a:last-child {
        border-right: 1px solid #e6e8e8;
        padding-right: 33px;
    }
}

/* 公司介绍：仓储图片受网格约束，避免原图尺寸撑破版块 */
.factory-warehouse-layout {
    grid-template-columns: minmax(0, 1.33fr) minmax(0, 0.67fr) !important;
}

.factory-warehouse-image {
    min-width: 0;
    overflow: hidden;
}

.factory-warehouse-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 760px) {
    .factory-warehouse-layout {
        grid-template-columns: 1fr !important;
    }

    .factory-warehouse-image {
        height: 265px;
    }
}

/* Hero 字号统一：以下载中心 Banner 为基准 */
.banner h1,
.news-category-hero h1,
.factory-hero h1,
.fence-banner h1,
.siding-hero h1,
.pd-banner h1,
.v45-category-inner h1 {
    font-size: clamp(29px, 2.75vw, 40px) !important;
    font-weight: 400 !important;
    line-height: 1.18 !important;
    letter-spacing: -0.015em !important;
}

.banner p,
.news-category-hero p,
.factory-hero p,
.fence-banner p,
.siding-hero p,
.pd-banner p {
    font-size: 15px !important;
    line-height: 1.55 !important;
}

@media (max-width: 760px) {
    .banner h1,
    .news-category-hero h1,
    .factory-hero h1,
    .fence-banner h1,
    .siding-hero h1,
    .pd-banner h1,
    .v45-category-inner h1 {
        font-size: 30px !important;
        line-height: 1.18 !important;
    }

    .banner p,
    .news-category-hero p,
    .factory-hero p,
    .fence-banner p,
    .siding-hero p,
    .pd-banner p {
        font-size: 15px !important;
        line-height: 1.55 !important;
    }
}

/* PVC 分类页：正文使用古腾堡按钮时的样式衔接 */
.downloads-page .head {
    margin-bottom: 22px;
}

.downloads-page .head h2 {
    margin-top: 0;
}

.downloads-page .head p {
    max-width: none;
    margin-top: 8px;
}

.downloads-page .doc {
    padding-top: 20px;
    padding-bottom: 20px;
}

.downloads-page .doc a {
    color: #4A4F54;
    border-bottom: 1px solid #333;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.downloads-page .doc:hover a,
.downloads-page .doc a:hover {
    color: #111;
    border-bottom-color: #111;
    box-shadow: 0 1px 0 #111;
}

@media (max-width: 760px) {
    .downloads-page .head {
        margin-bottom: 18px;
    }

    .downloads-page .doc {
        padding-top: 16px;
        padding-bottom: 16px;
    }
}
.v45-category-actions .wp-block-button {
    margin: 0;
}

.v45-category-actions .wp-block-button__link {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 13px 26px;
    font-size: inherit;
    line-height: inherit;
}

.v45-category-actions .wp-block-button.v45-dark-link {
    background: #4a4f54;
}

.v45-category-actions .wp-block-button.v45-dark-link a {
    color: #fff;
}

.v45-category-actions .wp-block-button.v45-text-link {
    background: transparent;
}

.v45-category-actions .wp-block-button.v45-text-link a {
    color: #171918;
    border-bottom: 1px solid #4a4f54;
    border-radius: 0;
    padding: 0 0 5px;
}

/* 首页 Hero 不显示 Banner 遮罩 */
body.home #home .hero.bw-has-bg-image::after,
body.home #home .home-slide::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* Banner 背景图遮罩（统一由全站/页面 ACF 控制） */
.bw-has-bg-image {
    position: relative;
}

.bw-has-bg-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: var(--bw-banner-overlay-color, #0a0a0a) !important;
    opacity: var(--bw-banner-overlay-opacity, 0.35);
}

.bw-has-bg-image > .overlay,
.bw-has-bg-image > .hero-copy,
.bw-has-bg-image > .factory-hero-inner,
.bw-has-bg-image > .siding-hero-inner {
    z-index: 2;
}

.bw-has-bg-image > .wrap,
.bw-has-bg-image > .banner-copy {
    position: relative;
    z-index: 2;
}

/* 统一面包屑 */
.bw-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 18px;
    padding-bottom: 18px;
    font-size: 12px;
    color: #777;
    line-height: 1.6;
}

.bw-breadcrumb a {
    color: #777;
    transition: color 0.2s ease;
}

.bw-breadcrumb a:hover {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bw-breadcrumb span[aria-current="page"] {
    color: #333;
}

.bw-breadcrumb-sep {
    color: #bbb;
}

/* 文章详情：标题、分类、发布时间放在正文上方 */
.news-v41-title-block {
    max-width: 900px;
    margin: 0 auto;
    padding: 34px 28px 8px;
}

.news-v41-title-block h1 {
    margin: 0 0 16px;
    color: #111;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.02em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-v41-title-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    color: #777;
    font-size: 12px;
    line-height: 1.6;
}

.news-v41-title-meta a {
    color: #4A4F54;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.news-v41-title-meta a:hover {
    color: #111;
}

@media (max-width: 760px) {
    .news-v41-title-block {
        padding: 24px 20px 6px;
    }

    .news-v41-title-block h1 {
        margin-bottom: 13px;
        font-size: 28px;
    }

    .news-v41-title-meta {
        gap: 9px 16px;
        font-size: 11px;
    }
}

/* 面包屑之后的首个内容区统一上间距，避免各页面出现过大留白 */
.bw-breadcrumb + section,
.bw-breadcrumb + .section {
    padding-top: 48px !important;
}

@media (max-width: 760px) {
    .bw-breadcrumb {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .bw-breadcrumb + section,
    .bw-breadcrumb + .section {
        padding-top: 36px !important;
    }
}

/* 新闻分类 Hero（分类字段控制背景、遮罩、文字颜色与对齐） */
.news-category-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 380px;
    padding: 90px 0 70px;
    overflow: hidden;
    background: #4A4F54;
}

.news-category-hero picture {
    position: absolute;
    inset: 0;
    display: block;
}

.news-category-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.news-category-hero-mask {
    position: absolute;
    inset: 0;
    background: var(--bw-banner-overlay-color, #0a0a0a);
    opacity: var(--bw-banner-overlay-opacity, 0.35);
    pointer-events: none;
}

.news-category-hero-inner {
    position: relative;
    z-index: 2;
}

.news-category-hero-copy {
    max-width: 820px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-category-hero h1 {
    max-width: 100%;
    margin: 0 0 18px;
    font-size: clamp(34px, 4vw, 58px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-category-hero-desc,
.news-category-hero-desc p {
    max-width: 760px;
    margin: 0;
    font-size: 16px;
    line-height: 1.9;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-category-hero.is-white h1,
.news-category-hero.is-white .news-category-hero-desc,
.news-category-hero.is-white .news-category-hero-desc p {
    color: #fff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.news-category-hero.is-dark h1,
.news-category-hero.is-dark .news-category-hero-desc,
.news-category-hero.is-dark .news-category-hero-desc p {
    color: #111;
    text-shadow: none;
}

.news-category-hero.is-center .news-category-hero-copy {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.news-category-hero.is-right .news-category-hero-copy {
    margin-left: auto;
    text-align: right;
}

@media (max-width: 760px) {
    .news-category-hero {
        min-height: 300px;
        padding: 74px 0 54px;
    }

    .news-category-hero h1 {
        font-size: 32px;
    }

    .news-category-hero-desc,
    .news-category-hero-desc p {
        font-size: 14px;
        line-height: 1.8;
    }
}

.cta .pill {
    color: #4A4F54;
    background: #fff;
    border-color: #fff;
}

/* 手机端菜单：始终使用白底深色文字，避免深色导航状态下黑字压深灰底 */
@media (max-width: 820px) {
    body > header.nav .mobile-nav.open,
    body > header.nav.nav-past-banner .mobile-nav.open {
        background: #fff !important;
        color: #202429 !important;
        border-top: 1px solid #e4e4e7 !important;
        box-shadow: 0 18px 35px rgba(20, 24, 26, .14);
        padding: 16px 22px 20px !important;
        max-height: calc(100dvh - 70px) !important;
        overflow-y: auto;
    }

    body > header.nav .mobile-nav.open a,
    body > header.nav.nav-past-banner .mobile-nav.open a {
        color: #202429 !important;
        font-size: 16px !important;
        line-height: 1.5;
        padding: 14px 0 !important;
        border-bottom: 1px solid #eef0ed !important;
    }

    body > header.nav .mobile-nav.open a.active {
        color: #171918 !important;
        font-weight: 600;
    }

    .mobile-nav .mobile-mega {
        border-bottom: 1px solid #e7e9e6;
    }

    body > header.nav .mobile-nav .mobile-mega > summary {
        color: #202429;
        font-size: 16px;
        font-weight: 400;
        padding: 17px 0;
        min-height: 52px;
    }

    .mobile-nav .mobile-mega-panel {
        padding: 0 0 14px;
    }

    body > header.nav .mobile-nav .mobile-brand-menu-group {
        padding: 13px 0 7px;
    }

    body > header.nav .mobile-nav .mobile-brand-menu-group + .mobile-brand-menu-group {
        border-top: 1px solid #e5e7e4;
        margin-top: 3px;
        padding-top: 16px;
    }

    body > header.nav .mobile-nav .mobile-brand-menu-heading {
        color: #171918;
        font-size: 15px !important;
        font-weight: 600;
        line-height: 1.5;
    }

    body > header.nav .mobile-nav .mobile-brand-menu-tagline {
        color: #6f7773 !important;
        font-size: 12px !important;
        line-height: 1.65;
        margin: 4px 0 8px;
    }

    body > header.nav .mobile-nav .mobile-mega-panel a:not(.mobile-mega-parent) {
        color: #202429 !important;
        font-size: 15px !important;
        line-height: 1.6;
        padding: 11px 0 !important;
        border-bottom: 1px solid #f0f1ee !important;
    }

    .mobile-nav .mobile-mega-panel a:last-child {
        border-bottom: 0 !important;
    }

    body > header.nav .mobile-nav .mobile-mega-parent {
        color: #59615d !important;
        font-size: 13px !important;
        font-weight: 500;
        padding: 9px 0 !important;
        border-bottom: 1px solid #eef0ed;
    }

    body > header.nav .mobile-nav .mobile-mega > summary::after {
        color: #59615d;
        font-size: 20px;
    }
}
