/* style.css */
/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    margin: 0 auto;
}

/* 头部样式 */
.header {
    background: #0061ae;
    padding: 1rem 0;
    position: relative;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    transition: 0.3s;
}

/* 导航菜单 */
.main-nav {
    transition: 0.3s;
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-list > li {
    margin-left: 2rem;
    position: relative;
}

.nav-list a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem;
    display: block;
}

.login-btn {
    background: #f8b600;
    border-radius: 4px;
    padding: 0.5rem 1rem !important;
}

/* 子菜单 */
.submenu {
    display: none;
    position: absolute;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    top: 100%;
    left: 0;
    z-index: 1000;
}

.submenu a {
    color: #333 !important;
    padding: 0.8rem 1rem;
}

.submenu a:hover {
    background: #f5f5f5;
}

.submenu li{
    list-style-type: none; /* 去掉有序列表的项目符号 */
    padding-left: 0; /* 可选：去掉默认的内边距 */
}

.submenu ul {
    list-style-type: none; /* 去掉有序列表的项目符号 */
    padding-left: 0; /* 可选：去掉默认的内边距 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #0061ae;
        padding: 1rem;
        z-index: 1000;
    }

    .nav-list {
        flex-direction: column;
        z-index: 1000;
    }

    .nav-list > li {
        margin: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .submenu {
        position: static;
        background: rgba(0,0,0,0.1);
        box-shadow: none;
    }
}

/* 添加PC端子菜单悬停效果 */
@media (min-width: 769px) {
    .has-submenu {
        position: relative;
    }
    .has-submenu .submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        min-width: 200px;
    }
    .has-submenu:hover .submenu {
        display: block;
    }
}

/* 主体内容样式 */
.content {
    margin-top: 2rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 产品区块 */
.products {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    color: #0061ae;
    margin-bottom: 2rem;
}

.section-title h2{
    color:#0061ae;
}

.product-grid {
    display: grid;
    gap: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-content {
    padding: 1.5rem;
    order: 2;
}

.product-image {
    order: 1;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-card {
        flex-direction: row;
    }
    
    .product-content {
        flex: 1;
        order: 1;
    }
    
    .product-image {
        flex: 0 0 45%;
        order: 2;
    }
}

/* 内容区块样式 */
.content-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-wrapper {
    display: flex;
    margin-bottom: 20px;
}

.content-image {
    flex: 0 0 40%;
    margin-right: 20px;
}

.content-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.content-text {
    flex: 1;
}

.content-text p {
    margin-bottom: 10px;
    line-height: 1.8;
    color: #666;
}

.section-heading {
    color: #0061ae;
    margin-bottom: 20px;
    font-size: 20px;
}

/* 页脚 */
.footer {
    background: #f5f5f5;
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: #0061ae;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #666;
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links img {
    width: 40px;
    height: 40px;
}

.copyright {
    text-align: center;
    color: #999;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .content-image {
        flex: 0 0 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* 产品中心样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.product-content {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.product-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.more-link {
    color: #0061ae;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.more-link:after {
    content: "→";
    margin-left: 5px;
}

.product-image {
    width: 100%;
    height: 150px;
    background-color: #f5f5f5;
    margin-top: 20px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.custom-card {
    background-color: #0061ae;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.custom-card .product-title {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.custom-card .product-description {
    color: rgb(137, 143, 145);
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .custom-card {
        grid-column: 1;
    }
}

/* 产品详情样式 */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-title {
    color: #0061ae;
    font-size: 1.5rem;
}

.back-btn {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
}

.back-btn:before {
    content: "←";
    margin-right: 5px;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.product-content {
    margin-bottom: 2rem;
}

.product-image {
    width: 100%;
    height: 300px;
    background-color: #f5f5f5;
    margin-top: 1rem;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.related-products {
    margin-bottom: 2rem;
}

.product-tabs {
    display: flex;
    background: #0061ae;
    color: white;
    margin-top: 1rem;
}

.tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.tab.active {
    background: #005aa0;
}

.tab img {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
}

.tab span {
    display: block;
}

.technical-specifications, .product-packaging {
    margin-bottom: 2rem;
}

/* 前往产品中心按钮 */
.go-to-product-center {
    background: #0061ae;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.go-to-product-center .more-link {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.go-to-product-center .more-link span {
    color: white;
    font-size: 1.2rem;
    text-decoration: underline;
    font-weight: bold;
    display: inline-block;
    padding: 1rem 2rem;
}

.go-to-product-center .more-link:after {
    content: "";
}

/* 轮播图样式 */
.hero {
    width: 100%;
    height: 500px; /* 设置轮播图的高度 */
    overflow: hidden; /* 确保图片不会溢出容器 */
    position: relative;
}

.hero-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover; /* 确保图片按比例缩放以填充容器 */
}

@media (max-width: 768px) {
    .hero {
        height: 200px; /* 调整轮播图的高度 */
    }
}
