/* =========================================================
    Project: Feature Pickup Slider
   ========================================================= */

/* --- 0. Swiper 基礎構造 --- */
.p-featureSlider.swiper {
    position: relative;
    overflow: visible !important; 
    list-style: none;
    padding: 0;
    z-index: 1;
}

.p-featureSlider .swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.p-featureSlider .swiper-slide {
    flex-shrink: 0;
    height: auto;
    position: relative;
    transition-property: transform;
    display: flex;
}

/* --- 1. スライダー共通デザイン --- */
.p-featureSlider {
    width: 100%;
    padding-bottom: var(--wan-s-10);
}

/* ページネーション（ドット） */
.p-featureSlider .swiper-pagination {
    bottom: 0 !important;
    position: relative;
    margin-top: var(--wan-s-6);
    text-align: center;
}

.p-featureSlider .swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
    display: inline-block !important;
    background: #ccc !important;
    opacity: 0.5 !important;
    margin: 0 var(--wan-s-2) !important;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.p-featureSlider .swiper-pagination-bullet-active {
    background: var(--wan-color-brand, #ff922b) !important;
    opacity: 1 !important;
    width: 24px !important;
    border-radius: 4px;
}

/* 送りボタン（矢印） */
.p-featureSlider .swiper-button-next,
.p-featureSlider .swiper-button-prev {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background-color: var(--wan-color-brand, #ff922b);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    z-index: 100;
    display: flex; 
    align-items: center;
    justify-content: center;
    box-shadow: var(--wan-shd-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.p-featureSlider .swiper-button-next::after,
.p-featureSlider .swiper-button-prev::after {
    font-family: sans-serif;
    font-size: var(--wan-f-size-xl);
    font-weight: bold;
}
.p-featureSlider .swiper-button-prev::after { content: "←"; }
.p-featureSlider .swiper-button-next::after { content: "→"; }

.p-featureSlider .swiper-button-prev { left: -24px; }
.p-featureSlider .swiper-button-next { right: -24px; }


/* --- 2. スマホ専用：中央配置・無限ループ設定 --- */
@media screen and (max-width: 768px) {
    .p-featureSlider__wrap {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-top: var(--wan-s-3);
        overflow: hidden; 
    }

    .p-featureSlider {
        width: 100% !important; 
        padding-left: 0 !important;  
        padding-right: 0 !important; 
        box-sizing: border-box;
        overflow: visible !important;   
    }

    .p-featureSlider .swiper-button-next,
    .p-featureSlider .swiper-button-prev {
        display: none !important;
    }

    .p-featureSlider .swiper-slide {
        width: 82% !important; 
    }
}


/* --- 3. PC専用：レイアウト調整 --- */
@media screen and (min-width: 769px) {
    .p-featureSlider__wrap {
        width: 100%;
        overflow: visible !important;
        position: relative;
    }

    .p-featureSlider {
        overflow: hidden !important; 
        padding-top: var(--wan-s-5);
        padding-bottom: var(--wan-s-12);
    }

    .p-featureSlider .swiper-slide {
        width: 100% !important;
    }

    .p-featureSlider .swiper-button-next:hover,
    .p-featureSlider .swiper-button-prev:hover {
        opacity: 0.8;
        transform: translateY(-50%) scale(1.05);
    }
}

/* --- 4. JS実行前のガタつき防止 --- */
.p-featureSlider:not(.swiper-initialized) {
    overflow: hidden;
}

.p-featureSlider:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
}

.p-featureSlider:not(.swiper-initialized) .swiper-slide {
    flex-shrink: 0;
    /* 💡 JS実行後の 82% と数値を合わせて「震え」を最小化 */
    width: 82%; 
}