/**
 * dm-taxonomy.css
 * Dawnmaker 分类页（优化版）
 * - Apple 风格卡片
 * - GPU 加速
 * - 与 creation Center 完全统一
 */

/* ---------------------------------------------
   CONTAINER
--------------------------------------------- */
.dm-taxonomy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.dm-taxonomy-container .dm-page-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

/* ---------------------------------------------
   TERM GRID（复用 Creation Center）
--------------------------------------------- */
.dm-term-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto 40px;
    justify-content: center;
}

.dm-term-card {
    flex: 0 0 calc((100% - 60px) / 3);
    max-width: calc((100% - 60px) / 3);
    display: flex;
    flex-direction: column;
    position: relative;

    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #111;

    box-shadow: 0 4px 14px rgba(0,0,0,0.08);

    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition:
        opacity .6s ease,
        transform .6s ease,
        box-shadow .3s ease;
    will-change: transform, opacity;
}

/* fade-in */
.dm-term-card.dm-fade-in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* hover */
.dm-term-card:hover {
    transform: translate3d(0, -6px, 0);
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

/* thumb */
.dm-term-card-thumb {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.dm-term-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dm-term-card-thumb-fallback {
    width: 100%;
    height: 100%;
    background: #f2f2f2;
}

/* body */
.dm-term-card-body {
    padding: 18px 16px 12px;
}

.dm-term-card-title {
    font-size: 20px;
    margin: 0;
    font-weight: 600;
    line-height: 1.05;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* responsive */
@media (max-width: 900px) {
    .dm-term-card {
        flex: 0 0 calc((100% - 30px) / 2);
        max-width: calc((100% - 30px) / 2);
    }
}

@media (max-width: 600px) {
    .dm-term-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .dm-term-grid {
        gap: 20px;
    }
}

/* 禁用移动端 hover */
@media (hover: none) {
    .dm-term-card:hover {
        transform: none;
        box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    }
}

/* ---------------------------------------------
   CREATION GRID（无子分类时）
--------------------------------------------- */
.dm-creation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.dm-creation-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.dm-creation-card:hover {
    transform: translate3d(0, -4px, 0);
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.dm-creation-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dm-creation-card-body {
    padding: 10px;
}

.dm-creation-card-title {
    font-size: 16px;
    margin: 0 0 4px;
    font-weight: 600;
}

.dm-creation-card-title a {
    text-decoration: none;
    color: #111;
}

.dm-creation-card-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.dm-btn.dm-btn-dark {
    display: inline-block;
    padding: 6px 14px;
    background: #111;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    border-radius: 4px;
}

/* pagination */
.dm-pagination {
    margin-top: 30px;
    text-align: center;
}
