@charset "utf-8";

/* ===========================
main
=========================== */
html { scroll-behavior: smooth; }

.store__shop::before {
    content: '';
    display: block;
    width: 4px;
    height: 6px;
    background-color: #295CCC;
}

.store__shop {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: Outfit;
    font-size: 1.4rem;
    line-height: 1;
}

.section--store {
    padding: 0 5.3%;
}

.storeBtn {
    margin-top: 64px;
}

.storeBtn__list {
    display: flex;
    gap: 8px;
}

.storeBtn__item {
    color: var(--primary-blue);
    font-family: Outfit;
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1;
    border-radius: 49px;
    border: 1px solid var(--primary-blue);
    display: flex;
    padding: 9px 19px;
    justify-content: center;
    align-items: center;
}

.melonbooks {
    margin-top: 48px;
}

.booth {
    margin-top: 72px;
}

.store__item a {
    display: inline-flex;
    padding: 9px 15px;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border-radius: 3px;
    border: 1px solid var(--primary-blue);
    background: var(--primary-blue);
    color: var(--primary-white);
    font-size: 1.2rem;
    font-weight: 500;
    font-family: Outfit;
    line-height: 1;
}

.store__item a::after {
    content: '';
    display: block;
    background-image: url(../images/external-link-white.svg);
    width: 12px;
    height: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    aspect-ratio: 1/1;
}

/* すでに .store__item は縦並びのflex */
.store__item {
    display: flex;
    flex-direction: column;
}

/* ボタンをカードの最下端に押し下げる */
.store__btn {
    margin-top: auto;   /* ← ここがポイント */
    /* 既存の margin-top:16px; は削除 or 上書きされます */
}


/* ====== grid base ====== */
.store__list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* SP: 2カラム */
    column-gap: 15px; /* 横の余白 */
    row-gap: 56px;    /* ← liとliの縦の余白を48pxに設定 */
    margin: 16px auto 0;
}

/* 各カード：縦積み */
.store__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* サムネイル（正方形・中身は全体を収める） */
.store__item > img {
    width: 100%;
    aspect-ratio: 1 / 1;                 /* 念のため明示 */
    object-fit: contain;                  /* 画像全体を収める（トリミングしない） */
    display: block;
    background-color: var(--bg-blue-light); /* 正方形の背景色（任意で上書き） */
}

.store__item .cover-img {
    object-fit: cover;
}

.store__category {
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    border-radius: 3px;
    background: var(--bg-blue-soft);
    margin-top: 6px;
}

.store__title {
    font-size: 1.4rem;
    line-height: 1.5; 
    margin-top: 4px;
}

.store__price {
    font-family: Outfit;
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.5;
    margin: 4px 0 16px;
}

.store__price span {
    font-family: "Zen Kaku Gothic New";
    font-weight: 400;
}

/* main tb */
@media screen and (min-width: 768px){
    .section--store {
        padding: 0 7.3%;
    }

    .storeBtn__item {
        font-size: 1.4rem;
    }

    .store__item a {
        gap: 5px;
    }

    .store__list {
    column-gap: 22px; /* 横の余白 */
    row-gap: 84px;    /* ← liとliの縦の余白を48pxに設定 */
}

    .store__list {
        grid-template-columns: repeat(3, 1fr);
    }

    .store__item > img {
        max-width: 370px;;
    }

    .store__category {
        margin-top: 8px;
        font-size: 1.2rem;
    }

    .store__price {
        font-size: 1.4rem;
        margin-top: 2px;
    }

    .store__item a {
        font-size: 1.4rem;
    }

    .store__item a::after {
        width: 14px;
        height: 14px;
    }

    .copy {
        padding-top: 108px;
    }

    .storeBtn {
        padding-bottom: 8px;
    }

    .booth {
        margin-top: 104px;
    }
}

@media screen and (min-width: 834px){
    .store__list {
        column-gap: 28px; /* 横の余白 */
        row-gap: 86px;    /* ← liとliの縦の余白を48pxに設定 */
    }

    .store__top {
        display: flex;
        justify-content: space-between;
        align-items: end;
    }

    .storeBtn {
        padding-bottom: 13px;
    }

    .melonbooks {
        margin-top: 83px;
    }

}

@media screen and (min-width: 1024px) {
    .store__item a {
        position: relative;
        overflow: hidden;
        z-index: 0;
        transition: 
            background-color 0.3s ease,
            color 0.3s ease;
        background-color: var(--primary-blue);
    }

    .store__item a:hover {
        background-color: var(--primary-white);
        color: var(--primary-blue);
    }

    /* アイコンのアニメーションは維持 */
    .store__item a::after {
        content: '';
        display: block;
        width: 14px;
        height: 14px;
        background-image: url(../images/external-link-white.svg);
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        transition: background-image 0.3s ease;
        aspect-ratio: 1 / 1;
    }

    .store__item a:hover::after {
        background-image: url(../images/external-link-blue.svg);
    }

    .storeBtn__item {
        transition: background-color .2s ease, color .2s ease;
    }

    .storeBtn__item:hover {
        background-color: var(--primary-blue);
        color: var(--primary-white);
    }

}

/* @media screen and (min-width: 1024px){
    .store__list {
        grid-template-columns: repeat(4, 1fr);
    }
} */

/* main pc */
@media screen and (min-width: 1440px){
    .store__list {
        grid-template-columns: repeat(4, 1fr);
    }

    .article {
        padding: 0 8.3%;
    }

    .section--store {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0;
    }

    .store__list {
        row-gap: 96px;    /* ← liとliの縦の余白を48pxに設定 */
    }
}