/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 通用按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ff6b35;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background-color: #e55a2b;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* 头部样式 */
.header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: #f8f9fa;
    padding: 8px 0;
    font-size: 12px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left span {
    margin-right: 15px;
    color: #666;
}

.top-left a, .top-right a {
    color: #333;
    text-decoration: none;
    margin: 0 5px;
}

.top-left a:hover, .top-right a:hover {
    color: #ff6b35;
}

.wechat-tip {
    color: #666;
    margin-left: 15px;
}

.main-header {
    padding: 15px 0;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo h1 {
    color: #ff6b35;
    font-size: 28px;
    font-weight: bold;
}

/* 导航菜单 */
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
    margin: 0 20px;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    padding: 10px 0;
    display: block;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ff6b35;
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 150px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: normal;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
}

/* 搜索和购物车 */
.search-cart {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.search-box input {
    padding: 8px 12px;
    border: none;
    outline: none;
    width: 200px;
}

.search-box button {
    padding: 8px 15px;
    background-color: #ff6b35;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #e55a2b;
}

.cart {
    position: relative;
}

.cart a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 18px;
}

.cart-icon {
    margin-right: 5px;
}

.cart-count {
    background-color: #ff6b35;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    position: absolute;
    top: -8px;
    right: -8px;
}

/* 页面标题 */
.section-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #ff6b35;
}

/* 商品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.product-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
}

.product-price {
    color: #ff6b35;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
}

.stars {
    color: #ffc107;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    flex: 1;
    text-align: center;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: white;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 40px 0;
}

.footer-section h3 {
    color: #ff6b35;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ff6b35;
}

.footer-section p {
    color: #ccc;
    margin-bottom: 8px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-link {
    color: #ccc;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: #ff6b35;
    border-color: #ff6b35;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding: 20px 0;
    text-align: center;
    color: #999;
    font-size: 12px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #ff6b35;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 20px;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #e55a2b;
    transform: translateY(-3px);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

.pagination .current {
    background-color: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

/* 面包屑导航 */
.breadcrumb {
    background-color: white;
    padding: 15px 0;
    margin-bottom: 20px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 10px;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '>';
    margin-left: 10px;
    color: #666;
}

.breadcrumb-list a {
    color: #666;
    text-decoration: none;
}

.breadcrumb-list a:hover {
    color: #ff6b35;
}

.breadcrumb-list .current {
    color: #333;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li {
        margin: 5px 10px;
    }
    
    .search-cart {
        width: 100%;
        justify-content: center;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .product-item img {
        height: 150px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 16px;
    }
} 