/* =========================================================
   江苏瑞悦门户网站 — 前台样式（纯手写，无框架）
   工业制造风：白底 + 主红 #C81623 + 深灰 #333
   ========================================================= */

:root {
    --red: #C81623;
    --red-dark: #a51219;
    --dark: #333333;
    --gray: #666666;
    --light-gray: #999999;
    --bg-gray: #f5f5f5;
    --border: #e5e5e5;
    --footer-bg: #262626;
    --footer-text: #aaaaaa;
    --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: var(--dark);
    background: #ffffff;
    font-size: 15px;
    line-height: 1.7;
}

img { max-width: 100%; display: block; border: 0; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
ul, ol { list-style: none; }

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

/* ===================== 顶部细条 ===================== */
.topbar {
    background: var(--dark);
    color: #cccccc;
    font-size: 13px;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
}
.topbar-slogan { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-switch { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-switch a { color: #cccccc; }
.lang-switch a:hover { color: #ffffff; }
.lang-switch a.active { color: #ffffff; font-weight: bold; }
.lang-sep { color: #666666; }

/* ===================== logo 区 ===================== */
.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 20px;
}
.logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo img { height: 68px; width: auto; flex-shrink: 0; }
.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: var(--dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.header-tel { text-align: right; flex-shrink: 0; }
.header-tel-label { display: block; font-size: 13px; color: var(--light-gray); }
.header-tel-num { display: block; font-size: 24px; font-weight: bold; color: var(--red); line-height: 1.2; }

/* 汉堡按钮（默认隐藏，移动端显示） */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: var(--red);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}
.hamburger span { display: block; height: 2px; background: #ffffff; border-radius: 2px; }

/* ===================== 主导航 ===================== */
.mainnav { background: var(--red); }
.nav-list { display: flex; }
.nav-list > li { position: relative; }
.nav-list > li > a {
    display: block;
    padding: 14px 28px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    transition: background .2s ease;
}
.nav-list > li > a:hover,
.nav-list > li > a.active { background: var(--red-dark); }
.nav-list > li.has-dropdown > a::after {
    content: "";
    display: inline-block;
    margin-left: 6px;
    border: 5px solid transparent;
    border-top-color: #ffffff;
    vertical-align: middle;
    transform: translateY(2px);
}
/* 下拉菜单 */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
    border-top: 2px solid var(--red);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .2s ease;
    z-index: 100;
}
.nav-list > li:hover > .dropdown,
.nav-list > li.open > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown > li { position: relative; border-bottom: 1px solid var(--border); }
.dropdown > li:last-child { border-bottom: 0; }
.dropdown > li > a {
    display: block;
    padding: 11px 18px;
    color: var(--dark);
    font-size: 14px;
    white-space: nowrap;
}
.dropdown > li > a:hover { background: var(--bg-gray); color: var(--red); }
/* 三级（二级分类） */
.dropdown-sub {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 160px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
}
.dropdown > li:hover > .dropdown-sub { display: block; }
.dropdown-sub > li > a {
    display: block;
    padding: 10px 16px;
    color: var(--gray);
    font-size: 13px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
.dropdown-sub > li > a:hover { color: var(--red); background: var(--bg-gray); }

/* ===================== 轮播 ===================== */
.hero { background: var(--dark); }
.carousel { position: relative; overflow: hidden; }
.carousel-track {
    display: flex;
    transition: transform .6s ease;
}
.carousel-slide {
    position: relative;
    flex: 0 0 100%;
    min-width: 100%;
}
.carousel-slide img {
    width: 100%;
    height: clamp(260px, 38vw, 520px);
    object-fit: cover;
}
.carousel-caption {
    position: absolute;
    left: 8%;
    bottom: 15%;
    max-width: 620px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.carousel-caption h2 { font-size: clamp(22px, 3.4vw, 42px); margin-bottom: 10px; }
.carousel-caption p { font-size: clamp(13px, 1.6vw, 18px); }
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .35);
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
    z-index: 10;
}
.carousel-arrow:hover { background: var(--red); }
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }
.carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}
.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background .2s ease;
}
.carousel-dot.active { background: var(--red); border-color: var(--red); }

/* ===================== 通用区块 ===================== */
.section { padding: 56px 0; }
.section:nth-of-type(even) { background: var(--bg-gray); }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head.align-left { text-align: left; margin-bottom: 18px; }
.section-title {
    display: inline-block;
    font-size: 30px;
    color: var(--dark);
    padding-bottom: 10px;
    border-bottom: 3px solid var(--red);
}
.section-sub {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--light-gray);
    text-transform: uppercase;
}
.section-more { text-align: center; margin-top: 34px; }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 11px 34px;
    font-size: 15px;
    border-radius: 3px;
    cursor: pointer;
    transition: all .2s ease;
}
.btn-red { background: var(--red); color: #ffffff; border: 1px solid var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-outline { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-outline:hover { background: var(--red); color: #ffffff; }

.empty-tip { text-align: center; color: var(--light-gray); padding: 40px 0; }

/* ===================== 分类 Tab ===================== */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 34px;
}
.cat-tab {
    padding: 8px 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--gray);
    font-size: 14px;
    background: #ffffff;
    transition: all .2s ease;
}
.cat-tab:hover { border-color: var(--red); color: var(--red); }

