/* 产品页面专用样式 */
.products-hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #e53e3e 0%, #f56565 100%);
    color: white;
    text-align: center;
}

.products-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.products-hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.products-content {
    padding: 80px 0;
    background: #f7fafc;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.products-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.filter-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.filter-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.filter-option:hover {
    color: #e53e3e;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #e53e3e;
}

.filter-option span {
    cursor: pointer;
    font-size: 0.95rem;
    color: #4a5568;
}

.price-filter {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
}

.price-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.price-input:focus {
    outline: none;
    border-color: #e53e3e;
}

.price-apply-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.price-apply-btn:hover {
    background: #c53030;
}

.products-main {
    min-height: 600px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.toolbar-left {
    color: #718096;
    font-size: 0.95rem;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #4a5568;
    font-size: 0.9rem;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #e53e3e;
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #718096;
}

.view-btn.active,
.view-btn:hover {
    border-color: #e53e3e;
    color: #e53e3e;
    background: #fef5f5;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.product-card.featured {
    border: 2px solid #e53e3e;
}

.product-card.new {
    border: 2px solid #3182ce;
}

.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e53e3e;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-badge.new-badge {
    background: #3182ce;
}

.product-number {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-image {
    height: 200px;
    background: linear-gradient(135deg, #4a5568, #718096);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image i {
    font-size: 48px;
    color: white;
    opacity: 0.8;
}

.product-content {
    padding: 30px;
}

.product-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
}

.product-price {
    margin-bottom: 20px;
    text-align: center;
}

.price {
    font-size: 2.2rem;
    font-weight: 700;
    color: #e53e3e;
    line-height: 1;
}

.period {
    font-size: 1rem;
    color: #718096;
    margin-left: 5px;
}

.product-features {
    list-style: none;
    margin-bottom: 25px;
    padding: 0;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    color: #4a5568;
    font-size: 0.95rem;
}

.product-features i {
    color: #38a169;
    font-size: 14px;
    width: 16px;
}

.product-actions {
    display: flex;
    gap: 15px;
}

.btn-primary {
    flex: 1;
    background: #e53e3e;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #c53030;
}

.btn-secondary {
    flex: 1;
    background: transparent;
    color: #e53e3e;
    border: 2px solid #e53e3e;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #e53e3e;
    color: white;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 60px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 分页信息样式 */
.pageinfo {
    color: #718096;
    font-size: 0.9rem;
    margin-right: 20px;
    font-weight: 500;
}

.pageinfo label {
    color: #e53e3e;
    font-weight: 600;
}

/* 分页按钮基础样式 */
.pagefirst, .pageup, .pagedown, .pageend, .pagenum {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #4a5568;
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 36px;
    text-align: center;
    display: inline-block;
}

/* 当前页样式 */
.current {
    padding: 8px 12px;
    border-radius: 6px;
    color: white;
    background: #e53e3e;
    border: 1px solid #e53e3e;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
    display: inline-block;
}

/* 可点击链接样式 */
.pagefirst:hover, .pageup:hover, .pagedown:hover, .pageend:hover, .pagenum:hover {
    background: #e53e3e;
    color: white;
    border-color: #e53e3e;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.2);
}

/* 禁用状态样式 */
.pagefirst:disabled, .pageup:disabled {
    color: #cbd5e0;
    background: #f7fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.pagefirst:disabled:hover, .pageup:disabled:hover {
    background: #f7fafc;
    color: #cbd5e0;
    border-color: #e2e8f0;
    transform: none;
    box-shadow: none;
}

/* 旧的分页按钮样式保持兼容 */
.page-btn {
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #4a5568;
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    min-width: 48px;
    text-align: center;
}

.page-btn:hover {
    background: #e53e3e;
    color: white;
    border-color: #e53e3e;
}

.page-btn.current {
    background: #e53e3e;
    color: white;
    border-color: #e53e3e;
}

/* 列表视图样式 */
.products-grid.list-view {
    grid-template-columns: 1fr;
}

.product-card.list-view {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 30px;
    align-items: center;
    padding: 30px;
}

.product-card.list-view .product-image {
    height: 120px;
    margin: 0;
}

.product-card.list-view .product-content {
    padding: 0;
}

.product-card.list-view .product-price {
    text-align: right;
    margin: 0;
}

.product-card.list-view .product-actions {
    flex-direction: column;
    min-width: 150px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .products-sidebar {
        position: static;
        order: -1;
    }

    .filter-section {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .products-hero h1 {
        font-size: 2.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .toolbar-right {
        flex-direction: column;
        gap: 15px;
    }

    .filter-section {
        grid-template-columns: 1fr;
    }

    .product-card.list-view {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .product-card.list-view .product-price {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .products-hero h1 {
        font-size: 2rem;
    }

    .product-card {
        margin: 0 10px;
    }

    .products-toolbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* 产品规格样式 - 与首页保持一致 */
.product-icon {
    margin-bottom: 20px;
    text-align: center;
}

.product-icon i {
    font-size: 48px;
    color: #e53e3e;
}

.product-specs {
    margin-bottom: 25px;
    text-align: left;
}

.spec-row {
    display: flex;
    margin-bottom: 8px;
}

.spec-row:last-child {
    margin-bottom: 0;
}

.spec-item {
    display: flex;
    width: 50%;
    padding: 6px 0;
}

.spec-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
    min-width: 60px;
    margin-right: 10px;
}

.spec-value {
    font-size: 0.9rem;
    color: #2d3748;
    font-weight: 600;
}

/* 当只有一个spec-item时的样式 */
.spec-row .spec-item:only-child {
    width: 100%;
}

/* 更新产品卡片样式以匹配首页 */
.product-card .product-number {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-card h3 {
    text-align: center;
    margin-bottom: 20px;
}

.product-card .product-price {
    text-align: center;
    margin-bottom: 30px;
}

.product-card .btn {
    width: 100%;
    text-align: center;
    display: block;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.product-card .btn.btn-primary {
    background: #e53e3e;
    color: white;
}

.product-card .btn.btn-primary:hover {
    background: #c53030;
}

.product-card .btn.btn-outline {
    background: transparent;
    color: #e53e3e;
    border: 2px solid #e53e3e;
}

.product-card .btn.btn-outline:hover {
    background: #e53e3e;
    color: white;
}

/* 产品分类区域样式 */
.product-categories {
    margin-bottom: 60px;
    padding: 40px 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.categories-header {
    text-align: center;
    margin-bottom: 40px;
}

.categories-header h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.categories-header p {
    font-size: 1.1rem;
    color: #718096;
    margin: 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 40px;
}

.category-item {
    background: #f7fafc;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.category-item:hover {
    background: white;
    border-color: #e53e3e;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.15);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: transform 0.3s ease;
}

.category-item:hover .category-icon {
    transform: scale(1.1);
}

.category-icon i {
    font-size: 32px;
    color: white;
}

.category-item h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.category-item p {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 15px;
    line-height: 1.5;
}

.category-count {
    display: inline-block;
    background: #e53e3e;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
        gap: 20px;
    }
    
    .product-categories {
        margin-bottom: 40px;
        padding: 30px 0;
    }
    
    .categories-header h3 {
        font-size: 1.6rem;
    }
    
    .category-item {
        padding: 25px 15px;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
    }
    
    .category-icon i {
        font-size: 24px;
    }
}