/*--------------------------

   hero
   menu
   submenu
   items

---------------------------*/

/*--------------------------

   hero

---------------------------*/
#hero .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    /* 修正ポイント：固定幅ではなく、最大幅を指定する */
    width: 100%;
    /* 基本は100% */
    max-width: 600px;
    /* PCでも最大600pxまで */
    margin: 0 auto;

    /* 念のため：親からはみ出さない設定 */
    box-sizing: border-box;
    padding: 0 5px;
    /* 左右に少し隙間を作るとスマホで見やすくなります */
}

#hero img {
    width: 100%;
}

@media screen and (max-width: 480px) {

    #hero .container {
        margin: 0;
    }

    #hero .content {
        width: 100%;
        margin: 0 auto;
    }

    #hero img {
        width: 100%;
    }

}

/*--------------------------

   top-button

---------------------------*/

#back-to-top {
    width: 75px;
    height: 75px;
    position: fixed;
    right: 10px;
    bottom: 10px;
    background: #89ffa7;
    border-radius: 50%;
    opacity: 1;
    border: none;
}

#back-to-top::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: '\f0d8';
    font-size: 50px;
    /* 50pxだとボタンからはみ出るので調整しました */
    color: rgb(255, 255, 255);

    /* 真ん中に配置する安定のセット */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* translate単体ではなくtransformを使います */
    line-height: 1;
}




@media screen and (max-width: 480px) {

    #back-to-top {
        width: 50px;
        height: 50px;
        position: fixed;
        right: 10px;
        bottom: 10px;
        background: #89ffa7;
        border-radius: 50%;
        opacity: 1;
        border: none;
    }

    #back-to-top::before {
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        content: '\f0d8';
        font-size: 25px;
        /* 50pxだとボタンからはみ出るので調整しました */
        color: rgb(255, 255, 255);

        /* 真ん中に配置する安定のセット */
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        /* translate単体ではなくtransformを使います */
        line-height: 1;
    }
}


/*--------------------------

   brand-menu

---------------------------*/
#brand-menu .container {
    margin: 0;
}

#brand-menu .items {
    display: grid;
    /* 1fr（同じ幅）を3回繰り返す ＝ 3列 */
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    /* カード同士の隙間 */
    max-width: 400px;
    /* 全体の最大幅 */
    margin: 0 auto;
    padding: 10px;
    /* 真ん中寄せ */
}

#brand-menu .item {
    background-color: #f1fdff;
    /* 薄い水色の背景 */
    padding: 40px 20px;
    border-radius: 15px;
    /* 角丸 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    /* 軽い影 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
    /* 正方形にする */
    transition: transform 0.3s;
    cursor: pointer;
}

#brand-menu .item:hover {
    transform: translateY(-5px);
    /* ホバー時に少し浮かす */
}

#brand-menu .icon-wrapper {
    /* 1. 正方形の器を作る */
    width: 80px;
    /* 好きなサイズに固定 */
    height: 80px;
    margin-bottom: 10px;

    /* 2. 中身を真ん中に寄せる設定 */
    display: flex;
    justify-content: center;
    align-items: center;
}

#brand-menu .icon-wrapper img,
#brand-menu .icon-wrapper svg {
    /* 3. SVGのサイズを器に合わせる */
    width: 100%;
    height: 100%;

    /* 4. これが重要！ 縦横比を維持したまま、はみ出さずに収める */
    object-fit: contain;

    /* もしアイコンが濃すぎるなら少し薄くする（ジェラピケ風） */
    opacity: 0.7;
}

/* 文字を画像の上に重ねたい場合 */
#brand-menu .item {
    position: relative;
}

#brand-menu .icon-wrapper {
    position: absolute;
    /* 背後に浮かせる */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    min-width: 0 !important;
    min-height: 0 !important;
}

#brand-menu .item h3,
.item p {
    position: relative;
    z-index: 2;
    /* 文字を前に出す */
}

#brand-menu h2 {
    text-align: center;
    color: #333;
    margin: 40px 0;
}

/* ベースのスタイル */
#brand-menu .item {
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* ロック状態の見た目：白黒にする or 少し暗くする */
#brand-menu .item.is-locked {
    filter: grayscale(100%);
    /* モノクロにする（画像は見えます） */
    opacity: 0.6;
    /* 少し透けさせる */
    cursor: not-allowed;
    /* マウスカーソルを禁止マークに */
    user-select: none;
    /* テキスト選択不可 */
    background-color: #999;
}

