
/* 全局扁平化变量 */
:root {
    --primary-color: #333;
    --primary-hover: #1C4532;
    --text-main: #111111;
    --text-muted: #555555;
    --border-light: #dddddd;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --transition: all 0.2s ease;
}

/* ====================== 顶部分类横幅 catalog-hero ====================== */
.catalog-hero {
    background-color: #194072 !important; /* 固定主体背景为深蓝色 */
    width: 100%;
    margin-bottom: 36px;
    padding: 40px 0;
}

.hero-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 面包屑 */
.hero-breadcrumb-row {
    margin-bottom: 12px;
}
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: #fff;
}
.breadcrumb li {
    display: flex;
    align-items: center;
}
.breadcrumb li a {
    color: #ffffff;
    text-decoration: none;
    transition: var(--transition);
}
.breadcrumb li a:hover {
    color: #e2e2e2;
}
.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin: 0 10px;
    color: #fff;
}
.breadcrumb li.active {
    color: #ffffff;
}

/* 左右布局 */
.hero-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

/* 左侧文案 */
.hero-text-col {
    flex: 1;
    padding: 0;
}
.catalog-h1 {
    font-size: 40px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 15px;
    line-height: 1.2;
}
.catalog-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: #fff;
    max-width: 580px;
    margin: 0;
}

/* 右侧圆形小图区块 */
.hero-img-col {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; /* 阻止右侧图片被压缩 */
}

.hero-circle-avatar {
    width: 240px;  /* 圆形直径，可按需要调整 (如 180px 或 200px) */
    height: 240px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3); /* 白色微透边框 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* 柔和阴影提高层次感 */
    background-color: #ffffff; /* 防止透明图片无底色 */
}

.hero-circle-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保证不同尺寸图片裁切填充为圆形不拉伸 */
    display: block;
}

/* 移动端自适应：竖向排列，图片在上或在下 */
@media (max-width: 768px) {
    .hero-main-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .catalog-subtitle {
        margin: 0 auto;
    }
}
/* ====================== 全局容器 ====================== */
.catalog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}
.catalog-grid-wrap {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 24px;
}

/* ====================== 左侧侧边栏 扁平化无阴影 ====================== */
.catalog-sidebar {
    background: var(--white);
    border: 1px solid var(--border-light);
    position: sticky;
    top: 24px;
    overflow: hidden;
}
.sidebar-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    padding: 18px 20px;
    margin: 0;
    border-bottom: 1px solid var(--border-light);
}
.sidebar-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-cat-list .cat-item {
    border-bottom: 1px solid var(--border-light);
    position: relative;
}
.sidebar-cat-list .cat-item:last-child {
    border-bottom: none;
}
.sidebar-cat-list > li > a {
    display: block;
    padding: 14px 20px;
    padding-right: 45px;
    font-size: 15px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}
.sidebar-cat-list a.active {
    background: var(--bg-light);
    color: var(--primary-color);
    font-weight: 600;
}
.sidebar-cat-list > li > a:hover:not(.active) {
    background: var(--bg-light);
    color: var(--text-main);
}

/* 展开收起按钮 */
.toggle-icon {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 16px;
    color: #777;
    cursor: pointer;
    line-height: 1;
    width: 20px;
    text-align: center;
}

/* 子分类 */
.sidebar-cat-list .children {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background: #fafafa;
}
.cat-item.open > .children {
    display: block;
}
.sidebar-cat-list .children li {
    border-top: 1px solid var(--border-light);
}
.sidebar-cat-list .children a {
    display: block;
    padding: 12px 20px 12px 36px;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}
.sidebar-cat-list .children a:hover,
.sidebar-cat-list .children a.active {
    color: var(--primary-color);
    background: var(--bg-light);
}

/* 侧边推荐产品 */
.sidebar-featured-wrap {
    border-top: 1px solid var(--border-light);
}
.sidebar-featured-list {
    list-style: none;
    padding: 16px 20px 24px;
    margin: 0;
}
.featured-item {
    margin-bottom: 16px;
}
.featured-item:last-child {
    margin-bottom: 0;
}
.featured-item a {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
}
.feat-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border: 1px solid var(--border-light);
    background: var(--white);
    flex-shrink: 0;
}
.feat-title {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}
.featured-item a:hover .feat-title {
    color: var(--primary-color);
}

/* ====================== 右侧顶部分类介绍区块 ====================== */
.catalog-term-intro {
    background: var(--white);
    border: 1px solid var(--border-light);
    padding: 32px;
    margin-bottom: 28px;
}
.term-title {
    font-size: 28px;
    color: var(--text-main);
    margin: 0 0 12px;
    font-weight: 700;
}
.term-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0;
}

/* ====================== 产品列表 纯扁平化 ====================== */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}
.product-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: stretch;
    overflow: hidden;
    transition: var(--transition);
}
.product-card:hover {
    border-color: #999;
}

.product-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: 32px;
    border-right: 1px solid var(--border-light);
}
.product-img-wrap img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    display: block;
}

.hot-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ef4444;
    color: #fff;
    font-weight: 600;
    padding: 4px 10px;
    font-size: 12px;
}

.prod-info {
    padding: 32px 32px 32px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.prod-name {
    font-size: 22px;
    line-height: 1.4;
    color: var(--text-main);
    margin: 0 0 12px;
    font-weight: 600;
}
.prod-name a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}
.prod-name a:hover {
    color: var(--primary-color);
}
.prod-short-desc {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

.prod-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.tag-item {
    border: 1px solid var(--border-light);
    padding: 4px 12px;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-light);
    text-decoration: none;
    transition: var(--transition);
}
.tag-item:hover {
    border-color: #999;
    color: var(--text-main);
}

.prod-buttons {
    display: flex;
    gap: 14px;
    margin-top: auto;
}
.btn-email {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.btn-email:hover {
    background: var(--primary-hover);
}
.btn-detail {
    background: var(--white);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    padding: 12px 24px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.btn-detail:hover {
    border-color: var(--text-main);
    background: var(--bg-light);
}

/* ====================== 分页 ====================== */
.pagination-wrap {
    margin-top: 48px;
    padding-bottom: 32px;
    text-align: center;
}
.pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    margin: 0 3px;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    background: var(--white);
    transition: var(--transition);
}
.pagination-wrap .page-numbers.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.pagination-wrap .page-numbers:hover:not(.current) {
    background: var(--bg-light);
}

/* ====================== 移动端适配 ====================== */
@media(max-width: 991px) {
    .catalog-grid-wrap {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .catalog-sidebar {
        position: static;
    }
    .product-card {
        grid-template-columns: 1fr;
    }
    .product-img-wrap {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        padding: 40px 0;
    }
    .prod-info {
        padding: 32px;
    }
    .hero-main-content {
        flex-direction: column;
    }
    .catalog-h1 {
        font-size: 30px;
    }
}

@media(max-width: 640px) {
    .catalog-term-intro {
        padding: 24px;
    }
    .term-title {
        font-size: 24px;
    }
    .prod-name {
        font-size: 20px;
    }
    .prod-info {
        padding: 24px;
    }
    .prod-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .btn-email, .btn-detail {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }
    .catalog-hero {
        padding: 30px 0;
    }
}
