/* 商品列表页面样式 */

.products-main {
    margin-top: 70px;
    padding: 40px 0;
    background: #f8f9fa;
    min-height: calc(100vh - 70px);
}

.breadcrumb {
    margin-bottom: 30px;
    color: #666;
}

.breadcrumb a {
    color: #04c484;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.products-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

/* 左侧筛选栏 */
.products-sidebar {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item {
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: #666;
}

.filter-item:hover {
    background: #f0fdf7;
    color: #04c484;
}

.filter-item.active {
    background: #04c484;
    color: white;
}

.selected-filters {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #04c484;
}

.selected-filters h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    background: #e8f5e9;
    color: #04c484;
    border-radius: 15px;
    font-size: 12px;
}

.filter-tag .remove {
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-clear {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.3s;
}

.btn-clear:hover {
    border-color: #ff4444;
    color: #ff4444;
}

/* 右侧商品内容区 */
.products-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 系列筛选条 - 横向滚动 */
.series-filter-bar {
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.series-scroll-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    padding: 5px 0;
}

.series-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome Safari */
}

.series-name-item {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    user-select: none;
}

.series-name-item:hover {
    background-color: #e8f5e9;
    color: #04c484;
}

.series-name-item.active {
    background-color: #04c484;
    color: white;
    font-weight: 600;
}

.series-name-item:active {
    opacity: 0.8;
    transform: scale(0.98);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.products-count {
    font-size: 16px;
    color: #666;
}

.products-count span {
    color: #04c484;
    font-weight: bold;
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-sort label {
    font-size: 14px;
    color: #666;
}

.products-sort select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

/* 商品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    background: white;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-color: #04c484;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f8f9fa;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 20px;
    color: #ff4444;
    font-weight: bold;
}

.product-price::before {
    content: '¥';
    font-size: 14px;
}

.product-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.page-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    border-color: #04c484;
    color: #04c484;
}

.page-btn.active {
    background: #04c484;
    color: white;
    border-color: #04c484;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .products-container {
        grid-template-columns: 1fr;
    }
    
    .products-sidebar {
        position: static;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-image {
        height: 150px;
    }
}