/* ロックされている時はホバー演出（拡大など）も無視する設定 */
#brand-menu .item.is-locked:hover {
    transform: none;
}


@media (max-width: 480px) {

    #brand-menu .icon-wrapper {
        /* 1. 正方形の器を作る */
        width: 80%;
        padding: 10px;
        /* 好きなサイズに固定 */
        height: 80%;
        margin-bottom: 10px;

        /* 2. 中身を真ん中に寄せる設定 */
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/*------------------------

sale-section

-------------------------*/



#price-menu .container {
    display: flex;
    flex-wrap: wrap;
    /* 折り返しを許可 */
    justify-content: center;
    /* 中央寄せ */
    gap: 8px;
    /* カード同士の隙間 */
    width: 100%;
    /* ここを100%にするのが最重要！ */
    max-width: 1200px;
    margin: 20px auto;
    background: #ffaf37;
    padding: 10px;
    border-radius: 30px;
    box-sizing: border-box;
}

#price-menu .bg-orange {
    background-color: #ffb667;
    width: auto;
}

#price-menu .bg-beige {
    background-color: #ffc68a;
    width: auto;
}

#price-menu .items {
    display: flex;
    max-width: 900px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 20px;
}

#price-menu h2 {
    text-align: center;
    color: #333;
    margin: 40px 0;
    padding-left: 5px;
}

#price-menu .items-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
}


/* 3. カード1枚ずつの幅を指定する */
.product-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    /* PC表示：4カラム */
    box-sizing: border-box;
    width: 200px;
}

/* ラジオボタンは隠す */
input[type="radio"] {
    display: none;
}

input[type="radio"]:focus,
button:focus {
    outline: none;
}

/* 画像エリア */
#price-menu .product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 4;
    /* 縦長画像に対応 */
    background: #f9f9f9;
}

#price-menu .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s;
}

/* 2. 魔法の一括設定：IDが何番であっても、末尾が一致すれば表示する */
/* 「main」がチェックされたら、そのカード内の「img-main」を出す */
[id$="-main"]:checked~.product-image .img-main,
[id$="-bk"]:checked~.product-image .img-bk,
[id$="-bl"]:checked~.product-image .img-bl,
[id$="-pk"]:checked~.product-image .img-pk,
[id$="-wt"]:checked~.product-image .img-wt,
[id$="-nv"]:checked~.product-image .img-nv,
[id$="-gr"]:checked~.product-image .img-gr,
[id$="-be"]:checked~.product-image .img-be,
[id$="-or"]:checked~.product-image .img-or,
[id$="-gy"]:checked~.product-image .img-gy,
[id$="-mc"]:checked~.product-image .img-mc,
[id$="-gj"]:checked~.product-image .img-gj,
[id$="-ol"]:checked~.product-image .img-ol {
    opacity: 1 !important;
    /* 強制的に表示 */
}

/* カラー選択ボタン（丸） */
#price-menu.color-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    margin-top: 10px;
    /* 横スクロールの設定 
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;*/
    /* iPhoneでヌルヌル動くように */
    padding-bottom: 5px;
    /* スクロールバーで隠れないよう少し隙間を */
}

/* スクロールバーを非表示にする（見た目スッキリ） */
#price-menu.color-selector::-webkit-scrollbar {
    display: none;
}

#price-menu.color-selector label {
    flex-shrink: 0;
    /* 潰れないように固定 */
    width: 16px;
    /* スマホだと12pxは押しにくいので少し大きく */
    height: 16px;
    /* 既存のスタイル... */
    margin: 1px;
    padding: 1px;
}


#price-menu.color-selector label {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    border: 0.25px solid #eee;
    margin: 0.5px;
}

#price-menu a {
    text-decoration: none;
}


/* ラジオボタンがチェックされている時の丸枠（選択中っぽく見せる） */
#p1-bk:checked~.product-info [for="p1-bk"],
#p1-bl:checked~.product-info [for="p1-bl"],
#p1-or:checked~.product-info [for="p1-or"],
#p1-wt:checked~.product-info [for="p1-wt"] {
    outline: 0.5px solid #ccc;
    outline-offset: 2px;
}

/* テキスト情報 */
#price-menu .product-info {
    padding: 10px;
}

#price-menu .product-name {
    font-size: 12px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 5px;
}

#price-menu .product-price {
    font-weight: bold;
    font-size: 14px;
    color: red;
}

