/*
    [brand-ranking-５.css]

    このファイルは、ブランドランキング iframeの中のソースに対する指定を行うものです。
    外側外側（=iframeタグ）への指定は、brand-ranking-wrap.css で行っています。
*/

/* --------------------
  ランキングのコンテンツ（iframe 内側です）

  スマホ719px以下、PC商品ページ720px以上の
  2つのメディアクエリが存在します。
-------------------- */
.tb-p-brand-ranking {
    margin-left: auto;
    margin-right: auto;
}

.tb-p-brand-ranking-title {
    margin-top: var(--sp-3);
    text-align: center;
    font-size: var(--fz-140);
    font-weight: 600;
    font-family: "Hanken Grotesk", sans-serif;
    color: var(--gr-90);
}

/* ランキング のサブ見出し */
.tb-p-brand-ranking-title--sub {
    display: block;
    margin: 0;
    line-height: 1;
    font-size: var(--fz-3);
    font-weight: 600;
    color: var(--gr-50);
    text-align: center;
}

.tb-p-brand-ranking-items li:nth-child(1)::before {
    content: "1";
    color: white;
    background-color: var(--gold);
}

.tb-p-brand-ranking-items li:nth-child(2)::before {
    content: "2";
    color: white;
    background-color: var(--silver);
}

.tb-p-brand-ranking-items li:nth-child(3)::before {
    content: "3";
    color: white;
    background-color: var(--bronze);
}

.tb-p-brand-ranking-items li:nth-child(4)::before {
    content: "4";
}

.tb-p-brand-ranking-items li:nth-child(5)::before {
    content: "5";
}

.tb-p-brand-ranking-items li:nth-child(6)::before {
    display: none;
}

.tb-p-brand-ranking-items-wrap {
    margin-top: var(--sp-5);
    overflow-x: scroll;
}

.tb-p-brand-ranking-items {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    height: auto;
    display: -webkit-box;/* 横スクロールうまく行かないときのおまじない */
}

.tb-p-brand-ranking-items li {
    display: block;
    margin-top: var(--sp-6);
    padding-top: var(--sp-4-5);
    padding-bottom: var(--sp-4);
    position: relative;
    width: 150px;
}

.tb-p-brand-ranking-items li + li {
    margin-left: var(--sp-4-5);
}

/* スマホだけ左に余白 */
.tb-p-brand-ranking-items li:nth-child(1) {
    margin-left: var(--sp-5);
}

/* 横スクロールの先頭と最後尾の余白調整ハック的に必要なので、nth-child(6)をこのように記述しています */
.tb-p-brand-ranking-items li:nth-child(6) {
    width: 1px;
}

.tb-p-brand-ranking-items li a {
    display: block;
    font-size: var(--fz-70);
    line-height: 1.3;
    text-align: center;
}

.tb-p-brand-ranking-items li a:link,
.tb-p-brand-ranking-items li a:visited,
.tb-p-brand-ranking-items li a:hover,
.tb-p-brand-ranking-items li a:active {
    text-decoration: none;
}

.tb-p-brand-ranking-items li::before {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    /* top: 0;
    left: 6px; */
    top: -21px;
    left: -16px;
    z-index: 10;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    content: "";
    line-height: 1;
    color: var(--gr-90);
    background-color: var(--gr-10);
    text-align: center;
    filter: drop-shadow(0px 2px 0px rgba(0,0,0,0.1));
}


.tb-p-brand-ranking-items li a img {
    display: block;
    margin-bottom: var(--sp-3);
    border-radius: var(--rd-3);
}

/* ===================================
   PC 720px （767px以下 商品ページを想定）
=================================== */
@media (min-width:585px) {

    .tb-p-brand-ranking {
        width: 100%;
    }

    .tb-p-brand-ranking-title--sub {
        margin: var(--sp-1) 0 0;
    }

    .tb-p-brand-ranking-items-wrap {
        margin-top: 0;
        overflow: hidden;
    }

    .tb-p-brand-ranking-title {
        font-size: var(--fz-170);
        font-family: "Hanken Grotesk", serif;
    }

    .tb-p-brand-ranking-items {
        display: grid;
        gap: var(--sp-4) var(--sp-4-5);
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
        justify-content: space-between;
        margin-top: var(--sp-4);
        margin-left: var(--sp-6);
        height: auto;
    }

    .tb-p-brand-ranking-items li {
        padding-bottom: 0;
        width: initial;
    }

    .tb-p-brand-ranking-items li::before {
        /* top: 0;
        left: 5px; */
        /* top: -18px;
        left: -16px; */
        top: -21px;
        left: -16px;
        width: 36px;
        height: 36px;
        font-size: var(--fz-90);
    }

    .tb-p-brand-ranking-items li:nth-child(1) {
        margin-left: 0!important;
    }

    .tb-p-brand-ranking-items li + li {
        margin-left: 0;
    }

    .tb-p-brand-ranking-items li a:hover,
    .tb-p-brand-ranking-items li a:active {
        opacity: .8;
    }
}
/* END PC 720px 以上 */