@charset "UTF8";

/* Article header */
.article__header {
    padding: 134px 7.6% 64px 7.6%;
}

.tab-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-label {
    font-size: 1.6rem;
    color: var(--primary-black);
    border: 1px solid #E9A85B;
    background: transparent;
    border-radius: 30px;
    height: 32px;
    padding: 0 11px;
    margin: 0 0 14px 14px ;
    /* margin-right: 5px;
    padding: 3px 12px; */
    order: -1;
}

@media screen and (max-width: 390px) {
    .tab-label--04 {
        margin-left: 61px;
    }

    .tab-label--06 {
        margin-right: 60px;
    }
}

.tab-label:hover {
    color: white;
    background-color: var(--primary-orange,#E9A85B);
    transition-duration: 0.5s;
}

.tab-label:hover:not(:disabled) {
    background-color: #f5dcb7;
    color: #3A3A3A;
}

.tab-content {
    width: 100%;
    display: none;
    text-align: center;
    margin-top: 30px;
}

/* アクティブなタブ */
.tab-switch:checked+.tab-label {
    color: white;
    background: var(--primary-orange,#E9A85B);
}

/* タブコンテンツの表示スタイルを変更 */
.tab-switch:checked+.tab-label+.tab-content {
    display: block; /* ← block表示にする（または削除してデフォルトでも可） */
}

/* ラジオボタン非表示 */
.tab-switch {
    display: none;
}

/* アイテムのスタイル */
.illustGridBox {
    width: 180px; /* スマホでの基準幅 */
    margin-bottom: 24px; /* アイテム間の縦の隙間 */
    /* 必要に応じて左右のmargin（gutterの代わりになる）*/
    /* 例: margin-left: 5px; margin-right: 5px; width: calc(180px - 10px); */
    box-sizing: border-box; /* paddingやborderを含めて幅を計算 */
}

.illustGrid img {
    display: block;
    /* max-width: 43.6%; */
    width: 100%;
    height: auto; /* 念のため高さを自動に */
    opacity: 1; /* 通常時は不透明 */
    transition: opacity 0.3s ease; /* opacityの変化を0.3秒アニメーション */
}

/* 画像のリンク(.illustGrid)をホバーした時のスタイル */
.illustGrid:hover img {
    opacity: 0.7; /* ホバー時に半透明 (50%) にする */
}

/* ホバー時にカーソルをポインターにする（任意ですが推奨） */
.illustGrid:hover {
    cursor: pointer;
}

/* イラストタイトル */
.illustTtl {
    font-size: 1.4rem;
    line-height: 150%;
    margin: 4px 0 0 0;
    /* padding-bottom: 10px; */
}

/* =========================
   ギャラリーアイテム アニメーション
   ========================= */

   @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px); /* 下からの移動距離 */
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* デフォルトでアイテムを透明にしておく */
  .illustGridContainer .illustGridBox {
    opacity: 0;
  }
  
  /* アニメーションを適用するクラス (JSで付与) */
  .illustGridContainer .illustGridBox.fade-in-up {
    animation: fadeInUp 1.2s ease-out forwards;
  }

.soldOut {
    font-size: 1.4rem;
    color: red;
    margin:0;
}

.illustGridBox--pc09 {
    display: none;
}

/* modal */
/* モーダル全体の配置 */
.modal {
    display: flex; /* displayは常にflexにしておく */
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9); /* 背景の透明度もアニメーションできます */

    /* ↓↓↓ フェードイン/アウトのためのスタイル ↓↓↓ */
    opacity: 0; /* 初期状態: 完全に透明 */
    visibility: hidden; /* 初期状態: 要素を隠し、クリックなどを無効化 */
    transition: opacity 0.6s ease, visibility 0.6s ease, background-color 0.6s ease; /* opacity, visibility, 背景色を0.4秒かけて変化させる */
}

/* JavaScriptで付与する表示状態用クラス */
.modal.is-visible {
    opacity: 1; /* 表示状態: 不透明 */
    visibility: visible; /* 表示状態: 見えるようにする */
}

