/* ▼▼▼ 1. ページ基本スタイル ▼▼▼ */
.swiper-pattern-content {
    width: 100%;
    max-width: 1600px;
    padding: 0 1rem;
    box-sizing: border-box;
    margin: 0 auto;
}

.swiper-pattern-section {
    width: 100%;
    height: 100%;
    margin-bottom: 3rem;
}

/* ▼▼▼ 2. Swiper共通スタイル ▼▼▼ */
.swiper-container-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* --- スライドの共通設定（JS実行前後での重複を統合） --- */
.swiper-wrapper>*,
.swiper-slide {
    /* レイアウト崩れ(FOUC)防止と基本デザイン */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    background-size: cover;
    background-position: center;
    box-sizing: border-box;
}

/* JS実行前の初期状態のみに必要な設定 */
.swiper-wrapper>* {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    /* CMS等のデフォルトスタイルリセット */
}

/* --- コントロール周り --- */
.swiper-controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 800px;
    position: relative;
}

.single-slide .swiper-controls-wrapper {
    display: none;
}

/* 再生/停止ボタン (CSS描画) */
.autoplay-controls {
    margin-right: 0.75rem;
    display: flex;
}

.autoplay-controls button {
    padding: 0;
    border: none;
    background: #8F7321;
    cursor: pointer;
    width: 30px;
    height: 30px;
    vertical-align: middle;
    position: relative;
}

.play-button,
.stop-button {
    background-color: #FFF;
    border: 1px solid #333;
    border-radius: 50%;
    box-sizing: border-box;
}

.play-button::after {
    content: '';
    display: block;
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #FFF;
    transform: translate(-50%, -50%);
    margin-left: 2px;
}

.stop-button::before,
.stop-button::after {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    width: 4px;
    height: 16px;
    background-color: #FFF;
    transform: translateY(-50%);
}

.stop-button::before {
    left: 8px;
}

.stop-button::after {
    right: 8px;
}

/* 左右矢印共通 */
.swiper-button-prev,
.swiper-button-next {
    position: static;
    width: 30px;
    height: 30px;
    margin-top: 0;
    margin-bottom: 0;
    background-color: #333;
    background-image: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-button-prev {
    margin-right: 1.5rem;
    transform: rotate(180deg);
}

.swiper-button-next {
    margin-left: 1.5rem;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    content: '';
    box-sizing: border-box;
    width: 10px;
    height: 10px;
    border-top: 2px solid #FFF;
    border-right: 2px solid #FFF;
    transform: rotate(45deg);
    position: relative;
    left: -1px;
}

/* ページネーション (ドット) スタイル */
.swiper-pagination {
    position: static;
    width: auto !important;
    display: flex;
    gap: 8px;
    align-items: center;
}

.swiper-pagination-bullet {
    width: 24px;
    height: 24px;
    background-color: transparent;
    opacity: 1;
    margin: 0;
    border-radius: 50%;
    transition: background-color 0.3s;
    border: 3px solid #8F7321;
}

.swiper-pagination-bullet-active {
    width: 30px;
    height: 30px;
    background-color: #D6B85C;
}

svg.swiper-navigation-icon {
    display: none;
}

/* ▼▼▼ 3. 各パターン固有スタイル ▼▼▼ */

/* --- Multiパターン --- */
.swiper-multi .swiper-container {
    width: 100%;
    max-width: 100vw;
    max-height: 100vh;
}

/* --- Peekパターン --- */
.swiper-peek .swiper-container {
    width: 100%;
    max-width: 100vw;
    max-height: 100vh;
    overflow: visible;
    position: relative;
    z-index: 1;
}

/* クラス付与前後で共通 */
.swiper-peek .swiper-wrapper>*,
.swiper-peek .swiper-slide {
    width: 80%;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.swiper-peek .swiper-slide-active {
    opacity: 1;
}

.swiper-peek .swiper-controls-wrapper {
    z-index: 2;
}

/* --- Coverflowパターン --- */
.swiper-coverflow .swiper-container {
    width: 100%;
    max-width: 100vw;
    overflow: visible;
    padding-top: 50px;
    padding-bottom: 50px;
}

/* クラス付与前後で共通 */
.swiper-coverflow .swiper-wrapper>*,
.swiper-coverflow .swiper-slide {
    width: 60%;
}

/* --- Gridパターン --- */
.swiper-grid .swiper-container {
    width: 100%;
}

/* クラス付与前後で共通 */
.swiper-grid .swiper-wrapper>*,
.swiper-grid .swiper-slide {
    height: auto;
    box-sizing: border-box;
}