/* ===================== 产品卡片网格 ===================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.product-grid-list { grid-template-columns: repeat(3, 1fr); }
.product-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}
.product-img {
    height: 200px;
    overflow: hidden;
    background: var(--bg-gray);
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.product-card:hover .product-img img { transform: scale(1.06); }
.product-body { padding: 16px 18px 20px; }
.product-name {
    font-size: 17px;
    color: var(--dark);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-card:hover .product-name { color: var(--red); }
.product-summary {
    font-size: 13px;
    color: var(--gray);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    margin-bottom: 12px;
}
.product-more { font-size: 13px; color: var(--red); }

/* ===================== 关于我们 ===================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.about-name { font-size: 22px; color: var(--dark); margin-bottom: 14px; }
.about-intro {
    color: var(--gray);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.about-img { border-radius: 4px; overflow: hidden; box-shadow: 12px 12px 0 var(--red); }
.about-img img { width: 100%; height: 340px; object-fit: cover; }

/* 数据指标 */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 56px;
    text-align: center;
}
.stat-item {
    padding: 26px 10px;
    background: #ffffff;
    border-top: 3px solid var(--red);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.stat-num { font-size: 38px; font-weight: bold; color: var(--red); line-height: 1.2; }
.stat-unit { font-size: 16px; margin-left: 4px; }
.stat-label { margin-top: 6px; font-size: 15px; color: var(--gray); }

/* ===================== 工厂实景图片墙 ===================== */
.factory-wall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.factory-item {
    height: 230px;
    overflow: hidden;
    border-radius: 4px;
}
.factory-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.factory-item:hover img { transform: scale(1.06); }

/* ===================== 合作伙伴 ===================== */
.partner-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}
.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.partner-item img {
    max-height: 64px;
    width: auto;
    filter: grayscale(100%);
    opacity: .75;
    transition: all .3s ease;
}
.partner-item:hover img { filter: grayscale(0); opacity: 1; }

