/* ============================================
   ITEMS 一覧（PDF デザイン完全再現）
============================================ */

/* グリッドレイアウト（PDFの4列 + 高い余白） */
#item-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 60px 40px;
    margin-top: 60px;
    margin-bottom: 90px;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1024px) {
    #item-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 30px;
    }
}

@media (max-width: 600px) {
    #item-list {
      grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 20px;
    }
}

/* -------------------------------------------
   カード
------------------------------------------- */
.item-card {
    position: relative;
    cursor: pointer;
}

/* NEW バッジ（PDF金色） */
.badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #c0b081;
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    letter-spacing: 0.04em;
    z-index: 2;
    font-family: "Gabarito", sans-serif;
}

.badge-new02 {
    max-width: 52px;
    display: inline-block;
    background: #c0b081;
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    letter-spacing: 0.04em;
    z-index: 2;
    font-family: "Gabarito", sans-serif;
    text-align: center;
}

@media (max-width: 680px){
.badge-new02 {
    font-size: 13px;
}

}

/* -------------------------------------------
   画像領域（正方形 + フェード切替）
------------------------------------------- */
.item-card-img {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 正方形 */
    overflow: hidden;
}

.item-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .35s ease;
}

/* ホバー時フェード切替 */
.item-card-img .hover-img { opacity: 0; }
.item-card:hover .hover-img { opacity: 1; }
.item-card:hover .main-img { opacity: 0; }

/* -------------------------------------------
   テキスト（PDFの上品フォント間隔）
------------------------------------------- */
.item-info {
    margin-top: 18px;
    text-align: center;
}

.item-category {
    font-size: 11px;
    letter-spacing: 0.15em;
    color: #9e9e9e;
    margin-bottom: 3px;
    font-family: "Gabarito", sans-serif;
}


.item-category02 {
    font-size: 1.8rem;
    color: #BEBABA;
    margin-bottom: 3px;
    line-height: 147%;
    margin-top: 14px;
    font-family: "Gabarito", sans-serif;
}

.item-title {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #333;
    margin-bottom: 6px;
}

@media (max-width: 680px){

.item-title {
    font-size: 13px;
    line-height: 147%;
    letter-spacing: 0.2em;
}

}

.item-price {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-family: "Gabarito", sans-serif;
}


.item-price .tax {
    font-size: 12px;
    margin-left: 4px;
    font-family: "Gabarito", sans-serif;
}

.item-price02 {
    font-size: 1.8rem;
    line-height: 172%;
    letter-spacing: 0.1em;
    font-weight: 400;
    color: #333;
    margin-top: 14px;
    font-family: "Gabarito", sans-serif;
}
@media (max-width: 680px){

    .item-price02 {
    font-size: 1.6rem;
    }
}


.item-price02 .tax {
    font-size: 1.8rem;
    line-height: 172%;
    letter-spacing: 0.1em;
    font-weight: 400;
    color: #333;
    margin-top: 14px;
    font-family: "Gabarito", sans-serif;
}

@media (max-width: 680px){

   .item-price02 .tax {
    font-size: 1.6rem;
    }
}

/* ============================================
   モーダル（PDFデザイン完全再現）
============================================ */

/* オーバーレイ */
#modal-overlay.open {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9998;
    display: block;
}

/* モーダル本体 */
#item-modal.open {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 40px;
}

/* -------------------------------------------
   モーダル内部（PDF 2カラム レイアウト）
------------------------------------------- */
.modal-inner {
    width: 94%;
    max-width: 1100px;
    background: #fff;
    padding: 65px;
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 40px;
    position: relative;
}

@media (max-width: 680px){
.modal-inner {
    gap: 16px;
}
}

/* 閉じるボタン */
.modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    z-index: 50;
    color: #333;
    z-index: 9999;
}

/* ============================================
   Swiper（左：大きい画像 + 下にサムネ）
============================================ */

.modal-main-swiper {
    width: 100%;
    height: 540px;
    background: #fafafa;
    border: 1px solid #e3e3e3;

}

.modal-main-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-thumb-swiper {
    margin-top: 15px;
    height: 100px;
}

.modal-thumb-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ナビ矢印 - PDF風の控えめデザイン */
.modal-main-swiper .swiper-button-next,
.modal-main-swiper .swiper-button-prev {
    color: #444 !important;
    z-index: 20 !important;
}

/* Swiper がモーダル外に出ないように */
#item-modal .swiper,
#item-modal .swiper-wrapper,
#item-modal .swiper-slide {
    z-index: 1 !important;
    line-height: 0;
}
.swiper-backface-hidden .swiper-slide{
    width: 100% !important;
}

