/* =================================================================
   ブランド / アイテム一覧（フリーページ）
   設置先：https://gigaplus.makeshop.jp/swat/cm/css/brand-list.css
================================================================= */

.brand-list-page *, .brand-list-page *::before, .brand-list-page *::after {
    box-sizing: border-box;
}

.brand-list-page {
    padding-bottom: 120px;
}

/* ページ内リンクはなめらかにスクロール */
html:has(.brand-list-page) {
    scroll-behavior: smooth;
}

/* ジャンプ先が固定ヘッダー＋頭文字ナビに隠れないように */
.bl-group,
.bl-cats {
    scroll-margin-top: calc(var(--hd-h, 170px) + 80px);
}

/* -----------------------------------------------------------------
   頭文字ナビ（スクロールしても画面上部に追従）
----------------------------------------------------------------- */

.bl-nav {
    position: sticky;
    top: var(--hd-h, 170px);
    z-index: 50;
    margin: 40px 0 20px;
    padding: 10px 0;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.bl-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.bl-nav li a,
.bl-nav li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 36px;
    padding: 0 4px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

.bl-nav li a {
    border: 1px solid #222;
    color: #222;
    transition: background .2s, color .2s;
}

.bl-nav li a:hover {
    background: #222;
    color: #fff;
}

/* 該当ブランドなし */
.bl-nav li span {
    border: 1px solid #e5e5e5;
    color: #ccc;
}

.bl-nav li.bl-nav-cat a {
    padding: 0 16px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 13px;
    background: #c8161d;
    border-color: #c8161d;
    color: #fff;
}

.bl-nav li.bl-nav-cat a:hover {
    opacity: .8;
    background: #c8161d;
}

/* -----------------------------------------------------------------
   ブランド一覧
----------------------------------------------------------------- */

.bl-group {
    padding: 40px 0 10px;
}

.bl-group + .bl-group {
    border-top: 1px solid #e5e5e5;
}

.bl-letter {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: #222;
    margin-bottom: 24px;
}

.bl-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px 24px;
}

.bl-item {
    display: flex;
    flex-direction: column;
}

.bl-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #222;
}

.bl-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 90px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #e5e5e5;
    background: #fff;
    transition: border-color .2s;
}

.bl-logo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.bl-link:hover .bl-logo {
    border-color: #222;
}

.bl-link:hover .bl-name {
    color: #c8161d;
}

.bl-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .04em;
}

.bl-kana {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.5;
    color: #888;
}

/* ブランド内のカテゴリ */
.bl-sub {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.bl-sub a {
    display: block;
    padding: 3px 10px;
    background: #f2f2f2;
    color: #444;
    font-size: 11px;
    line-height: 1.6;
    transition: background .2s;
}

.bl-sub a:hover {
    background: #dadada;
    color: #222;
}

/* その他のブランド */
.bl-other {
    margin-top: 40px;
    text-align: center;
}

.bl-other a {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 14px 40px;
    border: 1px solid #222;
    color: #222;
    font-size: 15px;
    letter-spacing: .08em;
    transition: background .2s, color .2s;
}

.bl-other a span {
    color: #c8161d;
    font-weight: 700;
    letter-spacing: .14em;
}

.bl-other a:hover {
    background: #222;
    color: #fff;
}

/* -----------------------------------------------------------------
   カテゴリー別に探す
----------------------------------------------------------------- */

.bl-cats {
    margin-top: 120px;
}

.bl-cat-grid {
    column-count: 3;
    column-gap: 40px;
}

.bl-cat {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    padding-bottom: 40px;
}

.bl-cat-ttl a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #222;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #222;
}

.bl-cat-ttl a span {
    flex-shrink: 0;
    font-size: 13px;
    letter-spacing: .12em;
    color: #c8161d;
}

.bl-cat-ttl a:hover {
    color: #c8161d;
}

.bl-cat-list > li {
    border-bottom: 1px solid #eee;
}

.bl-cat-list a {
    display: block;
    padding: 10px 4px 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    position: relative;
}

.bl-cat-list a::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-top: 1.5px solid #999;
    border-right: 1.5px solid #999;
    transform: translateY(-50%) rotate(45deg);
}

.bl-cat-list a:hover {
    color: #c8161d;
}

.bl-cat-sub {
    padding: 0 0 8px 18px;
}

.bl-cat-sub a {
    padding: 5px 4px 5px 14px;
    font-size: 12px;
    color: #666;
}

/* -----------------------------------------------------------------
   レスポンシブ
----------------------------------------------------------------- */

@media screen and (max-width: 1024px) {
    .bl-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .bl-cat-grid {
        column-count: 2;
    }
}

@media screen and (max-width: 768px) {
    .brand-list-page {
        padding-bottom: 70px;
    }

    /* 頭文字ナビは横スクロール1行 */
    .bl-nav {
        margin: 24px -20px 10px;
        padding: 8px 20px;
    }
    .bl-nav ul {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px;
    }
    .bl-nav ul::-webkit-scrollbar {
        display: none;
    }
    .bl-nav li {
        flex-shrink: 0;
    }
    .bl-nav li a,
    .bl-nav li span {
        min-width: 32px;
        height: 32px;
        font-size: 15px;
    }
    .bl-nav li.bl-nav-cat a {
        font-size: 12px;
        padding: 0 12px;
        white-space: nowrap;
    }

    .bl-group,
    .bl-cats {
        scroll-margin-top: calc(var(--hd-h, 100px) + 60px);
    }
    .bl-group {
        padding: 30px 0 6px;
    }
    .bl-letter {
        font-size: 30px;
        margin-bottom: 18px;
    }
    .bl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 12px;
    }
    .bl-logo {
        height: 70px;
        padding: 8px;
    }
    .bl-name {
        font-size: 12px;
    }
    .bl-kana {
        font-size: 10px;
    }
    .bl-sub a {
        padding: 2px 8px;
        font-size: 10px;
    }
    .bl-other a {
        padding: 12px 24px;
        font-size: 13px;
    }

    .bl-cats {
        margin-top: 70px;
    }
    .bl-cat-grid {
        column-count: 1;
    }
    .bl-cat {
        padding-bottom: 30px;
    }
    .bl-cat-ttl a {
        font-size: 16px;
    }
}
