/* =================================
   BASE RESET ONLY
   ❗ 不允许包含布局系统
================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #222;
    background: #f5f7fa;
    line-height: 1.6;
}


/* =================================
   ELEMENT DEFAULTS
================================= */

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}


/* =================================
   FORM RESET
================================= */

input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}


/* =================================
   HEADER LAYER FIX
   防止产品图片 / 页面内容压住搜索栏
================================= */

.site-header {
    position: relative;
    z-index: 5000;
}

.top-line {
    position: relative;
    z-index: 5001;
}

.main-header {
    position: relative;
    z-index: 5002;
    background: #fff;
}

.header-inner {
    position: relative;
    z-index: 5003;
}

.header-actions {
    position: relative;
    z-index: 5004;
}

.header-search {
    position: relative;
    z-index: 5005;
}


/* =================================
   MOBILE MENU BUTTON
   右上角菜单按钮固定显示
================================= */

.mobile-menu-btn {
    display: none;
}

.mobile-overlay {
    display: none;
}


/* =========================
   Floating Contact
========================= */

.float-contact {
    position: fixed;
    right: 24px;
    bottom: 120px;
    z-index: 999;
}

.float-contact-btn {
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #1677ff, #00a6ff);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(22, 119, 255, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.float-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(22, 119, 255, 0.42);
}

.float-contact-panel {
    position: absolute;
    right: 68px;
    bottom: 0;
    width: 248px;
    padding: 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    border: 1px solid #eef1f5;
    opacity: 0;
    visibility: hidden;
    transform: translateX(12px);
    transition: all 0.22s ease;
}

.float-contact:hover .float-contact-panel,
.float-contact.active .float-contact-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.float-contact-title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2d3d;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf0f5;
}

.float-contact-item {
    margin-bottom: 14px;
}

.float-contact-item:last-child {
    margin-bottom: 0;
}

.float-contact-label {
    font-size: 13px;
    color: #7a8798;
    margin-bottom: 6px;
}

.float-contact-phone {
    display: inline-flex;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: #1677ff;
    text-decoration: none;
}

.float-contact-phone:hover {
    text-decoration: underline;
}

.float-contact-qrcode {
    width: 132px;
    height: 132px;
    padding: 6px;
    border-radius: 10px;
    background: #f6f8fb;
    border: 1px solid #e8edf3;
}

.float-contact-qrcode img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 6px;
}

.float-contact-tip {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #7a8798;
}

.float-wechat-mobile {
    display: none;
}

.float-wechat-copy {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.float-wechat-copy span {
    flex: 1;
    padding: 7px 8px;
    border-radius: 6px;
    background: #f6f8fb;
    border: 1px solid #e8edf3;
    font-size: 13px;
    color: #334155;
    word-break: break-all;
}

.float-wechat-copy button {
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    background: #07c160;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.float-wechat-copy button:hover {
    background: #06ad56;
}


/* =========================
   Mobile
========================= */

@media (max-width: 768px) {

    /* =========================
       Header layer
    ========================= */

    .site-header {
        position: relative;
        z-index: 5000;
    }

    .top-line {
        position: relative;
        z-index: 5001;
    }

    .main-header {
        position: relative;
        z-index: 5002;
        background: #fff;
    }

    .header-inner {
        position: relative;
        z-index: 5003;
        flex-wrap: wrap;
    }


    /* =========================
       Mobile Menu Button
       固定右上角，不随页面内容层级变化
    ========================= */

    .mobile-menu-btn {
        display: flex !important;
        position: fixed;

        top: 22px;
        right: 14px;

        width: 40px;
        height: 40px;

        align-items: center;
        justify-content: center;

        z-index: 99999;

        border: 1px solid #dcdfe6;
        border-radius: 8px;
        background: #fff;

        color: #111;
        font-size: 22px;
        line-height: 1;

        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        cursor: pointer;
    }


    /* =========================
       Mobile Header Search
       手机端搜索栏显示
    ========================= */

    .header-actions {
        display: block !important;
        position: relative;
        z-index: 5004;
        width: 100%;
        margin-top: 12px;
    }

    .header-search {
        display: flex !important;
        position: relative;
        z-index: 5005;
        width: 100%;
        gap: 8px;
    }

    .header-search input {
        flex: 1;
        min-width: 0;
        height: 38px;
        padding: 0 12px;
        border: 1px solid #dcdfe6;
        border-radius: 8px;
        background: #fff;
        font-size: 14px;
    }

    .header-search button {
        width: 68px;
        height: 38px;
        border: none;
        border-radius: 8px;
        background: #0b5ed7;
        color: #fff;
        font-size: 14px;
        cursor: pointer;
    }


    /* =========================
       Mobile Floating Contact
    ========================= */

    .float-contact {
        right: 16px;
        bottom: 82px;
        z-index: 900;
    }

    .float-contact-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .float-contact-panel {
        right: 0;
        bottom: 62px;
        width: 230px;
    }

    .float-qrcode-pc {
        display: none;
    }

    .float-wechat-mobile {
        display: block;
    }


    /* =========================
       Mobile Product Grid
       产品列表页手机端两列
    ========================= */

    #productGrid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    #productGrid .product-card {
        width: 100%;
        min-width: 0;
    }

    #productGrid .product-img {
        aspect-ratio: 1 / 0.78;
        overflow: hidden;
        border-radius: 10px;
        background: #f5f7fa;
    }

    #productGrid .product-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    #productGrid .product-info h4 {
        margin: 0;
        font-size: 14px;
        line-height: 1.4;
        font-weight: 600;

        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }


    /* =========================
       Mobile Case Text
       最新案例文字收缩
    ========================= */

    .case-card .case-summary,
    .case-card .case-desc,
    .latest-case-card .case-summary,
    .latest-case-card .case-desc {
        font-size: 13px;
        line-height: 1.5;
        color: #666;

        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

}

@media (max-width: 768px) {
    body > .mobile-menu-btn {
        display: flex !important;
        position: fixed !important;
        top: 22px !important;
        right: 14px !important;
        z-index: 99999 !important;
    }
}

/* =========================
   Mobile Header Slogan Compact
========================= */

.mobile-header-slogan {
    display: none;
}

@media (max-width: 768px) {

    .site-logo {
        flex: 0 0 auto;
        max-width: 135px;
    }

    .mobile-header-slogan {
        display: block;

        flex: 1;
        min-width: 0;

        margin-left: 8px;
        margin-right: 48px;
        padding: 6px 9px;

        border-radius: 9px;

        background:
            linear-gradient(
                135deg,
                rgba(22, 119, 255, 0.14),
                rgba(0, 166, 255, 0.06)
            );

        border: 1px solid rgba(22, 119, 255, 0.14);

        overflow: hidden;
        position: relative;
    }

    .mobile-slogan-main {
        position: relative;
        z-index: 1;

        font-size: 11px;
        line-height: 1.2;
        font-weight: 700;

        color: #1f2d3d;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-slogan-sub {
        position: relative;
        z-index: 1;

        margin-top: 2px;

        font-size: 9px;
        line-height: 1.15;

        color: #6b7280;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

}