/* ========== 基础重置与全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 字体族与全局规范保持一致 */
body {
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding-bottom: 50px;
}

/* ========== 产品页面容器 ========== */
.product-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px;
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
    font-size: var(--font-size-p);
    color: #666;
    margin-bottom: 25px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    margin: 0 6px;
    color: #999;
}

.breadcrumb .current {
    color: #333;
}

/* ========== 页面标题 ========== */
.product-title {
    font-size: var(--font-size-h1);
    font-weight: 600;
    color: #222;
    margin-bottom: 30px;
    letter-spacing: -0.3px;
}

/* ========== 主布局容器 ========== */
.product-layout {
    display: flex;
    gap: 45px;
    align-items: flex-start;
}

/* ========== 左侧分类导航 ========== */
.category-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.category-list {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    cursor: pointer;
    transition: all 0.25s ease;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #444;
    position: relative;
}

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

.category-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.25s ease;
}

.category-item:hover {
    background-color: #f8f9fc;
    color: var(--primary-color);
}

.category-item.active {
    background-color: #e8f4fd;
    color: var(--primary-color);
    font-weight: 500;
}

.category-item.active::before {
    background: var(--primary-color);
}

.category-name {
    font-size: var(--font-size-18);
    letter-spacing: 0.2px;
}

.arrow {
    color: #bbb;
    font-size: var(--font-size-p);
    transition: all 0.25s ease;
}

.category-item:hover .arrow,
.category-item.active .arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}

/* ========== 分类手风琴（父子层级） ========== */
.category-group {
    border-bottom: 1px solid #f0f0f0;
}

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

/* 组内单元格自身边框由组容器统一控制 */
.category-group .category-parent,
.category-group .category-child {
    border-bottom: none;
}

/* 父级标题：可点击但不导航 */
.category-parent {
    cursor: pointer;
    user-select: none;
}

.category-parent .arrow {
    transition: transform 0.3s ease, color 0.25s ease;
}

/* 展开态：父级高亮 + 箭头旋转为向下 */
.category-group.expanded .category-parent {
    background-color: #f8f9fc;
    color: var(--primary-color);
}

.category-group.expanded .category-parent::before {
    background: var(--primary-color);
}

.category-group.expanded .category-parent .arrow {
    transform: rotate(90deg);
    color: var(--primary-color);
}

/* 父级 hover 时不再做 translateX，让旋转动画清晰 */
.category-parent:hover .arrow {
    transform: translateX(0);
}

.category-group.expanded .category-parent:hover .arrow {
    transform: rotate(90deg);
}

/* 子级容器：默认折叠，由 JS 控制 max-height 实现平滑展开 */
.category-children {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
    background-color: #fafbfd;
}

/* 服务端预渲染的展开态，避免 JS 加载前的闪烁；
   JS 初始化时会将其替换为精确 scrollHeight 以保证关闭动画平滑 */
.category-group.expanded .category-children {
    max-height: 1500px;
}

/* 子级项 */
.category-child {
    padding: 13px 22px 13px 44px;
    font-weight: 400;
    border-top: 1px solid #ececec;
}

.category-children .category-child:first-child {
    border-top: 1px solid #e8e8e8;
}

/* 子级项前的圆点指示符（覆盖父类的左侧色条） */
.category-child::before {
    left: 26px;
    top: 50%;
    bottom: auto;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ccc;
    transform: translateY(-50%);
    transition: background 0.25s ease, transform 0.25s ease;
}

.category-child:hover::before,
.category-child.active::before {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.2);
}

.category-child.active {
    background-color: #e8f4fd;
    color: var(--primary-color);
    font-weight: 500;
}

.category-child .category-name {
    font-size: var(--font-size-p);
    letter-spacing: 0.1px;
}

