/* ===================================================
   SR STAR 北京威涵科技有限公司 — 主样式表
   =================================================== */

/* ---- CSS 变量 ---- */
:root {
    --color-primary:   #003f7a;
    --color-accent:    #0072bc;
    --color-accent2:   #e8492a;
    --color-bg:        #f5f7fa;
    --color-white:     #ffffff;
    --color-text:      #333333;
    --color-muted:     #666666;
    --color-border:    #dde2e9;
    --color-footer-bg: #1a2a3e;
    --color-footer-text: #c8d4e0;

    --font-heading: 'Noto Serif SC', 'STSong', Georgia, serif;
    --font-body:    'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

    --nav-height: 70px;
    --max-width:  1200px;
    --radius:     4px;
    --shadow:     0 2px 12px rgba(0,0,0,0.10);
    --shadow-lg:  0 6px 24px rgba(0,0,0,0.14);
    --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); line-height: 1.7; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent2); }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

.site-header { position: sticky; top: 0; z-index: 1000; }

.category-banner { background: var(--color-white); border-bottom: 2px solid var(--color-border); overflow: hidden; }
.category-tabs { display: flex; border-bottom: 1px solid var(--color-border); }
.category-tab {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 18px 12px; font-size: 13px; font-weight: 600; color: var(--color-muted);
    border-right: 1px solid var(--color-border); text-decoration: none;
    transition: background var(--transition), color var(--transition); letter-spacing: 0.5px;
}
.category-tab:last-child { border-right: none; }
.category-tab:hover { background: #eef4fb; color: var(--color-accent); }
.category-tab .tab-num {
    background: var(--color-accent); color: white; width: 22px; height: 22px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.category-tab:hover .tab-num { background: var(--color-accent2); }

/* ---- 主内容区 ---- */
.main-content { padding: 40px 0; }

/* 内容网格：限制总宽度与标题栏一致，左右内容两列 */
.content-grid {
    display: flex;
    justify-content: space-between;
    max-width: 1140px;
    margin: 0 auto;
    gap: 20px;
    padding: 0 20px;
    box-sizing: border-box;
    align-items: flex-start;
}

.homepage-carousel-column {
    flex: 0 0 65%;
    min-width: 0;
}

/* 右侧侧边栏：页面滚动时粘附，始终保持可见 calc(35% - 20px) */
.about-company-column {
    flex: 0 0 calc(25%);
    min-width: 0;
    position: sticky;
    top: calc(var(--nav-height) + 10px);
    max-height: calc(100vh - var(--nav-height) - 30px);
    overflow-y: auto;
}

/* ---- section 标题 ---- */
.section-title {
    font-family: var(--font-heading); font-size: 15px; font-weight: 700;
    color: var(--color-white); background: var(--color-primary);
    padding: 10px 18px; margin-bottom: 20px; letter-spacing: 2px; position: relative;
}
.section-title::after {
    content: ''; position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
    border: 10px solid transparent; border-left-color: var(--color-primary);
}

/* ---- 产品列表（产品页） ---- */
.product-list { display: flex; flex-direction: column; gap: 24px; }

.product-card {
    display: grid; grid-template-columns: 220px 1fr;
    background: var(--color-white); border: 1px solid var(--color-border);
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    transition: box-shadow var(--transition), transform var(--transition);
    text-decoration: none; color: inherit;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.product-card-img {
    background: linear-gradient(135deg, #e8f0f8 0%, #d0e3f4 100%);
    display: flex; align-items: center; justify-content: center;
    min-height: 160px; position: relative; overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }

.product-img-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; color: var(--color-accent); padding: 20px; text-align: center;
}
.product-img-placeholder .icon { font-size: 48px; opacity: 0.6; }
.product-img-placeholder span { font-size: 12px; color: var(--color-muted); line-height: 1.4; }

.product-card-body { padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; }
.product-card-title { font-family: var(--font-heading); font-size: 17px; font-weight: 700; color: var(--color-primary); margin-bottom: 10px; line-height: 1.4; }
.product-card-desc { font-size: 13px; color: var(--color-muted); line-height: 1.75; white-space: pre-line; }
.product-card-more { margin-top: 14px; font-size: 12px; color: var(--color-accent); font-weight: 600; letter-spacing: 0.5px; }

/* ---- 侧边栏内部布局 ---- */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.company-intro-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.company-intro-card p { font-size: 13px; color: var(--color-muted); line-height: 1.85; }

.news-side-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.news-item-side { display: block; padding: 14px 18px; border-bottom: 1px solid var(--color-border); text-decoration: none; transition: background var(--transition); }
.news-item-side:last-child { border-bottom: none; }
.news-item-side:hover { background: #f0f6ff; }
.news-item-date { font-size: 11px; color: var(--color-accent2); font-weight: 600; margin-bottom: 4px; letter-spacing: 0.5px; }
.news-item-title { font-size: 13px; font-weight: 600; color: var(--color-text); line-height: 1.5; }

/* ---- 新闻列表页 ---- */
.news-main-list { display: flex; flex-direction: column; gap: 0; }
.news-main-item { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--color-border); text-decoration: none; color: inherit; transition: background var(--transition); }
.news-main-item:hover .news-main-title { color: var(--color-accent); }
.news-date-block { flex-shrink: 0; text-align: center; background: var(--color-primary); color: white; border-radius: var(--radius); padding: 10px 14px; width: 72px; height: fit-content; }
.news-date-year { font-size: 11px; opacity: 0.7; }
.news-date-day  { font-size: 22px; font-weight: 700; line-height: 1; }
.news-main-title { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--color-primary); margin-bottom: 8px; transition: color var(--transition); line-height: 1.4; }
.news-main-summary { font-size: 13px; color: var(--color-muted); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- 页脚 ---- */
.site-footer { background: var(--color-footer-bg); color: var(--color-footer-text); margin-top: 60px; }
.footer-top { padding: 48px 0 32px; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .brand-name { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: white; margin-bottom: 8px; }
.footer-brand .brand-en { font-size: 12px; color: rgba(255,255,255,0.5); letter-spacing: 1px; margin-bottom: 16px; }
.footer-brand .brand-info { font-size: 12px; line-height: 2; color: var(--color-footer-text); }
.footer-col h4 { font-size: 13px; font-weight: 700; color: white; letter-spacing: 1px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.15); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 12px; color: var(--color-footer-text); transition: color var(--transition); display: flex; align-items: center; gap: 6px; }
.footer-col ul li a::before { content: '›'; color: var(--color-accent); font-size: 16px; line-height: 1; }
.footer-col ul li a:hover { color: white; }
.footer-bottom { padding: 16px 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: rgba(255,255,255,0.4); letter-spacing: 1px; }

/* ---- 页面 hero 头 ---- */
.page-hero { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%); color: white; padding: 48px 0; text-align: center; margin-bottom: 40px; }
.page-hero h1 { font-family: var(--font-heading); font-size: 28px; font-weight: 700; letter-spacing: 3px; margin-bottom: 8px; }
.page-hero .breadcrumb { font-size: 13px; color: rgba(255,255,255,0.7); }
.page-hero .breadcrumb a { color: rgba(255,255,255,0.7); }
.page-hero .breadcrumb a:hover { color: white; }

/* ---- 联系页 ---- */
.contact-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.contact-card h2 { font-family: var(--font-heading); font-size: 20px; color: var(--color-primary); margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--color-border); }
.contact-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; font-size: 14px; }
.contact-row .label { font-weight: 700; color: var(--color-primary); min-width: 60px; flex-shrink: 0; }
.contact-row .value { color: var(--color-text); }
.contact-form { margin-top: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 14px; font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); transition: border-color var(--transition), box-shadow var(--transition); outline: none; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(0,114,188,0.12); }
.form-group textarea { min-height: 120px; resize: vertical; }
.btn-submit { background: var(--color-accent); color: white; border: none; padding: 12px 32px; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; transition: background var(--transition), transform var(--transition); letter-spacing: 1px; }
.btn-submit:hover { background: var(--color-primary); transform: translateY(-1px); }

