/* 文章详情页主体：对齐设计稿，头尾仍用 site-shell */
.article-show {
    --ad-brand: var(--brand, #5B7FFF);
    --ad-brand-2: #8B5FFF;
    --ad-soft: #F0F4FF;
    --ad-line: #E8ECF0;
    --ad-ink: #1a1a1a;
    --ad-text: #333;
    --ad-muted: #666;
    --ad-faint: #999;
}

.ad-breadcrumb .ad-breadcrumb-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ad-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--ad-brand);
    border-radius: 6px;
    color: var(--ad-brand) !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s ease;
}

.ad-back:hover {
    background: var(--ad-soft);
}

.ad-back i {
    font-size: 16px;
    line-height: 1;
}

.ad-breadcrumb-divider {
    width: 1px;
    height: 16px;
    background: var(--ad-line);
    margin: 0 4px;
}

.ad-breadcrumb .current {
    max-width: min(420px, 55vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ad-main {
    padding: 24px 0 48px;
}

.ad-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.ad-content {
    flex: 1;
    min-width: 0;
}

.ad-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.ad-header {
    margin-bottom: 24px;
}

.ad-cat {
    display: inline-block;
    font-size: 13px;
    color: var(--ad-brand);
    background: var(--ad-soft);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-weight: 500;
}

.ad-title {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 700;
    color: var(--ad-ink);
    line-height: 1.45;
}

.ad-subtitle {
    margin: 0 0 16px;
    font-size: 15px;
    color: var(--ad-muted);
    line-height: 1.6;
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding-top: 14px;
    border-top: 1px solid var(--ad-line);
}

.ad-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--ad-muted);
}

.ad-meta-item i {
    color: var(--ad-faint);
}

.ad-cover {
    width: 100%;
    max-height: 420px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    background: #F5F7FA;
}

.ad-cover img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: cover;
}

.ad-body {
    font-size: 16px;
    line-height: 2;
    color: var(--ad-text);
    word-break: break-word;
}

.ad-body h2 {
    margin: 28px 0 14px;
    font-size: 22px;
    font-weight: 600;
    color: var(--ad-ink);
    line-height: 1.5;
}

.ad-body h3 {
    margin: 22px 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ad-text);
    line-height: 1.5;
}

.ad-body p {
    margin: 0 0 14px;
    text-indent: 2em;
}

.ad-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.ad-body ul,
.ad-body ol {
    margin: 0 0 14px;
    padding-left: 1.6em;
}

.ad-body li {
    margin-bottom: 6px;
}

.ad-body a {
    color: var(--ad-brand);
}

.ad-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 24px 0;
    border-top: 1px solid var(--ad-line);
    border-bottom: 1px solid var(--ad-line);
    margin: 28px 0 0;
}

.ad-tag {
    padding: 6px 12px;
    background: #F5F7FA;
    border-radius: 16px;
    font-size: 14px;
    color: var(--ad-muted);
    text-decoration: none;
    transition: all .2s ease;
}

.ad-tag:hover {
    background: var(--ad-soft);
    color: var(--ad-brand);
}

.ad-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.ad-section-head i {
    color: var(--ad-brand);
    font-size: 18px;
}

.ad-section-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ad-text);
}

.ad-related-products,
.ad-related-articles {
    margin-top: 32px;
}

.ad-product-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ad-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px;
    background: #F5F7FA;
    border-radius: 12px;
    text-decoration: none;
    transition: all .25s ease;
}

.ad-product-card:hover {
    background: var(--ad-soft);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(91, 127, 255, 0.12);
}

.ad-product-card-icon,
.ad-product-card-fallback {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    margin-bottom: 12px;
    object-fit: cover;
}

.ad-product-card-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--ad-brand);
    font-size: 28px;
}

.ad-product-card-info {
    text-align: center;
    width: 100%;
}

.ad-product-card-info strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ad-text);
    margin-bottom: 8px;
}

.ad-product-card-info p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--ad-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-product-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--ad-brand) 0%, var(--ad-brand-2) 100%);
    border-radius: 6px;
    font-size: 13px;
    color: #fff;
    font-weight: 500;
}

.ad-related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ad-related-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    background: #F5F7FA;
    border-radius: 10px;
    text-decoration: none;
    transition: all .2s ease;
}

.ad-related-item:hover {
    background: var(--ad-soft);
    transform: translateX(2px);
}

.ad-related-thumb,
.ad-related-thumb-fallback {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
}

.ad-related-thumb-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--ad-brand);
    font-size: 22px;
}

.ad-related-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ad-related-info strong {
    font-size: 15px;
    font-weight: 500;
    color: var(--ad-text);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-related-meta {
    display: flex;
    gap: 16px;
}

.ad-related-meta em {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-style: normal;
    font-size: 13px;
    color: var(--ad-faint);
}

.ad-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 88px;
}

.ad-side-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.ad-side-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ad-line);
    font-size: 16px;
    font-weight: 600;
    color: var(--ad-text);
}

.ad-side-title i {
    color: var(--ad-brand);
}

.ad-side-title .fa-fire {
    color: #FF6B6B;
}

.ad-side-title .fa-star {
    color: #FFB800;
}

.ad-toc {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 320px;
    overflow-y: auto;
}

.ad-toc-item {
    font-size: 14px;
    color: var(--ad-muted);
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    line-height: 1.5;
    transition: all .2s ease;
}

.ad-toc-item:hover {
    background: #F5F7FA;
    color: var(--ad-brand);
}

.ad-toc-item.is-sub {
    padding-left: 22px;
    font-size: 13px;
}

.ad-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ad-author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 12px;
    background: var(--ad-soft);
    color: var(--ad-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.ad-author-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--ad-text);
    margin-bottom: 4px;
}

.ad-author-role {
    font-size: 13px;
    color: var(--ad-faint);
    margin-bottom: 8px;
}

.ad-author-bio {
    margin: 0;
    font-size: 13px;
    color: var(--ad-muted);
    line-height: 1.55;
}

.ad-hot-list,
.ad-side-products {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ad-hot-list li + li,
.ad-side-products li + li {
    margin-top: 8px;
}

.ad-hot-list a,
.ad-side-products a {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .2s ease;
}

.ad-hot-list a:hover,
.ad-side-products a:hover {
    background: #F5F7FA;
}

.ad-hot-rank {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #F5F7FA;
    color: var(--ad-faint);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ad-hot-rank.is-top {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: #fff;
}

.ad-hot-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ad-hot-title {
    font-size: 14px;
    color: var(--ad-text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-hot-views {
    font-size: 12px;
    color: var(--ad-faint);
}

.ad-side-products img,
.ad-side-product-fallback {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--ad-soft);
}

.ad-side-product-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ad-brand);
}

.ad-side-products strong {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ad-text);
    margin-bottom: 4px;
}

.ad-side-products em {
    display: block;
    font-style: normal;
    font-size: 12px;
    color: var(--ad-faint);
    line-height: 1.4;
}

.ad-side-empty {
    padding: 8px;
    font-size: 13px;
    color: var(--ad-faint);
}

@media (max-width: 960px) {
    .ad-layout {
        flex-direction: column;
    }

    .ad-sidebar {
        width: 100%;
        position: static;
    }

    .ad-product-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .ad-card {
        padding: 20px 16px;
    }

    .ad-title {
        font-size: 24px;
    }

    .ad-related-item {
        flex-direction: column;
    }

    .ad-related-thumb,
    .ad-related-thumb-fallback {
        width: 100%;
        height: 140px;
    }

    .ad-product-cards {
        grid-template-columns: 1fr;
    }
}
