.ads{
    margin-top: 1em;
    position: relative;
    padding: 1em .5em 3.5em;
    background-color: var(--pal-gray);
    box-shadow: var(--shadow);
}

@media screen and (min-width: 767px){
    .ads{
        margin-top: 2em;
    }
}

.product h5{
    color: var(--pale);
    padding-left: .7em;
    padding: .5em .5em .5em .7em;
}

.product h5::before{
    content: none;
    content: "\f290";
    font-family: var(--fa6);
    font-weight: bold;
    width: 2em;
    height: 2em;
    font-size: .8em;
    line-height: 2;
    color: #fff;
    margin-right: .5em;
    padding: .2em;
    border-radius: 50%;
    display: inline-block;
    text-align: center;
}

@media screen and (min-width: 767px){
    .product h5{
        padding: .75em .5em .75em .7em;
    }

    .product h5::before{
        margin-right: .75em;
    }
}

.ads + .ads{
    margin-top: 1em;
}

.ads::before{
    content: "PR";
    position: absolute;
    font-size: .7em;
    line-height: 1.5;
    bottom: 1.5em;
    left: -.8em;
    background-color: var(--sky);
    color: var(--white);
    padding: 0 .75em;
    border-radius: 2px;
    z-index: 10;
}

.ads.right::before,
.ads:nth-child(2n)::before{
    left: auto;
    right: -.8em;
    background-color: var(--red);
}

/*
.ads::after{
    content: "";
    position: absolute;
    top: calc(1.5em + .1em);
    left: -.55em;
    width: 0;
    height: 0;
    border-top: .6em solid var(--sky);
    border-left: .6em solid transparent;
    z-index: 1;
}

.ads.right::after,
.ads:nth-child(2n)::after{
    left: auto;
    right: -.55em;
    border-left: none;
    border-right: .6em solid transparent;
    border-top-color: var(--red);
}
*/


.ads + h6{
    margin: 1em 0 0;
    padding: .25em;
}

h6 + .ads{
    margin-top: 0;
}

.ads .heading{
    margin-bottom: 1em;
    display: block;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.heading span{
    color: var(--gold);
    background-color: var(--pal-gold);
    box-shadow: var(--sha-gold);
    font-size: .8em;
    border-radius: 2em;
    padding: .5em 1em;
}

.ads > .grid{
    display: grid;
    position: relative;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: .5em;
}

.ads::after{
    content: "提供元サイトで、必ず詳細を確認してください";
    color: var(--red);
    position: absolute;
    width: 100%;
    display: block;
    bottom: .75em;
    z-index: 10;
    font-size: .8em;
    text-align: center;
    grid-column: 1;
    grid-template-columns: none;
}

.ads.imgs{
    display: grid;
    grid-template-columns: 50% auto;
    align-items: start;
}

.heading > figure{
    padding: 0 .5em 0 0;
    margin: 0;
}

.ads.imgs > .grid{
    padding: 0;
    min-width: 0;
    grid-template-columns: repeat(1, 1fr);
}

.ads .grid > a {
    border: 2px transparent solid;
    display: block;
    padding: .5em 2px;
    text-align: center;
    background: var(--pal-pale);
    border-radius: 4px;
    box-shadow: var(--sha-pale);
    text-decoration: none;
    color: inherit;
    transition: .2s;
    font-size: .8em;
    color: var(--pale);
}

.ads .item > a{
    background-color: var(--pal-sky);
    color: var(--sky);
    box-shadow: var(--sha-sky);
}

.ads.imgs > .grid > a{
    background-color: var(--pal-green);
    color: var(--green);
    box-shadow: var(--sha-green);
}

@media screen and (min-width: 767px) {
    .ads{
        display: grid;
        grid-template-columns: 25% 75%;
        align-items: start;
        padding: 2em 0 3.5em;
    }

    .ads > div.heading {
        grid-column: 1 / 2;
        margin-bottom: 0;
        align-self: center;
    }

    .ads > .grid {
        padding-right: 1em;
        grid-column: 2 / 3;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }

    .ads.imgs{
        grid-template-columns: calc(100% / 3) auto;
    }

    .heading > figure{
        margin-left: 1em;
    }

    .ads.imgs > .grid{
        display: grid;
        padding-right: 1em;
        grid-column: 2 / 3;
        grid-template-columns: repeat(3, 1fr);
    }

    .ads.imgs > .grid a{
        margin-right: 0;
    }

    .ads.imgs > .grid > a:not(:first-child){
        margin-top: 0;
    }
}

@media screen and (min-width: 1181px){
    .ads > .grid > a:hover,
    .ads.imgs > .grid > a:hover{
        transform: translateY(2px);
        box-shadow: none;
        border-color: var(--mid-sky);
    }
}

.wcheck{
    margin-top: 1em;
    font-size: .8em;
    color: var(--red);
    text-align: center;
    text-decoration: underline;
    text-underline-offset: .25em;
}

