/* 分类页面样式 */

.main-content {
    padding: 20px 0 60px;
    background-color: #f5f5f5;
}

.category-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    align-items: start;
}

/* 侧边栏样式 */
.sidebar {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
}

.filter-section h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b35;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    color: #555;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: bold;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-link {
    display: block;
    color: #666;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-link:hover,
.filter-link.active {
    background-color: #ff6b35;
    color: white;
}

/* 热门推荐 */
.hot-recommendations {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.hot-recommendations h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 15px;
}

.hot-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hot-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.hot-item:hover {
    background-color: #f8f9fa;
}

.hot-item img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.hot-item-info {
    flex: 1;
}

.hot-item-title {
    font-size: 13px;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-item-price {
    color: #ff6b35;
    font-size: 14px;
    font-weight: bold;
}

/* 主要内容区域 */
.content-area {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.category-title h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 5px;
}

.result-count {
    color: #666;
    font-size: 14px;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options label {
    color: #666;
    font-size: 14px;
}

.sort-options select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

.sort-options select:focus {
    outline: none;
    border-color: #ff6b35;
}

/* 商品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.product-item {
    background-color: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #ff6b35;
}

.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;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-series {
    color: #999;
    font-size: 12px;
    margin-bottom: 8px;
}

.product-price {
    color: #ff6b35;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #666;
}

.stars {
    color: #ffc107;
}

.product-auth-tip {
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background-color: #fff6f1;
    color: #a15c3b;
    font-size: 12px;
    line-height: 1.6;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    flex: 1;
    text-align: center;
    border-radius: 4px;
}

/* 商品标签 */
.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    color: white;
    font-weight: bold;
}

.badge-new {
    background-color: #28a745;
}

.badge-hot {
    background-color: #dc3545;
}

.badge-sale {
    background-color: #ffc107;
    color: #333;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ff6b35;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state img {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #999;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .category-layout {
        grid-template-columns: 200px 1fr;
        gap: 20px;
    }
    
    .sidebar {
        padding: 15px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .category-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar {
        position: static;
        order: 2;
        margin-top: 20px;
    }
    
    .content-area {
        order: 1;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sort-options {
        width: 100%;
        justify-content: flex-end;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .filter-section {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .hot-recommendations {
        margin-top: 0;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }
    
    .hot-items {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .hot-item {
        flex-direction: column;
        text-align: center;
    }
    
    .hot-item img {
        width: 100%;
        height: 120px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px 0 40px;
    }
    
    .content-area,
    .sidebar {
        padding: 15px;
        margin: 0 -5px;
        border-radius: 0;
    }
    
    .category-header {
        margin-bottom: 20px;
    }
    
    .category-title h1 {
        font-size: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-item img {
        height: 150px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 16px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .filter-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .hot-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
} 
