@charset "UTF-8";

/*  ----------------------------------------------------------
    coupon
----------------------------------------------------------  */
.top-coupon {
    padding-bottom: 10rem;
    color: #333;
}

.top-coupon img {
    width: 100%;
}

.top-coupon .wrap {
    padding: 5rem;
}

.top-coupon .wrap > div {
    background: rgba(255, 255, 255, 0.9);
    padding-bottom: 8rem;
}

.top-coupon .wrap p {
    text-align: center;
    line-height: 2.8;
}

/* ★ 修正済：余計な padding / justify を削除した新しいレイアウト */
.top-coupon ul {
    margin-top: 40px;
    width: 80%;
    /* 全体幅の調整 */
    margin-left: auto;
    margin-right: auto;
    padding: 0 !important;
    /* レイアウト崩しの原因を無効化 */

    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    /* 常に左揃え */
    gap: 40px !important;
    /* カードの隙間 */
}

/* ★ 3カラム固定（gap に合わせて計算） */
.top-coupon ul li {
    width: calc((100% - 80px) / 3);
    /* gap 40px × 2を差し引く */
    list-style: none;
}

.top-coupon ul li:empty {
    display: none;
    /* 空要素を非表示（最後ulの崩れ防止） */
}

.top-coupon ul figure img,
.top-coupon ul div {
    transition: all .3s;
}

.top-coupon ul figure {
    margin-bottom: 2rem;
    overflow: hidden;
}

.top-coupon ul div {
    position: relative;
    text-align: left;
    font-size: 1.6rem;
    font-weight: 700;
    color: #544e40;
}

.top-coupon ul div span {
    display: block;
    color: #333;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    margin-top: 0.5rem;
    background-color: #fff;
    padding-top: 5px;
    line-height: 20px;
}

.top-coupon p {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    margin-top: 0.5rem;
    color: #f763c5;
    text-decoration: underline;
    background-color: #fff;
    padding-top: 5px;
    line-height: 25px;
}

.top-coupon ul a:hover figure img {
    transform: scale(1.1);
}

/* 画像の安定表示（★これが効かないとサイズ崩れが起こる） */
.top-coupon ul li img {
    width: 100% !important;
    height: auto;
    display: block;
}

/* ----------------------------
    SP レイアウト
---------------------------- */
@media screen and (max-width: 767px) {
    .top-coupon {
        padding-bottom: 8rem;
    }

    .top-coupon .wrap {
        padding: 2rem;
    }

    .top-coupon .wrap > div {
        padding: 0 3rem 3rem 3rem;
    }

    .top-coupon .wrap p {
        text-align: left;
        line-height: 2;
    }

    /* ★ SP は1カラムでOK */
    .top-coupon ul {
        width: 100%;
        padding: 0 2rem !important;
        display: block !important;
    }

    .top-coupon ul li {
        width: 100%;
        margin-bottom: 4rem;
    }
}
