* { box-sizing: border-box; }
/* 页内锚点直接使用浏览器平滑滚动，避免额外维护点击事件。 */
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
}
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--site-primary, #0054a6); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

/* 尊重系统的减少动态效果设置。 */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.page-content { flex: 1; }

/* ====== Header / Navigation ====== */
.site-header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    z-index: 100;
}
.site-header.is-fixed { position: sticky; top: 0; }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo { display: flex; align-items: center; }
.logo img { height: 40px; max-width: 200px; object-fit: contain; }
.logo-text { font-size: 20px; font-weight: 600; }

.main-nav ul { display: flex; align-items: center; gap: 8px; }
.nav-item { position: relative; }
.nav-item > a {
    display: block;
    padding: 8px 16px;
    font-size: 15px;
    border-radius: 4px;
}
.nav-item.active > a { font-weight: 600; }
.nav-item.has-children > a::after { content: ' ▾'; font-size: 10px; opacity: 0.6; }

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-radius: 4px;
    padding: 6px 0;
    display: none;
    z-index: 10;
}
.nav-item.has-children:hover .sub-menu { display: block; }
.sub-menu li a { display: block; padding: 8px 16px; font-size: 14px; }
.sub-menu li a:hover { background: #f5f5f5; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: 0;
    padding: 8px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: 0.2s;
}

