/* 外枠を相対位置に設定 */
.slider-wrapper {
    position: relative;
    max-width: 512px;
    margin: 0 auto;
}

/* ボタンの共通スタイル */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.4); /* 半透明の黒 */
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 左右の配置 */
.prev { left: 10px; }
.next { right: 10px; }

/* スライダー自体（前回のコードを活かす） */
.slider-container {
    scroll-behavior: smooth; /* クリック時にヌルッと動かすために必要 */
}
.slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;

    width: 100%;				/* スマホでは画面幅いっぱい */
    max-width: 512px;			/* PCなど大きな画面では512pxで止まる */
    margin: 0 auto;				/* スライダー自体を中央に寄せる */
    aspect-ratio: 512 / 763;	/* 横長に固定（お好みで 4/3 などに変更可） */

    border-radius: 12px;
    background: #eee;
}

.slider-container::-webkit-scrollbar {
    display: none;
}

.slide-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 枠に合わせてきれいにトリミング */
}
