/* ============ 产品详情页（照参考稿 lanhu_chanpin） ============ */
/* 内容区定位上下文（供面包屑绝对定位，样式定义见 common.css） */
.content { position: relative; }

/* ============ 面包屑（基础样式，新闻详情页复用） ============ */
.crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--c-text);
    margin-bottom: 1rem;
    padding: 0.6rem 1rem;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
}
.crumbs a {
    color: var(--c-text-sub);
    font-weight: 500;
/*    padding: 0.15rem 0.4rem;*/
    border-radius: 0.375rem;
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.crumbs a:hover {
    color: var(--c-primary);
    background: var(--c-primary-soft);
}
.crumbs__sep {
    color: var(--c-text-sub);
    font-size: 1rem;
    opacity: 0.5;
}
.crumbs__current {
    color: var(--c-primary);
    font-weight: 600;
    max-width: 16rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding: 0.15rem 0.4rem;
}

/* ============ 标题通栏 ============ */
.detail-head {
    display: flex;
    align-items: center;
    gap: 1.3125rem;
/*    background: #fff;
    border: 1px solid #f4f4f4;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(48, 42, 65, 0.18);*/
/*    padding: 1.25rem 1.5rem;*/
    margin-bottom: 1.5rem;
}
.detail-head__icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 8px;
    background: #dfdfdf;
    flex-shrink: 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.detail-head__icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-head__info {
    min-width: 0;
    flex: 1;
}
.detail-head__name {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}
.detail-head__desc {
    margin: 0.375rem 0 0;
    font-size: 1rem;
    color: #969ba4;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.detail-head__actions {
    display: flex;
    gap: 0.625rem;
    flex-shrink: 0;
}

/* ============ 按钮 ============ */
.detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.375rem;
    padding: 0 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s var(--ease), color 0.15s var(--ease),
                border-color 0.15s var(--ease);
}
.detail-btn--ghost {
    background: #fff;
    color: #333;
    border: 1px solid #f4f4f4;
}
.detail-btn--ghost:hover {
    color: var(--c-primary);
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
}
.detail-btn--solid {
    background: #333;
    color: #fff;
    border: 1px solid #333;
}
.detail-btn--solid:hover {
    background: var(--c-primary);
    border-color: var(--c-primary);
}
.detail-btn:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

/* ============ 信息胶囊（分类 / 更新时间） ============ */
.detail-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.875rem;
}
.detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 1.75rem;
    padding: 0 0.875rem;
    background: #fff;
    border: 1px solid #f4f4f4;
    border-radius: 1.75rem;
    font-size: 0.875rem;
    color: #969ba4;
    line-height: 1;
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
a.detail-chip:hover {
    color: var(--c-primary);
    border-color: var(--c-primary);
}
.detail-chip__icon {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    object-fit: contain;
}
.detail-chip--time { cursor: default; }

/* ============ 分隔线 ============ */
.detail-divider {
    height: 1px;
    background: #f2f2f2;
    margin-bottom: 1.5rem;
}

/* ============ 正文 + 推荐布局 ============ */
.detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30rem;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}
.detail-content {
    grid-column: 1;
    min-width: 0;
    /* 无卡片包裹，正文直接落在页面背景上，照参考稿 */
    overflow: hidden;
}
.detail-side {
    grid-column: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 富文本兜底排版（detail_html 为外部内容） */
.detail-content :where(p) {
    line-height: 1.875rem;
    color: #333;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}
.detail-content :where(h2) {
    font-size: 1.125rem;
    font-weight: 700;
    color: #333;
    margin: 2rem 0 1.25rem;
    line-height: 1.4;
}
.detail-content :where(h3) {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin: 1.5rem 0 1rem;
    line-height: 1.4;
}
.detail-content :where(ul, ol) {
    line-height: 1.875rem;
    margin: 0 0 1.25rem 1.5rem;
    color: #333;
    font-size: 0.875rem;
}
.detail-content :where(img) {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    border-radius: var(--radius);
    margin: 0.5rem 0 1.25rem;
    display: block;
}
.detail-content :where(table) {
    max-width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}
.detail-content :where(video, embed, iframe) {
    max-width: 100%;
}
.detail-content :where(div, p, span) {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}
.detail-content :where(a) {
    color: var(--c-primary);
    text-decoration: underline;
}
.detail-content :where(blockquote) {
    border-left: 3px solid var(--c-primary-soft-2);
    padding-left: 1rem;
    color: var(--c-text-sub);
    margin-bottom: 1.25rem;
}

/* 空态 */
.detail-empty {
    text-align: center;
    color: var(--c-text-sub);
    padding: 3rem 1rem;
    font-size: 0.9rem;
}

/* ============ 推荐卡（最新收录 / 类似工具） ============ */
.side-block {
    background: #fff;
    border: 1px solid #f4f4f4;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(48, 42, 65, 0.18);
    padding: 1.25rem 1.75rem;
}
.side-block__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1;
}
.side-block__line {
    height: 1px;
    background: #f2f2f2;
    margin-top: 1.25rem;
}
/* 推荐项：一行两列，小 logo + 名称，行间分隔线 */
.side-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.25rem;
    row-gap: 0;
}
.side-item {
    border-bottom: 1px solid #f2f2f2;
}
    .side-item:nth-child(2n+1) {
        border-right: none !important;
    }
