/*====================================
 人気ランキング全体
====================================*/

#r_ranking {
    margin: 60px 0;
    padding: 35px;
    border: 1px solid #d9b96a;
    border-radius: 18px;
    /*background: linear-gradient(to bottom, #fffef8 0%, #fff9df 45%, #ffffff 100%);*/
}

/* タイトル */

#r_ranking h2 {
    margin: 0 0 35px;
    padding: 18px;
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    color: #7b5b00;
    background: linear-gradient(to right, #fff6c9, #fffef5, #fff6c9);
    border-radius: 12px;
}

/*====================================
 一覧
====================================*/

#r_ranking .row {
    margin: 0;
}

#r_ranking .col {
    padding: 10px;
    display: flex;
}

/*====================================
 カード
====================================*/

#r_ranking .rankList {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .08);
    transition: .3s;
    overflow: visible;
}

#r_ranking .rankList:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .15);
}

/*====================================
 順位アイコン
====================================*/

#r_ranking .rankBadge {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

#r_ranking .rankBadge img {
    width: 50px;
    display: block;
}

/* 1～3位 */
#rank1 .rankBadge img,
#rank2 .rankBadge img,
#rank3 .rankBadge img {
    width: 50px;
    height: auto;
}

/* 4・5位 */
#rank4 .rankBadge,
#rank5 .rankBadge {
    top: -12px;
}

#rank4 .rankBadge img,
#rank5 .rankBadge img {
    width: 32px !important;
    height: auto !important;
    display: block;
}

/*====================================
 商品画像
====================================*/

#r_ranking .rankImg {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    padding: 24px 10px 8px;
    background: #fff;
    border-radius: 15px 15px 0 0;
}

#r_ranking .rankImg img {
    max-width: 145px;
    max-height: 125px;
    width: auto;
    height: auto;
    object-fit: contain;
}

#r_ranking .rankList:hover .rankImg img {
    transform: scale(1.05);
}

/*====================================
 商品情報
====================================*/

#r_ranking .rankDetail {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    text-align: center;
}

/*====================================
 商品名
====================================*/

#r_ranking .rankName {
    font-size: 15px;
    line-height: 1.6;
    min-height: 4.8em;
    margin-bottom: 15px;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

#r_ranking .rankName a {
    color: #333;
    text-decoration: none;
}

#r_ranking .rankName a:hover {
    color: #d60000;
}

/*====================================
 価格
====================================*/

#r_ranking .rankPrice {
    margin-top: auto;
    padding-top: 10px;
    font-size: 20px;
    font-weight: bold;
    color: #d60000;
    line-height: 1.5;
}

/*====================================
 TOP3
====================================*/

#rank1 {
    border: 2px solid #FFD700;
}

#rank2 {
    border: 2px solid #C0C0C0;
}

#rank3 {
    border: 2px solid #CD7F32;
}

/*====================================
 スマホ表示
 1位：1列
 2・3位：2列
 4・5位：2列
====================================*/
@media (max-width:767px) {
    /*====================================
 ランキング
====================================*/

    .rankingList {
        text-align: left;
        margin: 20px auto;
        letter-spacing: -0.4em;
    }

    .rankingList li {
        display: inline-block;
        vertical-align: top;
        width: 31%;
        margin-left: 2%;
        margin-bottom: 15px;
        padding: 8px;
        box-sizing: border-box;

        font-size: 12px;
        text-align: left;
        letter-spacing: normal;

        background: #fff;
        border: 1px solid #ddd;
        border-radius: 10px;
        box-shadow: 0 3px 8px rgba(0, 0, 0, .12);

        transition: .25s;
    }

    .rankingList li:nth-child(3n) {
        margin-right: 1%;
    }

    .rankingList li:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
    }

    /*====================================
 TOP3装飾
====================================*/

    .rankingList li:nth-child(1) {
        border: 2px solid #FFD700;
    }

    .rankingList li:nth-child(2) {
        border: 2px solid #C0C0C0;
    }

    .rankingList li:nth-child(3) {
        border: 2px solid #CD7F32;
    }

    /*====================================
 商品画像
====================================*/

    .rankingList .itemImg {
        position: relative;
        text-align: center;
        margin-bottom: 8px;
        height: 110px;

        display: flex;
        justify-content: center;
        align-items: center;
    }

    .rankingList .itemImg img {
        max-width: 100%;
        max-height: 95px;
        width: auto;
        height: auto;
    }

    /*====================================
 順位アイコン
====================================*/

    .rankingNum {
        position: absolute;
        left: -6px;
        top: -6px;

        width: 30px;
        height: 30px;
        line-height: 30px;

        background: #2490d0;
        color: #fff;

        font-size: 15px;
        font-weight: bold;
        text-align: center;

        border-radius: 50%;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    }

    /* 1位 */
    .rankingList li:nth-child(1) .rankingNum {
        background: #FFD700;
        color: #7a5200;
    }

    /* 2位 */
    .rankingList li:nth-child(2) .rankingNum {
        background: #C0C0C0;
        color: #333;
    }

    /* 3位 */
    .rankingList li:nth-child(3) .rankingNum {
        background: #CD7F32;
        color: #fff;
    }

    /*====================================
 商品名
====================================*/

    .rankingName {
        margin-top: 6px;
        line-height: 1.5;
        height: 54px;
        overflow: hidden;
        color: #333;
    }

    /*====================================
 価格
====================================*/

    .rankingPrice {
        margin-top: 8px;

        color: #d60000;
        font-size: 18px;
        font-weight: bold;
        text-align: center;

        text-shadow: 0 1px 0 #fff;
    }

    /*==============================
 ランキングタイトル
==============================*/

    .rankingHeading {
        background: linear-gradient(to bottom, #ffe88b, #ffcf3d);
        border: 2px solid #d9a400;
        padding: 8px 0;
        margin-bottom: 15px;
        text-align: center;
        color: #6d4700;
        font-size: 18px;
        font-weight: bold;

        box-shadow: 0 3px 8px rgba(0, 0, 0, .15);
    }

    .rankingHeading h2 {
        margin: 0;
        padding: 0;
        font-size: 18px;
        font-weight: bold;
        color: #6d4700;
        text-shadow: 1px 1px 0 #fff;
        letter-spacing: 1px;
    }
}