/* ====== Banner ====== */
.banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #2c3e50;
}
.banner-slides { width: 100%; height: 100%; }
.banner-slide {
    position: relative;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.banner-overlay { position: absolute; inset: 0; }
.banner-content {
    position: relative;
    text-align: center;
    z-index: 2;
    width: 100%;
}
.banner-title {
    font-size: 36px;
    margin: 0 0 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    line-height: 1.3;
}
.banner-subtitle {
    font-size: 18px;
    margin: 0 0 24px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.banner-btn {
    display: inline-block;
    padding: 10px 28px;
    border: 2px solid currentColor;
    border-radius: 4px;
    transition: 0.2s;
}
.banner-btn:hover { background: rgba(255,255,255,0.1); }
.banner-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #999;
}
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: 0;
    width: 44px;
    height: 44px;
    font-size: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 3;
    margin-top: 0;
}
.banner-arrow::after { font-size: 24px; font-weight: 700; }
.banner-arrow:hover { background: rgba(0,0,0,0.6); }
.banner-arrow.prev { left: 20px; }
.banner-arrow.next { right: 20px; }
.banner-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
    width: auto;
    top: auto;
}
.banner-dots .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
    opacity: 1;
    margin: 0 !important;
}
.banner-dots .swiper-pagination-bullet-active { background: #fff; }

/* ====== Section common ====== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}
.section-title {
    font-size: 24px;
    margin: 0;
    color: #333;
}
.more-link { color: var(--site-primary, #0054a6); font-size: 14px; }
.empty-tip { color: #999; padding: 40px 0; text-align: center; }

/* ====== News ====== */
.news-section { padding: 48px 0; background: #fff; }
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.news-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.news-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.news-cover img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.news-body { padding: 16px; }
.news-title {
    font-size: 16px;
    margin: 0 0 8px;
    line-height: 1.4;
}
.news-title a { color: #333; }
.news-title a:hover { color: var(--site-primary, #0054a6); }
.news-summary {
    color: #666;
    font-size: 13px;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-date { color: #999; font-size: 12px; }

/* ====== Product ====== */
.product-section { padding: 48px 0; background: #fafafa; }
.product-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 24px;
}
.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.product-cover img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.product-body { padding: 12px; }
.product-name {
    font-size: 15px;
    margin: 0;
    color: #333;
    line-height: 1.4;
}
.product-name:hover { color: var(--site-primary, #0054a6); }
.product-summary {
    color: #666;
    font-size: 13px;
    margin: 6px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ====== Job ====== */
.job-section { padding: 48px 0; background: #fff; }
.job-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.job-table th, .job-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.job-table th {
    background: #fafafa;
    font-weight: 600;
    color: #333;
}
.job-table tr:hover td { background: #fafafa; }
.job-table .job-title { color: var(--site-primary, #0054a6); font-weight: 500; }

/* ====== Footer ====== */
.site-footer {
    padding: 40px 0 20px;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}
.footer-col h4 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a:hover { opacity: 0.8; }
.footer-logo {
    height: 40px;
    margin-bottom: 12px;
}
.footer-company { font-size: 18px; margin: 0 0 8px; }
.footer-intro {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.6;
}
.footer-qrcode-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}
.footer-links {
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
}
.footer-links a:hover { opacity: 0.8; }
.footer-copyright {
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ====== Rich text / image / title ====== */
.rich-text-section { background: #fff; }
.rich-text-content { line-height: 1.8; }
.rich-text-content p { margin: 0 0 16px; }
.rich-text-content img { height: auto; border-radius: 4px; margin: 12px 0; }

.image-section { padding: 24px 0; }
.image-placeholder {
    padding: 60px 20px;
    background: #f5f5f5;
    color: #999;
    text-align: center;
    border-radius: 4px;
}

.title-section { background: #fff; }
.title-component { margin: 0; }

/* ====== Empty / 404 ====== */
.empty-page, .not-found-page {
    padding: 120px 0;
    text-align: center;
    color: #999;
}
.empty-page h2, .not-found-page h1 { color: #333; margin-bottom: 12px; }
.not-found-page h1 { font-size: 72px; margin-bottom: 0; }

/* ====== Article detail ====== */
.article-detail { padding: 32px 0 48px; }
.article-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.article-title { font-size: 28px; margin: 0 0 12px; line-height: 1.4; }
.article-meta { color: #999; font-size: 13px; }
.article-meta .meta-item { margin-right: 16px; }
.article-body { line-height: 1.8; font-size: 16px; }
.article-body p { margin: 0 0 16px; }
.article-body img { height: auto; border-radius: 4px; margin: 12px 0; }
.article-footer-nav { margin-top: 32px; }
.back-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    transition: 0.2s;
}
.back-btn:hover { border-color: var(--site-primary, #0054a6); color: var(--site-primary, #0054a6); }

/* ====== Product detail ====== */
.product-detail { padding: 24px 0 48px; }
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.product-main-image {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
}
.product-main-image img { width: 100%; height: 400px; object-fit: contain; }
.product-thumb-list {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.product-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.product-thumb:hover { border-color: var(--site-primary, #0054a6); }
.product-breadcrumb {
    color: #999;
    font-size: 13px;
    margin-bottom: 12px;
}
.product-title { font-size: 24px; margin: 0 0 16px; }
.product-summary {
    color: #666;
    line-height: 1.8;
    padding: 16px;
    background: #fafafa;
    border-radius: 4px;
    margin-bottom: 16px;
}
.product-feature h3 { font-size: 16px; margin: 0 0 8px; }
.product-section { margin-bottom: 32px; }
.product-section .section-title { font-size: 20px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.product-description, .product-specification { line-height: 1.8; }
.product-description { overflow-x: auto; }
.product-description p,
.product-description h1,
.product-description h2,
.product-description h3,
.product-description h4,
.product-description h5,
.product-description table,
.product-description pre { margin: 10px 0; line-height: 1.5; }
.product-description ul,
.product-description ol { margin: 10px 0 10px 20px; padding: 0; }
.product-description ul { list-style: disc; }
.product-description ol { list-style: decimal; }
.product-description table {
    border-collapse: collapse;
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
}
.product-description table th,
.product-description table td {
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 3px 5px;
    height: 30px;
}
.product-description table th {
    border-bottom-width: 2px;
    background: #f1f1f1;
    text-align: center;
}
.product-description blockquote {
    border-left: 8px solid #d0e5f2;
    padding: 5px 10px;
    margin: 10px 0;
    line-height: 1.4;
    background: #f1f1f1;
}
.product-footer-nav { text-align: center; }

/* ====== Component error ====== */
.component-error {
    background: #fff3f3;
    border: 1px solid #ffccc7;
    color: #cf1322;
    padding: 16px;
    margin: 16px 0;
    border-radius: 4px;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }

    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
        border-bottom: 1px solid #eee;
    }
    .main-nav.open { max-height: 80vh; overflow-y: auto; }
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        padding: 8px 16px;
        gap: 0;
    }
    .nav-item > a { padding: 12px 0; border-bottom: 1px solid #f5f5f5; }
    .sub-menu { position: static; box-shadow: none; padding: 0 0 0 16px; }
    .nav-item.has-children:hover .sub-menu { display: none; }

    .banner-title { font-size: 22px; }
    .banner-subtitle { font-size: 14px; }

    .news-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-cover img { height: 140px; }

    .job-table { font-size: 12px; }
    .job-table th, .job-table td { padding: 8px 6px; }

    .footer-grid { grid-template-columns: 1fr; gap: 16px; }

    .product-detail-grid { grid-template-columns: 1fr; }
    .product-main-image img { height: 280px; }

    .article-title { font-size: 22px; }
}