#price-menu .product-price span {
    text-decoration: line-through;
    text-decoration-color: red;
    color: #333;
}


#price-menu .tag-new {
    font-size: 10px;
    background: #ffbc73;
    color: white;
    padding: 2px 10px;
    border-radius: 10px;
}


#price-menu .buybutton {
    text-align: center;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

/* ランキング数字 */
#price-menu .rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    color: #999;
}

.priceimg {
    width: 30%;
    padding: 10px;
    margin: 0 auto;
}

#price-menu .more-btn-container {
    text-align: center;
    margin: 20px 0;
}

#price-menu .more-btn {
    padding: 10px 30px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
}


/* スマホ（画面幅768px以下）の場合の基本設定 */
/* PCでは全て表示、スマホでは隠す */
@media screen and (max-width: 768px) {

    .btn-container {
        display: inline;
    }


    .js-more-item {
        display: none;
        /* 初期状態は非表示 */
    }

    /* ボタンを表示状態にするスタイル */
    .js-more-item.is-visible {
        display: block;
    }

    .more-btn {
        display: block;
        margin: 20px auto;
        padding: 10px 30px;
        background-color: #ff9f43;
        /* オレンジに合わせる */
        color: white;
        border: none;
        border-radius: 20px;
    }
}

@media screen and (max-width: 968px) {
    .priceimg {
        width: 65%;
        padding: 10px;
        margin: 0 auto;
    }
}

/* PC（768pxより大きい）ではボタンを隠す */
@media screen and (min-width: 769px) {

    #price-menu .btn-container,
    .more-btn-container {
        display: none !important;
    }

    /* 修正ポイント：
       単純に .item を表示するのではなく、
       「公開前（JSで非表示にされたもの）」以外を 
       block !important にします。
    */

    /* 公開済みのアイテムや、通常のアイテムをPCで全表示 */
    #price-menu .item,
    .item {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* 【重要】ただし、JSで明示的に display: none 
       にされたもの（公開前）は、非表示を維持する 
    */
    #price-menu .item[style*="display: none"],
    .item[style*="display: none"] {
        display: none !important;
    }

    /* PC（769px以上）でボタンを表示させ、中央に置く設定 */
    /* 1. ボタンを包むコンテナを表示し、中央寄せにする */
    .btn-container,
    .more-btn-container {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        clear: both !important;
    }

    /* 2. ボタン自体を表示する */
    .more-btn {
        display: block !important;
        margin: 20px auto !important;
        /* 上下に余白を持たせて中央へ */
    }

    /* 3. もし .item に強制表示がかかってボタンを邪魔している場合はここを調整 */
    #price-menu .items {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
}



@media screen and (max-width: 768px) {

    #price-menu .items {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    /* カードを包む外枠 */
    #price-menu .item {
        width: 150px;
        /* カードの横幅を200pxで固定（お好みで調整） */
        flex-shrink: 0;
        /* 勝手に縮まないように固定 */
        box-sizing: border-box;
        margin: 0;
    }

    /* カード本体 */
    #price-menu .product-card {
        background: #fff;
        border-radius: 15px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        width: 100%;
        /* 親の .item いっぱいに広がる */
        display: flex;
        /* カード内を垂直に整えるため */
        flex-direction: column;
        height: 100%;
        /* カード自体の高さも揃える */
    }

    /* 画像エリアのサイズも固定 */
    #price-menu .product-image {
        width: 100%;
        aspect-ratio: 1 / 1;
        /* 正方形で固定 */
        overflow: hidden;
        border-radius: 15px 15px 0 0;
    }

    .priceimg {
        width: 90%;
        padding: 10px;
        margin: 0 auto;
    }

    /* 最初は3番目以降のアイテムを非表示にする */
    .item.is-hidden {
        display: none !important;
    }

    /* 「もっと見る」ボタンの見た目 */
    .more-btn-container {
        text-align: center;
        margin: 20px 0;
    }

    .more-btn {
        padding: 10px 30px;
        background-color: #333;
        color: #fff;
        border: none;
        border-radius: 25px;
        font-size: 14px;
        cursor: pointer;
    }

}



/*--------------------------

   lineup

---------------------------*/

#lineup .container {
    display: flex;
    flex-wrap: wrap;
    /* 折り返しを許可 */
    justify-content: center;
    /* 中央寄せ */
    gap: 8px;
    /* カード同士の隙間 */
    width: 100%;
    /* ここを100%にするのが最重要！ */
    max-width: 1200px;
    margin: 20px auto;
}

