:root {
    --c-primary: #0b57d0;
    --c-primary-dark: #083e94;
    --c-text: #1a1c1e;
    --c-muted: #5f6368;
    --c-border: #e3e5e8;
    --c-bg: #ffffff;
    --c-soft: #f6f8fa;
    --radius: 12px;
    --maxw: 1200px;
    --gap: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gap); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--c-border);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo img { max-height: 36px; }
.logo span { font-weight: 700; font-size: 18px; }

.nav-toggle {
    width: 40px; height: 40px;
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    background: none; border: 0; cursor: pointer; padding: 0 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--c-text); border-radius: 2px; }

.site-nav {
    position: fixed;
    inset: 60px 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    display: none;
    flex-direction: column;
    padding: 8px 16px 16px;
}
.site-nav.open { display: flex; }
.site-nav > a { padding: 12px 0; border-bottom: 1px solid var(--c-border); }

.lang-switch { display: flex; gap: 8px; padding-top: 12px; }
.lang-switch a { padding: 4px 12px; border: 1px solid var(--c-border); border-radius: 999px; font-size: 13px; }
.lang-switch a.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

.banner { background: var(--c-soft); }
.banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.banner-track::-webkit-scrollbar { display: none; }
.banner-item { flex: 0 0 100%; scroll-snap-align: start; }
.banner-item img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); padding-top: 28px; padding-bottom: 28px; }
.stat { text-align: center; padding: 16px 8px; background: var(--c-soft); border-radius: var(--radius); }
.stat strong { display: block; font-size: 20px; color: var(--c-primary); }
.stat span { font-size: 12px; color: var(--c-muted); }

.section-title { font-size: 20px; margin: 32px 0 16px; }

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.cat-card { background: var(--c-soft); border-radius: var(--radius); padding: 20px 12px; text-align: center; font-weight: 600; }
.cat-card img { height: 48px; width: auto; margin: 0 auto 10px; }

.prod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.prod-card { border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s; }
.prod-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.prod-card img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; background: var(--c-soft); }
.prod-card h3 { font-size: 14px; margin: 10px 12px 4px; line-height: 1.4; }
.prod-card .model { font-size: 12px; color: var(--c-muted); margin: 0 12px 12px; }

.about-teaser { padding: 8px 16px 24px; }
.btn-link { display: inline-block; margin-top: 8px; color: var(--c-primary); font-weight: 600; }