/* ============================================
   商品情報（右カラム）
============================================ */

.modal-details {
    display: flex;
    flex-direction: column;
   
}

.modal-title {
    font-size: 2.4rem;
    line-height: 147%;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.modal-subtitle {
    font-size: 15px;
    color: #888;
}

.modal-price {
    font-size: 20px;
    font-weight: 700;
    margin-top: 10px;
}

/* カラー選択エリア */
.modal-color-area {
    display: flex;
    /* gap: 10px; */
    align-items: center;
    margin-top: 14px;
}

.modal-color-swatch {
    display: inline-block;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    margin-right: 8px;
    border: 3px solid #fff; /* 通常の薄い枠 */
    cursor: pointer;
    position: relative;
    transition: 0.2s ease;
}

/* active時（太い黒ラインを外側に） */
.modal-color-swatch.active {
    border-color: #ffffff; /* 内側の線を白にして */
    box-shadow: 0 0 0 1px #000; /* 外側の黒ライン（太枠） */
    /* transform: scale(1.05); */
}
.modal-spec{
    margin-top: 14px;
}

.modal-spec li{
    font-size: 1.3rem;
    line-height: 215%;
    letter-spacing: 0.1em;
    font-family: "Gabarito", sans-serif;
}
@media (max-width: 680px){

    .modal-spec li{
    font-size: 1rem;
    }
}


.onlinebox{
    margin-top: 40px;
}

.onlinebox ul{
    display: flex;
    margin-top: 10px;
}
.onlinebox p{
    font-size: 1rem;
    letter-spacing: 0.1em;
    line-height: 172%;
    font-family: "Gabarito", sans-serif;
}
.onlinebox ul li:first-child{
    margin-right: 15px;
}
.onlinebox ul li a{
    font-size: 1.4rem;
    line-height: 1;
    letter-spacing: 0.15em;
    display: block;
    padding: 18px 40px;
    border: 1px solid #000;
    color: #000;
    font-family: "Gabarito", sans-serif;
}

@media(max-width: 600px) {

.onlinebox ul li a{
    padding: 16px 0px;
}


}


.onlinebox ul li a:hover{
    background-color: #000;
    color: #fff;
    transition: .2s ease-in-out;
}

/* ============================================
   スマホ対応
============================================ */
@media(max-width: 1100px) {

    #item-modal.open {
        padding: 20px;
    }

    .modal-inner {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .modal-main-swiper {
        height: 380px;
    }

    .modal-thumb-swiper {
        height: 80px;
    }
    .onlinebox ul{
        flex-direction: column;
    }
    .onlinebox ul li{
        width: 100%;
    }
    .onlinebox ul li a{
        text-align: center;
    }
    .onlinebox ul li:first-child{
        margin-bottom: 15px;
    }

}


/* ================================
   × ボタンを overlay より前面へ
================================ */
/* ================================
   フォントを使わないカスタム × ボタン
================================ */
#modal-close,
.modal-close {
    position: absolute;
    top: 0px;
    right: -40px;
    width: 37px;         /* ボタンのサイズ（外枠） */
    height: 37px;
    cursor: pointer;
    z-index: 10000 !important;
}

/* ×（2本の線） */
#modal-close::before,
#modal-close::after,
.modal-close::before,
.modal-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;

    width: 37px;        /* ← 線の長さ */
    height: 2px;        /* ← 線の太さ */
    background-color: #333; /* ← 線の色 */

    transform-origin: center;
}

/* 左上→右下の線 */
#modal-close::before,
.modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

/* 右上→左下の線 */
#modal-close::after,
.modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ホバー時の見やすさアップ */
#modal-close:hover::before,
#modal-close:hover::after,
.modal-close:hover::before,
.modal-close:hover::after {
    background-color: #000;
}

/* overlay は × の下に */
#modal-overlay.open {
    z-index: 9998 !important;
}

#item-modal.open {
    z-index: 9999 !important;
}


/* ============================
   モーダルの z-index 修正
============================ */
#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
    display: none;
}

#modal-overlay.open {
    display: block;
}

#item-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 40px;
}

#item-modal.open {
    display: flex;
}

/* 閉じるボタンを最前面に */
#modal-close {
    position: absolute;
    top: 29px;
    right: 27px;
    cursor: pointer;
    z-index: 10000 !important;
}


/* ============================
   サムネイル画像の比率強制
============================ */
.modal-thumb-swiper {
    height: 100px;
}

.modal-thumb-swiper .swiper-slide {
    height: 100px !important;
    width: 100px !important;
}

.modal-thumb-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* メイン画像の高さ固定 */
.modal-main-swiper {
    height: 540px;
}

