/* ========== 文章列表页面样式 v3 - 卡片网格布局 ========== */

/* 页面容器 - 与其他页面统一，使用 Bootstrap .container 默认宽度 */
.article-list-page {
    /* 不再限制 max-width，与商品/品牌/分类列表页保持一致 */
}

/* 页面标题区 */
.list-header {
    text-align: center;
    padding: 20px 0 8px;
    margin-bottom: 12px;
}

.list-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.list-title i {
    color: var(--primary-color, #ff5000);
    font-size: 26px;
}

.list-subtitle {
    font-size: 14px;
    color: var(--text-light, #999);
    margin: 0;
}

/* ========== 工具栏 ========== */
.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 360px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light, #999);
    font-size: 15px;
    z-index: 2;
}

.list-search {
    padding-left: 36px;
    padding-right: 36px;
    border-radius: 24px;
    border: 1px solid var(--border-color, #ddd);
    font-size: 14px;
    height: 40px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.list-search:focus {
    border-color: var(--primary-color, #ff5000);
    box-shadow: 0 0 0 3px rgba(255, 80, 0, 0.1);
    outline: none;
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light, #999);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    z-index: 2;
    line-height: 1;
    border-radius: 50%;
    transition: color 0.15s;
}

.search-clear-btn:hover {
    color: var(--text-secondary, #666);
}

.list-count {
    font-size: 13px;
    color: var(--text-light, #999);
    white-space: nowrap;
}

/* ========== 文章列表 - 卡片网格 ========== */
.article-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 单条文章 - 垂直卡片，封面图100%宽度 */
.article-item {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color, #f0f0f0);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: box-shadow 0.25s, transform 0.25s;
    margin: 0;
    padding: 0;
}

.article-item:first-child {
    padding-top: 0;
}

.article-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.article-item:hover .article-item-title {
    color: var(--primary-color, #ff5000);
}

/* 缩略图 - 全宽 16:9，封面图宽度100% */
.article-item-thumb {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 0;
    flex-shrink: 0;
}

.article-item-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-item:hover .article-item-thumb img {
    transform: scale(1.05);
}

.thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light, #ccc);
    font-size: 36px;
    background: var(--bg-secondary, #f0f0f0);
}

/* 置顶角标 - 封面图左上角 */
.article-top-badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #ff6b35, #f09819);
    border-radius: 0 0 8px 0;
    padding: 4px 12px;
    line-height: 1.5;
    white-space: nowrap;
}

/* 内容区 */
.article-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.article-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #222);
    line-height: 1.5;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.article-item-summary {
    font-size: 13px;
    color: var(--text-secondary, #888);
    line-height: 1.5;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.article-item-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-light, #bbb);
    margin-top: auto;
}

.article-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-item-meta i {
    font-size: 13px;
}

/* ========== 加载中（跨网格全宽） ========== */
.article-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

/* ========== 空状态 ========== */
.article-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #666);
}

.article-empty i {
    font-size: 48px;
    color: var(--text-light, #ddd);
    margin-bottom: 12px;
    display: block;
}

.article-empty p {
    font-size: 15px;
    margin: 4px 0;
}

/* ========== 分页 ========== */
.list-pager {
    padding: 0 4px;
}

.list-pager .btn {
    min-width: 100px;
    border-radius: 8px;
}

#pageInfo {
    font-size: 13px;
}

/* ==================== 响应式 ==================== */

/* 平板：仍保持两列，间距略小 */
@media (max-width: 991px) {
    .article-list {
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .article-list-page {
        padding: 12px 0 24px;
    }

    /* 移动端：单列 */
    .article-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .list-header {
        padding: 8px 12px 4px;
        margin-bottom: 10px;
    }

    .list-title {
        font-size: 20px;
    }

    .list-title i {
        font-size: 22px;
    }

    .list-subtitle {
        font-size: 13px;
    }

    .list-toolbar {
        padding: 0 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .search-input-wrapper {
        max-width: 100%;
    }

    .list-count {
        font-size: 12px;
    }

    .article-item-title {
        font-size: 15px;
    }

    .article-item-summary {
        font-size: 12px;
    }

    .article-item-meta {
        font-size: 11px;
        gap: 10px;
    }

    .list-pager {
        padding: 0 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .list-pager .btn {
        min-width: 80px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .list-title {
        font-size: 18px;
    }

    .article-item-title {
        font-size: 14px;
    }

    .article-item-summary {
        font-size: 12px;
    }

    .article-item-meta {
        font-size: 11px;
        gap: 8px;
    }

    .list-pager #pageInfo {
        font-size: 12px;
        width: 100%;
        text-align: center;
    }

    .list-pager {
        justify-content: center;
    }
}
