/* ============================================================
   工业清洗剂双语企业官网 - 统一响应式现代化 UI 样式表
   ============================================================ */

/* 基础重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a3a6b;
    --primary-light: #2a5a9b;
    --accent: #e8a830;
    --accent-hover: #d49520;
    --text: #333;
    --text-light: #666;
    --bg: #f8f9fa;
    --white: #fff;
    --border: #e0e0e0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 8px;
    --max-width: 1200px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

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

/* ========== 顶部信息栏 ========== */
.top-bar {
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    padding: 8px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-lang a { color: #aaa; margin: 0 5px; }
.top-bar-lang a.active { color: var(--accent); font-weight: bold; }
.top-bar-lang .sep { color: #555; }

/* ========== 主导航 ========== */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    padding-bottom: 15px;
}
.logo h1 { font-size: 22px; color: var(--primary); }
.main-nav ul { display: flex; gap: 30px; }
.main-nav a {
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--primary);
}

/* ========== 页面横幅 ========== */
.page-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    text-align: center;
    padding: 60px 20px;
}
.page-banner h1 { font-size: 36px; margin-bottom: 10px; }
.page-banner p { font-size: 18px; opacity: 0.9; }

/* ========== 通用区块 ========== */
.section {
    padding: 60px 0;
}
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 {
    font-size: 30px;
    color: var(--primary);
    margin-bottom: 10px;
}
.section-title p {
    color: var(--text-light);
    font-size: 16px;
}

/* ========== 首页轮播 ========== */
.banner-slider {
    position: relative;
    overflow: hidden;
    height: 420px;
}
.banner-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s;
}
.banner-slide.active { opacity: 1; }
.banner-slide .slide-content {
    text-align: center;
    color: var(--white);
    background: rgba(0,0,0,0.5);
    padding: 40px 60px;
    border-radius: var(--radius);
}
.banner-slide h2 { font-size: 36px; margin-bottom: 15px; }
.banner-slide p { font-size: 18px; }
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}
.banner-dots span {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}
.banner-dots span.active { background: var(--accent); }

/* ========== 产品卡片网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.product-card .card-img {
    height: 220px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card .card-body {
    padding: 20px;
}
.product-card .card-body h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--primary);
}
.product-card .card-body p {
    font-size: 14px;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.product-card .card-footer .btn {
    padding: 6px 16px;
    background: var(--primary);
    color: var(--white);
    border-radius: 4px;
    font-size: 14px;
    transition: 0.3s;
}
.product-card .card-footer .btn:hover {
    background: var(--primary-light);
}

/* ========== 新闻列表 ========== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}
.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}
.news-card:hover { transform: translateY(-3px); }
.news-card .news-img {
    height: 200px;
    background: #eee;
    overflow: hidden;
}
.news-card .news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-card .news-body {
    padding: 20px;
}
.news-card .news-body .news-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--accent);
    color: var(--white);
    font-size: 12px;
    border-radius: 3px;
    margin-bottom: 8px;
}
.news-card .news-body h3 {
    font-size: 18px;
    margin-bottom: 8px;
}
.news-card .news-body .news-date {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}
.news-card .news-body p {
    font-size: 14px;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 14px;
    transition: 0.3s;
}
.pagination a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.pagination .active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ========== 详情页 ========== */
.detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.detail-gallery .main-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
}
.detail-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.detail-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s;
}
.detail-thumbs img:hover, .detail-thumbs img.active {
    border-color: var(--accent);
}
.detail-info h1 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 15px;
}
.detail-info .meta {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
}
.detail-info .desc {
    margin-bottom: 20px;
    line-height: 1.8;
}
.detail-info .btn-download {
    display: inline-block;
    padding: 10px 24px;
    background: var(--accent);
    color: var(--white);
    border-radius: 4px;
    font-weight: 500;
    transition: 0.3s;
}
.detail-info .btn-download:hover {
    background: var(--accent-hover);
}
.detail-content {
    grid-column: 1 / -1;
    line-height: 1.8;
}
.detail-content h2 {
    font-size: 22px;
    color: var(--primary);
    margin: 30px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
}

/* ========== 关于我们 ========== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}
.about-content p {
    line-height: 1.8;
    margin-bottom: 15px;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.gallery-item .gallery-caption {
    padding: 10px;
    text-align: center;
    font-size: 14px;
    color: var(--text);
}

/* ========== 联系我们 ========== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.contact-info {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.contact-info h3 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 20px;
}
.contact-info p {
    margin-bottom: 10px;
    font-size: 15px;
}
.contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.contact-form .form-group {
    margin-bottom: 20px;
}
.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.contact-form textarea {
    height: 120px;
    resize: vertical;
}
.contact-form .captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.contact-form .captcha-row input {
    flex: 1;
}
.contact-form .captcha-row img {
    cursor: pointer;
    border-radius: 4px;
}
.contact-form .btn-submit {
    padding: 12px 30px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}
.contact-form .btn-submit:hover {
    background: var(--primary-light);
}
.alert {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ========== 产品分类选项卡 ========== */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}
.category-tabs a {
    padding: 8px 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-size: 14px;
    transition: 0.3s;
}
.category-tabs a:hover, .category-tabs a.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ========== 搜索框 ========== */
.search-box {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto 30px;
}
.search-box input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 15px;
}
.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}
.search-box button {
    padding: 10px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}
.search-box button:hover {
    background: var(--primary-light);
}

/* ========== 页脚 ========== */
.main-footer {
    background: var(--primary);
    color: #ccc;
    padding: 50px 0 0;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-col h4 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 18px;
}
.footer-col p, .footer-col li {
    font-size: 14px;
    line-height: 1.8;
}
.footer-col a {
    color: #aaa;
}
.footer-col a:hover {
    color: var(--accent);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }
    .main-nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        gap: 0;
    }
    .main-nav ul.show { display: flex; }
    .main-nav li { padding: 10px 0; border-bottom: 1px solid var(--border); }
    .banner-slider { height: 280px; }
    .banner-slide .slide-content { padding: 20px; }
    .banner-slide h2 { font-size: 24px; }
    .detail-wrapper { grid-template-columns: 1fr; }
    .about-content { grid-template-columns: 1fr; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .page-banner { padding: 40px 20px; }
    .page-banner h1 { font-size: 28px; }
    .section-title h2 { font-size: 24px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .news-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .top-bar { font-size: 12px; }
    .top-bar .container { flex-direction: column; gap: 5px; }
    .logo h1 { font-size: 18px; }
    .banner-slider { height: 220px; }
    .banner-slide h2 { font-size: 20px; }
    .banner-slide p { font-size: 14px; }
}