.modal-main-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ----------------------------------
   カラードット（通常は非表示）
---------------------------------- */
.color-dots {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    opacity: 0;               /* ← 初期状態：非表示 */
    transform: translateY(4px);
    transition: opacity .3s ease, transform .3s ease;
}

/* ================================
   カラードット（画像右下に重ねる）
================================ */
.item-card-img {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 正方形維持 */
    overflow: hidden;
}

/* 初期状態：非表示 */
.color-dots {
    position: absolute;
    right: 8px;     /* 右下に配置 */
    bottom: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;          /* 非表示 */
    transform: translateY(4px);
    transition: opacity .3s ease, transform .3s ease;
    z-index: 5;    /* 画像より前に出す */
}

/* ホバーで表示 */
.item-card:hover .color-dots {
    opacity: 1;
    transform: translateY(0);
}

/* カラードット本体 */
.color-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
}



.filter-category{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===========================================================
   Swiper デフォルト矢印を消す
=========================================================== */
.modal-main-swiper .swiper-button-prev::after,
.modal-main-swiper .swiper-button-next::after {
    display: none !important;
}


/* ===========================================================
   カスタム矢印（添付画像サイズ再現版）
=========================================================== */
.modal-main-swiper .swiper-button-prev,
.modal-main-swiper .swiper-button-next {
    width: 70px;          /* 当たり判定エリア */
    height: 70px;
    background: none;
    opacity: 0.7;
    transition: 0.3s;
}

.modal-main-swiper .swiper-button-prev:hover,
.modal-main-swiper .swiper-button-next:hover {
    opacity: 1;
}

/* ====== 矢印本体（ここが線の部分） ====== */
.modal-main-swiper .swiper-button-prev::before,
.modal-main-swiper .swiper-button-next::before {
    content: "";
    display: block;

    /* ▼ 矢印の長さ（画像に合わせて調整済み） ▼ */
    width: 40px;
    height: 40px;

    /* ▼ 線の太さ（4px）と色（白） ▼ */
    border-top: 1px solid #CFCFCF;
    border-right: 1px solid #CFCFCF;

    margin: auto;
}

/* 左（←） */
.modal-main-swiper .swiper-button-prev::before {
    transform: rotate(225deg);
}

/* 右（→） */
.modal-main-swiper .swiper-button-next::before {
    transform: rotate(45deg);
}

/* ====== 位置調整（添付画像くらいの位置） ====== */
.modal-main-swiper .swiper-button-prev {
    left: 2%;
}

.modal-main-swiper .swiper-button-next {
    right: 2%;
}


/* ===========================================================
   スマホ（少し小さくする）
=========================================================== */
@media (max-width: 768px) {
    .modal-main-swiper .swiper-button-prev,
    .modal-main-swiper .swiper-button-next {
        width: 50px;
        height: 50px;
    }

    .modal-main-swiper .swiper-button-prev::before,
    .modal-main-swiper .swiper-button-next::before {
        width: 28px;
        height: 28px;
        border-top-width: 3px;
        border-right-width: 3px;
    }
}


/* ===========================================================
   ページネーション
=========================================================== */
.pagination-wrap{

    margin-bottom: 135px;
}
.pagination-wrap ul{
    display: flex;
    justify-content: center;
    gap: 30px;
}
.pagination-wrap ul li{
    font-size: 1.5rem;
    letter-spacing: 0.15em;
    font-family: "Gabarito", sans-serif;
}
.pagination-wrap ul li a{
    color: #000000;
}


.single .modal-inner{
    margin: 0 auto;
}



.modal-left{
    max-width: 550px;
}

@media (max-width: 1100px) {
    .modal-left{
        margin: auto;
    }
    .modal-right{
          max-width: 550px;
          width: 100%;
          margin: auto;
    }
    .modal-inner{
        top: 27%;
        width: 100%;
    }
    .modal-main-swiper {
    height: auto;
    }
    .item-list.grid {
    grid-template-columns: repeat(3, 1fr);
        }
  
}

@media (max-width: 550px) {

.modal-right{
       max-width: 330px;
}
.modal-left{
    max-width: 330px;
}

    .item-list.grid {
    grid-template-columns: repeat(2, 1fr);
        }

.modal-thumb-swiper .swiper-slide img {
    height: 85px !important;
    width: 85px !important;
}
.modal-thumb-swiper .swiper-slide{
       height: 85px !important;
    width: 85px !important;
}

}

@media (max-width: 440px) {
    #modal-close{
            top: 12px;
    right: 15px;
    }
    
    .modal-right{
       max-width: 300px;
}
.modal-left{
    max-width: 300px;
}
.modal-inner{
    padding: 60px 15px 55px;
}
}