/* コンテンツ部分のスタイル */
.modal-content {
    background-color: transparent;
    width: 90%; /* スマホでは少し横幅を広げるなど */
    padding: 15px; /* スマホではパディングを少し狭くするなど */
    border-radius: 12px;
    max-width: 600px;
    text-align: center;
    position: relative;
    /* ↓↓↓ コンテンツ部分のアニメーション（任意：例として少し下から表示）↓↓↓ */
    /* transform: translateY(10px); 初期状態少し下にずらす */
    /* opacity: 0; コンテンツも初期状態は透明に */
    transition: transform 0.4s ease, opacity 0.4s ease; /* transformとopacityを0.4秒かけて変化 */
}

/* モーダル表示時にコンテンツを元の位置&不透明に */
.modal.is-visible .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* 矢印共通スタイル */
.modal-arrow {
    position: absolute; /* modal-content を基準に絶対配置 */
    top: 45%; /* 上下中央に配置 */
    transform: translateY(-50%); /* 自身の高さの半分だけ上にずらして完全に中央へ */
    z-index: 1001; /* モーダル画像より手前に表示 */
    cursor: pointer;
    font-size: 2.5rem; /* 文字サイズ（矢印の大きさ） */
    font-weight: bold;
    color: #aaa; /* 矢印の色  */
    background-color: transparent; /* 背景色 */
    width: 45px; /* 幅を指定 */
    height: 45px; /* 高さを指定 */
    display: flex; /* 中の文字(< >)を中央揃えにするため */
    justify-content: center;
    align-items: center;
    user-select: none; /* テキスト選択を無効化 */
    transition: background-color 0.3s ease, color 0.3s ease; /* ホバー効果を滑らかに */
}

/* 矢印ホバー時のスタイル */
.modal-arrow:hover {
    background-color: transparent;
    color: #3A3A3A;
}

/* 左矢印の位置 */
.modal-prev {
    left: 2px; /* モーダルコンテンツの左端から10px */
}

/* 右矢印の位置 */
.modal-next {
    right: 2px; /* モーダルコンテンツの右端から10px */
}

/* (オプション) 最初/最後の画像で矢印を無効化する場合のスタイル */
.modal-arrow.disabled {
    opacity: 0;
    cursor: default;
    pointer-events: none; /* クリックを無効化 */
}

#modal-title {
    font-size: 1.6rem;
    margin-top: 8px;
}

#modal-image {
    width: 90%;
    max-width: 272px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.modal-close {
    color: #aaa;
    font-size: 32px;
    font-weight: 400;
    cursor: pointer;
    position: absolute;
    transition: color 0.3s ease; /* ホバー効果もスムーズに */
    top: -6%;
    right: -2%;
    padding: 5px;
}

.modal-close:hover {
    color: #3A3A3A;
}

/* =========================
Pagination Styles
========================= */
.pagination-container {
    text-align: center;
    margin-top: 40px; /* グリッドとの間隔 */
    margin-bottom: 20px; /* フッターとの間隔調整 */
    padding: 10px 0;
}

.pagination-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    gap: 5px; /* ボタン間の隙間 */
}