/* ===================== 内页横幅 / 面包屑 ===================== */
.page-banner {
    background: linear-gradient(120deg, var(--dark) 0%, #4a4a4a 60%, var(--red-dark) 100%);
    color: #ffffff;
    padding: 46px 0;
}
.page-banner-title { font-size: 30px; margin-bottom: 8px; }
.breadcrumb { font-size: 13px; color: rgba(255, 255, 255, .75); }
.breadcrumb a:hover { color: #ffffff; }
.breadcrumb-sep { margin: 0 8px; }

/* ===================== 内页左右布局 ===================== */
.page-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}
.aside-title {
    background: var(--red);
    color: #ffffff;
    font-size: 18px;
    padding: 13px 20px;
    border-radius: 4px 4px 0 0;
}
.aside-nav { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 4px 4px; }
.aside-nav > li { border-bottom: 1px solid var(--border); }
.aside-nav > li:last-child { border-bottom: 0; }
.aside-nav > li > a {
    display: block;
    padding: 12px 20px;
    color: var(--dark);
    font-size: 15px;
    border-left: 3px solid transparent;
    transition: all .2s ease;
}
.aside-nav > li > a:hover { color: var(--red); background: var(--bg-gray); }
.aside-nav > li > a.active {
    color: var(--red);
    border-left-color: var(--red);
    background: var(--bg-gray);
    font-weight: bold;
}
.aside-subnav { background: #fafafa; }
.aside-subnav > li > a {
    display: block;
    padding: 9px 20px 9px 38px;
    color: var(--gray);
    font-size: 13px;
}
.aside-subnav > li > a:hover,
.aside-subnav > li > a.active { color: var(--red); }

.content-heading {
    font-size: 24px;
    color: var(--dark);
    padding-bottom: 12px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
    position: relative;
}
.content-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 64px;
    height: 2px;
    background: var(--red);
}

/* 富文本内容 */
.richtext { color: var(--dark); overflow-wrap: break-word; }
.richtext img { max-width: 100%; height: auto; margin: 10px 0; }
.richtext p { margin-bottom: 12px; }
.richtext table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.richtext td, .richtext th { border: 1px solid var(--border); padding: 8px 12px; }
.richtext h1, .richtext h2, .richtext h3 { margin: 18px 0 10px; }

/* 内容图片集 */
.content-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 30px;
}
.content-gallery-item { height: 200px; overflow: hidden; border-radius: 4px; }
.content-gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* ===================== 产品详情 ===================== */
.pd-top {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 44px;
    align-items: start;
}
.pd-main-img {
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    height: 380px;
    background: var(--bg-gray);
}
.pd-main-img img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.pd-thumb {
    height: 76px;
    border: 2px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s ease;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb:hover, .pd-thumb.active { border-color: var(--red); }
.pd-name {
    font-size: 26px;
    color: var(--dark);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.pd-block-title {
    font-size: 19px;
    color: var(--dark);
    padding-left: 12px;
    border-left: 4px solid var(--red);
    margin-bottom: 14px;
}
.pd-summary { margin-bottom: 26px; color: var(--gray); }
.pd-params { margin-bottom: 26px; }
.params-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.params-table th, .params-table td {
    border: 1px solid var(--border);
    padding: 10px 14px;
    text-align: left;
}
.params-table th {
    width: 38%;
    background: var(--bg-gray);
    color: var(--dark);
    font-weight: 500;
}
.pd-detail { margin-top: 44px; }

/* ===================== 联系我们 ===================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 56px;
    align-items: start;
}
.contact-list li {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--border);
}
.contact-label {
    flex-shrink: 0;
    min-width: 64px;
    color: var(--red);
    font-weight: bold;
}
.contact-value { color: var(--gray); }
.contact-qr { margin-top: 26px; }
.contact-qr img { width: 150px; height: 150px; object-fit: cover; border: 1px solid var(--border); border-radius: 4px; }
.contact-qr p { margin-top: 8px; font-size: 13px; color: var(--light-gray); }

.alert {
    padding: 12px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-success { background: #e9f7ef; color: #1e8449; border: 1px solid #a9dfbf; }

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--dark); }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: var(--dark);
    transition: border-color .2s ease;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--red); }
.form-group textarea { resize: vertical; }
.btn-submit { min-width: 160px; }

/* ===================== 页脚 ===================== */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 48px;
    padding-top: 52px;
    padding-bottom: 40px;
}
.footer-title {
    color: #ffffff;
    font-size: 18px;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid #3a3a3a;
    position: relative;
}
.footer-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 44px;
    height: 2px;
    background: var(--red);
}
.footer-contact li { display: flex; gap: 10px; margin-bottom: 12px; font-size: 14px; }
.fc-label { flex-shrink: 0; min-width: 44px; color: #dddddd; }
.footer-links li { margin-bottom: 10px; font-size: 14px; }
.footer-links a:hover { color: #ffffff; }
.footer-qr img { width: 120px; height: 120px; object-fit: cover; border-radius: 4px; }
.footer-follow-text { margin-top: 10px; font-size: 13px; }
.footer-bottom { border-top: 1px solid #3a3a3a; padding: 16px 0; font-size: 13px; }
.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===================== 响应式 ===================== */
@media (max-width: 992px) {
    .product-grid, .product-grid-list { grid-template-columns: repeat(2, 1fr); }
    .partner-row { grid-template-columns: repeat(4, 1fr); }
    .factory-wall, .content-gallery { grid-template-columns: repeat(2, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .pd-top { grid-template-columns: 1fr; }
    .pd-main-img { height: 320px; }
    .about-grid { grid-template-columns: 1fr; gap: 30px; }
    .about-img img { height: 280px; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .header-tel { display: none; }
    .header-main { padding-top: 12px; padding-bottom: 12px; }
    .logo img { height: 52px; }
    .logo-text { font-size: 16px; }
    .hamburger { display: flex; }

    /* 移动端导航：默认隐藏，汉堡展开 */
    .mainnav .container { padding: 0; }
    .nav-list {
        display: none;
        flex-direction: column;
        max-height: 70vh;
        overflow-y: auto;
    }
    .nav-list.open { display: flex; }
    .nav-list > li > a { padding: 13px 20px; border-top: 1px solid rgba(255, 255, 255, .15); }
    /* 移动端下拉：静态展开显示 */
    .dropdown, .dropdown-sub {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: 0;
        background: var(--red-dark);
        min-width: 0;
    }
    .nav-list > li.open > .dropdown { display: block; }
    .dropdown > li { border-bottom: 0; }
    .dropdown > li > a { color: rgba(255, 255, 255, .9); padding-left: 36px; }
    .dropdown > li > a:hover { background: rgba(0, 0, 0, .15); color: #ffffff; }
    .dropdown > li:hover > .dropdown-sub { display: none; }
    .dropdown > li.open > .dropdown-sub { display: block; }
    .dropdown-sub > li > a { color: rgba(255, 255, 255, .75); padding-left: 56px; border-bottom: 0; }

    .section { padding: 40px 0; }
    .section-title { font-size: 24px; }
    .page-body { grid-template-columns: 1fr; }
    .product-grid, .product-grid-list { grid-template-columns: 1fr; }
    .partner-row { grid-template-columns: repeat(2, 1fr); }
    .factory-wall, .content-gallery { grid-template-columns: 1fr; }
    .contact-form .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; padding-top: 40px; }
    .carousel-caption { left: 6%; right: 6%; bottom: 18%; }
    .carousel-arrow { width: 36px; height: 36px; font-size: 16px; }
}

/* 合作伙伴无 Logo 时显示文字名称 */
.partner-name {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 64px;
    padding: 8px 12px;
    color: #999;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    filter: grayscale(0);
    transition: color .3s;
}
.partner-item:hover .partner-name { color: #C81623; }