.inquiry-section { padding-bottom: 40px; }
.inquiry-form { background: var(--c-soft); border-radius: var(--radius); padding: 20px; }
.inquiry-form h2 { font-size: 18px; margin: 0 0 16px; }
.inquiry-form label { display: block; margin-bottom: 12px; }
.inquiry-form label > span { display: block; font-size: 13px; color: var(--c-muted); margin-bottom: 4px; }
.inquiry-form input, .inquiry-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
}
.inquiry-form button {
    width: 100%;
    padding: 13px;
    background: var(--c-primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.inquiry-form button:hover { background: var(--c-primary-dark); }
.inquiry-form button:disabled { opacity: .6; cursor: default; }
.field-row { display: flex; gap: 12px; }
.field-row > label { flex: 1; }

/* 蜜罐: 绝不能用 display:none, 部分爬虫会跳过隐藏字段 */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-msg { margin: 12px 0 0; font-size: 14px; min-height: 20px; }
.form-msg.ok { color: #137333; }
.form-msg.err { color: #c5221f; }

.site-footer { background: #1a1c1e; color: #cdd0d4; margin-top: 40px; padding: 32px 0 16px; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 24px; }
.site-footer h3 { font-size: 16px; margin: 0 0 8px; color: #fff; }
.site-footer h4 { font-size: 14px; margin: 0 0 8px; color: #fff; }
.site-footer p { margin: 4px 0; font-size: 14px; }
.copyright { border-top: 1px solid #333; margin-top: 24px; padding-top: 16px; font-size: 13px; }

.float-contact { position: fixed; right: 14px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.fc-btn {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.fc-wa { background: #25d366; }
.fc-mail { background: var(--c-primary); font-size: 20px; }

.cat-filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; }
.cat-filter a {
    flex: 0 0 auto;
    padding: 6px 14px;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-size: 14px;
    white-space: nowrap;
}
.cat-filter a.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 32px 0; }
.pager a { color: var(--c-primary); font-weight: 600; }
.pager span { color: var(--c-muted); font-size: 14px; }

.gallery { background: var(--c-soft); }
.gallery-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* 防止横向滚动容器吞掉页面的垂直滚轮 -- 外贸站 1.1.0 */
    overscroll-behavior-x: contain;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item { flex: 0 0 100%; scroll-snap-align: start; }
.gallery-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }

.detail-title { font-size: 22px; margin: 20px 0 8px; }
.detail-model { color: var(--c-muted); margin: 0 0 8px; font-size: 14px; }
.detail-summary { color: var(--c-muted); margin: 0 0 16px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td { padding: 10px 12px; border: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.spec-table th { background: var(--c-soft); width: 38%; font-weight: 600; }

.rich-text { font-size: 15px; }
.rich-text img { margin: 12px auto; border-radius: 8px; }
.rich-text table { width: 100%; border-collapse: collapse; }
.rich-text td, .rich-text th { border: 1px solid var(--c-border); padding: 8px; }

.table-wrap { overflow-x: auto; }

.error-page { text-align: center; padding: 60px 16px 80px; }
.error-page h1 { font-size: 24px; margin: 0 0 12px; }
.error-page p { color: var(--c-muted); margin: 0 0 24px; }

.contact-info { margin-bottom: 8px; }
.contact-info p { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-border); margin: 0; }
.contact-info strong { min-width: 110px; color: var(--c-muted); font-weight: 600; }
.contact-info a { color: var(--c-primary); }

@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .site-nav {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 24px;
        border: 0;
        padding: 0;
    }
    .site-nav > a { border: 0; padding: 0; }
    .lang-switch { padding-top: 0; }
    .stats { grid-template-columns: repeat(4, 1fr); }
    .cat-grid { grid-template-columns: repeat(4, 1fr); }
    .prod-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .inquiry-form { padding: 28px 32px; }
    .section-title { font-size: 24px; }
    /* 限高，否则 16:9 图册在宽屏下占满首屏，产品信息被挤到折叠线以下 -- 外贸站 1.1.0 */
    .gallery-item img { aspect-ratio: 16 / 9; max-height: 440px; }
    .gallery-track { max-height: 440px; }
    .detail-title { font-size: 28px; }
}

/* ===== 外贸站 1.1.0 新增 ===== */

/* 顶栏：图标 + 店名 + slogan 并排 */
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo img { max-height: 38px; width: auto; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.logo-text strong { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.logo-text em {
    font-style: normal;
    font-size: 10.5px;
    color: var(--c-muted);
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 产品下拉子类 */
.nav-group { position: relative; }
.nav-group > a { display: inline-block; }
.sub-toggle {
    background: none;
    border: 0;
    color: var(--c-muted);
    font-size: 18px;
    line-height: 1;
    padding: 0 8px;
    cursor: pointer;
}
.nav-sub { display: none; flex-direction: column; }
.nav-group.open .nav-sub { display: flex; }
.nav-sub a {
    padding: 8px 0 8px 14px;
    font-size: 14px;
    color: var(--c-muted);
    border-bottom: 1px solid var(--c-border);
}
.nav-sub a:hover { color: var(--c-primary); }

/* 产品卡片特性要点 */
.prod-card-inner { display: flex; flex-direction: column; height: 100%; }
.prod-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.prod-body h3 { font-size: 14px; margin: 0; line-height: 1.4; }
.prod-body .model { font-size: 12px; color: var(--c-muted); margin: 0; }
.prod-features { list-style: none; padding: 0; margin: 4px 0 0; }
.prod-features li {
    font-size: 12px;
    color: var(--c-muted);
    padding-left: 12px;
    position: relative;
    margin-bottom: 2px;
    line-height: 1.5;
}
.prod-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--c-primary);
}
.prod-card h3 { margin: 0; }

/* 区块副标题 */
.section-sub { color: var(--c-muted); margin: -8px 0 20px; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-bg);
    overflow: hidden;
}
.faq-item summary {
    padding: 14px 44px 14px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    list-style: none;
    position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-primary);
    font-size: 20px;
    font-weight: 400;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { background: var(--c-soft); }
.faq-item p { margin: 0; padding: 12px 16px 16px; color: var(--c-muted); white-space: pre-wrap; }

/* 资讯卡片 */
.news-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
.news-card {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}
.news-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.news-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--c-soft); }
.news-body { padding: 14px 16px 16px; }
.news-body time { font-size: 12px; color: var(--c-muted); letter-spacing: .02em; }
.news-body h3 { font-size: 15px; margin: 6px 0 6px; line-height: 1.45; }
.news-body p {
    font-size: 13.5px;
    color: var(--c-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 资讯正文 */
.article { padding-bottom: 24px; }
.article h1 { font-size: 24px; line-height: 1.35; margin: 24px 0 8px; }
.article-date { display: block; color: var(--c-muted); font-size: 13px; margin-bottom: 16px; }
.article-cover { width: 100%; border-radius: var(--radius); margin-bottom: 20px; }
.article-lead { font-size: 16px; color: var(--c-muted); margin-bottom: 20px; }

/* 悬浮按钮扩展 */
.fc-btn { position: relative; cursor: pointer; font-size: 13px; }
.fc-tel { background: #f4a62a; }
.fc-wechat { background: #07c160; }
.fc-qr {
    display: none;
    position: absolute;
    right: 58px;
    bottom: 0;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .16);
    width: 148px;
    text-align: center;
}
.fc-wechat:hover .fc-qr, .fc-wechat:focus .fc-qr, .fc-wechat.open .fc-qr { display: block; }
.fc-qr img { width: 130px; height: 130px; object-fit: contain; }
.fc-qr em {
    display: block;
    font-style: normal;
    font-size: 11px;
    color: var(--c-muted);
    margin-top: 4px;
    word-break: break-all;
}

@media (min-width: 768px) {
    .logo img { max-height: 44px; }
    .logo-text strong { font-size: 18px; }
    .logo-text em { font-size: 11.5px; }

    .nav-group.has-sub .nav-sub {
        position: absolute;
        top: 100%;
        left: -14px;
        min-width: 210px;
        background: #fff;
        border: 1px solid var(--c-border);
        border-radius: var(--radius);
        box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
        padding: 6px 0;
        margin-top: 10px;
    }
    .nav-group.has-sub:hover .nav-sub { display: flex; }
    .nav-sub a { padding: 8px 16px; border: 0; white-space: nowrap; }
    .nav-sub a:hover { background: var(--c-soft); }
    .sub-toggle { display: none; }

    .news-grid { grid-template-columns: repeat(3, 1fr); }
    .article h1 { font-size: 30px; }
    .article { max-width: 820px; }
}
