/* ========================================
   カテゴリ一覧位置
======================================== */
#category-list-top {
    scroll-margin-top: 20px;
}

/* ========================================
   カテゴリ一覧ページ
======================================== */
.category-list-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* ========================================
   カテゴリ一覧
======================================== */
.category-list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 5mm;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 縦方向を成り行きにする */
.category-list-grid.grid-auto {
    grid-template-rows: auto;
}

/* ========================================
   カード
======================================== */
.category-list-item {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.category-list-item a {
    display: block;
    width: 100%;
    height: 100%;
    padding: 3mm;
    box-sizing: border-box;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
}

.category-list-item a:hover {
    background: var(--color-background);
}

/* ========================================
   画像
======================================== */
.category-list-image {
    width: calc(100% + 6mm);
    margin: -3mm -3mm 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--k10);
    box-sizing: border-box;
}

.category-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   内容
======================================== */
.category-list-content {
    min-width: 0;
    padding-top: 2mm;
    line-height: 1.25;
    box-sizing: border-box;
}

/* タイトル */
.category-list-content p:first-child {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin: 0;
    font-size: 1.15rem;
    font-weight: bold;
    line-height: 1.25;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ディスクリプション */
.category-list-content p:nth-child(2) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin: 4px 0 0;
    font-size: 0.85rem;
    line-height: 1.25;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ========================================
   ページネーション
======================================== */
.category-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 4mm;
    width: 100%;
    margin: 5mm 0 0;
    box-sizing: border-box;
}

.category-pagination-pages {
    display: flex;
    align-items: center;
    gap: 1mm;
    min-width: 0;
}

.category-pagination a,
.category-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 8mm;
    height: 8mm;
    padding: 0 2mm;
    box-sizing: border-box;
    text-decoration: none;
}

.category-pagination a {
    cursor: pointer;
}

.category-pagination .is-current {
    font-weight: bold;
}

.category-pagination .is-disabled {
    opacity: 0.35;
}

/* ========================================
   スマートフォン
======================================== */
@media (max-width: 767px) {

    /* ----------------------------------------
       一覧
    ---------------------------------------- */
    .category-list-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        gap: 3mm;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
    }

    /* ----------------------------------------
       カード
    ---------------------------------------- */
    .category-list-item {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    .category-list-item a {
        display: flex;
        align-items: center;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 2.5mm;
        gap: 3mm;
        border: 1px solid var(--color-border);
        border-radius: 5px;
        overflow: hidden;
    }

    /* ----------------------------------------
       画像
    ---------------------------------------- */
    .category-list-image {
        flex: 0 0 calc(30% + 2.5mm);
        width: calc(30% + 2.5mm) !important;
        max-width: calc(30% + 2.5mm) !important;
        min-width: 0 !important;
        height: auto;
        aspect-ratio: 16 / 9;
        margin: -2.5mm 0 -2.5mm -2.5mm;
        padding: 0;
        overflow: hidden;
    }

    .category-list-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: 100%;
        margin: 0;
        padding: 0;
        object-fit: cover;
    }

    /* ----------------------------------------
       内容
    ---------------------------------------- */
    .category-list-content {
        flex: 1 1 0;
        width: auto !important;
        max-width: 100%;
        min-width: 0 !important;
        height: auto;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }

    .category-list-content p:first-child {
        margin: 0;
        font-size: 1rem;
        line-height: 1.3;
    }

    .category-list-content p:nth-child(2) {
        display: none;
        /*
        display: block;
        margin: 1.5mm 0 0;
        font-size: 0.8rem;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        */
    }
}