/* ========== 右侧产品网格区域 ========== */
.product-grid-wrapper {
    flex: 1;
    min-width: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ========== 产品卡片 ========== */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

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

/* 产品图片容器 */
.product-image-wrapper {
    width: 100%;
    height: 230px;
    overflow: hidden;
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

/* 产品内容区域 */
.product-card-content {
    padding: 20px 18px 24px;
    text-align: center;
    min-height: 95px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.product-card-title {
    font-size: var(--font-size-18);
    font-weight: 500;
    color: #2c2c2c;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* ========== Learn More 按钮 - 默认隐藏，悬停显示 ========== */
.learn-more-btn {
    display: inline-block;
    padding: 9px 26px;
    background-color: #f43838;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: var(--font-size-p);
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    margin-top: 14px;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 12px rgba(244, 56, 56, 0.35);
}

.product-card:hover .learn-more-btn {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.learn-more-btn:hover {
    background-color: #d62d2d;
    box-shadow: 0 5px 18px rgba(244, 56, 56, 0.45);
}

/* ========== 热门产品板块 ========== */
.hot-product-section {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.hot-product-title {
    font-size: var(--font-size-18);
    font-weight: 600;
    color: #1a88e8;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hot-product-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hot-product-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.hot-product-item:hover {
    background-color: #f5f7fa;
}

.hot-product-item:hover .hot-product-name {
    color: #1a88e8;
}

.hot-product-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

.hot-product-name {
    font-size: var(--font-size-p);
    font-weight: 500;
    color: #333;
    line-height: 1.35;
    transition: color 0.25s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 联系我们板块 ========== */
.contact-expert-section {
    background: var(--primary-color);
    border-radius: 10px;
    padding: 32px 24px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(244, 56, 56, 0.28);
}

.contact-subtitle {
    font-size: var(--font-size-18);
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.contact-title {
    font-size: var(--font-size-36);
    font-weight: 700;
    color: #fff;
    margin-bottom: 22px;
    letter-spacing: 0.5px;
}

.contact-btn {
    display: inline-block;
    padding: 12px 36px;
    background: #fff;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 30px;
    font-size: var(--font-size-18);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(244, 56, 56, 0.25);
    background: #fff5f5;
}

/* ========== 优势板块 ========== */
.advantage-section {
    margin-top: 70px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
    padding: 70px 0 80px;
}

.advantage-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 50px;
    display: flex;
    align-items: stretch;
    gap: 50px;
}

.advantage-sidebar {
    width: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advantage-sidebar-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: var(--font-size-20);
    font-weight: 700;
    color: #333;
    letter-spacing: 2px;
    line-height: 1.6;
}

.advantage-content {
    flex: 1;
    min-width: 0;
}

.advantage-title {
    font-size: var(--font-size-h2);
    font-weight: 600;
    color: #222;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
    line-height: 1.35;
}

.advantage-desc {
    font-size: var(--font-size-18);
    color: #666;
    text-align: center;
    line-height: 1.8;
    margin-bottom: 50px;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

/* 优势卡片网格 - 放大尺寸 */
.advantage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.advantage-item {
    background-color: #fff;
    border-radius: 16px;
    padding: 72px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #eef0f4;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.05);
    /* 确保方块最小高度，维持视觉比例 */
    min-height: 200px;
}

/* 卡片顶部装饰条 */
.advantage-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 0 0 4px 4px;
    opacity: 0;
    transition: all 0.35s ease;
}

.advantage-item:hover {
    border-color: transparent;
    box-shadow: 0 12px 36px rgba(244, 56, 56, 0.14);
    transform: translateY(-6px);
}

.advantage-item:hover::before {
    opacity: 1;
    width: 70%;
}

.advantage-name {
    font-size: var(--font-size-20);
    font-weight: 600;
    color: #2c2c2c;
    line-height: 1.5;
    letter-spacing: 0.2px;
}

/* ========== FAQ板块（复用全局.problem-list手风琴样式） ========== */
.faq-section {
    margin-top: 6px;
}

.faq-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px 60px;
    display: flex;
    align-items: flex-start;
    border-top: 1px solid #e5e5e5;
    gap: 40px;
}

.faq-sidebar {
    width: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-sidebar-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: var(--font-size-20);
    font-weight: 700;
    color: #333;
    letter-spacing: 2px;
    line-height: 1.6;
}

.faq-content {
    flex: 1;
    min-width: 0;
}

.faq-title {
    font-size: var(--font-size-h2);
    font-weight: 600;
    color: #222;
    text-align: center;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

.faq-desc {
    font-size: var(--font-size-p);
    color: #666;
    text-align: center;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}


/* 平板设备 */
@media screen and (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }

    .product-container {
        padding: 25px 30px;
    }

    .advantage-section {
        margin-top: 50px;
        padding: 55px 0 65px;
    }

    .advantage-container {
        padding: 0 35px;
        gap: 36px;
    }

    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .advantage-item {
        padding: 54px 26px;
        min-height: 170px;
    }
}

@media screen and (max-width: 992px) {
    .product-layout {
        flex-direction: column;
        gap: 30px;
    }

    .category-sidebar {
        width: 100%;
    }

    /* 保持纵向手风琴布局（不再转为横向滚动条），更适合父子层级展示 */
    .category-list {
        display: block;
        overflow: visible;
        white-space: normal;
        padding: 0;
    }

    .category-item {
        padding: 14px 22px;
    }

    .category-child {
        padding: 12px 22px 12px 44px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 热门产品平板端横向排列 */
    .hot-product-section {
        margin-top: 20px;
    }

    .hot-product-list {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 4px;
    }

    .hot-product-list::-webkit-scrollbar {
        height: 4px;
    }

    .hot-product-list::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 4px;
    }

    .hot-product-item {
        flex-shrink: 0;
        min-width: 220px;
        padding: 10px 14px;
        border: 1px solid #eee;
        border-radius: 8px;
    }

    .hot-product-img {
        width: 70px;
        height: 52px;
    }

    /* 联系我们板块平板端全宽显示 */
    .contact-expert-section {
        margin-top: 24px;
        padding: 36px 28px;
    }

    /* 优势板块平板端适配 */
    .advantage-container,
    .faq-container {
        flex-direction: column;
        padding: 24px 28px;
        gap: 22px;
    }

    .advantage-sidebar,
    .faq-sidebar {
        width: auto;
    }

    .advantage-sidebar-label,
    .faq-sidebar-label {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        letter-spacing: 1px;
    }
}

/* 手机设备 */
@media screen and (max-width: 650px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .product-container {
        padding: 18px 16px;
    }

    .breadcrumb {
        font-size: var(--font-size-p);
        margin-bottom: 18px;
    }

    .product-title {
        font-size: var(--font-size-28);
        margin-bottom: 22px;
    }

    .product-image-wrapper {
        height: 200px;
    }

    .product-card-content {
        padding: 16px 14px 20px;
    }

    .category-item {
        padding: 11px 16px;
        font-size: var(--font-size-p);
    }

    .category-child {
        padding: 10px 16px 10px 36px;
    }

    .category-child::before {
        left: 20px;
    }

    .category-name {
        font-size: var(--font-size-18);
    }

    /* 热门产品移动端适配 */
    .hot-product-section {
        margin-top: 16px;
        padding: 16px;
    }

    .hot-product-item {
        min-width: 200px;
    }

    .hot-product-img {
        width: 60px;
        height: 45px;
    }

    .hot-product-name {
        font-size: var(--font-size-p);
    }

    /* 联系我们移动端适配 */
    .contact-expert-section {
        margin-top: 18px;
        padding: 28px 20px;
    }

    .contact-subtitle {
        font-size: var(--font-size-18);
    }

    .contact-title {
        font-size: var(--font-size-34);
        margin-bottom: 18px;
    }

    .contact-btn {
        padding: 11px 32px;
        font-size: var(--font-size-p);
    }

    /* 优势板块移动端适配 */
    .advantage-section {
        margin-top: 40px;
        padding: 45px 0 55px;
    }

    .advantage-container,
    .faq-container {
        padding: 18px 16px;
        gap: 16px;
    }

    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .advantage-item {
        padding: 40px 18px;
        border-radius: 12px;
        min-height: 140px;
    }

    .advantage-item::before {
        height: 3px;
    }

    .advantage-name {
        font-size: var(--font-size-18);
    }

    .advantage-title,
    .faq-title {
        font-size: var(--font-size-28);
        margin-bottom: 10px;
    }

    .advantage-desc,
    .faq-desc {
        margin-bottom: 20px;
    }

    .advantage-sidebar-label,
    .faq-sidebar-label {
        font-size: var(--font-size-18);
    }

    /* FAQ板块移动端适配（复用全局.problem-list样式） */
    .faq-section .problem-list .down {
        padding: 18px 40px 18px 14px;
    }
}