/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

a:hover {
    color: #c00;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #c00;
    color: #fff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #a00;
    color: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #c00;
}

/* 顶部导航栏 */
.top-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo h1 {
    font-size: 24px;
    color: #c00;
    font-weight: bold;
}

.logo p {
    font-size: 12px;
    color: #666;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    display: block;
    padding: 30px 15px;
    font-size: 16px;
}

.main-nav ul li.active a,
.main-nav ul li:hover a {
    color: #c00;
}

.main-nav ul li a i {
    margin-right: 5px;
}

/* 下拉菜单 */
.dropdown-content {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    background-color: #fff;
    width: 600px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-top: 3px solid #c00;
    padding: 20px;
    z-index: 999;
}

.dropdown:hover .dropdown-content {
    display: flex;
    flex-wrap: wrap;
}

.dropdown-column {
    flex: 1;
    min-width: 150px;
    margin-bottom: 15px;
}

.dropdown-column h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #c00;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.dropdown-column a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
}

.dropdown-column a:hover {
    color: #c00;
    padding-left: 5px;
}

.sub-column {
    margin-bottom: 15px;
}

.sub-column h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #666;
}

.user-actions {
    display: flex;
    align-items: center;
}

.search-btn {
    font-size: 18px;
    margin-right: 20px;
    color: #666;
}

.search-btn:hover {
    color: #c00;
}

.login-btn {
    padding: 8px 20px;
    border: 1px solid #c00;
    color: #c00;
    border-radius: 4px;
}

.login-btn:hover {
    background-color: #c00;
    color: #fff;
}

/* 搜索框 */
.search-container {
    background-color: #f5f5f5;
    padding: 15px 0;
    display: none;
}

.search-container .container {
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-container button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
}

/* 轮播图 */
.hero-slider {
    height: 500px;
    position: relative;
    overflow: hidden;
}

.slider-container {
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: absolute;
    bottom: 100px;
    left: 100px;
    max-width: 500px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 30px;
    color: #fff;
}

.slide-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 20px;
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}

.slider-controls button {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-controls button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
}

.dot.active {
    background-color: #fff;
}

/* 特色分类 */
.featured-categories {
    padding: 60px 0;
    background-color: #fff;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-card h3 {
    padding: 15px;
    font-size: 18px;
    text-align: center;
}

.category-card p {
    padding: 0 15px 15px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* 热门推荐 */
.hot-recommendations {
    padding: 60px 0;
    background-color: #f5f5f5;
}

.recommendations-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #c00;
    border-bottom-color: #c00;
}

.recommendations-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.tab-pane {
    display: none;
    width: 100%;
}

.tab-pane.active {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.product-card {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.price {
    font-size: 20px;
    color: #c00;
    font-weight: bold;
    margin-bottom: 10px;
}

.desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.rating {
    margin-bottom: 15px;
    color: #ffc107;
}

.rating span {
    color: #666;
    font-size: 14px;
    margin-left: 10px;
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background-color: #c00;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background-color: #a00;
}

/* 文章推荐 */
.article-recommendations {
    padding: 60px 0;
    background-color: #fff;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.article-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.read-more {
    font-size: 14px;
    color: #c00;
}

.read-more:hover {
    text-decoration: underline;
}

/* 评论区域 */
.comments-section {
    padding: 60px 0;
    background-color: #f5f5f5;
}

/* 页脚 */
.main-footer {
    background-color: #222;
    color: #fff;
    padding: 60px 0 0;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.footer-column p {
    font-size: 14px;
    color: #bbb;
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #bbb;
    font-size: 14px;
}

.footer-column ul li a:hover {
    color: #fff;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: #333;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #c00;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #444;
    font-size: 14px;
    color: #bbb;
}

.footer-bottom a {
    color: #bbb;
}

.footer-bottom a:hover {
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .categories-grid,
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-nav ul li a {
        padding: 30px 10px;
    }
}

@media (max-width: 768px) {
    .top-header .container {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav ul li a {
        padding: 15px 10px;
    }
    
    .user-actions {
        margin-top: 15px;
    }
    
    .hero-slider {
        height: 400px;
    }
    
    .slide-content {
        left: 50%;
        transform: translateX(-50%);
        bottom: 50px;
        max-width: 90%;
    }
    
    .categories-grid,
    .articles-grid,
    .footer-columns {
        grid-template-columns: 1fr;
    }
    
    .dropdown-content {
        width: 100%;
        left: 0;
    }
}
