/* ==========================================================
   artisan.css - 手艺人&品牌合作页面（设计稿对齐版）
   ========================================================== */

/* ========== Hero Banner ========== */
/* 同比例(16:9)满屏；竖屏/长屏按 16:9 自适应，上限 70vh；dvh 处理移动端地址栏 */
.hero-banner {
    position: relative;
    width: 100%;
    height: 100vh;
    /* 老浏览器回退 */
    height: min(100dvh, max(56.25vw, 70vh));
}

/* banner 轮播容器（与首页 page-index.css 一致，本页未加载该文件故在此补充） */
.hero-banner .swiper-container {
    width: 100%;
    height: 100%;
}

/* banner 单帧：铺满并按 cover 居中显示背景图 */
.banner-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* banner 顶部渐隐装饰条 */
.banner-overlay {
    position: absolute;
    inset: 0;
    background: url('../images/index/banner-overlay.png') no-repeat top center;
    background-size: 100% auto;
}

/* banner 分页圆点 */
.hero-banner .swiper-pagination {
    bottom: 20px !important;
}

.hero-banner .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    margin: 0 5px;
    transition: all 0.3s;
}

.hero-banner .swiper-pagination-bullet-active {
    background: #fff;
    width: 24px;
    border-radius: var(--radius-sm);
}

/* ========== 引言区 ========== */
.artisan-quote-section {
    padding: var(--sp-24) 0;
    background: var(--color-bg-cream);
}

.artisan-quote {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.artisan-quote-text {
    font-size: var(--fs-lg);
    color: var(--color-text-dark);
    line-height: var(--lh-loose);
    letter-spacing: 1px;
    margin-bottom: var(--sp-6);
}

.artisan-quote-label {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--color-secondary);
    margin-bottom: var(--sp-16);
}

.artisan-quote-label .label-en {
    font-size: var(--fs-base);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.artisan-quote-label .label-cn,
.artisan-quote-label .label-dot {
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    letter-spacing: 1px;
}

.artisan-quote-seal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-3);
}

/* 引言区 logo 占位（替换原印章字符） */
.seal-logo {
    width: 100px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ========== 顶部筛选区 ========== */
.artisan-filter-section {
    padding: var(--sp-24) 0;
    border-bottom: 1px solid var(--color-border);
}

.filter-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sp-6);
}

.search-box {
    width: min(430px, 100%);
}

.search-label,
.search-cn,
.search-dot {
    color: var(--color-secondary);
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    letter-spacing: 1.5px;
}

.search-label {
    letter-spacing: 3px;
    margin-right: var(--sp-2);
}

.search-dot {
    margin-right: var(--sp-2);
}

.search-input-wrap {
    margin-top: var(--sp-8);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    border-bottom: 2px solid #898989;
    padding-bottom: var(--sp-2);
    color: var(--color-text-muted);
}

.search-input-wrap input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: var(--fs-base);
    color: var(--color-text-dark);
    letter-spacing: 0.5px;
    outline: none;
}

.search-input-wrap input::placeholder {
    color: var(--color-text-muted);
}

.filter-actions {
    display: flex;
    align-items: flex-end;
    gap: var(--sp-6);
}

.filter-select-wrap {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.select-label {
    font-size: var(--fs-base);
    color: var(--color-text-dark);
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.filter-select-wrap select {
    min-width: 110px;
    border: none;
    background: transparent;
    color: var(--color-text-dark);
    font-size: var(--fs-base);
    letter-spacing: 1px;
    padding-right: var(--sp-4);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%23948B82' stroke-width='1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

/* ========== 内容区布局 ========== */
.artisan-content-section {
    padding: var(--sp-24) 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: var(--sp-24);
}

/* ========== 左侧分类导航 ========== */
.category-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 30px);
    align-self: start;
}

.sidebar-group {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--color-text-dark);
    margin-bottom: var(--sp-2);
}

.sidebar-sub {
    font-size: var(--fs-base);
    color: var(--color-text-muted);
    margin-bottom: var(--sp-3);
}

.category-list {
    list-style: none;
    padding-top: var(--sp-8);
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sp-2) 0;
    padding-left: var(--sp-3);
    cursor: pointer;
    transition: opacity 0.24s, color 0.24s;
    border-left: 3px solid transparent;
}

.category-item:hover {
    opacity: 0.85;
}

/* 激活态：红色竖线 + 深色文字 */
/*.category-item.active {
    border-left-color: var(--color-seal);
}*/

.category-name {
    font-size: var(--fs-base);
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}

.category-item.active .category-name {
    color: #1f1b18;
    font-weight: var(--fw-semibold);
}

.category-count {
    font-size: var(--fs-base);
    color: #a19a92;
}

/* ========== 列表式文章卡片（左图右文） ========== */
.article-area {
    min-width: 0;
}

.article-list {
    display: flex;
    flex-direction: column;
}

.article-list-item {
    display: grid;
    grid-template-columns: 556px 1fr;
    gap: var(--sp-30);
    align-items: start;
    cursor: pointer;
    padding: var(--sp-10) 0;
    text-decoration: none;
    color: inherit;
}

