/* ===================================================================
   详情页通用样式：产品 / 新闻 / 案例 三种版式
   主色调走 CSS 变量 --xr-primary（模板 <head> 里注入）
   引入方式：<link rel="stylesheet" href="/assets/_common/xr-detail.css">
   =================================================================== */

/* ---------- 公共 ---------- */
.xr-detail {
    width: 100%;
    padding: 40px 0 76px !important;
    background: #fff;
    box-sizing: border-box;
}

.xr-detail .container {
    width: 100% !important; max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    box-sizing: border-box;
}

/* 面包屑 */
.xr-crumb {
    font-size: 13px;
    color: #a5a19d;
    margin-bottom: 26px;
    line-height: 1.6;
}

.xr-crumb a {
    color: #7a7175 !important;
    text-decoration: none;
    transition: color .25s;
}

.xr-crumb a:hover {
    color: var(--xr-primary, #22b38a) !important;
}

.xr-crumb span {
    margin: 0 8px;
    color: #d5d0ca;
}

.xr-crumb em {
    font-style: normal;
    color: #4a4744;
}

/* 按钮 */
.xr-btn-solid,
.xr-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 26px;
    font-size: 14px;
    line-height: 1;
    text-decoration: none !important;
    transition: all .3s cubic-bezier(.2, .8, .3, 1);
    white-space: nowrap;
    box-sizing: border-box;
}