/* ★★★ すべてのボタン（数字・矢印共通）の基本スタイル ★★★ */
.pagination-item button {
    font-size: 1.5rem;
    color: var(--primary-black);
    background-color: transparent;
    border: 1px solid #E9A85B;
    border-radius: 5px;
    padding: 8px 15px; /* ★★★ ご指定のpaddingに変更 ★★★ */
    height: 42px; /* ★★★ paddingに合わせて高さを調整 ★★★ */
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination-item button:hover:not(:disabled) {
    background-color: #f5dcb7; /* 薄いオレンジ */
}

.pagination-item.active button {
    background-color: var(--primary-orange, #E9A85B);
    color: white;
    border-color: var(--primary-orange, #E9A85B);
}

.pagination-item.disabled button {
    opacity: 0.5;
    cursor: default;
    border-color: #ccc;
    color: #aaa;
}

.pagination-item.ellipsis span {
    padding: 0 5px;
    color: #aaa;
    display: flex;
    align-items: center;
    height: 42px; /* ★★★ 高さをボタンと揃える */
}

/* ★★★ ここから矢印ボタン専用のスタイル ★★★ */
/* 「前へ」「次へ」ボタンのスタイル */
.pagination-item:first-child button,
.pagination-item:last-child button {
    text-indent: -9999px;
    position: relative;
    overflow: hidden;
    padding: 0; /* paddingをリセット */
    width: 42px; /* ★★★ 幅を高さと揃えて正方形にする */
    /* min-widthは不要なので適用されない */
}

/* 「前へ」「次へ」ボタンに矢印アイコンを追加 */
.pagination-item:first-child button::before,
.pagination-item:last-child button::before {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1;
}

/* 「前へ」ボタンのアイコンを指定 */
.pagination-item:first-child button::before {
    content: '<';
}

/* 「次へ」ボタンのアイコンを指定 */
.pagination-item:last-child button::before {
    content: '>';
}



/* =========================
Masonry Container Centering
========================= */
.illustGridContainer {
    /* fitWidth: true と併用してグリッド全体を中央揃えにする */
    margin-left: auto;
    margin-right: auto;

    /* Masonryが position: relative を自動で付与しますが、
    明示的に書いておいても問題ありません */
    position: relative;
}

/* =========================
   スマホ表示時のモーダル調整 (768px以下)
   ========================= */
   @media screen and (max-width: 768px) {

    /* --- 左右矢印の位置調整 --- */
    .modal-prev {
        /* 現在 left: 2px; */
        left: -3%; /* 左端からの距離を少し広げる (例: 8px) - 値は調整してください */
        /* 必要なら上下位置も調整 top: 50%; など */
    }

    .modal-next {
        /* 現在 right: 2px; */
        right: -3%; /* 右端からの距離を少し広げる (例: 8px) - 値は調整してください */
        /* 必要なら上下位置も調整 top: 50%; など */
    }

    /* --- 閉じるボタンのサイズ調整 --- */
    .modal-close {
        /* 現在 font-size: 32px; (PCでは40px) */
        font-size: 32px; /* 少し大きくする (例: 36px) - 値は調整してください */

        /* サイズ変更に伴い位置も微調整が必要な場合 (例) */
        /* top: -7%; */
        /* right: -4%; */

        /* クリックしやすいように当たり判定エリアを広げる場合 (オプション) */
        /* padding: 8px; */
    }

    /* --- 他のスマホ向け調整があればここに追加 --- */

}


/* =========================
gallery PC
========================= */
@media screen and (min-width: 769px){
    .main {
        padding: 0; /* main要素の共通paddingをリセット */
    }

    .article__header {
        padding: 240px 0 80px 12%;
    }

    .tab-label {
        font-size: 1.6rem;
        height: 40px;
        width: 90px;
        text-align: center;
        padding: 4px 4px 11px 5px;
        margin-left: 24px;
    }

    .tab-wrap {
        padding: 0 12%;
    }

    .spBr {
        display: none;
    }

    .illustGridBox--pc09 {
        display: block;
    }

    .illustGridBox {
        width: 324px; /* PCでの基準幅 */
        margin-bottom: 40px;
        /* 必要に応じて左右のmargin */
        
        /* PC用の中央寄せ設定など */
        /* .tab-switch:checked+.tab-label+.tab-content { ... } */
    }

    .tab-content {
        margin-top: 60px;
        /* gap: 20px; */
        /* justify-content: normal */
    }

    .illustTtl {
        font-size: 1.6rem;
        margin: 8px 0 0 0;
        /* padding-bottom: 10px; */
    }

    .soldOut {
        font-size: 1.6rem;
        color: red;
    }

    /* modal */
    /* コンテンツ部分のスタイル */
    .modal-content {
        padding: 20px;
        width: 80%;
    }

    #modal-title {
        font-size: 2rem;
        margin-top: 24px;
    }

    #modal-image {
        max-width: 450px;
        max-height: 700px;
        object-fit: contain;
    }

    .modal-close {
        font-size: 40px;
        top: 2%;
        right: -1%;
    }

    .pagination-item button {
        font-size: 1.6rem;
        /* paddingは基本スタイルと同じなのでここでは不要 */
        /* min-widthも基本スタイルと同じなので不要 */
        height: 44px; /* ★★★ PCのフォントサイズに合わせて微調整 */
    }

    /* PC用の矢印ボタンの上書きスタイル */
    .pagination-item:first-child button,
    .pagination-item:last-child button {
        padding: 0;
        width: 44px; /* ★★★ 高さと揃える */
    }

    .pagination-list {
        gap: 8px;
    }

} 
 /* PC 769px */

@media screen and (min-width: 430px) and (max-width: 768px) {
    .tab-wrap {
        gap: 12px;
    }

    .tab-label {
        margin: 0;
    }
}
