/* 全局卡片 */
.level1-card, .level2-card, .product-card {
    border: 1px solid #d1d9e6 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.16);
    transition: all 0.3s ease;
}

/* 悬停 */
.level1-card:hover, .level2-card:hover, .product-card:hover {
    border-color: #0d6efd !important;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.2);
}

/* =========================================
展示一级目录（一行一个，图文同行）
========================================= */
.level1-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    border-left: 5px solid #0d6efd;
}

.level1-card:hover {
    transform: translateY(-4px);
}

.level1-img {
    width: 35%;
    min-height: clamp(170px, 18vw, 220px);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #dee4ef !important;
}

.level1-img img {
    width: 100%;
    height: auto;
}

.level1-info {
    width: 65%;
    padding: clamp(14px, 2vw, 24px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.level1-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.level1-card:hover .level1-info h3 {
    color: #0d6efd;
}

.level1-info p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .level1-card {
        flex-direction: column;
    }

    .level1-img,
    .level1-info {
        width: 100%;
    }
}

/* =========================================
展示二级目录（一行两个，上下排列）
========================================= */
.level2-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.level2-card:hover {
    transform: translateY(-6px);
}

.level2-img {
    width: 100%;
    aspect-ratio: 16 / 12;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 30px 30px 0 30px;
}

.level2-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.level2-card:hover .level2-img img {
    transform: scale(1.05);
}

.level2-info {
    padding: clamp(12px, 1.8vw, 15px);
    background-color: #fcfcfc;
    border-top: 1px solid #eaeaea;
}

.level2-info h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.level2-card:hover .level2-info h4 {
    color: #0d6efd;
}

/* =========================================
展示产品/文章（一行三个，正方形图）
========================================= */
.product-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
}

.card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid #f7fafc;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: 0.5s;
}

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

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    padding: 10px;
    text-align: center;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3rem;
    background-color: #f8f9fa;
    border-top: 1px solid #edf2f7;
}

.product-card:hover .product-title {
    color: #0d6efd;
}

/* =========================================
分页样式 
========================================= */
.pagination-wrapper {
    margin-top: 50px;
}

.pagination {
    justify-content: center;
    gap: 5px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    color: #0d6efd;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.pagination a:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.pagination .disabled {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

@media (max-width: 767.98px) {
    .level2-info h4 {
        font-size: 1rem;
    }
}
@media (min-width: 2700px) {
    .level2-card {
        padding: 50px 50px 0 50px;
    }
    .level2-info h4 {
        font-size: 2rem;
    }
}