﻿/* ============================================================
     Richitek Header 全站头部样式（header.htm / header_home.htm 共用）
     由 index.css 抽离，供各内页通过 header.htm 引入
     ============================================================ */

/* =========================

===================================
 *  Richitek Header - 响应式头部样式
 *  适用于 header_home.htm 简化结构
 * ============================================================ */

/* ---------- 全局重置（header 作用域内） ---------- */
.rtk-header *,
.rtk-header *::before,
.rtk-header *::after {
    box-sizing: border-box;
}

/* 彻底清除 body/html 顶部可能的意外 margin/padding（消除白色间距） */
html, body {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.rtk-header {
    font-family: Source Han Sans, Geneva, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    width: 100%;
    position: relative;
    background: #fff;
    z-index: 999;
}

/* ---------- 顶部信息条 ---------- */
.rtk-top-bar {
    background: #f5f5f5;
    border-bottom: none;
    height: 38px;
    line-height: 38px;
    font-size: 12px;
    color: #333;
    font-weight: 700;
}

.rtk-top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.rtk-top-bar-welcome {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rtk-top-bar-welcome span {
    font-size: 12px;
    color: #333;
    font-weight: 700;
}

/* ---------- 语言切换 ---------- */
.rtk-top-bar-lang {
    margin-left: 20px;
    flex-shrink: 0;
}

.w-language {
    position: relative;
    display: inline-block;
    height: 38px;
    line-height: 38px;
}

.w-language-inner {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 12px;
    cursor: pointer;
    color: #333;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.2s;
}

.w-language-inner:hover {
    background: #eaeaea;
}

.w-language-pic {
    margin-right: 5px;
    font-size: 14px;
}

.w-language-txt a {
    color: #333;
    text-decoration: none;
    font-weight: 700;
}

.w-language-dropdown {
    display: none;
    position: absolute;
    top: 38px;
    right: 0;
    min-width: 140px;
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    list-style: none;
    padding: 6px 0;
    margin: 0;
}

.w-language:hover .w-language-dropdown {
    display: block;
}

.w-language-dropdown-item {
    padding: 0;
}

.w-language-link {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s;
}

.w-language-link:hover {
    background: #f0f6ff;
    color: #0066cc;
}

/* ---------- Logo + Slogan + Contact 主体 ---------- */
.rtk-header-main {
    background: #fff;
    height: 100px;
    display: flex;
    align-items: center;
    border-bottom: none;
}

.rtk-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo */
.rtk-header-logo {
    flex-shrink: 0;
}

.rtk-header-logo a {
    display: inline-block;
    text-decoration: none;
}

.rtk-header-logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

/* Slogan */
.rtk-header-slogan {
    flex: 1;
    min-width: 0;
    padding: 0 30px;
    text-align: left;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.rtk-header-slogan p {
    margin: 0;
    line-height: 1.4;
    font-size: 13px;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Contact */
.rtk-header-contact {
    flex-shrink: 0;
    text-align: right;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.rtk-header-contact a {
    color: #0066cc;
    text-decoration: none;
}

.rtk-header-contact a:hover {
    text-decoration: underline;
}

/* ---------- 导航栏 ---------- */
.rtk-header-nav {
    background: #0066cc;
    height: 50px;
}

.rtk-header-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: stretch;
}

.rtk-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: stretch;
    height: 100%;
}

.rtk-nav-item {
    position: relative;
    height: 50px;
}

.rtk-nav-item > a {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 20px;
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
}

.rtk-nav-item > a:hover,
.rtk-nav-item.active > a {
    background: rgba(255, 255, 255, 0.15);
}

/* 下拉子菜单 - 宽度按最长子项自适应 */
.rtk-nav-sub {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    background: #fff;
    width: max-content;
    min-width: 160px;
    max-width: 360px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 100;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    border-top: 2px solid #0066cc;
}

.rtk-nav-item:hover > .rtk-nav-sub {
    display: block;
}

.rtk-nav-sub li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.rtk-nav-sub li a:hover {
    background: #f0f6ff;
    color: #0066cc;
}

/* ---------- 移动端汉堡按钮 ---------- */
.rtk-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 0 15px;
    height: 50px;
    line-height: 50px;
}

/* 移动端抽屉菜单（通过 JS 切换） */
.rtk-header-nav-inner.is-open .rtk-nav-list {
    transform: translateX(0);
}

/* ============================================================
 *  响应式 - 平板 & 移动端
 * ============================================================ */

/* 平板 (768px ~ 1024px) */
@media (max-width: 1024px) {
    .rtk-header-slogan {
        padding: 0 15px;
    }
    .rtk-nav-item > a {
        padding: 0 14px;
        font-size: 13px;
    }
}

/* 移动端 (<= 767px) */
@media (max-width: 767px) {
    .rtk-top-bar {
        height: auto;
        min-height: 34px;
        line-height: 34px;
        font-size: 11px;
    }

    .rtk-top-bar-inner {
        padding: 0 10px;
    }

    .rtk-top-bar-welcome {
        font-size: 11px;
    }

    .w-language {
        height: 34px;
        line-height: 34px;
    }

    .w-language-inner {
        height: 34px;
        font-size: 11px;
        padding: 0 8px;
    }

    .w-language-dropdown {
        top: 34px;
        min-width: 120px;
        right: 0;
    }

    .rtk-header-main {
        height: auto;
        min-height: 70px;
        padding: 10px 0;
    }

    .rtk-header-inner {
        padding: 0 10px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .rtk-header-logo img {
        max-height: 36px;
    }

    .rtk-header-slogan {
        display: none;
    }

    .rtk-header-contact {
        display: none;
    }

    .rtk-header-nav {
        height: 50px;
    }

    .rtk-header-nav-inner {
        justify-content: space-between;
        padding: 0 10px;
        position: relative;
    }

    .rtk-mobile-toggle {
        display: block;
    }

    .rtk-nav-list {
        display: none;
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        background: #0066cc;
        flex-direction: column;
        height: auto;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        max-height: 70vh;
        overflow-y: auto;
        z-index: 999;
    }

    .rtk-header-nav-inner.is-open .rtk-nav-list {
        display: flex;
    }

    .rtk-nav-item {
        height: auto;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .rtk-nav-item > a {
        height: 48px;
        padding: 0 15px;
        font-size: 14px;
    }

    .rtk-nav-sub {
        position: static;
        display: none;
        background: #004d99;
        min-width: 0;
        box-shadow: none;
        border-top: none;
        padding: 0;
    }

    .rtk-header-nav-inner.is-open .rtk-nav-item:hover > .rtk-nav-sub,
    .rtk-nav-item.open > .rtk-nav-sub {
        display: block;
    }

    .rtk-nav-sub li a {
        padding: 12px 15px 12px 35px;
        color: #cce0ff;
        font-size: 13px;
    }

    .rtk-nav-sub li a:hover {
        background: #0055aa;
        color: #fff;
    }
}

/* 小屏手机 (<= 480px) */
@media (max-width: 480px) {
    .rtk-header-logo img {
        max-height: 32px;
    }
    .rtk-nav-item > a {
        padding: 0 12px;
        font-size: 13px;
    }
}

/* ============================================================
 *  全站统一面包屑导航（白色横条 + 顶部细蓝线 + 当前页蓝色胶囊）
 *  - 列表页：.rtk-crumb-bar > .rtk-crumb-row，最后一个栏目链接自动胶囊
 *  - 详情页：row 加 .rtk-crumb--detail，追加 <span class="rtk-crumb-cur">四级标题
 *  - 旧版绝对定位页面：smartAbs 容器加 .rtk-crumb-bar 并左右拉伸即可复用
 * ============================================================ */
.rtk-crumb-bar {
    background: #fff;
    border-top: 2px solid #3099dd;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
}
.rtk-crumb-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    max-width: 1500px;
    margin: 0 auto;
    padding: 9px 30px;
    min-height: 48px;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.5;
    color: #888;
    font-family: inherit;
    text-align: left;
}
.rtk-crumb-row a {
    display: inline-flex;
    align-items: center;
    color: #444 !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.2s;
}
.rtk-crumb-row a:hover {
    color: #3099dd !important;
}
/* 首页图标 */
.rtk-crumb-row > a:first-child::before {
    content: "";
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin-right: 5px;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M12 3 2 12h3v8h6v-6h2v6h6v-8h3L12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* 当前页胶囊：列表页为最后一个栏目链接 */
.rtk-crumb-row > a:last-of-type {
    background: #e8f3fc;
    color: #3099dd !important;
    padding: 2px 12px;
    border-radius: 999px;
    font-weight: 700;
}
.rtk-crumb-row > a:last-of-type:hover {
    background: #d8ecfa;
}
/* 详情页：胶囊让位给四级标题 span，最后一个栏目链接还原为普通样式 */
.rtk-crumb-row.rtk-crumb--detail > a:last-of-type {
    background: transparent;
    color: #444 !important;
    padding: 0;
    border-radius: 0;
    font-weight: 600;
}
.rtk-crumb-row .rtk-crumb-cur {
    display: inline-flex;
    align-items: center;
    /* PC 端不截断：长标题在面包屑条内自然换行完整显示 */
    overflow-wrap: anywhere;
    background: #e8f3fc;
    color: #3099dd;
    padding: 2px 12px;
    border-radius: 999px;
    font-weight: 700;
}
/* 详情页第三级 → 第四级的分隔箭头：必须是真实元素。
   不能用 .rtk-crumb-cur::before 绝对定位——胶囊的 overflow:hidden（长标题省略号）
   会把定位在胶囊外侧的伪元素一起裁掉 */
.rtk-crumb-row .rtk-crumb-sep {
    flex: 0 0 auto;
    color: #888;
    font-weight: 400;
}
/* 移动端 */
@media (max-width: 767px) {
    .rtk-crumb-row {
        padding: 7px 16px;
        min-height: 40px;
        font-size: 13px;
    }
    .rtk-crumb-row > a:first-child::before {
        width: 12px;
        height: 12px;
    }
    .rtk-crumb-row > a:last-of-type,
    .rtk-crumb-row .rtk-crumb-cur {
        padding: 2px 10px;
    }
    /* 移动端同样不截断：长标题换行完整显示 */
}

/* ============================================================
 *  内页左侧边栏（left.htm，被 lists_product / view_product 等页面引入）
 *  产品图文列表 + 联系按钮，流式布局；≤1000px 随 pc-show 整体隐藏
 * ============================================================ */
.rtk-ls {
    width: 240px;
    flex: 0 0 240px;
    font-family: inherit;
}

.rtk-ls-block {
    background: #fff;
    border: 1px solid #e8eef4;
    border-top: 2px solid #3099dd;
    border-radius: 10px;
    padding: 16px 14px;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(20, 60, 100, 0.06);
}

.rtk-ls-head {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
    position: relative;
    line-height: 1.4;
    font-family: inherit;
}

.rtk-ls-head::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%);
    width: 44px;
    height: 2px;
    background: linear-gradient(90deg, #0066cc, #2e86de);
}

.rtk-ls-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.rtk-ls-item {
    display: flex;
    gap: 11px;
    padding: 9px 8px;
    margin: 0 -8px;
    border-radius: 10px;
    align-items: flex-start;
    /* 背景色随条目主色淡染（6%），与左侧彩条同色系 */
    background: #f7fafd;
    background: color-mix(in srgb, var(--ls-accent, #0066cc) 6%, #fff);
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.rtk-ls-item:hover {
    background: color-mix(in srgb, var(--ls-accent, #0066cc) 13%, #fff);
    transform: translateY(-1px);
}

.rtk-ls-item:last-child {
    border-bottom: none;
}

/* 条目主色循环（蓝/天蓝/青绿/紫）：用于淡染背景，hover 时标题同步变对应色 */
.rtk-ls-item:nth-child(4n + 1) {
    --ls-accent: #0066cc;
}

.rtk-ls-item:nth-child(4n + 2) {
    --ls-accent: #00a8ff;
}

.rtk-ls-item:nth-child(4n + 3) {
    --ls-accent: #12b886;
}

.rtk-ls-item:nth-child(4n + 4) {
    --ls-accent: #7048e8;
}

.rtk-ls-thumb {
    position: relative;
    flex: 0 0 76px;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(20, 60, 100, 0.14);
}

.rtk-ls-thumb img {
    width: 76px;
    height: 57px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: #f4f7fb;
    transition: transform 0.35s;
}

.rtk-ls-item:hover .rtk-ls-thumb img {
    transform: scale(1.08);
}

.rtk-ls-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding-top: 2px;
}

.rtk-ls-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
    font-family: inherit;
}

.rtk-ls-title a {
    color: #26313c;
    text-decoration: none;
    transition: color 0.2s;
}

.rtk-ls-title a:hover {
    color: var(--ls-accent, #0066cc);
}

.rtk-ls-desc {
    font-size: 12px;
    color: #8a97a5;
    line-height: 1.55;
    margin: 5px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rtk-ls-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    padding: 11px 16px;
    background: linear-gradient(135deg, #0066cc, #2e86de);
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rtk-ls-btn::before {
    content: '\2709';
    margin-right: 8px;
    font-size: 15px;
}

.rtk-ls-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
    color: #fff;
}

/* 窄屏 PC（平板横屏）：侧栏收窄，给右侧主体让出空间 */
@media (max-width: 1180px) {
    .rtk-ls {
        width: 210px;
        flex: 0 0 210px;
    }

    .rtk-ls-thumb {
        flex: 0 0 64px;
    }

    .rtk-ls-thumb img {
        width: 64px;
        height: 48px;
    }

    .rtk-ls-desc {
        -webkit-line-clamp: 1;
    }
}

/* 移动端/窄屏（≤1000px）：彻底隐藏侧边栏，避免挤压主体内容。
   正常情况下 ≤1000px 由 common.css 隐藏整个 pc-show 区块（移动端模板不含侧栏），
   此规则作为保险：即使 pc-show 被强制显示（桌面模式手机/特殊视口），侧栏也不会出现 */
@media (max-width: 1000px) {
    .rtk-ls {
        display: none !important;
    }
}

/* 2026-11-06 全站兜底：阻断超宽元素引发的横向滚动（与 index.css 首页规则一致） */
html, body { overflow-x: hidden; }