/* 每行第二项右侧补一条分隔线，构成两列间竖线（参考稿每项间均有线） */
.side-list li:nth-last-child(-n+2) {
    border-bottom: none;
}
.side-item a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 0.625rem;
    transition: background 0.15s var(--ease);
    border-radius: 6px;
}
.side-item a:hover { background: #faf9ff; }
.side-item__icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 6px;
    background: #fafbfc;
    flex-shrink: 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.side-item__icon img { width: 100%; height: 100%; object-fit: contain; }
.side-item__name {
    font-size: 0.875rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    transition: color 0.15s var(--ease);
}
.side-item a:hover .side-item__name { color: var(--c-primary); }
.side-empty {
    text-align: center;
    color: var(--c-text-sub);
    padding: 2rem 1rem;
    font-size: 0.85rem;
}

/* ============ 更多AI工具（grid 第 1 列，与文章同宽，照参考稿 box_39） ============ */
.detail-more {
    grid-column: 1;
    min-width: 0;
}
.detail-more__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 1.25rem;
    line-height: 1.4;
}
.detail-more__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}
.more-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.875rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(48, 42, 65, 0.18);
    padding: 1.25rem 0.875rem;
    transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
    overflow: hidden;
}
.more-card:hover {
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.16);
    transform: translateY(-2px);
}
.more-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    background: var(--c-primary-soft);
    color: var(--c-primary);
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.more-card__icon img { width: 100%; height: 100%; object-fit: cover; }
.more-card__body {
    min-width: 0;
    flex: 1;
}
.more-card__name {
    font-size: 1rem;
    color: #333;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s var(--ease);
}
.more-card:hover .more-card__name { color: var(--c-primary); }
.more-card__desc {
    font-size: 0.75rem;
    color: #969ba4;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ 响应式 ============ */
@media (max-width: 1023px) {
    .detail-body { grid-template-columns: minmax(0, 1fr); }
    .detail-side { grid-column: 1; }
    .detail-more__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
    .detail-head {
        flex-wrap: wrap;
/*        padding: 1.25rem;*/
        gap: 0.875rem;
    }
    .detail-head__actions {
        width: 100%;
        justify-content: flex-end;
    }
    .detail-head__name { font-size: 1.5rem; }
    .detail-meta { flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
    .side-list { grid-template-columns: 1fr; }
/*    .side-item:nth-child(odd) { border-right: none; }*/
    .detail-more__grid { grid-template-columns: 1fr; }
}

/* ============ 反馈弹窗（照参考稿 lanhu_fankui） ============ */
.feedback-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(51, 51, 51, 0.6);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6rem 1rem 2rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}
.feedback-mask.is-open {
    opacity: 1;
    visibility: visible;
}
.feedback-modal {
    background: #fff;
    border-radius: 10px;
    width: 462px;
    max-width: 100%;
    padding: 1.125rem 0 2.5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.25s var(--ease);
}
.feedback-mask.is-open .feedback-modal {
    transform: translateY(0);
}

/* 标题栏：左标题 + 右插图 + 关闭按钮 */
.feedback-modal__head {
    display: flex;
    align-items: flex-start;
    padding: 0 1.25rem 0 1.25rem;
    min-height: 4.75rem;
}
.feedback-modal__head-text {
    margin-top: 1.875rem;
    flex: 1;
    min-width: 0;
}
.feedback-modal__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}
.feedback-modal__subtitle {
    margin: 0.625rem 0 0;
    font-size: 0.875rem;
    color: #969ba4;
    line-height: 1;
}
.feedback-modal__illust {
    width: 7.25rem;
    height: 4.625rem;
    object-fit: contain;
    flex-shrink: 0;
    align-self: flex-start;
}
.feedback-modal__close {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 50%;
    background: #d6d7e6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s var(--ease);
    margin-left: 0.5rem;
    margin-top: 0.125rem;
}
.feedback-modal__close:hover { background: var(--c-primary-soft-2); }
.feedback-modal__close svg {
    width: 0.625rem;
    height: 0.625rem;
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* 提示条 */
.feedback-modal__tip {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0.75rem 1.3125rem 0;
    padding: 0 1rem;
    height: 3rem;
    background: #f7f3ff;
    border-radius: 8px;
}
.feedback-modal__tip-ico {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    object-fit: contain;
}
.feedback-modal__tip span {
    font-size: 0.875rem;
    color: #5833aa;
    line-height: 1;
}

/* 问题类型标签 */
.feedback-modal__label {
    margin: 1.875rem 1.3125rem 0;
    font-size: 1rem;
    color: #333;
    line-height: 1;
}

/* 单选卡片网格：两列 */
.feedback-modal__options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1.25rem 1.3125rem 0;
}
.feedback-opt {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    height: 3.375rem;
    padding: 0 1rem 0 1.875rem;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
    position: relative;
}
.feedback-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.feedback-opt__dot {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    border: 1px solid #bfbfbf;
    background: #fff;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: border-width 0.15s var(--ease), background 0.15s var(--ease);
}
/* 选中态：紫边 + 紫心（实心环） */
.feedback-opt.is-active {
    background: #f7f3ff;
    border-color: #c3a4ff;
}
.feedback-opt.is-active .feedback-opt__dot {
    border: 6px solid #783bf2;
    background: #fff;
}
.feedback-opt__text {
    font-size: 0.875rem;
    color: #333;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.feedback-opt:hover:not(.is-active) {
    border-color: #c3a4ff;
}

