#stock_area{
	display: flex;
	flex-wrap:wrap;
    margin: 80px auto;
    justify-content: space-between;
}
#stock_area .stock_box{
	width: 23.5%;
}
#stock_area .stock_box .stock_thumb{
	aspect-ratio: 4/3;
	background-size: contain;
    background-repeat: no-repeat;
	background-position: center;
    background-color: #ECEEF1;
}
#stock_area .stock_box h3{
    font-weight: bold;
    margin: 15px 0 15px;
}
#stock_area .stock_box .price{
    display: flex;
    justify-content: space-between;
}
#stock_area .stock_box .price .price_left,
#stock_area .stock_box .price .price_right{
    width: 49%;
    padding: 10px 3px;
    box-sizing: border-box;
    text-align: center;
    font-weight: bold;
    font-size: 0.95em;
    background-color: #ECEEF1;
    border-radius: 5px;
}
#stock_area .stock_box .price .price_right{
    background-color: #D9DDE3;
}
#stock_area .stock_box .price span{
    font-weight: normal;
    font-size: 0.85em;
    display: block;
}
#stock_area .stock_box p{
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8em;
    line-height: 1.5em;
    margin: 10px 0 15px;
}
#stock_area .stock_box .stock_link{
    background-color: #728396;
    color: #fff;
    font-weight: normal;
    text-align: center;
    box-sizing: border-box;
    font-size: 0.9em;
    position: relative;
}
#stock_area .stock_box .stock_link a{
    display: block;
    color: #fff;
    padding: 10px 5px;
}
#stock_area .stock_box .stock_link::after{
    content: url(/fwcjp/img/common/btn_arrow_w.svg);
    position: absolute;
    width: 8px;
    right: 15px;
    top: 30%;
}
/* ページャー*/
.pager{
    margin: 30px 0 80px;
    text-align: center;
}
.pager a,
.pager span{
    display: inline-block;
    padding: 2px 8px;
    margin: 0 6px;
    color: #728396;
    border: 1px solid #728396;
    text-decoration: none;
}
.pager .current{
    background: #728396;
    color: #fff;
    border-color: #728396;
}
.pager .pager_next,
.pager .pager_prev{
    border: 0px;
    padding: 0 8px;
    vertical-align: middle;
}
.pager img {
    width: 12px;
    height: auto;
}
.pager_prev img {
    transform: scaleX(-1);
}
.pager .disabled{
    display: none;
}
.more_wrap{
	display: none;
}
@media (max-width: 767px) {
    #page_header h2{
        top: 47% !important;
    }
    .page_stock_detail{
        height: 30vh !important;
    }
    .page_stock_detail h3{
        top: 63% !important;
    }
    .pager,
    .stock_none{
    	display: none;
    }
    .more_wrap{
    	display: block;
        max-width: 40%;
        width: 100px;
        margin: 0 auto 80px;
    }
    #stock_area{
        display: block;
        padding: 0 20px;
        margin: 40px auto;
    }
    #stock_area .stock_box{
        width: 100%;
        margin-bottom: 50px;
    }
    #stock_area .stock_box p{
        font-size: 0.9em;
        margin: 15px 0 20px;
    }
    #stock_area .stock_box .stock_link{
        padding: 5px 5px;
        font-size: 1em;
    }

    #stock_area .stock_box.enter{
        opacity:0;
        transform:translateY(12px);
        will-change: opacity, transform;
    }
    #stock_area .stock_box.enter.in{
        opacity:1;
        transform:none;
        transition:opacity .55s ease, transform .55s ease;
    }
}
@media (prefers-reduced-motion: reduce){
    #stock_area .stock_box.enter,
    #stock_area .stock_box.enter.in{
        transition:none !important;
        transform:none !important;
        opacity:1 !important;
    }
}

:root{
    --thumb-w: 206px;
    --gap: 10px;
}

