* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; color: #333; line-height: 1.6; }
a { text-decoration: none; }

/* ========== 全站统一宽度变量（保证顶部 / 内容 / 底部对齐） ========== */
:root {
    --content-max: 1300px;       /* 内容版块最大宽度 */
    --content-pad: 24px;         /* 内容左右内距 */
    --content-pad-mobile: 16px;  /* 移动端左右内距 */
}

/* ========== 顶部导航条（统一：LOGO + 菜单 + 搜索/语言图标 + 下拉） ========== */
.topbar { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 500; }
.topbar-inner { max-width: var(--content-max); margin: 0 auto; height: 70px; padding: 0 var(--content-pad); display: flex; align-items: center; }
.topbar-logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: bold; color: #e53935; white-space: nowrap; }
.topbar-logo img { height: 40px; }
.topnav { display: flex; align-items: center; height: 100%; margin-left: 30px; flex: 1; }
.nav-item { position: relative; height: 100%; display: flex; align-items: center; }
.nav-item > a {
    display: flex; align-items: center; height: 100%; padding: 0 16px;
    font-size: 16px; color: #333; position: relative; transition: color 0.25s;
}
.nav-item > a::after {
    content: ''; position: absolute; left: 16px; right: 16px; bottom: 14px;
    height: 3px; background: #e53935; transform: scaleX(0); transform-origin: center;
    transition: transform 0.25s ease;
}
.nav-item:hover > a, .nav-item > a.active { color: #e53935; }
.nav-item:hover > a::after, .nav-item > a.active::after { transform: scaleX(1); }

/* 下拉通用 */
.dropdown-menu {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); border-radius: 0 0 6px 6px;
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: all 0.25s ease; z-index: 600;
    display: flex; justify-content: center;
}
.nav-item.has-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }

