/* ============================================================
   沃唐卡 — 首页样式
   ============================================================ */

body {
    background-color: #F9F4E8;
    font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif;
    color: #4A3A28;
}

.thangka-main {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面大标题 */
.page-title {
    text-align: center;
    font-family: "STSong", "SimSun", "Noto Serif SC", serif;
    font-size: 34px;
    color: #8C5A2E;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: 2px;
}

/* 标题下方左右排版 */
.header-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    gap: 24px;
    flex-wrap: wrap;
}
.header-left {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.brand-link {
    font-family: "Noto Serif SC", serif;
    font-size: 18px;
    font-weight: 700;
    color: #8C5A2E;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
    line-height: 1;
}
.brand-link:hover {
    color: #A67C4F;
}
.header-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 筛选按钮区域 */
.filter-box {
    margin-bottom: 0;
}
.filter-btn {
    display: inline-block;
    padding: 9px 24px;
    margin: 0 12px 8px 0;
    border: 1px solid #8C5A2E;
    background: #FFFFFF;
    color: #8C5A2E;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-family: "Microsoft YaHei", sans-serif;
    transition: all 0.3s ease;
    outline: none;
    text-decoration: none;
}
.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #8C5A2E, #A67C4F);
    color: #fff;
    border-color: #8C5A2E;
    box-shadow: 0 2px 8px rgba(140, 90, 46, 0.25);
}

/* 结果栏 */
.result-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 4px;
    font-size: 14px;
    color: #7A6248;
}
.sort-select {
    padding: 6px 12px;
    border: 1px solid #D4C2A8;
    border-radius: 4px;
    background: #fff;
    color: #8C5A2E;
    cursor: pointer;
    outline: none;
}

/* 唐卡卡片 */
.thangka-card {
    display: flex;
    align-items: stretch;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 3px 12px rgba(100, 70, 40, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #EEE6D8;
}
.thangka-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(100, 70, 40, 0.18);
}

/* 图片区域 */
.img-box {
    width: 180px;
    height: 240px;
    margin-right: 32px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid #E8D9C2;
}
.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}
.img-box:hover img {
    transform: scale(1.05);
}

/* 信息区域 */
.info-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 32px;
    margin-bottom: 16px;
}
.info-item {
    font-size: 15px;
    line-height: 1.6;
}
.info-label {
    font-weight: 600;
    color: #8C5A2E;
    display: inline-block;
    width: 110px;
}
.info-value {
    color: #4A3A28;
}

/* 推荐指数星级 */
.stars {
    color: #D4A04A;
    letter-spacing: 2px;
}

/* 状态提示 */
.status-tip {
    position: relative;
    cursor: help;
    border-bottom: 1px dashed #8C5A2E;
}

/* 卡片底部 */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px dashed #E8D9C2;
}
.detail-link {
    color: #A67C4F;
    text-decoration: none;
    font-size: 14px;
}
.detail-link:hover {
    color: #8C5A2E;
    text-decoration: underline;
}
.consult-btn {
    padding: 7px 18px;
    background: linear-gradient(135deg, #8C5A2E, #A67C4F);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}
.consult-btn:hover {
    box-shadow: 0 2px 8px rgba(140, 90, 46, 0.3);
    transform: translateY(-1px);
}

/* 空状态 */
#emptyState {
    text-align: center;
    padding: 24px;
    font-size: 15px;
    color: #947B5C;
}

/* 分页 */
.pagination-nav {
    text-align: center;
    padding: 24px 0;
}
.pagination-nav .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #D4C2A8;
    border-radius: 6px;
    color: #8C5A2E;
    text-decoration: none;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s;
}
.pagination-nav .page-numbers.current {
    background: #8C5A2E;
    color: #fff;
    border-color: #8C5A2E;
}
.pagination-nav .page-numbers:hover:not(.current) {
    background: #FDF6EC;
    border-color: #8C5A2E;
}

/* 回到顶部 */
.back-top {
    position: fixed;
    right: 30px;
    bottom: 40px;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    background: #8C5A2E;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.back-top.show {
    opacity: 1;
    visibility: visible;
}
.back-top:hover {
    background: #A67C4F;
}

/* 图片放大弹窗 */
.img-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 22, 12, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}
.img-modal.show { display: flex; }
.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}
.modal-img {
    max-width: 100%;
    max-height: 85vh;
    border: 4px solid #E8D9C2;
    border-radius: 8px;
}
.close-btn {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    background: #8C5A2E;
    color: #fff;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}
.close-btn:hover { background: #A67C4F; }

/* 详情弹窗 */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 22, 12, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.detail-modal.show { display: flex; }
.detail-box {
    position: relative;
    width: 900px;
    max-width: 100%;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    overflow-y: auto;
    border: 1px solid #E8D9C2;
}
.detail-box h3 {
    font-family: "Noto Serif SC", serif;
    color: #8C5A2E;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E8D9C2;
}
.detail-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}
.detail-img {
    width: 100%;
    border-radius: 8px;
    border: 2px solid #E8D9C2;
    cursor: zoom-in;
}
.detail-info p {
    margin-bottom: 12px;
    line-height: 1.8;
    font-size: 15px;
}
.detail-info strong {
    color: #8C5A2E;
    display: inline-block;
    width: 100px;
}
.detail-meaning {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed #E8D9C2;
}
.detail-meaning h4 {
    color: #8C5A2E;
    margin-bottom: 10px;
    font-size: 16px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .page-title { font-size: 24px; }
    .header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .filter-btn {
        margin: 4px 6px 4px 0;
        padding: 8px 14px;
        font-size: 14px;
    }
    .result-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .thangka-card {
        flex-direction: column;
        padding: 20px;
    }
    .img-box {
        width: 100%;
        height: 300px;
        margin: 0 auto 20px;
    }
    .info-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        text-align: center;
    }
    .consult-btn { width: 100%; padding: 10px; text-align: center; }
    .detail-body { grid-template-columns: 1fr; }
    .detail-box { padding: 20px; }
    .close-btn { top: -50px; right: 0; }
}
