/* ========================================
   トップページ関連CSS - ギャラリースライダー
   
   ブレークポイント:
   - モバイル: 650px以下
   - タブレット: 651px〜1210px
   - PC: 1211px以上
   
   親テーマの上書き:
   - #index_recipe_slider の height: 383px → auto
   - .item の width: 260px, height: 366px → カスタムサイズ
   - .image_wrap の height: 260px → カスタムサイズ
   - .image の height: 260px !important → 100% !important
   - .owl-nav button のサイズと位置を調整
======================================== */

/* ========================================
   基本スタイル（全デバイス共通）
======================================== */

/* スライダーコンテナ */
#index_recipe_slider_wrap {
    overflow: hidden;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

/* 親テーマの margin: 0 15px を上書き - 左右の余白を均等に */
#index_slider_wrap {
    margin: 0 !important;
}

/* Owl Carouselのステージ周りの余白をリセット */
#index_recipe_slider .owl-stage-outer {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

#index_recipe_slider .owl-stage {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* Owl Carouselのアイテムマージンを統一（activeクラスの有無に関わらず） */
#index_recipe_slider .owl-item {
    margin: 0 1px !important;
    padding: 0 !important;
}

#index_recipe_slider .owl-item.active {
    margin: 0 1px !important;
    padding: 0 !important;
}

#index_recipe_slider .owl-item.cloned {
    margin: 0 1px !important;
    padding: 0 !important;
}

#index_recipe_slider .owl-item.cloned.active {
    margin: 0 1px !important;
    padding: 0 !important;
}

/* 親テーマのスライダー高さを上書き（383px → auto） */
#index_recipe_slider {
    height: auto !important;
}

/* ========================================
   ギャラリーアイテム - PC表示（1211px以上）
======================================== */

/* アイテムコンテナ - 親テーマの width: 260px, height: 366px を上書き */
#index_recipe_slider_wrap .item.gallery-item {
    width: 220px !important;
    max-width: 220px;
    height: 160px !important;
    margin: 0 !important;
}

/* 画像ラッパー - 親テーマの height: 260px を上書き */
#index_recipe_slider_wrap .item.gallery-item .image_wrap {
    width: 220px !important;
    height: 160px !important;
    overflow: hidden;
    max-width: 100%;
}

/* 画像本体 - 親テーマの height: 260px !important を上書き */
#index_recipe_slider_wrap .item.gallery-item .image {
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* ========================================
   非表示要素
======================================== */

/* タイトルエリアを非表示（画像のみ表示） */
#index_recipe_slider_wrap .item.gallery-item .title_area {
    display: none !important;
}

/* カテゴリーとプレミアムアイコンを非表示 */
#index_recipe_slider_wrap .item.gallery-item .category,
#index_recipe_slider_wrap .item.gallery-item .premium_icon {
    display: none !important;
}

/* ========================================
   テキストオーバーレイ（中央の黒帯）
======================================== */

/* image_wrapを相対位置に設定（オーバーレイの基準点） */
#index_recipe_slider_wrap .item.gallery-item .image_wrap {
    position: relative;
}

/* テキストオーバーレイコンテナ */
#index_recipe_slider_wrap .item.gallery-item .text_overlay {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 4px 10px;
    text-align: center;
    z-index: 10;
}

/* 1行目のテキスト */
#index_recipe_slider_wrap .item.gallery-item .overlay_line1 {
    color: #ffffff;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

/* 2行目のテキスト */
#index_recipe_slider_wrap .item.gallery-item .overlay_line2 {
    color: #ffffff;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}


/* ========================================
   ナビゲーションボタン
======================================== */

/* ボタン共通スタイル - 親テーマの 60x60px, #fff を上書き */
#index_recipe_slider .owl-nav button {
    width: 54px !important;
    height: 54px !important;
    background: #454545 !important;
}

/* 左ボタン - 上下中央配置 */
#index_recipe_slider .owl-prev {
    top: 50% !important;
    transform: translateY(-50%);
    left: 0px !important;
}

/* 右ボタン - 上下中央配置 */
#index_recipe_slider .owl-next {
    top: 50% !important;
    transform: translateY(-50%);
    right: 0px;
}

/* アイコンの色を白に変更 */
#index_recipe_slider .owl-nav span:after {
    color: #fff !important;
}

/* ホバー時のアイコン色 */
#index_recipe_slider .owl-nav button:hover span:after {
    color: #9E2339 !important;
}

/* アイコン位置の微調整（54pxに合わせて） */
#index_recipe_slider .owl-prev span:after {
    left: 20px !important;
}

#index_recipe_slider .owl-next span:after {
    left: 22px !important;
}

/* ========================================
   ホバーエフェクト
======================================== */

#index_recipe_slider_wrap .item.gallery-item .link:hover .image {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ========================================
   レスポンシブ対応
======================================== */

/* タブレット: 651px〜1210px */
@media (min-width: 651px) and (max-width: 1210px) {
    #index_recipe_slider_wrap .item.gallery-item {
        width: 180px !important;
        height: 130px !important;
    }

    #index_recipe_slider_wrap .item.gallery-item .image_wrap {
        width: 180px !important;
        height: 130px !important;
    }

    /* タブレットサイズでのテキストオーバーレイ調整 */
    #index_recipe_slider_wrap .item.gallery-item .text_overlay {
        padding: 3px 8px;
    }

    #index_recipe_slider_wrap .item.gallery-item .overlay_line1,
    #index_recipe_slider_wrap .item.gallery-item .overlay_line2 {
        font-size: 10px;
        line-height: 1.2;
    }
}

/* モバイル: 650px以下 */
@media (max-width: 650px) {
    #index_recipe_slider_wrap .item.gallery-item {
        width: 110px !important;
        height: 110px !important;
    }

    #index_recipe_slider_wrap .item.gallery-item .image_wrap {
        width: 110px !important;
        height: 110px !important;
    }

    /* モバイルサイズでのテキストオーバーレイ調整 */
    #index_recipe_slider_wrap .item.gallery-item .text_overlay {
        padding: 2px 5px;
    }

    #index_recipe_slider_wrap .item.gallery-item .overlay_line1,
    #index_recipe_slider_wrap .item.gallery-item .overlay_line2 {
        font-size: 8px;
        line-height: 1.2;
    }

    /* モバイルではナビゲーションボタンを小さく */
    #index_recipe_slider .owl-nav button {
        width: 40px !important;
        height: 40px !important;
    }

    #index_recipe_slider .owl-prev span:after {
        left: 13px !important;
    }

    #index_recipe_slider .owl-next span:after {
        left: 15px !important;
    }
}