/* ================================
   スライダー共通スタイル
   全ページで使用するスライダーの基本設定
   ================================ */

/* 基本スライダー構造 */
.slider-section {
    position: relative;
    width: 100%;
    overflow: visible;
}

.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.slide,
.product-slide {
    min-width: 100%;
    position: relative;
}

/* ================================
   サムネイルナビゲーション共通
   ================================ */

/* 基本サムネイル設定 */
.thumbnail-nav,
.slider-thumbnails,
.slider-dots {
    display: flex;
    transition: all 0.3s ease;
}

.thumbnail,
.dot {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.thumbnail.active,
.dot.active {
    opacity: 1;
}

.thumbnail:hover,
.dot:hover {
    opacity: 0.8;
}

/* ================================
   レイアウトバリエーション
   ================================ */

/* パターン1: 全幅分割型（TOPページメインビジュアル用） */
.thumbnail-nav.full-width {
    width: 100%;
    gap: 0;
    background: rgba(0, 0, 0, 0.9);
}

.thumbnail-nav.full-width .thumbnail {
    flex: 1;
    height: auto;
    aspect-ratio: 16/9;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: none;
}

.thumbnail-nav.full-width .thumbnail:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* パターン2: 固定幅型（商品ページ用） */
.thumbnail-nav.fixed-width {
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
}

.thumbnail-nav.fixed-width .thumbnail {
    width: 100px;
    height: 60px;
    border: 2px solid #ddd;
}

.thumbnail-nav.fixed-width .thumbnail.active {
    border-color: var(--theme-color);
}

/* パターン3: インライン型（商品カテゴリ用） */
.thumbnail-nav.inline {
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
}

.thumbnail-nav.inline .thumbnail {
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
}

.thumbnail-nav.inline .thumbnail.active {
    border-color: var(--theme-color);
}

/* ================================
   サムネイル内容バリエーション
   ================================ */

/* 画像あり */
.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* プレースホルダー（画像なし） */
.thumbnail.placeholder {
    background: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

/* 詳細度を高めて角丸を無効化 */
.thumbnail-nav .thumbnail.placeholder,
.thumbnail-nav.full-width .thumbnail.placeholder,
.thumbnail-nav.fixed-width .thumbnail.placeholder,
.thumbnail-nav.inline .thumbnail.placeholder,
.slider-dots .thumbnail.placeholder,
.product-thumbnails .thumbnail.placeholder {
    border-radius: 0;
}

.thumbnail.placeholder::before {
    content: attr(data-number);
    font-size: 24px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
}

/* ================================
   レスポンシブ対応
   ================================ */
@media (max-width: 768px) {
    .thumbnail-nav.fixed-width .thumbnail {
        width: 80px;
        height: 50px;
    }

    .thumbnail-nav.inline .thumbnail {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .thumbnail-nav.full-width .thumbnail {
        height: auto;
        aspect-ratio: 16/9;
    }

    .thumbnail-nav.fixed-width {
        gap: 5px;
    }
}
