/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #1e2a3e;
    background-color: #ffffff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

h2 span {
    color: #9E2A2B;
    border-bottom: 3px solid #9E2A2B;
    padding-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: #5a6e7c;
    margin-top: -1.5rem;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 15px rgba(158, 42, 43, 0.5);
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo img {
    display: block;
    height: 50px;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #1e2a3e;
    font-weight: 500;
    transition: color 0.2s, border-bottom-color 0.2s;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
    color: #9E2A2B;
    border-bottom-color: #9E2A2B;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* ========== Hero 首屏（桌面端） ========== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 650px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* ========== 移动端首图完整显示（不裁剪） ========== */
@media (max-width: 768px) {
    .hero {
        height: auto;
        /* 高度自动，由图片撑开 */
        min-height: 0;
        overflow: visible;
    }

    .hero-bg {
        position: relative;
        /* 改为相对定位，脱离绝对定位限制 */
        width: 100%;
        height: auto;
        /* 高度自适应，保持原始比例 */
        object-fit: contain;
        /* 确保整张图片可见，不裁剪 */
        background-color: #f5f5f5;
        /* 背景色与图片边缘融合（浅灰） */
        display: block;
    }
}

.hero-info {
    padding: 4rem 0;
    background: #ffffff;
    text-align: center;
}

.info-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #9E2A2B;
}

.info-card h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #1e2a3e;
}

.info-card p {
    font-size: 1.2rem;
    color: #5a6e7c;
    margin-bottom: 2rem;
}

.hero-info .hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.hero-info .stat-item {
    background: rgba(158, 42, 43, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(158, 42, 43, 0.2);
    color: #9E2A2B;
}

.hero-info .stat-item span {
    color: #9E2A2B;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.product-description {
    background: rgba(158, 42, 43, 0.03);
    padding: 3rem 0;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #2c3e4e;
    border-top: 1px solid rgba(158, 42, 43, 0.1);
    border-bottom: 1px solid rgba(158, 42, 43, 0.1);
}

.product-description p {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.stat-item {
    background: rgba(158, 42, 43, 0.5);
    backdrop-filter: blur(6px);
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 1.1rem;
}

.stat-item span {
    font-size: 1.8rem;
    font-weight: 700;
    margin-right: 0.3rem;
}

.about-page {
    padding: 6rem 0 4rem;
    background-color: #f8fafc;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.2rem;
    color: #2c3e4e;
}

.about-image img {
    width: 100%;
    border-radius: 16px;
}

.image-caption {
    text-align: center;
    font-size: 0.85rem;
    color: #5a6e7c;
    margin-top: 0.5rem;
}

.products-page {
    padding: 6rem 0 4rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border: 1px solid #eef2f6;
    border-radius: 20px;
    padding: 1.8rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(158, 42, 43, 0.1);
}

.product-card i {
    font-size: 2.8rem;
    color: #9E2A2B;
    margin-bottom: 1rem;
}

.product-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.product-card p {
    font-size: 0.9rem;
    color: #5a6e7c;
}

.product-note {
    text-align: center;
    margin-top: 2.5rem;
    font-style: italic;
    color: #5a6e7c;
}

.news-page {
    padding: 6rem 0 4rem;
    background-color: #f1f5f9;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.news-item {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(158, 42, 43, 0.1);
}

.news-date {
    display: inline-block;
    background: #9E2A2B;
    color: white;
    padding: 0.2rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.news-item h3 {
    margin-bottom: 0.8rem;
    font-size: 1.25rem;
}

.contact-page {
    padding: 6rem 0 4rem;
    background: rgba(158, 42, 43, 0.03);
}

.contact-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    background: white;
    border-radius: 2rem;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(158, 42, 43, 0.5);
    width: 100%;
}

.contact-info {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: space-between;
}

.contact-details,
.map-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-info-block,
.contact-form-block {
    flex: 1;
    min-width: 260px;
}

.contact-info-block h2 {
    font-size: 2rem;
    text-align: left;
    margin-bottom: 0.5rem;
    color: #9E2A2B;
}

.contact-info-block h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #1e2a3e;
}

.contact-info-block p {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.contact-info-block i {
    width: 24px;
    color: #9E2A2B;
}

.contact-form-block h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

#quoteForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#quoteForm input {
    padding: 0.9rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 2rem;
    font-size: 1rem;
}

#quoteForm button {
    background: #9E2A2B;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#quoteForm button:hover {
    background: #7a1f20;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.social-links a {
    background: #eef2ff;
    padding: 0.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    color: #9E2A2B;
    font-size: 1.3rem;
}

.social-links a:hover {
    background: #9E2A2B;
    color: white;
}

.form-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #5a6e7c;
}

.footer {
    background: rgba(158, 42, 43, 0.05);
    color: #1e2a3e;
    padding: 2rem 0;
    text-align: center;
    border-top: 3px solid #9E2A2B;
}

