/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header,
.header-top {
    background-color: #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    padding: 20px 0 !important;
}

.header-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

.language-switcher a {
    margin-right: 10px !important;
    text-decoration: none !important;
    color: #333 !important;
}

.language-switcher a.active {
    font-weight: bold !important;
    color: #007bff !important;
}

.user-links a {
    margin-left: 15px !important;
    text-decoration: none !important;
    color: #333 !important;
}

.header-middle {
    text-align: center !important;
    margin-bottom: 20px !important;
}

.header-middle h1 {
    font-size: 24px !important;
    margin-bottom: 15px !important;
}

.search-form {
    display: flex !important;
    justify-content: center !important;
}

.search-form input {
    width: 400px !important;
    padding: 10px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px 0 0 4px !important;
}

.search-form button {
    padding: 10px 20px !important;
    background-color: #007bff !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 4px 4px 0 !important;
    cursor: pointer !important;
}

.header-bottom nav ul {
    display: flex !important;
    justify-content: center !important;
    list-style: none !important;
}

.header-bottom nav ul li {
    margin: 0 15px !important;
}

.header-bottom nav ul li a {
    text-decoration: none !important;
    color: #333 !important;
    font-weight: 500 !important;
}

/* 主内容样式 */
main {
    padding: 40px 0;
}

/* 商品列表样式 */
.products-section {
    margin-bottom: 60px;
}

.products-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

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

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 15px;
    font-size: 16px;
}

.product-card p {
    padding: 0 15px 15px;
    font-size: 14px;
    color: #666;
}

.product-price {
    padding: 0 15px 15px;
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
}

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

.product-actions button {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.product-actions button:hover {
    background-color: #e9ecef;
}

/* 新闻列表样式 */
.news-section {
    margin-bottom: 60px;
}

.news-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.news-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.news-card h3 {
    padding: 15px;
    font-size: 16px;
}

.news-card p {
    padding: 0 15px 15px;
    font-size: 14px;
    color: #666;
}

.news-date {
    padding: 0 15px 10px;
    font-size: 12px;
    color: #999;
}

.read-more {
    display: inline-block;
    padding: 0 15px 15px;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

/* 商品详情样式 */
.product-detail-section {
    margin-bottom: 60px;
}

.product-detail {
    display: flex;
    gap: 40px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-image img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.product-info h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 15px;
}

.product-stock {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.product-description h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-description p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 30px;
}

/* 商品评价样式 */
.product-reviews {
    margin-top: 40px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-reviews h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.review-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: bold;
}

.review-date {
    font-size: 12px;
    color: #999;
}

.review-rating .star {
    color: #ddd;
    font-size: 16px;
}

.review-rating .star.active {
    color: #ffc107;
}

.review-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* 相关商品样式 */
.related-products-section {
    margin-bottom: 60px;
}

.related-products-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

/* 搜索结果样式 */
.search-results-section {
    margin-bottom: 60px;
}

.search-results-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #fff;
}

.footer-column p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #ccc;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 14px;
    color: #ccc;
}

/* 客服系统样式 */
.customer-support {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 9999 !important;
    display: block !important;
}

.support-btn {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background-color: #007bff !important;
    color: white !important;
    border: none !important;
    font-size: 24px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.4) !important;
    transition: all 0.3s ease !important;
    display: block !important;
}

.support-btn:hover {
    background-color: #0056b3 !important;
    transform: scale(1.1) !important;
}

.support-chat {
    position: absolute !important;
    bottom: 70px !important;
    right: 0 !important;
    width: 350px !important;
    background-color: white !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
    display: none !important;
    overflow: hidden !important;
    z-index: 9999 !important;
}

.chat-header {
    background-color: #007bff !important;
    color: white !important;
    padding: 15px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.chat-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.close-btn {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 20px !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.chat-messages {
    height: 300px !important;
    overflow-y: auto !important;
    padding: 15px !important;
    background-color: #f8f9fa !important;
}

.message {
    margin-bottom: 15px !important;
    max-width: 80% !important;
    padding: 10px 15px !important;
    border-radius: 18px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

.bot-message {
    background-color: white !important;
    border: 1px solid #e9ecef !important;
    border-radius: 18px 18px 18px 4px !important;
    align-self: flex-start !important;
}

.user-message {
    background-color: #007bff !important;
    color: white !important;
    border-radius: 18px 18px 4px 18px !important;
    align-self: flex-end !important;
    margin-left: auto !important;
}

.chat-input {
    display: flex !important;
    padding: 10px !important;
    border-top: 1px solid #e9ecef !important;
    align-items: center !important;
}

.chat-input input[type="text"] {
    flex: 1 !important;
    padding: 10px !important;
    border: 1px solid #ced4da !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    outline: none !important;
    transition: border-color 0.3s ease !important;
}

.chat-input input[type="text"]:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.attach-btn, .send-btn {
    background: none !important;
    border: none !important;
    font-size: 16px !important;
    color: #6c757d !important;
    cursor: pointer !important;
    padding: 8px !important;
    margin-left: 5px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.attach-btn:hover, .send-btn:hover {
    background-color: #e9ecef !important;
    color: #007bff !important;
}

.send-btn {
    color: #007bff !important;
}

.send-btn:hover {
    background-color: #007bff !important;
    color: white !important;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-detail {
        flex-direction: column;
    }
    
    .product-image img {
        width: 100%;
        height: auto;
    }
    
    .support-chat {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-middle h1 {
        font-size: 20px;
    }
    
    .search-form input {
        width: 300px;
    }
    
    .header-bottom nav ul {
        flex-wrap: wrap;
    }
    
    .header-bottom nav ul li {
        margin: 5px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
    
    .customer-support {
        bottom: 20px;
        right: 20px;
    }
    
    .support-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .support-chat {
        width: 280px;
        bottom: 60px;
    }
    
    .chat-messages {
        height: 250px;
    }
}
