/**
 * 全站短代码（shortcodes-common.php）
 * — xingyi_certs：版心由 .xy-module-container 与 .xy-shortcode-certs 对齐栅格
 * — xingyi_product_series_contact：背景通栏，文案区在 .product-series-contact__inner 内对齐版心
 * — xy_actions：仅浮动按钮阴影等局部样式（不参与版心）
 * — xy_cta：.cta-section 始终视口通栏，不受各页版心 frame 左右留白影响
 */

section.cta-section {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-inline: 0;
}

.xy-module-page-shell > section.cta-section,
main [class*="-page-frame"] > section.cta-section,
main [class*="-content-frame"] > section.cta-section {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-inline: 0;
}

@media (max-width: 389.98px) {
    .cta-title {
        font-size: 18px;
    }
}

@media (min-width: 390px) and (max-width: 429.98px) {
    .cta-title {
        font-size: 19px;
    }
}

@media (min-width: 430px) and (max-width: 479.98px) {
    .cta-title {
        font-size: 20px;
    }
}

@media (min-width: 480px) and (max-width: 639.98px) {
    .cta-title {
        font-size: 21px;
    }
}

@media (min-width: 640px) and (max-width: 767.98px) {
    .cta-title {
        font-size: 22px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .cta-title {
        font-size: 24px;
    }
}

@media (min-width: 1025px) and (max-width: 1365.98px) {
    .cta-title {
        font-size: 26px;
    }
}

@media (min-width: 1366px) and (max-width: 1512px) {
    .cta-title {
        font-size: 28px;
    }
}

@media (min-width: 1513px) and (max-width: 1599.98px) {
    .cta-title {
        font-size: 30px;
    }
}

@media (min-width: 1600px) {
    .cta-title {
        font-size: 32px;
    }
}

/* ========== 证书条：避免与 main.css 中 max-width:1296px 叠窄（版心由 container 承担） ========== */
.xy-shortcode-certs.certs-section {
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* ========== 联系 CTA：全宽背景 + 内层版心 ========== */
.xy-shortcode-product-contact .product-series-contact__inner {
    position: relative;
    z-index: 2;
    height: 100%;
    box-sizing: border-box;
    width: 100%;
    max-width: 1296px;
    margin-left: auto;
    margin-right: auto;
}

/* 小屏：内层拉满宽度，与 main.css 中居中/全宽排版一致 */
@media (max-width: 1024px) {
    .xy-shortcode-product-contact .product-series-contact__inner {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* 桌面：文案相对版心内层定位（勿在 <1025px 覆盖 main 的 left:0 等） */
@media (min-width: 1025px) {
    .xy-shortcode-product-contact .product-series-contact__actions {
        left: 40px;
        bottom: 80px;
        right: auto;
        width: auto;
        max-width: min(650px, calc(100% - 80px));
        box-sizing: border-box;
    }
}

/* ========== 规则 7：1025–1365.98 ========== */
@media (min-width: 1025px) and (max-width: 1365.98px) {
    .xy-shortcode-product-contact .product-series-contact__actions {
        left: 60px;
        bottom: 64px;
        right: auto;
        width: auto;
        max-width: min(650px, calc(100% - 120px));
        box-sizing: border-box;
    }

    .xy-shortcode-product-contact .product-series-contact__title {
        font-size: 26px;
        line-height: 1.25;
    }

    .xy-shortcode-product-contact .product-series-contact__btn span {
        font-size: 18px;
    }
}

/* ========== 浮动：回到顶部按钮（原内联 box-shadow） ========== */
.xy-shortcode-floating-actions {
    --xy-floating-action-size: 28px;
}

.xy-shortcode-floating-actions .xy-chat-trigger,
.xy-shortcode-floating-actions .xy-floating-scroll-top {
    width: var(--xy-floating-action-size);
    height: var(--xy-floating-action-size);
    box-sizing: border-box;
}

.xy-shortcode-floating-actions .xy-floating-scroll-top {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ========== 规则 11 ========== */
@media (hover: hover) and (pointer: fine) {
    .xy-shortcode-product-contact .product-series-contact__btn {
        transition: background-color 0.25s ease, opacity 0.2s ease;
    }
}

@media (max-width: 389.98px) {
    .xy-shortcode-certs.certs-section {
        height: 100px;
    }

    .xy-shortcode-certs .certs-logo--iso9001 {
        width: 59px;
        height: 59px;
    }

    .xy-shortcode-certs .certs-logo--iatf16949 {
        width: 59px;
        height: 59px;
    }

    .xy-shortcode-certs .certs-logo--iso14001 {
        width: 77px;
        height: 77px;
    }

    .xy-shortcode-certs .certs-logo--cwb {
        width: 198px;
        height: 53px;
    }

    .xy-shortcode-product-contact.product-series-contact {
        height: 220px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg {
        height: 220px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg-img {
        inset: auto;
        left: 0;
        top: 0;
        width: 100%;
        height: 220px;
        max-width: none;
        object-fit: cover;
    }

    .xy-shortcode-product-contact .product-series-contact__btn span {
        font-size: 12px;
    }
}

@media (min-width: 390px) and (max-width: 429.98px) {
    .xy-shortcode-certs.certs-section {
        height: 110px;
    }

    .xy-shortcode-certs .certs-logo--iso9001 {
        width: 65px;
        height: 65px;
    }

    .xy-shortcode-certs .certs-logo--iatf16949 {
        width: 65px;
        height: 65px;
    }

    .xy-shortcode-certs .certs-logo--iso14001 {
        width: 85px;
        height: 85px;
    }

    .xy-shortcode-certs .certs-logo--cwb {
        width: 217px;
        height: 58px;
    }

    .xy-shortcode-product-contact.product-series-contact {
        height: 228px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg {
        height: 228px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg-img {
        inset: auto;
        left: 0;
        top: 0;
        width: 100%;
        height: 228px;
        max-width: none;
        object-fit: cover;
    }

    .xy-shortcode-product-contact .product-series-contact__btn span {
        font-size: 12px;
    }
}

@media (min-width: 430px) and (max-width: 479.98px) {
    .xy-shortcode-certs.certs-section {
        height: 120px;
    }

    .xy-shortcode-certs .certs-logo--iso9001 {
        width: 71px;
        height: 71px;
    }

    .xy-shortcode-certs .certs-logo--iatf16949 {
        width: 71px;
        height: 71px;
    }

    .xy-shortcode-certs .certs-logo--iso14001 {
        width: 93px;
        height: 93px;
    }

    .xy-shortcode-certs .certs-logo--cwb {
        width: 237px;
        height: 64px;
    }

    .xy-shortcode-product-contact.product-series-contact {
        height: 236px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg {
        height: 236px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg-img {
        inset: auto;
        left: 0;
        top: 0;
        width: 100%;
        height: 236px;
        max-width: none;
        object-fit: cover;
    }
}

@media (min-width: 480px) and (max-width: 639.98px) {
    .xy-shortcode-certs.certs-section {
        height: 140px;
    }

    .xy-shortcode-certs .certs-logo--iso9001 {
        width: 83px;
        height: 83px;
    }

    .xy-shortcode-certs .certs-logo--iatf16949 {
        width: 84px;
        height: 84px;
    }

    .xy-shortcode-certs .certs-logo--iso14001 {
        width: 108px;
        height: 108px;
    }

    .xy-shortcode-certs .certs-logo--cwb {
        width: 276px;
        height: 74px;
    }

    .xy-shortcode-product-contact.product-series-contact {
        height: 244px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg {
        height: 244px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg-img {
        inset: auto;
        left: 0;
        top: 0;
        width: 100%;
        height: 244px;
        max-width: none;
        object-fit: cover;
    }
}

@media (min-width: 640px) and (max-width: 767.98px) {
    .xy-shortcode-certs.certs-section {
        height: 160px;
    }

    .xy-shortcode-certs .certs-logo--iso9001 {
        width: 95px;
        height: 95px;
    }

    .xy-shortcode-certs .certs-logo--iatf16949 {
        width: 96px;
        height: 96px;
    }

    .xy-shortcode-certs .certs-logo--iso14001 {
        width: 125px;
        height: 125px;
    }

    .xy-shortcode-certs .certs-logo--cwb {
        width: 317px;
        height: 84px;
    }

    .xy-shortcode-product-contact.product-series-contact {
        height: 252px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg {
        height: 252px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg-img {
        inset: auto;
        left: 0;
        top: 0;
        width: 100%;
        height: 252px;
        max-width: none;
        object-fit: cover;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .xy-shortcode-certs.certs-section {
        height: 170px;
    }

    .xy-shortcode-certs .certs-logo {
        position: static;
    }

    .xy-shortcode-certs .certs-logo--iso9001 {
        width: 101px;
        height: 101px;
    }

    .xy-shortcode-certs .certs-logo--iatf16949 {
        width: 102px;
        height: 102px;
    }

    .xy-shortcode-certs .certs-logo--iso14001 {
        width: 132px;
        height: 132px;
    }

    .xy-shortcode-certs .certs-logo--cwb {
        width: 336px;
        height: 90px;
    }

    .xy-shortcode-product-contact.product-series-contact {
        height: 385px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg {
        height: 385px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg-img {
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
    }
}

@media (min-width: 1025px) and (max-width: 1365.98px) {
    .xy-shortcode-certs.certs-section {
        height: 180px;
    }

    .xy-shortcode-certs .certs-logo {
        position: static;
    }

    .xy-shortcode-certs .certs-logo--iso9001 {
        width: 107px;
        height: 107px;
    }

    .xy-shortcode-certs .certs-logo--iatf16949 {
        width: 108px;
        height: 108px;
    }

    .xy-shortcode-certs .certs-logo--iso14001 {
        width: 140px;
        height: 140px;
    }

    .xy-shortcode-certs .certs-logo--cwb {
        width: 356px;
        height: 95px;
    }

    .xy-shortcode-product-contact.product-series-contact {
        height: 440px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg {
        height: 440px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg-img {
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
    }
}

@media (min-width: 1366px) and (max-width: 1512px) {
    .xy-shortcode-certs.certs-section {
        height: 260px;
    }

    .xy-shortcode-certs .certs-logo--iso9001 {
        width: 130px;
        height: 130px;
    }

    .xy-shortcode-certs .certs-logo--iatf16949 {
        width: 131px;
        height: 131px;
    }

    .xy-shortcode-certs .certs-logo--iso14001 {
        width: 170px;
        height: 170px;
    }

    .xy-shortcode-certs .certs-logo--cwb {
        width: 433px;
        height: 116px;
    }

    .xy-shortcode-product-contact.product-series-contact {
        height: 476px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg {
        height: 476px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg-img {
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
    }
}

@media (min-width: 1513px) and (max-width: 1599.98px) {
    .xy-shortcode-certs.certs-section {
        height: 280px;
    }

    .xy-shortcode-certs .certs-logo--iso9001 {
        width: 136px;
        height: 136px;
    }

    .xy-shortcode-certs .certs-logo--iatf16949 {
        width: 137px;
        height: 137px;
    }

    .xy-shortcode-certs .certs-logo--iso14001 {
        width: 182px;
        height: 182px;
    }

    .xy-shortcode-certs .certs-logo--cwb {
        width: 467px;
        height: 124px;
    }

    .xy-shortcode-product-contact.product-series-contact {
        height: 488px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg {
        height: 488px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg-img {
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
    }
}

@media (min-width: 1600px) {
    .xy-shortcode-certs.certs-section {
        height: 300px;
    }

    .xy-shortcode-certs .certs-logo--iso9001 {
        width: 143px;
        height: 143px;
    }

    .xy-shortcode-certs .certs-logo--iatf16949 {
        width: 144px;
        height: 144px;
    }

    .xy-shortcode-certs .certs-logo--iso14001 {
        width: 194px;
        height: 194px;
    }

    .xy-shortcode-certs .certs-logo--cwb {
        width: 500px;
        height: 133px;
    }

    .xy-shortcode-product-contact.product-series-contact {
        height: 500px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg {
        height: 500px;
    }

    .xy-shortcode-product-contact .product-series-contact__bg-img {
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
    }
}

@media (max-width: 389.98px) {
    .xy-shortcode-floating-actions {
        --xy-floating-action-size: 28px;
    }
}

@media (min-width: 390px) and (max-width: 429.98px) {
    .xy-shortcode-floating-actions {
        --xy-floating-action-size: 30px;
    }
}

@media (min-width: 430px) and (max-width: 479.98px) {
    .xy-shortcode-floating-actions {
        --xy-floating-action-size: 32px;
    }
}

@media (min-width: 480px) and (max-width: 639.98px) {
    .xy-shortcode-floating-actions {
        --xy-floating-action-size: 34px;
    }
}

@media (min-width: 640px) and (max-width: 767.98px) {
    .xy-shortcode-floating-actions {
        --xy-floating-action-size: 36px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .xy-shortcode-floating-actions {
        --xy-floating-action-size: 38px;
    }
}

@media (min-width: 1025px) and (max-width: 1365.98px) {
    .xy-shortcode-floating-actions {
        --xy-floating-action-size: 40px;
    }
}

@media (min-width: 1366px) and (max-width: 1512px) {
    .xy-shortcode-floating-actions {
        --xy-floating-action-size: 40px;
    }
}

@media (min-width: 1513px) and (max-width: 1599.98px) {
    .xy-shortcode-floating-actions {
        --xy-floating-action-size: 40px;
    }
}

@media (min-width: 1600px) {
    .xy-shortcode-floating-actions {
        --xy-floating-action-size: 40px;
    }
}
