/* ==========================================================================
   产品中心（版式参照通锐 trvip.cn 产品中心）
   列表页：左侧分类 + 右侧 3 列产品卡 + 分页
   详情页：左图右信息 + 产品介绍 + 相关产品
   依赖 about.css 的 .tr-container / :root 变量 / .tr-page-hero
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 列表页
   -------------------------------------------------------------------------- */
.tr-products {
    position: relative;
    padding: 80px 0;
    background: #fff;
}

.tr-products-page {
    padding: 60px 0 70px;
}

.tr-pro-box {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

/* 左侧分类 */
.tr-pro-side {
    flex: 0 0 240px;
    width: 240px;
}

.tr-pro-side-title {
    position: relative;
    margin: 0 0 16px;
    padding-left: 14px;
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.tr-pro-side-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--tr-main);
}

.tr-pro-tabs {
    display: block;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #eef1f5;
}

.tr-pro-tabs li {
    margin: 0;
    padding: 0;
    font-size: 15px;
    text-align: left;
    background: transparent;
    border-bottom: 1px solid #eef1f5;
    transition: background .25s ease;
}

.tr-pro-tabs li:last-child {
    border-bottom: 0;
}

.tr-pro-tabs li a {
    display: block;
    padding: 14px 18px;
    color: #333;
}

.tr-pro-tabs li:hover,
.tr-pro-tabs li.active {
    background: var(--tr-main);
}

.tr-pro-tabs li:hover a,
.tr-pro-tabs li.active a {
    color: #fff;
}

/* 侧栏询价引导 */
.tr-pro-cta {
    margin-top: 24px;
    padding: 22px 20px;
    background: #f5f8fc;
    border: 1px solid #eef1f5;
}

.tr-pro-cta p {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.8;
    color: #666;
}

.tr-pro-cta-btn {
    display: block;
    padding: 11px 10px;
    font-size: 14px;
    text-align: center;
    color: #fff;
    background: var(--tr-main);
    border-radius: 4px;
    text-decoration: none;
    transition: background .3s ease;
}

.tr-pro-cta-btn i {
    margin-right: 6px;
}

.tr-pro-cta-btn:hover {
    color: #fff;
    background: #0a4f96;
}

/* 右侧产品网格 */
.tr-pro-main {
    flex: 1;
    min-width: 0;
}

.tr-pro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* 产品卡：图 4:3 + 标题 + 简介 2 行 + 了解更多 */
.tr-pcard {
    display: block;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eef1f5;
    text-decoration: none;
    transition: all .3s ease;
}

.tr-pcard:hover {
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(6, 26, 43, .12);
    transform: translateY(-4px);
}

.tr-pcard-pic {
    display: block;
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: #eef1f5;
}

.tr-pcard-pic img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.tr-pcard:hover .tr-pcard-pic img {
    transform: scale(1.06);
}

.tr-pcard-body {
    display: block;
    padding: 18px 18px 20px;
}

.tr-pcard-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    color: #222;
    transition: color .3s ease;
}

.tr-pcard:hover .tr-pcard-name {
    color: var(--tr-main);
}

.tr-pcard-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.75;
    color: #888;
}

.tr-pcard-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 14px;
    font-size: 13px;
    color: #999;
    transition: color .3s ease;
}

.tr-pcard-more i {
    font-size: 12px;
    transition: transform .3s ease;
}

.tr-pcard:hover .tr-pcard-more {
    color: var(--tr-main);
}

.tr-pcard:hover .tr-pcard-more i {
    transform: translateX(3px);
}

/* 分页 */
.tr-pro-page {
    margin-top: 40px;
    text-align: center;
}

.tr-pro-page ul,
.tr-pro-page .pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tr-pro-page ul.pagination > li > a,
.tr-pro-page ul.pagination > li > span {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 34px;
    padding: 0 8px;
    border: 1px solid #e5e9f0;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
}

.tr-pro-page ul.pagination > li > a:hover,
.tr-pro-page ul.pagination > li.active > a,
.tr-pro-page ul.pagination > li.active > span {
    background: var(--tr-main);
    border-color: var(--tr-main);
    color: #fff;
}

.tr-pro-page ul.pagination > li.disabled > span {
    color: #c3cad4;
}