/* detail */
#stock_detail{
    margin: 80px auto;
}
#stock_detail .viewmodal{
    cursor: pointer;
    position: relative;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #ECEEF1;
}
.gallery-wrap{
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* メイン */
.modal-content{
    z-index: 10000 !important;
}
.modal-content img{
    height: auto !important;
}
.main-swiper{
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 6px;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.main-swiper .swiper-slide{
    display: flex;
    align-items: center;
    justify-content: center;
}
.main-swiper img{
    width: 100%;
    height: 100%;
    object-fit: contain; /* 画像は縮小して全体表示 */
    display: block;
}
.main-swiper img.camera{
    width: 30px;
    height: auto;
    position: absolute;
    bottom: 3%;
    right: 3%;
    cursor: pointer;
    transition: 0.4s;
}

/* サムネ縦（メインと同じ高さに固定／高さはSwiper側で4分割） */
.thumbs-swiper{
    position: relative;
    width: var(--thumb-w);
    flex: 0 0 var(--thumb-w);
    border-radius: 6px;
    overflow: hidden;
    height: calc(
        (var(--thumb-w) * 3 / 4) * 4
        + (var(--gap) * 3)
    );
    contain: content;
    min-height: 0;
}
/* Swiperの計算は壊さない */
.thumbs-swiper .swiper-slide{
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 4:3 を作る箱 */
.thumbs-swiper .thumb-inner{
    width: 100%;
    aspect-ratio: 4/3;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #ECEEF1;
    border-radius: 4px;
}
.thumbs-swiper .swiper-slide-thumb-active{
    opacity: 1;
}
.thumbs-swiper img{
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 4px;
    object-fit: cover; /* 面で埋める（トリミング） */
}

/* Swiper Scrollbar（サムネ用） */
.thumbs-scrollbar{
    position: absolute;
    right: 2px;
    top: 6px;
    bottom: 6px;
    width: 6px;
    background: rgba(0,0,0,0.06);
    border-radius: 3px;
}
.thumbs-scrollbar .swiper-scrollbar-drag{
    background: rgba(0,0,0,0.35);
    border-radius: 3px;
}

#stock_detail h4{
    margin: 50px 0 20px;
    background-color: #ECEEF1;
    padding: 10px 0;
    box-sizing: border-box;
    font-size: 1.1em;
}
#stock_detail #catch{
    margin-top: 30px;
    font-size: 1.2em;
    line-height: 1.5em;
    font-weight: bold;
}
#stock_detail #prices{
    display: flex;
    justify-content: space-between;
    margin: 30px 0 60px;
}
#stock_detail #prices .price_left,
#stock_detail #prices .price_right{
    width: 49%;
    padding: 20px 5px;
    box-sizing: border-box;
    text-align: center;
    font-weight: bold;
    font-size: 1.3em;
    background-color: #ECEEF1;
    border-radius: 5px;
}
#stock_detail #prices .price_right{
    background-color: #D9DDE3;
}
#stock_detail #prices span{
    font-weight: normal;
    font-size: 0.75em;
    margin-right: 10px;
}
#stock_detail .stock_link{
    margin: 80px auto 30px;
    background-color: #728396;
    color: #fff;
    font-weight: normal;
    text-align: center;
    box-sizing: border-box;
    font-size: 0.9em;
    position: relative;
    width: 250px;
    max-width: 100%;
}
#stock_detail .stock_link a{
    display: block;
    color: #fff;
    padding: 10px 5px;
}
#stock_detail .stock_link::after{
    content: url(/fwcjp/img/common/btn_arrow_w.svg);
    position: absolute;
    width: 8px;
    right: 15px;
    top: 30%;
}
/* ライトボックス矢印 */
.modal-prev,
.modal-next{
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    font-size: 50px;
    font-weight: bold;
    color: #ffffff;
    z-index: 99999;
    cursor: pointer;
    user-select: none;
    text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

.modal-prev{ left: 20px; }
.modal-next{ right: 20px; }

/* モーダル画像 アニメーション設定 */
#modal_viewer img{
    transition: all 0.25s ease;
    opacity: 1;
}

#modal_viewer img.slide-out-left{
    transform: translateX(-40px);
    opacity: 0;
}

#modal_viewer img.slide-out-right{
    transform: translateX(40px);
    opacity: 0;
}

#modal_viewer img.slide-in-left{
    transform: translateX(-40px);
    opacity: 0;
}

#modal_viewer img.slide-in-right{
    transform: translateX(40px);
    opacity: 0;
}

#modal_viewer img.slide-in-active{
    transform: translateX(0);
    opacity: 1;
}

@media (max-width: 1100px) {
    :root{
        --thumb-w: 18.8vw;
        --gap: 6px;
    }
}

@media (max-width: 767px) {
    :root{
        --thumb-w: 22.5vw;
        --gap: 3px;
    }
    .thumbs-swiper{
        height: calc(
            (var(--thumb-w) * 3 / 4) * 3
            + (var(--gap) * 3)
        );
    }
    #stock_detail{
        display: block;
        padding: 0 10px;
        margin: 30px auto;
    }
    .gallery-wrap{
        gap: 5px;
        align-items: center;
    }
    #stock_detail #catch{
        margin-top: 15px;
        font-size: 1.1em;
    }
    #stock_detail #prices{
        margin: 20px auto 30px;
    }
    #stock_detail #prices .price_left,
    #stock_detail #prices .price_right{
        padding: 10px 5px;
        font-size: 1.1em;
        border-radius: 5px;
    }
    #stock_detail #prices span{
        display: block;
        margin-right: 0px;
    }
    #stock_detail #detail_texts{
        font-size: 0.9em;
    }
    #stock_detail h4{
        margin: 20px 0 10px;
        padding: 5px 0;
        font-size: 0.9em;
    }
    #stock_detail .stock_link{
        margin: 60px auto 40px;
        width: 90%;
    }
}
