/* 模具制造企业网站样式 - 红色主题 */

/* 变量定义 */
:root {
    --primary-color: #C8102E;
    --primary-dark: #A00D24;
    --primary-light: #E8455F;
    --secondary-color: #333333;
    --text-color: #666666;
    --text-light: #999999;
    --bg-light: #F5F5F5;
    --bg-dark: #1A1A1A;
    --white: #FFFFFF;
    --gold: #D4AF37;
    --border-color: #E5E5E5;
    --transition: all 0.3s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部信息栏 */
.top-bar {
    background: var(--secondary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 13px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left span {
    margin-right: 20px;
}

.top-left i {
    color: var(--primary-color);
    margin-right: 5px;
}

.lang-switch {
    color: var(--white);
    border: 1px solid var(--white);
    padding: 3px 15px;
    border-radius: 3px;
}

.lang-switch:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 主导航 */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
}

.logo img {
    max-height: 50px;
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    margin-left: 40px;
}

.main-nav a {
    font-size: 15px;
    color: var(--secondary-color);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.mobile-menu li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

/* 面包屑导航 */
.breadcrumb {
    background: var(--bg-light);
    padding: 15px 0;
    font-size: 13px;
}

.breadcrumb a {
    color: var(--text-color);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    margin: 0 10px;
    color: var(--text-light);
}

/* 轮播图 */
.banner {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.swiper-container {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
}

.banner-content h2 {
    font-size: 48px;
    color: var(--white);
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.banner-content p {
    font-size: 20px;
    color: var(--white);
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s both;
}

.swiper-button-prev,
.swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: var(--primary-color);
}

.swiper-button-prev { left: 20px; }
.swiper-button-next { right: 20px; }

.swiper-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.swiper-pagination span {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
}

.swiper-pagination span.active {
    background: var(--primary-color);
}

/* 通用区块 */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 32px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.section-header .subtitle {
    font-size: 14px;
    color: var(--text-light);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.section-header.light h2 {
    color: var(--white);
}

.section-header.light .subtitle {
    color: rgba(255,255,255,0.7);
}

/* 按钮 */
.btn-primary {
    display: inline-block;
    padding: 12px 35px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 3px;
    font-size: 14px;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200,16,46,0.3);
}

.btn-outline {
    display: inline-block;
    padding: 10px 30px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 3px;
    font-size: 14px;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.text-center {
    text-align: center;
}

/* 关于我们 */
.about-section {
    background: var(--white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 16px;
    line-height: 2;
    margin-bottom: 30px;
}

/* 核心优势 */
.advantage-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-dark) 100%);
    color: var(--white);
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.advantage-item {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    transition: var(--transition);
}

.advantage-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-5px);
}

.advantage-item .icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.advantage-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.advantage-item p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

/* 产品中心 */
.product-section {
    background: var(--bg-light);
}

.product-cats {
    text-align: center;
    margin-bottom: 40px;
}

.product-cats a {
    display: inline-block;
    padding: 8px 25px;
    margin: 0 5px;
    border-radius: 3px;
    transition: var(--transition);
}

.product-cats a:hover,
.product-cats a.active {
    background: var(--primary-color);
    color: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.product-item {
    background: var(--white);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-item:hover .product-img img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(200,16,46,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.product-overlay span {
    color: var(--white);
    border: 2px solid var(--white);
    padding: 8px 25px;
    border-radius: 3px;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.product-info p {
    font-size: 13px;
    color: var(--text-light);
}

/* 新闻资讯 */
.news-section {
    background: var(--white);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.news-item {
    display: flex;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 5px;
    transition: var(--transition);
}

.news-item:hover {
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.news-date {
    width: 70px;
    text-align: center;
    padding-right: 20px;
    border-right: 1px solid var(--border-color);
    margin-right: 20px;
}

.news-date .day {
    display: block;
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.news-date .month {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

.news-content {
    flex: 1;
}

.news-content h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.news-content h3 a:hover {
    color: var(--primary-color);
}

.news-content p {
    font-size: 13px;
    color: var(--text-light);
}

/* 页脚 */
.main-footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.footer-section ul li {
    padding: 8px 0;
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
}

.contact-list i {
    color: var(--primary-color);
    margin-right: 10px;
    margin-top: 3px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* 产品列表页 */
.product-list-page .product-grid {
    margin-bottom: 30px;
}

.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 3px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    transition: var(--transition);
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* 产品详情页 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.product-gallery {
    position: relative;
}

.product-main-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 5px;
}

.product-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.product-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 3px;
    cursor: pointer;
    border: 2px solid transparent;
}

.product-thumbs img.active {
    border-color: var(--primary-color);
}

.product-info-detail h1 {
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.product-info-detail .summary {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-color);
}

.product-params {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.product-params h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.params-table {
    width: 100%;
}

.params-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.params-table td:first-child {
    width: 120px;
    color: var(--text-light);
}

.product-actions {
    display: flex;
    gap: 15px;
}

.product-actions .btn-primary {
    flex: 1;
    text-align: center;
}

/* 新闻列表页 */
.news-list .news-item {
    margin-bottom: 20px;
}

/* 新闻详情页 */
.news-detail {
    max-width: 900px;
    margin: 0 auto;
}

.news-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.news-header h1 {
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.news-meta {
    color: var(--text-light);
    font-size: 13px;
}

.news-meta span {
    margin: 0 15px;
}

.news-content-detail {
    font-size: 15px;
    line-height: 2;
}

.news-content-detail p {
    margin-bottom: 20px;
}

.news-content-detail img {
    max-width: 100%;
    border-radius: 5px;
}

.news-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* 单页内容 */
.page-content {
    max-width: 1000px;
    margin: 0 auto;
}

.page-sidebar {
    display: grid;
    /* grid-template-columns: 250px 1fr; */
    gap: 40px;
}

.sidebar-menu {
    background: var(--bg-light);
    border-radius: 5px;
    overflow: hidden;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: var(--primary-color);
    color: var(--white);
}

.page-main {
    background: var(--white);
    padding: 30px;
    border-radius: 5px;
}

.page-main h1 {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.page-main .content {
    font-size: 15px;
    line-height: 2;
}

.page-main .content p {
    margin-bottom: 15px;
}

.page-main .content img {
    max-width: 100%;
    border-radius: 5px;
    margin: 20px 0;
}

/* 联系我们 */
.contact-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info-section h2 {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.contact-info-list {
    margin-bottom: 30px;
}

.contact-info-list li {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: var(--bg-light);
    margin-bottom: 15px;
    border-radius: 5px;
}

.contact-info-list i {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-info-list h4 {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.contact-form-section {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 5px;
}

.contact-form-section h2 {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.form-group label .required {
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 15px;
}

.form-actions .btn-primary,
.form-actions .btn-outline {
    flex: 1;
    text-align: center;
    border: none;
    cursor: pointer;
}

.map-section {
    margin-top: 50px;
}

.map-section iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 5px;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .banner {
        height: 400px;
    }
    
    .banner-content h2 {
        font-size: 28px;
    }
    
    .banner-content p {
        font-size: 16px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .advantage-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .page-sidebar {
        grid-template-columns: 1fr;
    }
    
    .contact-page {
        grid-template-columns: 1fr;
    }
    
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
}
