top-header {
    padding: 15px 0;
    background: #000;
    color: #fff;
}
/* 产品页面布局 */
.products-page {
    padding: 40px 0;
    background-color: #fff;
    gap: 30px;
}

/* 侧边栏样式 */
aside {
    width: 280px;
    flex-shrink: 0;
}

.aside_content {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.aside_content h3 {
    padding: 15px 20px;
    margin: 0;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-menu li {
    border-bottom: 1px solid #eee;
}

.category-menu li:last-child {
    border-bottom: none;
}

.category-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.category-menu a:hover {
    background: #f8f9fa;
    color: #0056b3;
}

.category-menu .active > a {
    color: #0056b3;
    font-weight: 600;
    position: relative;
}

.category-menu .active > a:hover {
    background: #34495e;
    color: #fff;
}

.category-menu .active > a::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

.category-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
}

.category-menu ul li a {
    padding-left: 40px;
    font-size: 14px;
}

/* 主内容区域 */
main {
    flex: 1;
}

main h2 {
    margin: 0 0 20px;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 2px solid #eee;
}

main .products-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

main .products-header .product-count {
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-right: 20px;
}

.product-count .count-number {
    display: block;
    font-size: 32px;
    font-weight: 600;
    color: #2563eb;
    line-height: 1.2;
}

.product-count .count-label {
    display: block;
    color: #6b7280;
    text-transform: uppercase;
}

main .products-header .product-count span {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 600;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-left: 1rem;
}
.product-count{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}
#product-count {
    color: #e74c3c;
    font-size: 1.2rem;
}

main h2 span {
    font-size: 14px;
    color: #666;
}

.main_content {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
}

/* 工具栏 */
.tools_view {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

/* 产品列表 */
.list_bigpic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    align-items: stretch; /* Ensures cards in a row have the same height */
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Explicitly use full height of the grid cell */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card .product-link {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow link to grow if card has more space, or use height: 100% if card's height is strictly set by grid */
    height: 100%; /* Ensure it fills the card */
    text-decoration: none;
    color: inherit;
}

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

.product-image {
    display: block;
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}
.single-product-image{
    display: block;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;

}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.3s ease;
}

.product-image:hover img {
    transform: scale(1.05);
}

.single-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.3s ease;
}

.single-product-image:hover img {
    transform: scale(1.05);
}
.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Crucial: takes available vertical space in .product-link */
    padding: 15px;
    /* Force override of problematic inline styles */
    height: auto !important; 
    justify-content: normal !important; /* Use 'normal' or 'flex-start' to reset */
}

.product-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 600;
    color: #333; /* Ensure text color */
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.product-title a:hover {
    color: #007bff;
}

.product-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.product-specs {
    font-size: 0.9rem;
    color: #555;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.product-category {
    font-size: 0.9rem;
}

.product-category a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.product-category a:hover {
    color: #007bff;
}



.product-price {
    margin-top: auto; /* Pushes price to the bottom of .product-info */
    padding-top: 10px; /* Adds a little space above the price */
    font-size: 1.2rem;
    font-weight: bold;
    color: #e53935;
}

.product-actions {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.btn-details,
.btn-quote {
    flex: 1;
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-details {
    background: #007bff;
    color: #fff;
}

.btn-quote {
    background: #28a745;
    color: #fff;
}

.btn-details:hover,
.btn-quote:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.product-title a {
    color: #333;
    text-decoration: none;
}

.product-title a:hover {
    color: #007bff;
}

.product-category {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.product-category a {
    color: #6c757d;
    text-decoration: none;
}

.product-category a:hover {
    color: #007bff;
}


.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 3px;
    color: #6c757d;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #e9ecef;
    color: #007bff;
}

.product-actions {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.btn-details,
.btn-quote {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    flex: 1;
    transition: all 0.2s ease;
}

.btn-details {
    background: #007bff;
    color: #fff;
}

.btn-quote {
    background: #28a745;
    color: #fff;
}

.btn-details:hover,
.btn-quote:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* 分页 */
.pagination {
    margin-top: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination button {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 6px;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.pagination button:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.pagination button:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-numbers button {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s;
}

.page-numbers button.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.page-numbers button:hover:not(.active) {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination .current {
    background: #0056b3;
    color: #fff;
    border-color: #0056b3;
}

.pagination a:hover {
    background: #f8f9fa;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .products_page {
        flex-direction: column;
    }
    
    aside {
        width: 100%;
    }
    
    .list_bigpic {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}
.products-container {
    display: flex;
    gap: 30px;
    max-width: 1450px;
    margin: 0 auto;
    padding: 30px 15px;
}

/* 侧边栏样式 */
.products-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.products-filter {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

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

.filter-header h2 {
    margin: 0 0 15px;
    font-size: 24px;
    color: #333;
}

.filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.sort-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.view-switch button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-switch button.active {
    background: #0056b3;
    color: #fff;
    border-color: #0056b3;
}

/* 分类过滤器 */
.filter-categories,
.filter-tags {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.filter-categories h3,
.filter-tags h3 {
    margin: 0 0 15px;
    font-size: 18px;
    color: #333;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
}

.category-item input[type="checkbox"] {
    margin-right: 10px;
}

.category-name {
    flex: 1;
    font-size: 14px;
}

.category-count {
    color: #666;
    font-size: 12px;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-item:hover {
    background: #e9ecef;
}

.tag-item input[type="checkbox"] {
    display: none;
}

.tag-item input[type="checkbox"]:checked + .tag-name {
    color: #0056b3;
    font-weight: 500;
}

/* 主内容区域 */
.products-main {
    flex: 1;
}

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

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination .page-numbers.current {
    background: #0056b3;
    color: #fff;
    border-color: #0056b3;
}

.pagination .page-numbers:hover:not(.current) {
    background: #f8f9fa;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .products-container {
        flex-direction: column;
    }
    
    .products-sidebar {
        width: 100%;
    }
    
    .filter-categories,
    .filter-tags {
        padding: 15px;
    }
}

/* 列表视图 */
.products-grid.list-view {
    display: block;
}

.list-view .product-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    margin-bottom: 20px;
}

/* 客户端分页和产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    position: relative;
    padding-top: 75%;
    background: #f8f8f8;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}
.single-product-image {
    position: relative;
    background: #f8f8f8;
}

.single-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}
.product-info {
    padding: 1rem;
}

.product-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #333;
}

.product-excerpt {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-weight: bold;
    color: #2c3e50;
}

/* 分页样式 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.pagination button:hover:not(:disabled) {
    background: #f8f8f8;
    border-color: #bbb;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-number.active {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

.no-products {
    text-align: center;
    padding: 3rem;
    background: #f8f8f8;
    border-radius: 8px;
    color: #666;
    grid-column: 1 / -1;
}

.list-view .product-image {
    height: 200px;
}

.list-view .product-info {
    padding: 20px;
}

.no-products {
    text-align: center;
    padding: 50px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}
