/* ================================
   スライダー仮表示用CSS
   画像がない場合の視認用スタイル
   ================================ */

/* メインビジュアルスライダーの仮表示 */
.hero-slider .slide {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider .slide::before {
    content: none;
}

.hero-slider .slide::after {
    content: none;
}

/* スライドごとのグレー系グラデーション */
.hero-slider .slide:nth-child(1) { background: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 100%); }
.hero-slider .slide:nth-child(2) { background: linear-gradient(135deg, #d5d5d5 0%, #a5a5a5 100%); }
.hero-slider .slide:nth-child(3) { background: linear-gradient(135deg, #cacaca 0%, #9a9a9a 100%); }
.hero-slider .slide:nth-child(4) { background: linear-gradient(135deg, #bfbfbf 0%, #8f8f8f 100%); }
.hero-slider .slide:nth-child(5) { background: linear-gradient(135deg, #b4b4b4 0%, #848484 100%); }
.hero-slider .slide:nth-child(6) { background: linear-gradient(135deg, #a9a9a9 0%, #797979 100%); }
.hero-slider .slide:nth-child(7) { background: linear-gradient(135deg, #9e9e9e 0%, #6e6e6e 100%); }
.hero-slider .slide:nth-child(8) { background: linear-gradient(135deg, #939393 0%, #636363 100%); }

/* 商品スライダーの仮表示 */
.product-slide {
    position: relative;
    background: #e0e0e0;
    width: 100%;  /* 幅を100%に固定 */
    flex: 0 0 100%;  /* flexアイテムとして縮小を防ぐ */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-slide::before {
    content: none;
}

/* すべてのカテゴリーをグレー色に統一 */
.product-category .product-slide:nth-child(1) { background: linear-gradient(135deg, #e8e8e8 0%, #c8c8c8 100%); }
.product-category .product-slide:nth-child(2) { background: linear-gradient(135deg, #dedede 0%, #bebebe 100%); }
.product-category .product-slide:nth-child(3) { background: linear-gradient(135deg, #d4d4d4 0%, #b4b4b4 100%); }
.product-category .product-slide:nth-child(4) { background: linear-gradient(135deg, #cacaca 0%, #aaaaaa 100%); }

/* サムネイルの仮表示 */
span.thumbnail,
.thumbnail {
    position: relative;
    background: #ccc;
    display: inline-block;
    width: 60px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 0;
}

/* 角丸を完全に無効化（詳細度を高めて上書き） */
div.thumbnail,
div.thumbnail.placeholder,
span.thumbnail,
.thumbnail-nav div.thumbnail,
.thumbnail-nav div.thumbnail.placeholder,
.product-thumbnails span.thumbnail,
.slider-dots div.thumbnail,
.slider-dots div.thumbnail.placeholder {
    border-radius: 0;
}

span.thumbnail::before,
.thumbnail::before {
    content: attr(data-thumb-number);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.3);
}

span.thumbnail.active,
.thumbnail.active {
    background: #999;
    border-color: var(--theme-color);
}

/* プレースホルダー画像が読み込めない場合の代替表示 */
img[src*="placeholder"],
img[src*="via.placeholder"] {
    display: none;
}

img[src*="placeholder"] + .image-placeholder,
img[src*="via.placeholder"] + .image-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
}

/* アニメーション効果の追加 */
.slider-wrapper,
.product-slider-wrapper {
    transition: transform 0.5s ease;
}

/* サムネイル形式のナビゲーション（全幅8分割） */
.slider-dots {
    display: flex;
    gap: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.9);
    width: 100%;
    position: relative;
    bottom: 0;
    left: 0;
}

/* サムネイル用（比率維持） */
.slider-dots .dot {
    flex: 1;
    height: auto;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.slider-dots .dot:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* 各サムネイルの識別番号 */
.slider-dots .dot::before {
    content: attr(data-slide-thumb);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

/* 各サムネイルの背景色を個別に設定 */
.slider-dots .dot:nth-child(1) { background: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 100%); }
.slider-dots .dot:nth-child(2) { background: linear-gradient(135deg, #d5d5d5 0%, #a5a5a5 100%); }
.slider-dots .dot:nth-child(3) { background: linear-gradient(135deg, #cacaca 0%, #9a9a9a 100%); }
.slider-dots .dot:nth-child(4) { background: linear-gradient(135deg, #bfbfbf 0%, #8f8f8f 100%); }
.slider-dots .dot:nth-child(5) { background: linear-gradient(135deg, #b4b4b4 0%, #848484 100%); }
.slider-dots .dot:nth-child(6) { background: linear-gradient(135deg, #a9a9a9 0%, #797979 100%); }
.slider-dots .dot:nth-child(7) { background: linear-gradient(135deg, #9e9e9e 0%, #6e6e6e 100%); }
.slider-dots .dot:nth-child(8) { background: linear-gradient(135deg, #939393 0%, #636363 100%); }

.slider-dots .dot.active {
    background: linear-gradient(135deg, #ffcc00 0%, #ff9900 100%);
    border-color: #ff9900;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.slider-dots .dot:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #c0c0c0 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

/* サムネイル画像ナビゲーション */
.slider-dots.thumbnail-nav {
    background: #000;
}

.slider-dots.thumbnail-nav .thumbnail {
    flex: 1;
    height: auto;
    aspect-ratio: 16/9;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 0.6;
}

.slider-dots.thumbnail-nav .thumbnail:last-child {
    border-right: none;
}

.slider-dots.thumbnail-nav .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-dots.thumbnail-nav .thumbnail.active {
    opacity: 1;
    border-bottom: 3px solid var(--theme-color, #3d5a80);
}

.slider-dots.thumbnail-nav .thumbnail:hover {
    opacity: 0.9;
}

/* ================================
   レスポンシブ: スマホ幅でドットナビに切り替え
   ================================ */
@media (max-width: 480px) {
    /* サムネイル画像ナビ → ドットナビに変換 */
    .slider-dots,
    .slider-dots.thumbnail-nav {
        justify-content: center;
        gap: 16px;
        padding: 12px 0;
        background: transparent !important;
    }

    .slider-dots .dot,
    .slider-dots .dot:nth-child(n),
    .slider-dots.thumbnail-nav .thumbnail,
    .thumbnail-nav.full-width .thumbnail {
        flex: none !important;
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        background: rgba(0, 0, 0, 0.3) !important;
        border: none !important;
        opacity: 1 !important;
    }

    .slider-dots .dot img,
    .slider-dots.thumbnail-nav .thumbnail img {
        display: none !important;
    }

    .slider-dots .dot::before,
    .slider-dots.thumbnail-nav .thumbnail::before {
        content: none !important;
    }

    .slider-dots .dot.active,
    .slider-dots .dot.active:nth-child(n),
    .slider-dots.thumbnail-nav .thumbnail.active,
    .thumbnail-nav.full-width .thumbnail.active {
        background: var(--theme-color, #333) !important;
        border: none !important;
        box-shadow: none !important;
    }

    .slider-dots .dot:hover,
    .slider-dots.thumbnail-nav .thumbnail:hover {
        background: rgba(0, 0, 0, 0.5) !important;
        border: none !important;
    }
}
