/*
Theme Name: CNABKE Theme
Theme URI: https://www.cnabke.com/
Author: Theme Developer
Author URI: https://www.cnabke.com/
Description: 专业外贸建站主题，基于cnabke.com设计风格，完美支持企业展示、产品管理、文章发布等功能
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cnabke-theme
Tags: custom-header, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* ==================== CSS Reset ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

/* ==================== 通用样式 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.section-title .subtitle {
    font-size: 1.1rem;
    color: #666;
}

/* ==================== 导航栏 ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 10px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}

.logo span {
    color: #0066cc;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    display: block;
    padding: 5px 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #0066cc;
}

.nav-menu .current-menu-item a {
    color: #0066cc;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* ==================== 首页轮播 ==================== */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #fff;
    color: #0066cc;
}

.btn-primary:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-outline:hover {
    background-color: #fff;
    color: #0066cc;
}

/* ==================== 服务特色 ==================== */
.features {
    background-color: #f8f9fa;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    color: #0066cc;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.feature-card p {
    color: #666;
    line-height: 1.8;
}

/* ==================== 产品展示 ==================== */
.products {
    background-color: #fff;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    background-color: #f0f0f0;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-content {
    padding: 30px;
}

.product-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.product-content .price {
    font-size: 1.3rem;
    color: #0066cc;
    font-weight: 700;
    margin-bottom: 15px;
}

.product-content .btn {
    width: 100%;
    padding: 12px;
}

/* ==================== 关于我们 ==================== */
.about {
    background-color: #fff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: #1a1a1a;
}

.about-text p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #0066cc;
}

.stat-label {
    font-size: 1.1rem;
    color: #666;
}

/* ==================== 客户案例 ==================== */
.cases {
    background-color: #f8f9fa;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.case-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.case-image {
    width: 100%;
    height: 200px;
    background-color: #f0f0f0;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-content {
    padding: 25px;
}

.case-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.case-content .category {
    color: #0066cc;
    font-size: 0.9rem;
}

/* ==================== 新闻资讯 ==================== */
.news {
    background-color: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.news-image {
    width: 100%;
    height: 200px;
    background-color: #f0f0f0;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 25px;
}

.news-content .meta {
    display: flex;
    gap: 15px;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.news-content h3 a {
    color: #1a1a1a;
    text-decoration: none;
}

.news-content h3 a:hover {
    color: #0066cc;
}

.news-content .read-more {
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
}

/* ==================== 联系我们 ==================== */
.contact {
    background-color: #f8f9fa;
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0066cc;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ==================== 页脚 ==================== */
.footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #fff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #0066cc;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    color: #999;
}

.footer-bottom a {
    color: #0066cc;
    text-decoration: none;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .contact-container {
        padding: 30px;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .product-image,
    .news-image,
    .case-image {
        height: 200px;
    }
}

/* ==================== 动画效果 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ==================== 表单验证 ==================== */
.form-error {
    border-color: #dc3545 !important;
}

.form-success {
    border-color: #28a745 !important;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #0066cc;
    color: #fff;
}

.pagination .current {
    background-color: #0066cc;
    color: #fff;
}

/* ==================== 404页面 ==================== */
.error-404 {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 0;
}

.error-404 h1 {
    font-size: 8rem;
    font-weight: 900;
    color: #0066cc;
    line-height: 1;
    margin-bottom: 20px;
}

.error-404 h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.error-404 p {
    color: #666;
    margin-bottom: 30px;
}

/* ==================== 搜索页面 ==================== */
.search-results {
    padding: 40px 0;
}

.search-form {
    max-width: 600px;
    margin: 0 auto 40px;
    display: flex;
    gap: 10px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
}

.search-form button {
    padding: 15px 30px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: #0052a3;
}

/* ==================== 评论 ==================== */
.comments-area {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.comment-author {
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.comment-meta {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.comment-content {
    color: #666;
    line-height: 1.8;
}

.comment-reply {
    display: inline-block;
    padding: 8px 20px;
    background-color: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.comment-reply:hover {
    background-color: #0052a3;
}

/* ==================== 表格 ==================== */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background-color: #f8f9fa;
    font-weight: 700;
    color: #1a1a1a;
}

table tr:hover {
    background-color: #f8f9fa;
}

/* ==================== 引用 ==================== */
blockquote {
    border-left: 4px solid #0066cc;
    padding: 20px 30px;
    margin: 30px 0;
    background-color: #f8f9fa;
    font-style: italic;
    color: #666;
}

blockquote p {
    margin: 0;
    line-height: 1.8;
}

/* ==================== 代码块 ==================== */
pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

code {
    background-color: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: "Courier New", monospace;
    color: #e83e8c;
}

pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* ==================== 列表 ==================== */
ul,
ol {
    margin: 20px 0;
    padding-left: 40px;
}

ul li,
ol li {
    margin-bottom: 10px;
    line-height: 1.6;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

/* ==================== 图片 ==================== */
img {
    max-width: 100%;
    height: auto;
}

.alignleft {
    float: left;
    margin: 10px 20px 10px 0;
}

.alignright {
    float: right;
    margin: 10px 0 10px 20px;
}

.aligncenter {
    display: block;
    margin: 20px auto;
}