.tr-pro-page .pagination-block {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.tr-pro-page .pagination_info {
    display: flex;
    justify-content: center;
}

.tr-pro-page .pagination_info span {
    display: inline;
    width: auto;
    min-width: 0;
    height: auto;
    line-height: 1.6;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #888;
    font-size: 13px;
    white-space: normal;
}

/* --------------------------------------------------------------------------
   2. 详情页
   -------------------------------------------------------------------------- */
.tr-breadcrumb {
    font-size: 14px;
    color: rgba(255, 255, 255, .85);
}

.tr-breadcrumb a {
    color: rgba(255, 255, 255, .85);
}

.tr-breadcrumb a:hover {
    color: #fff;
}

.tr-product-detail {
    padding: 50px 0 60px;
    background: #fff;
}

.tr-product-detail-box {
    display: flex;
    gap: 44px;
    align-items: stretch;
}

.tr-product-gallery {
    flex: 0 0 46%;
    max-width: 46%;
}

.tr-product-gallery .tr-pimg {
    display: block;
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: #eef1f5;
    border: 1px solid #eef1f5;
    border-radius: 6px;
}

.tr-product-gallery .tr-pimg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tr-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tr-product-info-bottom {
    margin-top: auto;
}

.tr-product-cate {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--tr-main);
    background: #eaf3fb;
    border-radius: 20px;
    text-decoration: none;
}

.tr-product-cate:hover {
    color: var(--tr-main);
}

.tr-product-info h1 {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    margin: 0 0 14px;
    line-height: 1.3;
}

.tr-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #999;
}

.tr-product-meta i {
    margin-right: 5px;
    color: #bbb;
}

.tr-product-intro {
    font-size: 15px;
    line-height: 1.9;
    color: #555;
    margin-bottom: 26px;
}

.tr-product-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.tr-product-thumbs .tr-thumb {
    width: 76px;
    height: 76px;
    border: 2px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .25s ease, box-shadow .25s ease;
    background: #f7f7f7;
}

.tr-product-thumbs .tr-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tr-product-thumbs .tr-thumb:hover,
.tr-product-thumbs .tr-thumb.is-active {
    border-color: var(--tr-main);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

.tr-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tr-product-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 26px;
    font-size: 15px;
    border-radius: 4px;
    text-decoration: none;
    transition: all .3s ease;
}

.tr-btn-primary {
    color: #fff;
    background: var(--tr-main);
}

.tr-btn-primary:hover {
    color: #fff;
    background: #0a4f96;
}

.tr-btn-ghost {
    color: var(--tr-main);
    border: 1px solid var(--tr-main);
    background: transparent;
}

.tr-btn-ghost:hover {
    color: #fff;
    background: var(--tr-main);
}

.tr-product-content {
    margin-top: 46px;
    padding-top: 36px;
    border-top: 1px solid #eef1f5;
}

.tr-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 20px;
}

.tr-section-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 20px;
    margin-right: 10px;
    vertical-align: -3px;
    background: var(--tr-main);
    border-radius: 2px;
}

.tr-product-content .main-content {
    font-size: 15px;
    line-height: 1.9;
    color: #444;
}

.tr-product-content .main-content p {
    margin-bottom: 14px;
}

/* 规格参数表 */
.tr-spec-table {
    width: 100%;
    margin-bottom: 24px;
    border-collapse: collapse;
    font-size: 14px;
}

.tr-spec-table th,
.tr-spec-table td {
    padding: 11px 16px;
    border: 1px solid #eef1f5;
    text-align: left;
}

.tr-spec-table th {
    width: 130px;
    color: #666;
    font-weight: 400;
    background: #f7f9fc;
}

.tr-spec-table td {
    color: #333;
}

.tr-product-related {
    padding: 10px 0 60px;
    background: #fff;
}

/* --------------------------------------------------------------------------
   3. 响应式
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1199px) {
    .tr-pro-side {
        flex: 0 0 200px;
        width: 200px;
    }

    .tr-pro-grid {
        gap: 18px;
    }
}

@media screen and (max-width: 992px) {
    .tr-pro-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .tr-products {
        padding: 30px 0 40px;
    }

    .tr-products-page {
        padding: 30px 0 40px;
    }

    .tr-pro-box {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .tr-pro-side {
        flex: none;
        width: 100%;
    }

    .tr-pro-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        background: transparent;
        border: 0;
    }

    .tr-pro-tabs li {
        text-align: center;
        white-space: normal;
        border: 1px solid #eef1f5;
    }

    .tr-pro-tabs li:last-child {
        border-bottom: 1px solid #eef1f5;
    }

    .tr-pro-tabs li a {
        padding: 12px 10px;
    }

    .tr-pro-cta {
        display: none;
    }

    .tr-pro-grid {
        gap: 14px;
    }

    .tr-pcard-body {
        padding: 14px 14px 16px;
    }

    .tr-pcard-name {
        height: 44px;
        font-size: 15px;
        line-height: 22px;
    }

    .tr-pcard-more {
        margin-top: 10px;
    }

    .tr-product-detail-box {
        flex-direction: column;
        gap: 24px;
    }

    .tr-product-gallery {
        flex: none;
        width: 100%;
        max-width: 100%;
    }

    .tr-product-info h1 {
        font-size: 23px;
    }

    .tr-product-actions a {
        flex: 1;
        justify-content: center;
    }
}
