/*
Theme Name: GeneratePress
Theme URI: https://generatepress.com
Author: Tom Usborne
Author URI: https://generatepress.com/about
Description: GeneratePress is a lightweight WordPress theme built with a focus on speed and usability. Performance is important to us, which is why a fresh GeneratePress install adds less than 10kb (gzipped) to your page size. We take full advantage of the block editor (Gutenberg), which gives you more control over creating your content. If you use page builders, GeneratePress is the right theme for you. It is completely compatible with all major page builders, including Beaver Builder and Elementor. Thanks to our emphasis on WordPress coding standards, we can boast full compatibility with all well-coded plugins, including WooCommerce. GeneratePress is fully responsive, uses valid HTML/CSS, and is translated into over 25 languages by our amazing community of users. A few of our many features include 60+ color controls, powerful dynamic typography, 5 navigation locations, 5 sidebar layouts, dropdown menus (click or hover), and 9 widget areas. Learn more and check out our powerful premium version at https://generatepress.com
Version: 3.6.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: generatepress
Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options

GeneratePress, Copyright 2014-2025 EDGE22 Studios LTD.
GeneratePress is distributed under the terms of the GNU GPL

GeneratePress is based on Underscores http://underscores.me/, (C) 2012-2025 Automattic, Inc.

Actual CSS can be found in /assets/css/ folder.
*/
/* 分类页面样式 */
.woocommerce-category-page {
    margin: 0 auto;
    padding: 20px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 分类头部 */
.category-header {
    margin-bottom: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.category-banner {
    display: flex;
    align-items: center;
    min-height: 200px;
    padding: 30px;
}

.category-image {
    flex: 0 0 200px;
    margin-right: 30px;
}

.category-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.category-info {
    flex: 1;
}

.category-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.category-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

/* 相关分类 */
.related-categories {
    margin-bottom: 40px;
}

.related-categories h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.related-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.related-category-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-category-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-category-item a {
    text-decoration: none;
    color: #333;
    display: block;
}

.related-category-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
}

.related-category-item span {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.related-category-item small {
    color: #666;
    font-size: 0.9rem;
}

/* 产品表格 */
.products-table-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.table-header h3 {
    font-size: 1.3rem;
    color: #333;
    margin: 0;
}

.table-controls {
    display: flex;
    gap: 15px;
}

.table-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
}

.products-table-wrapper {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.products-table th,
.products-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.products-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

.product-image {
    width: 80px;
    text-align: center;
}

.product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.product-name {
    min-width: 200px;
}

.product-name a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.product-name a:hover {
    color: #007cba;
}

.product-excerpt {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
}

.product-sku {
    font-family: monospace;
    color: #666;
}

.product-price {
    font-weight: 600;
    color: #27ae60;
}

.product-stock .in-stock {
    color: #27ae60;
    font-weight: 500;
}

.product-stock .out-of-stock {
    color: #e74c3c;
    font-weight: 500;
}

.product-rating {
    width: 120px;
}

.star-rating {
    display: flex;
    align-items: center;
}

.no-rating {
    color: #999;
    font-size: 0.85rem;
}

.product-action {
    width: 140px;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background: #007cba;
    color: #fff;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #545b62;
}

.no-products {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 分页 */
.products-pagination {
    padding: 20px 30px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.products-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.products-pagination .page-numbers:hover,
.products-pagination .page-numbers.current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .category-image {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .table-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .table-controls {
        width: 100%;
        justify-content: center;
    }
    
    .products-table th,
    .products-table td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .product-actions {
        flex-direction: row;
        gap: 3px;
    }
    
    .btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}
/* 补充样式 */
.row-hover {
    background-color: #f8f9fa !important;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* 移动端表格样式 */
.mobile-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

.mobile-table tbody,
.mobile-table thead,
.mobile-table th,
.mobile-table td,
.mobile-table tr {
    display: block;
}

.mobile-table tr {
    border: 1px solid #ccc;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 4px;
}

.mobile-table th {
    display: none;
}

.mobile-table td {
    border: none;
    padding: 5px 0;
    position: relative;
    padding-left: 40%;
}

.mobile-table td:before {
    content: attr(data-label);
    position: absolute;
    left: 6px;
    width: 35%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
}

/* 筛选器样式 */
.category-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.category-filters h4 {
    margin-bottom: 15px;
    color: #333;
}

.filter-group {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    min-width: 150px;
}

/* 面包屑样式 */
.woocommerce-breadcrumb {
    margin-bottom: 20px;
    padding: 10px 0;
    color: #666;
}

.woocommerce-breadcrumb a {
    color: #007cba;
    text-decoration: none;
}

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

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
