/* 首页样式 */

/* 产品网格样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 首页产品4列 */
    gap: 15px;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

/* 新闻网格样式 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 首页新闻2列 */
    gap: 15px;
    padding: 20px;
}

/* 产品网格标题样式 */
.section-title {
    text-align: center;
    margin: 40px 0 20px;
    font-size: 2rem;
    color: #333;
}

/* 产品/新闻项通用样式 */
.product-item, .news-item {
    background: #f4f4f4;
    padding: 20px;
    text-align: center;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s ease;
}

.product-item:hover, .news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 产品项内部元素样式 */
.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.product-name {
    padding: 1rem;
    text-align: center;
    color: #444;
}

/* 区块样式 */
.about-preview,
.product-section,
.news-section,
.why-choose-us {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 为什么选择我们样式 */
.why-choose-us h2 {
    text-align: left;
    margin-left: 0;
    padding-left: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.advantage-item {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.advantage-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.advantage-item h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #222;
}

.advantage-item p {
    line-height: 1.6;
    color: #666;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .advantage-item {
        padding: 20px;
    }
}

/* 关于预览内容样式 */
.about-preview-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.about-preview-img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 区块标题样式 */
.about-preview h2,
.product-section h2,
.news-section h2 {
    text-align: left;
    margin-left: 0;
    padding-left: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* 联系表单样式 */
.contact-form {
    padding: 20px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-form h2 {
    text-align: center;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.contact-form button {
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background: #555;
}

/* 移动端响应式适配 */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr; /* 移动端产品1列 */
        padding: 1rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr; /* 移动端新闻1列 */
    }

    .product-grid h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .about-preview {
        padding: 0 20px 15px;
    }
    
    .about-preview-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-preview-img {
        width: 100%;
        height: auto;
    }

    .contact-form {
        padding: 15px 20px;
    }
}


