/* 产品模板样式 */
.product_tpl {
    padding: 30px 0;
}

.product_tpl .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.category-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.category-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
}

.category-description {
    color: #666;
    line-height: 1.6;
}

.content-wrapper {
    display: flex;
    gap: 30px;
}

/* 侧边栏样式 */
.category-sidebar {
    flex: 0 0 250px;
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
}

/* 手风琴样式 */
.accordion-categories {
    border-radius: 5px;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid #eee;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f9f9f9;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.accordion-header:hover, .accordion-header.active {
    background: #f0f0f0;
    color: var(--primary-color);
}

.accordion-icon {
    width: 10px;
    height: 10px;
    position: relative;
}

.accordion-icon:before, .accordion-icon:after {
    content: '';
    position: absolute;
    background: #666;
    transition: transform 0.3s;
}

.accordion-icon:before {
    width: 10px;
    height: 2px;
    top: 4px;
    left: 0;
}

.accordion-icon:after {
    width: 2px;
    height: 10px;
    left: 4px;
    top: 0;
}

.accordion-header.active .accordion-icon:after {
    transform: rotate(90deg);
}

.accordion-content {
    display: none;
    padding: 10px 0;
    background: #fff;
}

.accordion-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.accordion-content li {
    padding: 8px 15px 8px 25px;
    transition: all 0.3s;
}

.accordion-content li:hover {
    background: #f5f5f5;
}

.accordion-content li.active {
    background: rgba(75, 123, 229, 0.1);
}

.accordion-content li a {
    color: #666;
    display: block;
    text-decoration: none;
}

.accordion-content li.active a, .accordion-content li a:hover {
    color: var(--primary-color);
}

/* 产品列表样式 */
.product-list {
    flex: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info h3 a {
    color: #333;
    text-decoration: none;
}

.product-info h3 a:hover {
    color: var(--primary-color);
}

.product-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 分页样式 */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #f5f5f5;
    color: var(--primary-color);
    border-color: #ccc;
}

.pagination .current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* 空数据提示 */
.empty-data {
    padding: 50px 0;
    text-align: center;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .category-sidebar {
        flex: none;
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}