/* 单列下拉 —— 横向单行排列（参考目标站风格） */
.dropdown-simple {
    display: flex;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    padding: 14px 0;
    white-space: nowrap;
}
.dropdown-simple a {
    display: inline-block;
    padding: 14px 22px;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    transition: color 0.2s;
}
.dropdown-simple a:hover { color: #e53935; }

/* 产品中心下拉 —— 左侧竖向分类 + 右侧横向多列子项（整体居中） */
.dropdown-mega {
    display: flex;
    flex: 0 1 auto;
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 0;
    background: #fff;
    justify-content: center;
}
.mega-left {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid #eee;
    padding-right: 8px;
}
.mega-left-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}
.mega-left-item:hover,
.mega-left-item.active { color: #e53935; }
.mega-left-item i { color: #ccc; font-size: 13px; transition: transform 0.2s; }
.mega-left-item.active i,
.mega-left-item:hover i { transform: translateX(3px); color: #e53935; }

.mega-right {
    flex: 0 1 auto;
    padding: 10px 30px;
    display: none;
}
.mega-right.active { display: block; }
.mega-right-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 48px;
}
.mega-right a {
    display: inline-block;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    white-space: nowrap;
    transition: color 0.2s;
}
.mega-right a:hover { color: #e53935; }

/* 搜索 / 语言工具 */
.topbar-tools { display: flex; align-items: center; gap: 14px; }
.tool-btn { width: 38px; height: 38px; border: none; background: transparent; color: #444; font-size: 18px; cursor: pointer; border-radius: 50%; transition: background 0.25s, color 0.25s; display: flex; align-items: center; justify-content: center; }
.tool-btn:hover { background: #f2f6fc; color: #e53935; }
/* 语言切换下拉 */
.lang-switch { position: relative; }
.lang-dropdown { position: absolute; top: calc(100% + 10px); right: 0; min-width: 120px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.12); border-radius: 0 0 6px 6px; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(8px); transition: all 0.25s ease; z-index: 700; }
.lang-switch.open .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dropdown a { display: block; padding: 11px 18px; font-size: 14px; color: #333; transition: background 0.2s, color 0.2s; white-space: nowrap; }
.lang-dropdown a:hover, .lang-dropdown a.active { background: #f2f6fc; color: #e53935; }

/* ========== Banner 轮播区（多图切换） ========== */
.banner { position: relative; width: 100%; overflow: hidden; }
.banner-img { display: block; width: 100%; height: auto; }

.banner-buttons { position: absolute; top: 20px; right: 20px; z-index: 10; display: flex; gap: 10px; }
.banner-btn { padding: 6px 16px; font-size: 14px; border: none; cursor: pointer; transition: all 0.3s; display: inline-block; text-shadow: 0 1px 3px rgba(0,0,0,0.55); }
.banner-btn--red { background: transparent; color: #fff; border: none; }
.banner-btn--red:hover { background: rgba(255,255,255,0.12); }

.banner-dots { position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.banner-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; border: none; }
.banner-dot.active { background: #fff; transform: scale(1.2); }

.banner-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 45px; height: 45px; background: rgba(0,0,0,0.35); color: #fff; border: none; border-radius: 50%; font-size: 20px; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; transition: all 0.3s; opacity: 0; }
.banner:hover .banner-arrow { opacity: 1; }
.banner-arrow:hover { background: rgba(0,0,0,0.6); }
.banner-arrow--prev { left: 20px; }
.banner-arrow--next { right: 20px; }

/* ========== 产品展示区（通栏全屏） ========== */
.product-section { width: 100%; line-height: 0; cursor: pointer; }
.product-image { width: 100%; height: auto; display: block; }

/* ========== 视频播放浮层 ========== */
.video-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.video-overlay.active { display: flex; }
.video-modal {
    position: relative;
    width:90%;
    max-width: 1200px;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}
.video-player { width: 100%; height: auto; display: block; }
.video-close {
    position: absolute; top: 10px; right: 12px;
    width: 36px; height: 36px;
    background: rgba(0,0,0,0.5); color: #fff;
    border: none; border-radius: 50%;
    font-size: 24px; line-height: 1; cursor: pointer;
    z-index: 2; transition: background 0.3s;
}
.video-close:hover { background: rgba(0,0,0,0.85); }

/* ========== 搜索浮层（整页变暗） ========== */
.search-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.search-overlay.active { display: flex; opacity: 1; }
.search-box {
    position: relative;
    width: 90%;
    max-width: 640px;
    margin-top: 18vh;
    background: #fff;
    border-radius: 8px;
    padding: 30px 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.search-close {
    position: absolute; top: 12px; right: 14px;
    width: 32px; height: 32px;
    background: transparent; color: #999;
    border: none; border-radius: 50%;
    font-size: 26px; line-height: 1; cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.search-close:hover { color: #333; background: #f0f0f0; }
.search-form { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid #e53935; padding-bottom: 10px; }
.search-icon { color: #e53935; font-size: 20px; flex-shrink: 0; }
.search-input {
    flex: 1; border: none; outline: none;
    font-size: 18px; color: #333; padding: 6px 4px;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.search-input::placeholder { color: #bbb; }
.search-submit {
    border: none; background: #e53935; color: #fff;
    padding: 8px 24px; font-size: 15px; border-radius: 4px; cursor: pointer;
    transition: background 0.2s; flex-shrink: 0;
}
.search-submit:hover { background: #c62828; }

@media (max-width: 768px) {
    .search-box { margin-top: 12vh; padding: 24px 18px; }
    .search-input { font-size: 16px; }
    .search-submit { padding: 8px 16px; font-size: 14px; }
}

/* ========== 导航卡片区（8张图片，悬停切换） ========== */
.nav-cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; width: 100%; margin: 0; }

.nav-card {
    position: relative;
    display: block;
    overflow: hidden;
    cursor: pointer;
    line-height: 0;
    background: #1c2940;
}
.nav-card img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

/* ========== Footer ========== */
.footer { background: #001938; padding:40px 0 20px 25px; color: #bbb; }
.footer-inner { max-width: var(--content-max); margin: 0 auto; padding: 0; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 25px; }
.footer-left { display: flex; align-items: center; gap: 18px; }
.footer-logo { width: 400px; max-width: 100%; height: auto; object-fit: contain; flex-shrink: 0; }
.footer-company h3 { color: #ddd; font-size: 17px; font-weight: 400; margin-bottom: 3px; }
.footer-company p { font-size: 13px; color: #999; }
.footer-slogan { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 0; font-size: 15px; color: #e0e0e0; letter-spacing: 1px; flex: 1; text-align: right; }
.footer-slogan .divider { color: rgba(255,255,255,0.45); padding: 0 22px; font-weight: 300; }
.footer-qr { text-align: center; }
.footer-qr img { width: 80px; height: 80px; background: #fff; padding: 5px; border-radius: 4px; }
.footer-qr span { font-size: 11px; color: #888; display: block; margin-top: 5px; }
.footer-bottom { max-width: var(--content-max); margin: 20px auto 0; padding: 18px 0 0; box-sizing: border-box; border-top: 1px solid rgba(255,255,255,0.08); text-align: left; font-size: 12px; color: #7c7c7c; }

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .nav-cards-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, auto); grid-auto-flow: column; }
}
@media (max-width: 768px) {
    :root { --content-pad: 16px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-left { flex-direction: column; }
    .footer-qr { width: 100%; text-align: center; align-self: center; }
    .footer-bottom { text-align: center; }
    .footer-slogan { flex-direction: column; align-items: center; justify-content: center; text-align: center; flex: none; gap: 6px 0; }
    .footer-slogan .divider { display: none; }
}
@media (max-width: 480px) {
    .banner-buttons { top: 10px; right: 10px; }
    .banner-btn { padding: 4px 10px; font-size: 13px; }
    .nav-cards-grid { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; }
}

/* ========== 顶部导航：移动端（汉堡 + 竖向菜单 + 下拉展开） ========== */
.topbar-toggle { display: none; background: transparent; border: none; font-size: 22px; color: #333; cursor: pointer; }
@media (max-width: 768px) {
    .topbar-inner { height: auto; flex-wrap: wrap; padding: 10px 16px; }
    .topbar-toggle { display: block; margin-left: auto; }
    .topnav {
        display: none; width: 100%; flex-direction: column; align-items: stretch; height: auto;
        margin-left: 0; margin-top: 10px; border-top: 1px solid #eee;
    }
    .topbar-tools { order: -1; }
    .topnav.open { display: flex; }
    .nav-item { height: auto; flex-direction: column; align-items: stretch; }
    .nav-item > a { height: auto; padding: 12px 8px; justify-content: space-between; }
    .nav-item > a::after { display: none; }
    .nav-item:hover > a { color: #333; }
    .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; }
    .nav-item.has-dropdown.open .dropdown-menu { display: block; }
    .dropdown-simple { padding: 0 0 8px; flex-direction: column; }
    .dropdown-simple a { padding: 8px 20px; }
    .dropdown-mega { flex-direction: column; padding: 0 0 10px; }
    .mega-left { width: 100%; border-right: none; border-bottom: 1px solid #f0f0f0; padding-right: 0; }
    .mega-left-item { padding: 10px 20px; }
    .mega-right { padding: 8px 20px; display: none; }
    .mega-right.active { display: block; }
    .mega-right-row { flex-direction: column; gap: 4px; }
}