/* ---- 公司简介页 ---- */
.about-content { background: white; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.about-content h2 { font-family: var(--font-heading); font-size: 22px; color: var(--color-primary); margin-bottom: 20px; }
.about-content p { font-size: 14px; color: var(--color-muted); line-height: 1.9; margin-bottom: 16px; }
.about-highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.highlight-item { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; text-align: center; }
.highlight-item .h-icon { font-size: 36px; margin-bottom: 10px; }
.highlight-item h4 { font-size: 14px; font-weight: 700; color: var(--color-primary); margin-bottom: 6px; }
.highlight-item p { font-size: 12px; color: var(--color-muted); margin: 0; }

/* ---- 产品详情页 ---- */
.product-detail-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.product-detail-header { background: linear-gradient(135deg, #e8f0f8 0%, #d0e3f4 100%); padding: 40px; display: flex; align-items: center; justify-content: center; min-height: 200px; }
.product-detail-body { padding: 32px; }
.product-detail-body h2 { font-family: var(--font-heading); font-size: 22px; color: var(--color-primary); margin-bottom: 16px; }
.product-detail-body .desc { font-size: 14px; color: var(--color-muted); line-height: 1.9; white-space: pre-line; }

.product-features { font-family: "Segoe UI", Arial, sans-serif; color: #1c1c1c; margin: 30px 0; }
.feature-section { margin-bottom: 30px; }
.feature-section h2 { font-size: 20px; font-weight: 600; margin-bottom: 15px; color: #0d1a26; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.feature-item { background-color: #f5f7fa; padding: 12px 16px; border-radius: 8px; position: relative; font-size: 14px; line-height: 1.5; }
.feature-item::before { content: ''; display: inline-block; width: 8px; height: 8px; background-color: #4674e8; border-radius: 50%; margin-right: 8px; vertical-align: middle; }

.product-files { margin-top: 30px; }
.product-files h2 { font-size: 20px; font-weight: 600; margin-bottom: 15px; color: #0d1a26; }
.file-list { display: flex; flex-wrap: wrap; gap: 12px; }
.file-item { display: inline-block; padding: 12px 16px; background-color: #f5f7fa; border-radius: 8px; text-decoration: none; color: #1c1c1c; transition: background-color 0.2s; min-width: 200px; text-align: center; }
.file-item:hover { background-color: #e0ebff; }

/* ---- 汉堡菜单样式见 banner.css ---- */

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .content-grid { flex-direction: column; }
    .about-company-column { position: static; max-height: none; flex: 1 1 auto; order: -1; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .category-tabs { flex-wrap: wrap; }
    .category-tab { flex-basis: 50%; }
}
@media (max-width: 640px) {
    .product-card { grid-template-columns: 1fr; }
    .product-card-img { min-height: 160px; }
    .footer-top { grid-template-columns: 1fr; }
    .about-highlights { grid-template-columns: 1fr; }
}

/* =========================
   产品标签（通用）
========================= */
.product-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.product-tag { padding: 4px 10px; border-radius: 12px; background: #eef5ff; color: #1e63b5; font-size: 12px; line-height: 1.4; }

/* =========================
   产品列表页分类标签
========================= */
.cat-grandchild-name { font-size: 14px; font-weight: 600; color: #23384d; }
.cat-grandchild-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.cat-grandchild-tag { font-size: 12px; color: #7b8794; line-height: 1.4; }

.cat-l3-tags {
    padding: 0;
    margin-top: 3px;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.cat-l3-tag {
    font-size: 11px;
    line-height: 1.4;
    color: #7b8794;
    background: #f3f6fa;
    padding: 2px 8px;
    border-radius: 10px;
}

/* =========================
   首页产品轮播
   结构: [外层限宽] > [箭头] [wrapper overflow:hidden] [箭头]
   轮播最多同时显示 3 列，多余靠箭头翻页
========================= */

/* 最外层：限宽居中，flex 横排，箭头在轮播两侧 */
.product-carousel-outer {
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 0;
}

/* 左右箭头 */
.carousel-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.65;
    transition: opacity 0.2s;
}
.carousel-arrow:hover { opacity: 1; }
.carousel-arrow img { width: 100%; height: 100%; object-fit: contain; }

/* 轮播容器：flex 弹性撑满，溢出隐藏实现滑动 */
.product-carousel-wrapper {
    flex: 1;
    overflow: hidden;
    margin: 0 16px; /* 轮播内容与箭头之间的间距（对应截图红框宽度） */
}

/* 轮播轨道 */
.product-carousel {
    display: flex;
    gap: 16px;
    transition: transform 0.4s ease;
    will-change: transform;
}

/* 单个产品卡片：宽度由 JS 动态注入，flex-shrink:0 防压缩 */
.product-item {
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    text-align: center;
    padding: 10px;
    box-shadow: var(--shadow);
}

.product-item .product-image { width: 100%; }
.product-item .product-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.product-item .product-name {
    font-weight: 600;
    font-size: 13px;
    margin: 8px 0 5px;
    color: var(--color-primary);
    line-height: 1.4;
}

/* 轮播区内的标签覆盖 */
.product-carousel .product-tags {
    margin-top: 0;
    justify-content: center;
    gap: 4px;
}
.product-carousel .product-tag {
    padding: 2px 6px;
    font-size: 11px;
}

/* =========================
   内页通用两列布局（与首页保持一致）
   左列 65%，右侧栏 35% sticky
========================= */
.inner-main-column {
    flex: 0 0 calc(75%);
    min-width: 0;
}

.inner-sidebar-column {
    flex: 0 0 calc(25%);
    min-width: 0;
    position: sticky;
    top: calc(var(--nav-height) + 10px);
    max-height: calc(100vh - var(--nav-height) - 30px);
    overflow-y: auto;
}

@media (max-width: 900px) {
    .inner-sidebar-column {
        position: static;
        max-height: none;
        flex: 1 1 auto;
        order: -1;
    }
}

/* =========================
   产品列表页 — 父类分组标题
========================= */
.product-group {
    margin-bottom: 36px;
}
.product-group:last-child {
    margin-bottom: 0;
}

.product-group-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-white);
    background: var(--color-accent);   /* 与 section-title 蓝色系呼应，但用 accent 以便与大标题区分 */
    padding: 9px 16px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    letter-spacing: 1px;
    position: relative;
}
.product-group-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 14px;
    background: rgba(255,255,255,0.6);
    border-radius: 2px;
    margin-right: 10px;
    vertical-align: middle;
}
