.p-mv {
    position: relative;
    height: 100vh;
    max-height: 100vh;
    line-height: 1;
    overflow: hidden; /* 画像のはみ出し防止 */

    @media (768px > width) {
        height: auto; /* スマホで中身（1枚目）に合わせる */
        max-height: none;
    }

    & .p-mv__logo {
        position: absolute;
        width: 260px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10; /* 画像より前面に */
        @media (768px > width) {
            width: 120px;
        }
        img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: center;
        }
    }

    & .p-mv__img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        transition: opacity 1s; /* JSの切り替えを滑らかに */

        @media (768px > width) {
            /* スマホ時：1枚目（最初の画像）だけを通常配置にして高さを出す */
            &:first-of-type {
                position: relative; /* staticでも良いですが、念のため */
                height: auto; 
                opacity: 1; /* JSが動く前でも1枚目は見せておく */
            }
            /* 2枚目以降は1枚目に重ねる */
            &:not(:first-of-type) {
                position: absolute;
                top: 0;
                left: 0;
            }
        }

        &.active {
            opacity: 1;
            z-index: 1; /* 重なり順を上げる */
            view-transition-name: mv-image;
        }
    }
}
/* カスタムアニメーション（デフォルトのクロスフェードを少し調整したい場合） */
::view-transition-old(mv-image),
::view-transition-new(mv-image) {
    animation-duration: 0.8s;
    animation-timing-function: ease-in-out;
}
.p-concept {
    padding: 12rem 0;
    @media (768px > width) {
        padding: 6rem 1.6rem 8rem;
    }
    & .p-concept__container {
        display: flex;
        justify-content: center;
        gap: 2rem;
        @media (768px > width) {
            flex-direction: column-reverse;
            gap: 3rem;
        }
        > img {
            width: calc(580 / 1240 * 100vw);
            max-width: 654px;
            margin-left: calc(50% - 48vw);
            height: 100%;
            @media (768px > width) {
                width: 100%;
                margin-left: auto;
                margin-right: auto;
            }
        }
    }
    & .p-concept__content {
        text-align: center;
        width: calc(660 / 1240 * 100%);
        padding: 2rem;
        @media (768px > width) {
            width: 100%;
            padding: 0;
        }
        & .p-concept__contentHeading {
            font-size: 1.8rem;
            font-weight: 600;
            font-family: "Josefin Sans", sans-serif;
            color: var(--color-tea);
        }
        & .p-concept__contentTitle {
            margin-bottom: 4rem;
            font-size: 2.6rem;
            font-weight: 500;
            color: var(--color-bk);
            letter-spacing: .25rem;
            @media (1024px > width) {
                font-size: 2rem;
            }
            @media (768px > width) {
                margin-bottom: 2.4rem;
                white-space: nowrap;
            }
        }
        & .p-concept__contentText {
            text-align: left;
            line-height: calc(32 / 16);
            font-size: 1.6rem;
        }
    }
}
.p-products {
    padding: 0 0 12rem;
    @media (768px > width) {
        padding: 0 0 8rem;
    }
    & .p-products__title {
        text-align: center;
        margin-bottom: 6rem;
        @media (768px > width) {
            margin-bottom: 3.6rem;
        }
    }
    & .p-products__titleText {
        padding-bottom: 1.2rem;
        font-size: 1.6rem;
        font-weight: 600;
        font-family: "Josefin Sans", sans-serif;
        color: var(--color-tea);
        &.coffee {
            color: var(--color-coffee);
        }
    }
    & .p-products__titleHeading {
        font-size: 2.6rem;
        font-weight: 500;
        color: var(--color-bk);
        @media (768px > width) {
            font-size: 2rem;
        }
    }
    & .p-products__name {
        margin: 2.4rem 0;
        @media (768px > width) {
            margin: 1.2rem 0
        }
        & .p-products__nameText {
            font-size: 1.8rem;
            font-weight: 500;
            color: var(--color-brown);
            @media (768px > width) {
                font-size: 1.3rem;
            }
        }
        & .p-products__nameHeading {
            font-size: 2rem;
            color: var(--color-bk);
            @media (768px > width) {
                font-size: 1.5rem;
            }
        }
    }
    & .p-products__list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        &.mg {
            margin-bottom: 4rem;
        }
        &.mg120 {
            margin-bottom: 12rem;
        }
        & .p-products__item {
            @media (768px > width) {
                padding: 2.4rem 1.2rem;
            }
        }
    }
    & .p-products__text {
        font-size: 1.6rem;
        color: var(--color-bk);
        @media (768px > width) {
            font-size: 1.4rem;
        }
    }
    & .p-products__button {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        width: 24rem;
        margin: 2.4rem auto 0;
        padding: 1.1rem 0 1.1rem 2.4rem;
        border: 1px solid var(--color-bk);
        border-radius: 10rem;
        font-size: 1.6rem;
        color: var(--color-bk);
        @media (768px > width) {
            width: 100%;
            margin: 1.6rem auto 0;
            padding: .75rem 0 .75rem 1.6rem;
            font-size: 1.4rem;
        }
        img {
            width: 3.2rem;
            height: 3.2rem;
            object-fit: contain;
            object-position: center;
            margin-left: 1rem;
            transition: .3s ease;
            @media (768px > width) {
                width: 2.4rem;
                height: 2.4rem;
            }
        }
        &:hover {
            img {
                transform: translateX(1rem);
            }
        }
    }
    & .p-products__item {
        display: grid;
        grid-template-columns: subgrid;
        grid-row: span 4;
        padding: 6rem 5rem;
        align-content: center;
        @media (768px > width) {
            padding: 4rem 2rem;
            align-content: flex-start;
        }
        &:nth-of-type(even) {
            border: 2px solid var(--color-bk);
            border-top-right-radius: 3rem;
            border-bottom-right-radius: 3rem;
        }
        &:nth-of-type(odd) {
            border: 2px solid var(--color-bk);
            border-top-left-radius: 3rem;
            border-bottom-left-radius: 3rem;
        }
    }
    & .p-productsCoupon {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        max-width: 820px;
        margin: 8rem auto 0;
        @media (768px > width) {
            flex-direction: column;
            gap: 2rem;
            margin: 4rem auto 0;
        }
        & .p-productsCoupon__content {
            align-content: center;
        }
        & .p-productsCoupon__banner {
            width: calc(100% - 270px);
            @media (768px > width) {
                width: 100%;
            }
        }
        & .p-productsCoupon__link {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 2rem;
            width: 270px;
            height: 270px;
            border: 3px solid var(--color-bk);
            border-radius: .5rem;
            @media (768px > width) {
                width: 180px;
                height: 180px;
                margin: 0 auto;
            }
            > img {
                width: 110px;
                @media (768px > width) {
                    width: 80px;
                }
            }
            p {
                display: flex;
                align-items: center;
                gap: 1rem;
                @media (768px > width) {
                    flex-direction: column;
                    gap: .75rem;
                }
                span {
                    font-size: 1.6rem;
                    font-weight: 600;
                    color: var(--color-bk);
                    @media (768px > width) {
                        font-size: 1.4rem;
                    }
                }
                img {
                    width: 3.2rem;
                    height: 3.2rem;
                    object-fit: contain;
                    object-position: center;
                }
            }
        }
    }
}
.p-instagram {
    padding: 0 0 12rem;
    @media (768px > width) {
        padding: 0 0 6rem;
    }
    & .p-instagram__title {
        text-align: center;
        margin-bottom: 6rem;
        color: #A73390;
        font-family: "Josefin Sans", sans-serif;
        @media (768px > width) {
            margin-bottom: 3.5rem;
        }
        font-size: 2rem;
        font-weight: 600;
        img {
            display: block;
            width: 5rem;
            height: 5rem;
            object-fit: contain;
            object-position: center;
            margin: 1.4rem auto 0;
        }
    }
    & .p-instagram__text {
        text-align: center;
        margin-bottom: 6rem;
        font-size: 2rem;
        font-weight: 500;
        color: var(--color-bk);
        @media (768px > width) {
            font-size: 1.6rem;
        }
    }
    & .p-instagram__button {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        width: 24rem;
        margin: 0 auto;
        padding: 1.1rem 0 1.1rem 2.4rem;
        border: 1px solid var(--color-bk);
        border-radius: 10rem;
        font-size: 1.6rem;
        color: var(--color-bk);
        @media (768px > width) {
            margin: 0 auto;
            padding: .75rem 0 .75rem 1.6rem;
            font-size: 1.4rem;
        }
        img {
            width: 3.2rem;
            height: 3.2rem;
            object-fit: contain;
            object-position: center;
            margin-left: 1rem;
            transition: .3s ease;
        }
        &:hover {
            img {
                transform: translateX(1rem);
            }
        }
    }
}
.p-news {
    padding: 0 0 12rem;
    @media (768px > width) {
        padding: 0 0 6rem;
    }
    & .p-news__title {
        margin-right: 9.6rem;
        @media (768px > width) {
            margin-right: 3rem;
        }
    }
    & .p-news__date {
        font-size: 1.6rem;
        font-weight: 500;
        color: var(--color-bk);
        @media (768px > width) {
            font-size: 1.4rem;
        }
    }
    & .p-news__subject {
        font-size: 1.6rem;
        font-weight: 400;
        color: var(--color-bk);
    }
    & .p-news__content {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 9rem 0 9rem 10rem;
        border: 1px solid var(--color-bk);
        border-radius: 3rem;
        @media (768px > width) {
            padding: 3rem 1.5rem;
        }
    }
}
.p-access {
    padding: 0 0 12rem;
    @media (768px > width) {
        padding: 0 0 6rem;
    }
    & .p-access__title {
        margin-right: 9.6rem;
        @media (768px > width) {
            margin-right: 3rem;
        }
    }
    & .p-access__content {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 9rem 0 9rem 10rem;
        border: 1px solid var(--color-bk);
        border-radius: 3rem;
        @media (768px > width) {
            padding: 4rem 1.5rem;
        }
    }
    & .p-access__text {
        font-size: 1.6rem;
        color: var(--color-bk);
    }
}