/* ===================== 案例详情 ===================== */
.case-title {
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: 4px 0 12px;
    line-height: 1.4;
    text-align: center;
}

.case-meta {
    display: flex;
    gap: 12px 18px;
    font-size: var(--font-size-btn);
    color: var(--color-text-secondary, #666);
    padding-bottom: 14px;
    justify-content: center;
}

.main-content .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.case-tag-list {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 8px 10px;
    justify-content: center;
}

.case-tag-list .tag-chip {
    max-width: 180px;
    padding: 5px 12px;
    border-radius: 999px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.case-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.case-meta i {
    color: var(--color-text-secondary);
}

.case-review {
    margin-top: 28px;
    padding: 22px 24px 22px 28px;
    background: linear-gradient(135deg, var(--color-primary-bg), var(--color-bg-card));
    border: 1px solid var(--color-primary-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.case-review h3 {
    margin: 0 0 10px;
    font-size: var(--font-size-card-title);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.case-review p {
    margin: 0;
    font-size: var(--font-size-body);
    line-height: 1.8;
    color: var(--color-text-secondary);
}

@media (max-width: 1053px) {
    .case-title {
        font-size: 20px;
    }
}

/* ===================== 案例列表 ===================== */
/* 案例卡片图片：聊天长图缩小居中显示（仅作用于案例卡片，不影响商品卡） */
.goods-item--case .goods-img-box img {
    display: block;
    width: 70%;                 /* 图片缩小，两侧露出底色；想更大/更小只调这个值 */
    height: 100%;
    margin: 0 auto;             /* 水平居中 */
    object-fit: cover;          /* 超长部分上下裁切 */
    object-position: center center; /* 裁切窗口对齐图片中部 */
}
.case-banner {
    text-align: center;
}
.case-banner-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-text-primary, #20232a);
    margin-bottom: 10px;
}
.case-banner-title-icon {
    color: var(--color-primary, #d8373e);
    margin: 0 8px;
}
.case-banner-stats {
    font-size: 15px;
    color: var(--color-text-secondary, #666);
}
.case-banner-stats-icon {
    color: var(--color-warning);
    margin: 0 6px;
    font-size: 14px;
}
.case-banner-stats .highlight {
    color: var(--color-primary, #d8373e);
    font-weight: 700;
}
.case-banner-stats .dot {
    margin: 0 12px;
    color: var(--color-primary, #d8373e);
    font-size: 18px;
}
.meta-stars {
    color: var(--color-warning);
    font-size: 10px;
}
.case-banner-mobile { display: none; }

.section-title--case-mobile {
    display: none;
}

.case-banner-stats--mobile {
    display: none;
}

.section-title--no-border::after {
    display: none;
}

@media (max-width: 768px) {
    .case-banner { display: none; }
    .case-banner-mobile {
        display: block;
        padding: 12px 0 8px;
    }
    .case-banner-mobile .case-banner-title {
        font-size: 18px;
        margin-bottom: 6px;
    }
    .case-banner-mobile .case-banner-title-icon {
        margin: 0 4px;
    }
    .case-banner-mobile .case-banner-stats {
        font-size: 12px;
    }
    .case-banner-mobile .case-banner-stats .dot {
        margin: 0 1px;
        font-size: 14px;
    }
    /* 首页案例模块：移动端隐藏桌面 banner，显示标题行 + stats */
    .section-title--case-desktop {
        display: none !important;
    }
    .section-title--case-mobile {
        display: flex;
    }
    .case-banner-stats--mobile {
        display: block;
        text-align: center;
        font-size: 12px;
        color: var(--color-text-secondary);
        padding-bottom: 12px;
    }
    .case-banner-stats--mobile .dot {
        margin: 0 4px;
    }
    .goods-item--case .meta-read {
        display: none;
    }
}

/* ===================== 聊天截图轮播 ===================== */
.chat-section {
    background: linear-gradient(180deg, var(--color-bg-card), var(--color-primary-bg));
    border: 1px solid var(--color-primary-bg-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px 24px 18px;
    margin-top: 22px;
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.detail-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}

.detail-heading i {
    color: var(--color-primary);
}

.chat-section .detail-heading i {
    color: var(--color-green-accent);
}

.section-prompt-inline {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-tertiary, #999);
    line-height: 1.5;
    white-space: nowrap;
}

.chat-actions {
    display: inline-flex;
    gap: 8px;
    flex-shrink: 0;
}

.chat-arrow {
    width: 34px;
    height: 34px;
    border: 1px solid var(--color-border-light);
    border-radius: 50%;
    background: var(--color-bg-card);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-arrow:hover {
    color: var(--color-primary);
    border-color: var(--color-primary-border);
    box-shadow: 0 6px 18px var(--color-primary-shadow);
}

.chat-carousel {
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    padding: 8px 2px 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.chat-carousel::-webkit-scrollbar {
    height: 6px;
}

.chat-carousel::-webkit-scrollbar-thumb {
    background: var(--color-primary-border);
    border-radius: var(--radius-pill);
}

.chat-carousel::-webkit-scrollbar-track {
    background: var(--color-bg-muted);
    border-radius: var(--radius-pill);
}

.chat-track {
    display: flex;
    gap: 18px;
    transition: transform 0.4s ease;
    align-items: stretch;
}

.phone-frame {
    width: 228px;
    flex-shrink: 0;
    border-radius: 18px;
    border: 1px solid var(--color-border-light);
    overflow: hidden;
    background: var(--color-bg-card);
    position: relative;
    box-shadow: var(--shadow-card);
    scroll-snap-align: start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.phone-frame:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

.phone-topbar {
    height: 38px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-bg-hover);
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-tertiary);
}

.phone-topbar span {
    width: 28px;
    height: 4px;
    border-radius: var(--radius-pill);
    background: var(--color-border-strong);
}

.phone-topbar strong {
    font-size: 12px;
    color: var(--color-text-secondary);
    font-weight: 600;
}

.phone-screen {
    width: 100%;
    height: 390px;
    overflow: hidden;
    background: var(--color-bg-muted);
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    display: block;
}

.phone-hint {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--color-text-tertiary);
    font-size: 12px;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border-light);
}

.chat-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.chat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-text-disabled);
    cursor: pointer;
    transition: all 0.3s;
}

.chat-dot.active {
    background: var(--color-primary);
    width: 20px;
    border-radius: 4px;
}

/* ===================== 相关案例卡片（侧栏） ===================== */
/* 相关案例的 a.recommend-item 内为裸 img + span，需约束避免原图撑破/裁切不一致 */
.detail-sidebar a.recommend-item {
    padding: 0;
}

.detail-sidebar a.recommend-item img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 1px solid var(--color-border-light, #eee);
}

.detail-sidebar a.recommend-item span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    padding: 10px 12px 12px;
    font-size: var(--font-size-caption);
    line-height: 1.5;
    color: var(--color-text-body);
    word-break: break-all;
}

/* ===================== 关联商品按钮 ===================== */
.related-goods-actions {
    padding: 0 12px 12px;
}

.related-goods-btns.btn-group {
    margin-top: 0;
    gap: var(--space-sm);
}

.related-goods-btns .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* ===================== 项目概况 ===================== */
.project-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-top: 20px;
}

.project-desc {
    font-size: 14px;
    color: var(--color-text-secondary, #666);
    line-height: 1.8;
    margin: 0;
    white-space: pre-line;
}

@media (max-width: 992px) {
    /* 关联商品卡片独占一行，避免半宽下加购/购买按钮拥挤 */
    .detail-sidebar div.recommend-item {
        grid-column: 1 / -1;
    }

    .detail-sidebar a.recommend-item img {
        height: 130px;
    }
}

@media (max-width: 768px) {
    /* 案例页无商品详情页的 mobile-fixed-bar，但仍需为全局移动端底部导航留出空间 */
    body {
        padding-bottom: 70px;
    }

    .case-meta {
        flex-wrap: wrap;
        gap: 6px 14px;
        font-size: 12px;
        padding-bottom: 12px;
    }

    .chat-section {
        padding: 18px 14px 14px;
        margin-top: 18px;
        border-radius: var(--radius-xl, 12px);
    }

    .section-header {
        flex-direction: column;
        gap: 8px;
    }

    .chat-section .detail-heading {
        gap: 6px;
        align-items: center;
    }

    /* 图标和主标题文字不换行 */
    .chat-section .detail-heading > i,
    .chat-section .detail-heading > span:first-of-type {
        white-space: nowrap;
    }

    /* 移动端不展示脱敏提示文案 */
    .chat-section .section-prompt-inline {
        display: none;
    }

    .chat-actions {
        display: none;
    }

    .chat-carousel {
        margin: 0 -4px;
        padding-bottom: 12px;
    }

    .chat-track {
        gap: 12px;
    }

    .phone-frame {
        width: 78vw;
        max-width: 260px;
        border-radius: 16px;
    }

    .phone-screen {
        height: 420px;
    }

    .chat-nav {
        margin-top: 12px;
    }

    .case-review,
    .project-section {
        padding: 18px;
        border-radius: var(--radius-xl, 12px);
    }

    .detail-sidebar a.recommend-item img {
        height: 110px;
    }

    .detail-sidebar a.recommend-item span {
        padding: 8px 10px 10px;
        font-size: 12px;
    }

    .case-review h3 {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .case-title {
        font-size: 20px;
        text-align: center;
    }

    .case-meta,
    .main-content .tags {
        justify-content: center;
    }

    .case-tag-list {
        max-width: none;
        margin-top: 12px;
        padding: 0;
        gap: 7px;
    }

    .case-tag-list .tag-chip {
        max-width: 100%;
        white-space: normal;
    }

    .phone-screen {
        height: 380px;
    }
}

/* ===================== 相关案例卡片（案例详情页专属，覆盖全局 .recommend-item） ===================== */
.detail-sidebar .recommend-item {
    margin-bottom: 0;
    text-decoration: none;
    display: block;
    transition: none;
    border-radius: var(--radius-md);
    overflow: visible;
    border: none;
    box-shadow: none;
}
