/*
============================================================
 【文件名称】columns.css
 【中文名称】栏目专用样式表
 【功能说明】为产品/新闻/证书栏目的列表页与详情页提供差异化样式
 【适用模板】category-product.html / category-news.html / category-cert.html
            show-product.html / show-news.html / show-cert.html
 【使用方法】上传至 /skin/css/ 目录,模板已自动引用
 【迅睿规则】仅追加新样式,不修改核心文件与既有样式
============================================================
*/

/* ============================================================
   〇、滚动淡入动画基础态
   - html.js-enabled 时,.fade-in-up 默认隐藏
   - .is-visible 触发可见
   - 若 JS 未加载,内容直接显示,不影响可访问性
   ============================================================ */
html.js-enabled .fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
    will-change: opacity, transform;
}
html.js-enabled .fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    html.js-enabled .fade-in-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================================
   一、栏目通用：列表工具栏 + 分页
   ============================================================ */
.page-content .list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.page-content .toolbar-left { display: flex; align-items: center; gap: 8px; }
.page-content .toolbar-count { font-size: 14px; color: #6b7280; }
.page-content .toolbar-count strong { color: #1f2937; font-weight: 600; }
.page-content .toolbar-right { display: flex; gap: 6px; }
.page-content .toolbar-tab {
    padding: 6px 14px;
    font-size: 13px;
    color: #6b7280;
    background: #f5f7fa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all .2s ease;
}
.page-content .toolbar-tab:hover { color: #1f2937; border-color: #9ca3af; }
.page-content .toolbar-tab.active {
    color: #fff;
    background: #1f4f8f;
    border-color: #1f4f8f;
}

.page-content .list-pagination {
    margin-top: 32px;
    padding: 16px 0;
    text-align: center;
}
.page-content .list-pagination a,
.page-content .list-pagination span {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    padding: 0 10px;
    margin: 0 3px;
    font-size: 14px;
    color: #374151;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all .2s ease;
}
.page-content .list-pagination a:hover { border-color: #1f4f8f; color: #1f4f8f; }
.page-content .list-pagination .active a {
    color: #fff;
    background: #1f4f8f;
    border-color: #1f4f8f;
}

/* ============================================================
   二、产品列表页：网格卡片布局
   ============================================================ */
.page-content .product-grid-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.page-content .product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.page-content .product-card:hover {
    border-color: #1f4f8f;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(31, 79, 143, .12);
}
.page-content .product-img {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f5f7fa, #e5e7eb);
    overflow: hidden;
}
.page-content .product-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-content .product-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 56px;
    color: #9ca3af;
}
.page-content .product-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.55) 100%);
    opacity: 0;
    transition: opacity .25s ease;
}
.page-content .product-card:hover .product-overlay { opacity: 1; }
.page-content .product-body {
    padding: 16px 18px 20px;
}
.page-content .product-name {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.page-content .product-desc {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   三、新闻列表页：横向卡片布局
   ============================================================ */
.page-content .news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.page-content .news-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.page-content .news-card:hover {
    border-color: #1f4f8f;
    transform: translateX(4px);
    box-shadow: 0 8px 22px rgba(31, 79, 143, .1);
}
.page-content .news-card-link {
    display: flex;
    text-decoration: none;
    color: inherit;
}
.page-content .news-card-thumb {
    flex: 0 0 260px;
    aspect-ratio: 3 / 2;
    background: linear-gradient(135deg, #f5f7fa, #e5e7eb);
    overflow: hidden;
}
.page-content .news-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-content .news-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px;
    color: #9ca3af;
}
.page-content .news-card-body {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.page-content .news-card-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .2s ease;
}
.page-content .news-card:hover .news-card-title { color: #1f4f8f; }
.page-content .news-card-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #9ca3af;
}
.page-content .news-card-desc {
    margin: 0 0 12px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.page-content .news-card-more {
    align-self: flex-start;
    font-size: 13px;
    color: #1f4f8f;
    font-weight: 500;
    transition: transform .2s ease;
}
.page-content .news-card:hover .news-card-more { transform: translateX(4px); }

/* ============================================================
   四、证书列表页：画廊网格布局
   ============================================================ */
.page-content .cert-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.page-content .cert-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.page-content .cert-card:hover {
    border-color: #1f4f8f;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(31, 79, 143, .12);
}
.page-content .cert-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.page-content .cert-card-img {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f5f7fa, #e5e7eb);
    overflow: hidden;
    position: relative;
}
.page-content .cert-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.page-content .cert-card:hover .cert-card-img img { transform: scale(1.05); }
.page-content .cert-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 56px;
    color: #9ca3af;
}
.page-content .cert-card-body {
    padding: 14px 16px 16px;
    text-align: center;
    border-top: 1px solid #f0f2f5;
}
.page-content .cert-card-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.page-content .cert-card-date {
    font-size: 12px;
    color: #9ca3af;
}

/* ============================================================
   五、详情页通用：头部 / 元信息 / 正文
   ============================================================ */
.page-content .detail-header {
    padding: 24px 28px;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #1f4f8f;
    border-radius: 10px;
}
.page-content .detail-title {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
}
.page-content .detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 13px;
    color: #6b7280;
}
.page-content .detail-meta-divider { color: #d1d5db; }

.page-content .detail-section-title {
    margin: 0 0 16px;
    padding-left: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    border-left: 4px solid #1f4f8f;
    line-height: 1.2;
}

.page-content .detail-content {
    padding: 24px 28px;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.page-content .article-body {
    font-size: 15px;
    line-height: 1.85;
    color: #374151;
    word-break: break-word;
}
.page-content .article-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
.page-content .article-body p { margin: 0 0 14px; }
.page-content .article-body h2,
.page-content .article-body h3 { margin: 24px 0 12px; color: #1f2937; }
.page-content .article-body ul,
.page-content .article-body ol { padding-left: 24px; margin: 0 0 14px; }
.page-content .article-body table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.page-content .article-body table th,
.page-content .article-body table td { border: 1px solid #e5e7eb; padding: 8px 12px; }

/* ============================================================
   六、产品详情页：图片画廊 + 参数表格 + 相关推荐
   ============================================================ */
.page-content .detail-gallery {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 16px;
    padding: 20px;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.page-content .gallery-main {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f5f7fa, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
}
.page-content .gallery-main-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 96px;
    color: #9ca3af;
}
.page-content .gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.page-content .gallery-thumb {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f5f7fa, #e5e7eb);
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    color: #9ca3af;
    transition: border-color .2s ease;
}
.page-content .gallery-thumb:hover { border-color: #9ca3af; }
.page-content .gallery-thumb.active { border-color: #1f4f8f; }

.page-content .detail-params {
    padding: 24px 28px;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.page-content .params-table-wrap { overflow-x: auto; }
.page-content .params-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.page-content .params-table th,
.page-content .params-table td {
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    text-align: left;
}
.page-content .params-table th {
    width: 160px;
    background: #f5f7fa;
    color: #1f2937;
    font-weight: 600;
}
.page-content .params-table td { color: #374151; }
.page-content .params-table tr:nth-child(even) td { background: #fafbfc; }

.page-content .detail-related {
    padding: 24px 28px;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.page-content .related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.page-content .related-card .product-body { padding: 12px 14px 14px; }
.page-content .related-card .product-name { font-size: 14px; }
.page-content .related-card .product-desc { font-size: 12px; -webkit-line-clamp: 1; }

/* ============================================================
   七、新闻详情页：上一篇/下一篇
   ============================================================ */
.page-content .detail-prev-next {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 24px;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
}
.page-content .detail-prev-next a {
    color: #1f4f8f;
    text-decoration: none;
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .2s ease;
}
.page-content .detail-prev-next a:hover { color: #d97706; }

/* ============================================================
   八、证书详情页：大图展示
   ============================================================ */
.page-content .cert-image {
    padding: 28px;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.page-content .cert-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 1px solid #eee;
    box-shadow: 0 6px 24px rgba(0,0,0,.08);
}

/* ============================================================
   九、响应式适配
   ============================================================ */
@media (max-width: 1024px) {
    .page-content .product-grid-list,
    .page-content .cert-gallery,
    .page-content .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-content .news-card-thumb { flex-basis: 200px; }
}

@media (max-width: 768px) {
    /* 列表页 */
    .page-content .product-grid-list,
    .page-content .cert-gallery,
    .page-content .related-grid {
        grid-template-columns: 1fr;
    }
    .page-content .news-card-link { flex-direction: column; }
    .page-content .news-card-thumb {
        flex-basis: auto;
        width: 100%;
        aspect-ratio: 16 / 9;
    }
    .page-content .news-card-body { padding: 16px; }
    .page-content .news-card-title { font-size: 16px; }

    /* 工具栏 */
    .page-content .list-toolbar { padding: 12px; }
    .page-content .toolbar-tab { padding: 5px 10px; font-size: 12px; }

    /* 详情页 */
    .page-content .detail-header,
    .page-content .detail-content,
    .page-content .detail-params,
    .page-content .detail-related { padding: 16px; }
    .page-content .detail-title { font-size: 20px; }
    .page-content .detail-section-title { font-size: 17px; }

    /* 产品详情画廊 */
    .page-content .detail-gallery {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .page-content .gallery-thumbs {
        flex-direction: row;
        overflow-x: auto;
    }
    .page-content .gallery-thumb { flex: 0 0 64px; }

    /* 参数表 */
    .page-content .params-table th { width: 100px; }
    .page-content .params-table th,
    .page-content .params-table td { padding: 8px 10px; font-size: 13px; }

    /* 上一篇/下一篇 */
    .page-content .detail-prev-next { padding: 12px 16px; }
    .page-content .detail-prev-next a { max-width: 100%; }
}

@media (max-width: 480px) {
    .page-content .toolbar-right { width: 100%; justify-content: flex-start; }
    .page-content .product-body { padding: 12px 14px 14px; }
    .page-content .product-name { font-size: 15px; }
}
