/* 产品页面专用样式 */

/* 页面头部样式 */
.page-header {
    background: linear-gradient(135deg, #0d111e 0%, #1a1f3a 50%, #2d3748 100%);
    color: #fff;
    padding: 120px 0 80px;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 123, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 123, 255, 0.1) 0%, transparent 50%);
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 20px;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 10px;
    color: #b3b9c6;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #b3b9c6;
    position: relative;
    z-index: 1;
}

/* 分类导航样式 */
.category-nav {
    background: #fff;
    padding: 30px 0;
    border-bottom: 1px solid #e1e5e9;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.category-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e1e5e9;
    background: #fff;
    color: #666;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.search-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#sortSelect {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sortSelect:focus {
    outline: none;
    border-color: #007bff;
}

/* 产品列表样式 */
.products-listing {
    padding: 60px 0;
    background: #f8f9fa;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.product-item {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 200px;
    background: linear-gradient(135deg, #007bff, #00d4ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    position: relative;
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.product-badge.new {
    background: #28a745;
}

.product-badge {
    background: #ff6b35;
}

.product-info {
    padding: 25px;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-brief {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.spec-item {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #555;
    border: 1px solid #e1e5e9;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #007bff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.page-btn {
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    background: #fff;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-btn:hover,
.page-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

/* 产品筛选动画 */
.product-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.product-item.visible {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    font-size: 1rem;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .category-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .search-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 100px 0 60px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .category-nav {
        padding: 20px 0;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .btn-sm {
        width: 100%;
        justify-content: center;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 产品比较功能（可选） */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1f3a;
    color: #fff;
    padding: 15px 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.compare-bar.show {
    transform: translateY(0);
}

.compare-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compare-items {
    display: flex;
    gap: 10px;
}

.compare-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.compare-actions {
    display: flex;
    gap: 10px;
}

.compare-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.compare-btn.primary {
    background: #007bff;
    color: #fff;
}

.compare-btn.secondary {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
}

/* 产品选择复选框 */
.product-checkbox {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 20px;
    height: 20px;
    appearance: none;
    border: 2px solid #fff;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-checkbox:checked {
    background: #007bff;
    border-color: #007bff;
}

.product-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}