.xr-btn-solid {
    background: var(--xr-primary, #22b38a);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

.xr-btn-solid:hover {
    filter: brightness(.9);
    transform: translateY(-2px);
}

.xr-btn-ghost {
    border: 1px solid #dcd7d1;
    color: #6b6663 !important;
}

.xr-btn-ghost:hover {
    border-color: var(--xr-primary, #22b38a);
    color: var(--xr-primary, #22b38a) !important;
}

/* 区块小标题 */
.xr-sec-title {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #1a1d22 !important;
    margin: 56px 0 26px !important;
    padding-left: 14px;
    border-left: 3px solid var(--xr-primary, #22b38a);
    line-height: 1.4 !important;
}

/* 正文 */
.xr-detail-body {
    font-size: 15.5px !important;
    line-height: 2 !important;
    color: #4a4744 !important;
}

.xr-detail-body p {
    font-size: 15.5px !important;
    line-height: 2 !important;
    color: #4a4744 !important;
    margin: 0 0 20px !important;
}

.xr-detail-body p:last-child {
    margin-bottom: 0 !important;
}

.xr-detail-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 10px;
    margin: 24px auto;
    display: block;
}

.xr-detail-body h2,
.xr-detail-body h3 {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #1a1d22 !important;
    margin: 32px 0 14px !important;
}

.xr-detail-body ul,
.xr-detail-body ol {
    padding-left: 24px;
    margin: 0 0 20px;
}

.xr-detail-body li {
    font-size: 15.5px;
    line-height: 2;
    margin-bottom: 8px;
}

/* ===================================================================
   ① 产品：左图集 + 右信息
   =================================================================== */
.xr-prod {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.xr-prod-gallery {
    flex: 0 0 520px;
    max-width: 520px;
    min-width: 0;
}

.xr-prod-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f5f3;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #f2efec;
}

.xr-prod-main img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform .5s cubic-bezier(.2, .8, .3, 1);
}

.xr-prod-main:hover img {
    transform: scale(1.05);
}

.xr-prod-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.xr-thumb {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #f7f5f3;
    display: block;
    transition: border-color .25s, transform .25s;
    box-sizing: border-box;
}

.xr-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.xr-thumb:hover {
    border-color: #d8d2cc;
    transform: translateY(-2px);
}

.xr-thumb.active {
    border-color: var(--xr-primary, #22b38a);
}

.xr-prod-info {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 6px;
}

.xr-prod-title {
    font-size: 30px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    color: #1a1d22 !important;
    margin: 0 0 18px !important;
}

.xr-prod-meta {
    font-size: 13px !important;
    color: #a5a19d !important;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid #f0ece8;
}

.xr-prod-meta span {
    margin-right: 18px;
}

.xr-prod-desc {
    font-size: 15.5px !important;
    line-height: 1.95 !important;
    color: #5a5652 !important;
    padding: 18px 20px;
    background: #fafaf9;
    border-left: 3px solid var(--xr-primary, #22b38a);
    border-radius: 0 8px 8px 0;
    margin-bottom: 30px;
}

.xr-prod-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.xr-prod-content {
    margin-top: 10px;
}

/* ===================================================================
   ② 新闻：居中文章
   =================================================================== */
.xr-news-article {
    max-width: 860px;
    margin: 0 auto;
}

.xr-news-head {
    text-align: center;
    margin-bottom: 34px;
}

.xr-news-cat {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--xr-primary, #22b38a) 12%, #fff);
    color: var(--xr-primary, #22b38a);
    font-size: 12px;
    line-height: 1;
    margin-bottom: 18px;
    letter-spacing: .5px;
}

.xr-news-title {
    font-size: 32px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    color: #1a1d22 !important;
    margin: 0 0 18px !important;
}

.xr-news-meta {
    font-size: 13px !important;
    color: #a5a19d !important;
}

.xr-news-meta span {
    margin: 0 10px;
}

.xr-news-cover {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 40px;
    background: #f7f5f3;
}

.xr-news-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.xr-detail-news .xr-detail-body > p:first-of-type::first-letter {
    font-size: 44px;
    line-height: 1;
    float: left;
    margin: 6px 10px 0 0;
    color: var(--xr-primary, #22b38a);
    font-weight: 600;
}

.xr-news-foot {
    margin-top: 48px;
    padding-top: 26px;
    border-top: 1px solid #f0ece8;
    text-align: center;
}

/* ===================================================================
   ③ 案例：大图 + 图集网格
   =================================================================== */
.xr-case-head {
    text-align: center;
    margin-bottom: 34px;
}

.xr-case-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 14px;
    background: #faf7f2;
    color: #a89484;
    font-size: 12px;
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: .5px;
}

.xr-case-title {
    font-size: 32px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    color: #1a1d22 !important;
    margin: 0 0 14px !important;
}

.xr-case-meta {
    font-size: 13px !important;
    color: #a5a19d !important;
}

.xr-case-cover {
    width: 100%;
    max-height: 520px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #f7f5f3;
}

.xr-case-cover img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.xr-case-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 40px;
}

.xr-case-photo {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: #f7f5f3;
    transition: transform .35s cubic-bezier(.2, .8, .3, 1), box-shadow .35s;
}

.xr-case-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s;
}

.xr-case-photo:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(31, 45, 61, .14);
}

.xr-case-photo:hover img {
    transform: scale(1.06);
}

.xr-case-body {
    max-width: 860px;
    margin: 0 auto;
}

.xr-case-foot {
    margin-top: 48px;
    text-align: center;
}

/* ===================================================================
   响应式
   =================================================================== */
@media (max-width: 991px) {
    .xr-detail .container {
        padding: 0 16px !important;
    }

    .xr-prod {
        flex-direction: column;
        gap: 26px;
    }

    .xr-prod-gallery {
        flex: 0 0 auto;
        max-width: none;
        width: 100%;
    }

    .xr-prod-main {
        aspect-ratio: 16 / 10;
    }

    .xr-prod-title,
    .xr-news-title,
    .xr-case-title {
        font-size: 26px !important;
    }

    .xr-case-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .xr-news-cover {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .xr-detail {
        padding: 28px 0 48px !important;
    }

    .xr-detail .container {
        width: 100% !important;
        padding: 0 16px !important;
    }

    .xr-crumb {
        font-size: 12px;
        margin-bottom: 18px;
    }

    .xr-prod-title,
    .xr-news-title,
    .xr-case-title {
        font-size: 21px !important;
        line-height: 1.45 !important;
    }

    .xr-prod-main {
        aspect-ratio: 4 / 3;
        border-radius: 10px;
    }

    .xr-thumb {
        width: 64px;
        height: 64px;
    }

    .xr-prod-desc {
        font-size: 14.5px !important;
        padding: 14px 16px;
    }

    .xr-prod-actions {
        flex-direction: column;
    }

    .xr-btn-solid,
    .xr-btn-ghost {
        width: 100%;
    }

    .xr-detail-body,
    .xr-detail-body p,
    .xr-detail-body li {
        font-size: 14.5px !important;
        line-height: 1.9 !important;
    }

    .xr-detail-news .xr-detail-body > p:first-of-type::first-letter {
        font-size: inherit;
        float: none;
        margin: 0;
        color: inherit;
        font-weight: inherit;
    }

    .xr-case-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .xr-sec-title {
        font-size: 18px !important;
        margin: 36px 0 18px !important;
    }
}

/* ===================================================================
   单页版式（关于我们 / 联系我们 等）
   =================================================================== */

.xr-detail-page {
    background: #f7f8fa !important;
}

.xr-page-head {
    margin-bottom: 26px;
}

.xr-page-tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--xr-primary, #22b38a) 12%, #fff);
    color: var(--xr-primary, #22b38a);
    font-size: 12.5px;
    letter-spacing: 1px;
    line-height: 1.6;
}

.xr-page-title {
    margin: 14px 0 0 !important;
    font-size: 30px !important;
    font-weight: 600 !important;
    color: #1a2230 !important;
    line-height: 1.4 !important;
    letter-spacing: .5px;
}

/* 正文卡片 */
.xr-article {
    background: #fff;
    border-radius: 14px;
    padding: 44px 52px;
    box-shadow: 0 4px 26px rgba(31, 45, 61, .07);
    margin-bottom: 26px;
}

.xr-article-body > p {
    margin: 0 0 18px !important;
    font-size: 15.5px !important;
    line-height: 2 !important;
    color: #4a5462 !important;
    text-indent: 2em;
}

.xr-article-body > p:last-child {
    margin-bottom: 0 !important;
}

/* 首段强调 */
.xr-article-body > p:first-of-type {
    font-size: 16.5px !important;
    color: #2b3340 !important;
    padding-left: 18px;
    border-left: 3px solid var(--xr-primary, #22b38a);
    text-indent: 0;
    margin-bottom: 24px !important;
}

/* 小标题 */
.xr-article-body h2,
.xr-article-body h3 {
    position: relative;
    margin: 32px 0 14px !important;
    padding-left: 14px;
    font-size: 19px !important;
    font-weight: 600;
    color: #1a2230 !important;
    line-height: 1.5;
}

.xr-article-body h2::before,
.xr-article-body h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    border-radius: 2px;
    background: var(--xr-primary, #22b38a);
}

/* 图片 / 列表 / 表格 */
.xr-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    display: block;
}

.xr-article-body ul,
.xr-article-body ol {
    margin: 0 0 18px !important;
    padding-left: 24px !important;
}

.xr-article-body li {
    font-size: 15.5px !important;
    line-height: 2 !important;
    color: #4a5462 !important;
    margin-bottom: 6px;
    text-indent: 0;
}

/* 底部引导卡片 */
.xr-page-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    padding: 30px 40px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 26px rgba(31, 45, 61, .07);
}

.xr-page-cta > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.xr-page-cta strong {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: #1a2230;
    line-height: 1.5;
    margin-bottom: 6px;
}

.xr-page-cta span {
    font-size: 13.5px;
    color: #86909c;
    line-height: 1.7;
}

.xr-page-cta > div:last-child {
    display: flex;
    gap: 12px;
    flex: 0 0 auto;
}

@media (max-width: 991px) {
    .xr-article { padding: 30px 24px; }
    .xr-page-title { font-size: 24px !important; }
    .xr-page-cta { flex-direction: column; align-items: flex-start; padding: 24px; }
    .xr-page-cta > div:last-child { width: 100%; }
    .xr-page-cta .xr-btn-solid,
    .xr-page-cta .xr-btn-ghost { flex: 1 1 0; justify-content: center; }
}

@media (max-width: 767px) {
    .xr-article { padding: 24px 18px; border-radius: 10px; }
    .xr-page-title { font-size: 21px !important; }
    .xr-article-body > p { font-size: 14.5px !important; line-height: 1.9 !important; }
    .xr-article-body > p:first-of-type { font-size: 15.5px !important; padding-left: 14px; }
}