.footer-content img {
    filter: none;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.footer p {
    font-size: 0.85rem;
    color: #5a6e7c;
}

.home-contact {
    padding: 4rem 0 2rem;
    background: rgba(158, 42, 43, 0.03);
}

.home-contact .contact-form-block {
    margin-top: 0.5rem;
}

.home-contact .contact-form-block h3 {
    color: #9E2A2B;
    font-size: 1.9rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.8rem;
    letter-spacing: -0.3px;
}

.home-contact .form-note {
    text-align: center;
    margin-top: 0.2rem;
}

.home-contact .contact-layout {
    margin-top: 0;
    margin-bottom: 0;
}

/* ========== 响应式设计（移动端重点修改） ========== */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 1.5rem;
        gap: 1rem;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(158, 42, 43, 0.1);
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        z-index: 999;
    }

    .nav.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .nav a,
    .nav-item-dropdown>a {
        font-size: 1rem;
        font-weight: 500;
        padding: 8px 0;
        border-bottom: none;
    }

    .nav-item-dropdown {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .nav-item-dropdown>a {
        display: block;
        padding: 0.5rem 0;
    }

    /* 子菜单样式调整：降低上边距、适配背景、限制高度显示4个 */
    .dropdown-content {
        position: static;
        transform: none;
        top: auto;
        left: auto;
        width: 100%;
        max-width: 100%;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid #9E2A2B;
        margin-top: 0.2rem;
        padding: 0.2rem 0;
        max-height: 200px;
        overflow-y: auto;
        display: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item-dropdown.open .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        display: block;
        padding: 8px 16px;
        white-space: normal;
        font-size: 0.95rem;
        border-left: 2px solid transparent;
        transition: all 0.2s;
        text-align: left;
        color: #1e2a3e;
    }

    .dropdown-content a:hover {
        background: #fef2f2;
        padding-left: 20px;
        border-left-color: #9E2A2B;
    }

    /* Products 右侧箭头样式不变 */
    .nav-item-dropdown>a::after {
        content: " ▼";
        font-size: 0.7rem;
        opacity: 0.7;
        transition: transform 0.2s;
        display: inline-block;
        margin-left: 6px;
    }

    .nav-item-dropdown.open>a::after {
        content: " ▲";
    }

    /* 首图完整显示调整（已在上方全局 media 中定义，此处无需重复） */
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-item span {
        font-size: 1.3rem;
    }

    .about-grid,
    .contact-layout {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    h2 {
        font-size: 1.8rem;
    }
}

/* 首页表单样式 */
.home-contact #quoteFormHome,
.contact-page #quoteForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-contact #quoteFormHome input,
.home-contact #quoteFormHome textarea,
.home-contact #quoteFormHome select,
.contact-page #quoteForm input,
.contact-page #quoteForm textarea,
.contact-page #quoteForm select {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 2rem;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: inherit;
}

.home-contact #quoteFormHome select,
.contact-page #quoteForm select {
    padding: 0.9rem 2rem 0.9rem 1rem;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%239E2A2B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
}

.home-contact #quoteFormHome textarea,
.contact-page #quoteForm textarea {
    border-radius: 1.5rem;
    resize: vertical;
}

.home-contact #quoteFormHome button,
.contact-page #quoteForm button {
    background: #9E2A2B;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    align-self: flex-start;
}

.home-contact #quoteFormHome button:hover,
.contact-page #quoteForm button:hover {
    background: #7a1f20;
}

.contact-info-block img {
    max-width: 100%;
    height: auto;
}

#quoteFormHome button {
    display: block;
    margin: 0 auto;
}

.product-slider-section {
    padding: 4rem 0;
    background: #ffffff;
}

.product-slider {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin: 2rem 0 1rem;
    padding-bottom: 1rem;
}

.slider-track {
    display: inline-flex;
    gap: 2rem;
    padding: 0.5rem 0.2rem;
}

.product-card-slide {
    width: 260px;
    white-space: normal;
    background: rgba(158, 42, 43, 0.03);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eef2f6;
}

.product-card-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(158, 42, 43, 0.15);
}

.product-card-slide a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card-slide img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.product-card-slide h3 {
    font-size: 1.2rem;
    color: #1e2a3e;
    margin-top: 0.5rem;
}

.scroll-hint {
    text-align: center;
    font-size: 0.85rem;
    color: #5a6e7c;
    margin-top: 0.5rem;
}

/* 桌面端下拉菜单 */
.nav-item-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 240px;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 0.5rem 0;
    border: 1px solid rgba(158, 42, 43, 0.3);
    margin-top: -6px;
    padding-top: 6px;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
    filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.05));
}

.dropdown-content a {
    color: #1e2a3e;
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background: #fef2f2;
    color: #9E2A2B;
    padding-left: 1.8rem;
}

.nav-item-dropdown:hover .dropdown-content {
    display: block;
}

.header,
.header .container,
.nav {
    overflow: visible !important;
}

.dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: #9E2A2B;
    border-radius: 10px;
}

.logo a {
    display: inline-block;
    text-decoration: none;
}

/* 底部公司信息布局 */
.company-info-horizontal {
    background: white;
    border-radius: 2rem;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f6;
}

.company-info-horizontal .logo-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.company-info-horizontal .logo-text h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e2a3e;
}

.company-info-horizontal .info-items {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.company-info-horizontal .info-items .address-item {
    margin-bottom: 0;
}

.company-info-horizontal .info-items .contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
    justify-content: space-between;
}

.company-info-horizontal .info-items .contact-row p {
    margin: 0;
    flex: 0 1 auto;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .company-info-horizontal .info-items .contact-row {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .company-info-horizontal .info-items .contact-row p {
        white-space: nowrap;
    }
}

.company-info-horizontal .info-items p {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0;
    white-space: normal;
}

.company-info-horizontal .info-items i {
    font-size: 1.6rem;
    color: #9E2A2B;
}

@media (max-width: 768px) {
    .company-info-horizontal .info-items {
        grid-template-columns: 1fr;
    }
}

.company-info-horizontal .social-links {
    display: inline-flex;
    gap: 0.5rem;
    margin-left: 0;
}

@media (max-width: 768px) {
    .company-info-horizontal .info-items {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .company-info-horizontal .info-items p {
        white-space: normal;
    }
}

/* 滚动渐变动画 */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}