/* 分类页面样式 */
.category-page {
    padding: 2rem 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.category-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.sidebar {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    height: fit-content;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-link {
    display: block;
    padding: 0.5rem;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.category-link:hover,
.category-link.active {
    background: #e74c3c;
    color: white;
}

.size-filters,
.color-filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
}

.products-section {
    min-height: 500px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

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

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-number.active,
.page-number:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

/* 商品详情页样式 */
.product-page {
    padding: 2rem 0;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    position: relative;
    height: 500px;
    border-radius: 10px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-zoom {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.8);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
}

.thumbnail-images {
    display: flex;
    gap: 1rem;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail.active {
    border-color: #e74c3c;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.current-price {
    font-size: 2rem;
    font-weight: bold;
    color: #e74c3c;
}

.original-price {
    font-size: 1.2rem;
    color: #6c757d;
    text-decoration: line-through;
}

.discount-badge {
    background: #28a745;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #555;
}

.product-options {
    margin-bottom: 2rem;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.color-options,
.size-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-option,
.size-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
}

.size-option {
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: white;
}

.color-option.active,
.size-option.active {
    border-color: #e74c3c;
    transform: scale(1.1);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: #e9ecef;
}

#quantity {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.add-to-cart {
    flex: 2;
    min-width: 200px;
}

.buy-now {
    flex: 2;
    min-width: 200px;
}

.product-features {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #28a745;
    font-weight: 500;
}

.feature i {
    font-size: 1.2rem;
}

/* 商品标签页 */
.product-tabs {
    margin-bottom: 3rem;
}

.tab-headers {
    display: flex;
    border-bottom: 2px solid #f8f9fa;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-header {
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-header.active,
.tab-header:hover {
    color: #e74c3c;
    border-bottom-color: #e74c3c;
}

.tab-content {
    display: none;
    padding: 2rem 0;
}

.tab-content.active {
    display: block;
}

.size-chart {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.size-chart th,
.size-chart td {
    padding: 1rem;
    text-align: center;
    border: 1px solid #ddd;
}

.size-chart th {
    background: #f8f9fa;
    font-weight: 600;
}

.review-item {
    padding: 1.5rem;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.reviewer-name {
    font-weight: 600;
}

.review-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.shipping-option {
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.shipping-option h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .products-section {
        order: 1;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .main-image {
        height: 300px;
    }

    .product-actions {
        flex-direction: column;
    }

    .add-to-cart,
    .buy-now {
        min-width: auto;
    }

    .tab-headers {
        flex-direction: column;
    }

    .tab-header {
        text-align: left;
        border-bottom: 1px solid #eee;
        border-right: none;
    }

    .tab-header.active {
        border-bottom-color: #eee;
        background: #f8f9fa;
    }
}