#lineup .items {
    display: flex;
    max-width: 900px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 20px;
}

#lineup h2 {
    text-align: center;
    color: #333;
    margin: 40px 0;
}

#lineup .items-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
}


/* 3. カード1枚ずつの幅を指定する */
.product-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    /* PC表示：4カラム */
    box-sizing: border-box;
    width: 200px;
}

/* ラジオボタンは隠す */
input[type="radio"] {
    display: none;
}

/* 画像エリア */
#lineup .product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 4;
    /* 縦長画像に対応 */
    background: #f9f9f9;
}

#lineup .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s;
}

/* 2. 魔法の一括設定：IDが何番であっても、末尾が一致すれば表示する */
/* 「main」がチェックされたら、そのカード内の「img-main」を出す */
[id$="-main"]:checked~.product-image .img-main,
[id$="-bk"]:checked~.product-image .img-bk,
[id$="-bl"]:checked~.product-image .img-bl,
[id$="-pk"]:checked~.product-image .img-pk,
[id$="-wt"]:checked~.product-image .img-wt,
[id$="-nv"]:checked~.product-image .img-nv,
[id$="-gr"]:checked~.product-image .img-gr,
[id$="-be"]:checked~.product-image .img-be,
[id$="-or"]:checked~.product-image .img-or,
[id$="-gy"]:checked~.product-image .img-gy,
[id$="-mc"]:checked~.product-image .img-mc,
[id$="-gj"]:checked~.product-image .img-gj,
[id$="-ol"]:checked~.product-image .img-ol {
    opacity: 1 !important;
    /* 強制的に表示 */
}

/* カラー選択ボタン（丸） */
.color-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    margin-top: 10px;
    /* 横スクロールの設定 
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;*/
    /* iPhoneでヌルヌル動くように */
    padding-bottom: 5px;
    /* スクロールバーで隠れないよう少し隙間を */
}

/* スクロールバーを非表示にする（見た目スッキリ） */
.color-selector::-webkit-scrollbar {
    display: none;
}

.color-selector label {
    flex-shrink: 0;
    /* 潰れないように固定 */
    width: 16px;
    /* スマホだと12pxは押しにくいので少し大きく */
    height: 16px;
    /* 既存のスタイル... */
    margin: 1px;
    padding: 1px;
}


.color-selector label {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    border: 0.25px solid #eee;
    margin: 0.5px;
}

#lineup a {
    text-decoration: none;
}


/* ラジオボタンがチェックされている時の丸枠（選択中っぽく見せる） */
#p1-bk:checked~.product-info [for="p1-bk"],
#p1-bl:checked~.product-info [for="p1-bl"],
#p1-or:checked~.product-info [for="p1-or"],
#p1-wt:checked~.product-info [for="p1-wt"] {
    outline: 0.5px solid #ccc;
    outline-offset: 2px;
}

/* テキスト情報 */
.product-info {
    padding: 10px;
}

.product-name {
    font-size: 12px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 5px;
}

.product-price {
    font-weight: bold;
    font-size: 14px;
    color: red;
}

.product-price span {
    text-decoration: line-through;
    text-decoration-color: red;
    color: #333;
}


.tag-new {
    font-size: 10px;
    background: #ffbc73;
    color: white;
    padding: 2px 10px;
    border-radius: 10px;
}


#lineup .buybutton {
    text-align: center;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

/* ランキング数字 */
.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    color: #999;
}

@media screen and (max-width: 768px) {

    #lineup .items {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    /* カードを包む外枠 */
    #lineup .item {
        width: 150px;
        /* カードの横幅を200pxで固定（お好みで調整） */
        flex-shrink: 0;
        /* 勝手に縮まないように固定 */
        box-sizing: border-box;
        margin: 0;
    }

    /* カード本体 */
    .product-card {
        background: #fff;
        border-radius: 15px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        width: 100%;
        /* 親の .item いっぱいに広がる */
        display: flex;
        /* カード内を垂直に整えるため */
        flex-direction: column;
        height: 100%;
        /* カード自体の高さも揃える */
    }

    /* 画像エリアのサイズも固定 */
    #lineup .product-image {
        width: 100%;
        aspect-ratio: 1 / 1;
        /* 正方形で固定 */
        overflow: hidden;
        border-radius: 15px 15px 0 0;
    }
}