/* 仅卡片之间有分割线：第 2 张起顶部加线，首尾均无（x 条数据 = x-1 条线） */
.article-list-item + .article-list-item {
    border-top: 1px solid #DDDDDD;
}

.article-list-img {
    aspect-ratio: 556 / 346;
    overflow: hidden;
    background: #ddd;
}

.article-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.article-list-item:hover .article-list-img img {
    transform: scale(1.02);
}

/* 右侧文本区 — 控制最大宽度，不铺满 */
.article-list-body {
    display: flex;
    flex-direction: column;
    max-width: 380px;
    padding-top: var(--sp-2);
}

.article-meta {
    font-size: var(--fs-base);
    color: var(--color-secondary);
    letter-spacing: 1px;
    margin-bottom: var(--sp-4);
}

.article-title {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
    letter-spacing: 0.5px;
    color: var(--color-text-dark);
    margin-bottom: var(--sp-8);
}

.article-desc {
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    line-height: var(--lh-relaxed);
    color: var(--color-text-dark);
    margin-bottom: var(--sp-6);
}

/* 搜索结果：匹配关键词标红 */
.search-hit {
    color: #c0392b;
    font-style: normal;
}

/* 底部圆形三角形按钮 */
.article-arrow-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-text-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.24s, border-color 0.24s;
    cursor: pointer;
    flex-shrink: 0;
}

.article-arrow-btn svg {
    width: 10px;
    height: 10px;
    color: var(--color-text-muted);
    transition: transform 0.24s, color 0.24s;
}

.article-list-item:hover .article-arrow-btn {
    border-color: var(--color-secondary);
}

.article-list-item:hover .article-arrow-btn svg {
    color: var(--color-secondary);
    transform: translateX(2px);
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 90px 0;
}

.empty-state p {

    font-size: var(--fs-base);
    color: #867d74;
    letter-spacing: 2px;
}

/* ========== 查询加载中（ES 请求期间） ========== */
.artisan-es-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-3);
    padding: var(--sp-16) 0;
    font-size: var(--fs-base);
    color: var(--color-text-muted);
    letter-spacing: 1px;
}

.artisan-es-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-top-color: var(--color-seal);
    border-radius: 50%;
    animation: artisanEsSpin 0.7s linear infinite;
}

@keyframes artisanEsSpin {
    to { transform: rotate(360deg); }
}


/* ========== 响应式：中屏（1025~1600px）—— 收窄导航+图片，给文本留足空间 ========== */
@media (max-width: 1600px) and (min-width: 1025px) {

    .content-layout {
        grid-template-columns: 240px 1fr;
        gap: var(--sp-8);
    }

    .article-list-item {
        grid-template-columns: 400px 1fr;
        gap: var(--sp-8);
    }

    .article-list-img {
        width: 400px;
        height: 249px;
    }

    .article-list-body {
        max-width: none;
    }
}

/* ========== 响应式：平板 ========== */
@media (max-width: 1200px) {

    .article-title {
        font-size: var(--fs-lg);
    }

    .article-list-item {
        grid-template-columns: 400px 1fr;
        gap: var(--sp-8);
        padding: var(--sp-6) 0;
    }

    .article-list-img {
        width: 400px;
        height: 248px;
    }

    .article-arrow-btn {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 1024px) {

    .search-input-wrap input,
    .filter-select-wrap select {
        min-height: var(--sp-10);
    }

    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .content-layout {
        grid-template-columns: 1fr;
        gap: var(--sp-6);
    }

    .category-sidebar {
        position: static;
    }

    .category-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .category-item {
        border-bottom: none;
        border-left: none;
        padding: var(--sp-1) var(--sp-3);
        gap: 8px;
    }

    .category-item.active {
        border-left: none;
        border-bottom: 2px solid var(--color-seal);
        border-radius: 0;
    }
}

/* ========== 响应式：手机 ========== */
@media (max-width: 768px) {

    .artisan-quote-section,
    .artisan-filter-section,
    .artisan-content-section {
        padding: var(--sp-16) 0 var(--sp-12);
    }

    .artisan-quote-text {
        font-size: var(--fs-base);
        line-height: var(--lh-loose);
    }

    .filter-actions {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .filter-select-wrap {
        flex: 1;
        justify-content: space-between;
        border-bottom: 1px solid #ddd5cc;
        padding-bottom: 6px;
    }

    .filter-select-wrap select {
        min-width: auto;
        max-width: 120px;
    }

    /* 手机端卡片改为上下堆叠 */
    .article-list-item {
        grid-template-columns: 1fr;
        gap: var(--sp-4);
        padding: var(--sp-4) 0;
    }

    .article-list-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .article-list-body {
        max-width: none;
    }

    .article-title {
        font-size: var(--fs-lg);
    }

    .article-arrow-btn {
        width: 32px;
        height: 32px;
    }

    .article-arrow-btn svg {
        width: 10px;
        height: 10px;
    }

}