/* 提交按钮：紫色渐变 */
.feedback-modal__btn {
    display: block;
    width: calc(100% - 2.625rem);
    margin: 1.875rem 1.3125rem 0;
    height: 3.375rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #7f3bf4 0%, #6b3bef 100%);
    color: #fff;
    font-size: 1.125rem;
    font-family: inherit;
    cursor: pointer;
    transition: box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
}
.feedback-modal__btn:hover {
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
}
.feedback-modal__btn:active { opacity: 0.9; }
.feedback-modal__btn:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

/* 反馈弹窗响应式 */
@media (max-width: 767px) {
    .feedback-mask { padding: 0; align-items: stretch; }
    .feedback-modal { border-radius: 10px 10px 0 0; max-width: 100%; }
    .feedback-modal__illust { display: none; }
    .feedback-modal__head { min-height: auto; }
    .feedback-modal__head-text { margin-top: 0; }
    .feedback-modal__options { grid-template-columns: 1fr; }
}

/* 反馈-其他类型输入框 */
.feedback-modal__textarea {
    position: relative;
    width: calc(100% - 2.625rem);
    margin: 1rem 1.3125rem 0;
}
.feedback-modal__textarea textarea {
    width: 100%;
    min-height: 5.5rem;
    padding: 0.625rem 0.75rem 1.5rem;
    border: 1px solid #e6e6f5;
    border-radius: 8px;
    resize: none;
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.5;
    color: #333;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s var(--ease);
}
.feedback-modal__textarea textarea:focus { border-color: var(--c-primary); }
.feedback-modal__textarea textarea::placeholder { color: #b0b0c0; }
.feedback-modal__count {
    position: absolute;
    right: 0.75rem;
    bottom: 0.5rem;
    font-size: 0.75rem;
    color: #a0a0b5;
}
.feedback-modal__count em { font-style: normal; }

/* 反馈-提交按钮 loading 态 */
.feedback-modal__btn.is-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 反馈-轻量 toast */
.fb-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 10000;
    max-width: 80%;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.9375rem;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.fb-toast.is-show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
