@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap');

/* ========================================
   サイドバー関連CSS
   カテゴリ検索、一覧、バナーエリアなど
======================================== */

/* カテゴリエリア */
.side_category_area {
    width: 258px;
    height: 500px;
    background-color: #f5f5f5;
    /* 仮の背景色 */
    padding: 10px 0;
    box-sizing: border-box;
}

/* 検索窓 */
.side_search_box {
    width: 236px;
    height: 36px;
    margin: 0 auto 10px;
    /* 中央寄せ & 下マージン */
    position: relative;
}

#searchform {
    border: 1px solid #ddd;
    background: #fff;
    height: 36px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

#searchform #s {
    border: none;
    background: none;
    padding: 0 18px;
    margin: 0;
    width: calc(100% - 50px);
    height: 36px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

#searchform #searchsubmit {
    border: none;
    background: none;
    width: 30px;
    height: 30px;
    z-index: 200;
    position: absolute;
    cursor: pointer;
    display: block;
    text-indent: -300px;
    overflow: hidden;
}


.side_search_box input[type="text"] {
    width: 100%;
    height: 36px;
    border: 1px solid #ccc;
    padding: 0 30px 0 10px;
    /* アイコンスペース確保 */
    box-sizing: border-box;
    border-radius: 0;
    /* 角丸なし */
}

.side_search_box button {
    position: absolute;
    top: 50%;
    /* 縦方向中央配置の起点 */
    right: 10px;
    /* 右端からの距離 */
    transform: translateY(-50%);
    /* 縦方向の完全な中央揃え */
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.side_search_box button img {
    width: 20px;
    /* アイコンサイズ調整 */
    height: 20px;
    margin: 0;
    /* マージンリセット */
    display: block;
    opacity: 1;
}

/* カテゴリ一覧 */
.side_category_list {
    width: 258px;
    height: 425px;
    overflow-y: scroll;
    /* スクロールバー表示 */
    padding: 0 10px;
    /* 内側の余白 */
    box-sizing: border-box;
}

.side_category_list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side_category_list li {
    margin-bottom: 5px;
    /* background: #fff;  <- li自体の背景色は削除 */
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    line-height: 1.4;
    display: flex;
    /* Flexboxで要素幅をコンテンツに合わせる */
    align-items: flex-start;
    /* 左寄せ */
}

.side_category_list li a {
    display: inline-block;
    /* ブロックからインラインブロックへ変更 */
    background-color: #fff;
    /* リンク（テキスト部分）に背景色を設定 */
    padding: 4px 8px;
    /* 内側の余白を調整 */
    text-decoration: none;
    color: #333;
    text-transform: uppercase;
    /* 大文字変換（画像に合わせる） */
}

.side_category_list li a:hover {
    background-color: #eee;
    opacity: 0.8;
    /* ホバー時の変化 */
}

/* スクロールバーのカスタマイズ（Webkit系） */
.side_category_list::-webkit-scrollbar {
    width: 8px;
}

.side_category_list::-webkit-scrollbar-track {
    background: #e0e0e0;
}

.side_category_list::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

/* バナーエリア */
.side_banner_area {
    margin-top: 20px;
    width: 258px;
}

.side_banner_item {
    width: 258px;
    height: 70px;
    margin-top: 10px;
    /* バナー間のマージン */
}

.side_banner_item:first-child {
    margin-top: 0;
    /* 最初のバナーはマージンなし（エリアのマージンで調整） */
}

.side_banner_item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 画像の比率を保持して枠内に収める */
    display: block;
}


/* ========================================
   レスポンシブ対応
   
   ブレークポイント:
   - モバイル: 650px以下
   - タブレット: 651px〜1210px
   - PC: 1211px以上
   
   注意: PC表示（1211px以上）は元のレイアウトを維持
======================================== */

/* ========================================
   タブレット: 651px〜1210px
======================================== */
@media (min-width: 651px) and (max-width: 1210px) {
    /* タブレットでは親テーマのレイアウトに従う */
    /* 必要に応じてここに調整を追加 */
}

/* ========================================
   モバイル: 650px以下
======================================== */
@media screen and (max-width: 650px) {

    /* サイドバー全体 */
    #side_col {
        width: 100% !important;
        float: none !important;
        padding: 0 10px;
        /* 両端に10pxの余白 */
        box-sizing: border-box;
    }

    /* カテゴリエリア */
    .side_category_area {
        width: 100% !important;
        height: 274px !important;
        /* 高さは自動調整 */
        background-color: #f5f5f5;
        /* PCと同じ背景色 */
        padding: 10px 0;
        /* PCと同じパディング */
        box-sizing: border-box;
    }

    /* 検索窓 */
    .side_search_box {
        width: 95% !important;
        max-width: 100%;
    }

    #searchform #s {
        width: calc(100% - 40px) !important;
        /* ボタン幅分引く */
    }

    /* カテゴリ一覧 */
    .side_category_list {
        width: 100% !important;
        height: auto !important;
        max-height: 200px;
        padding: 0 10px;
        /* PC同様の内側余白を追加 */
    }

    /* バナーエリア */
    .side_banner_area {
        width: 100% !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        /* 2列表示のための均等配置 */
    }

    .side_banner_item {
        width: 49% !important;
        /* 2列表示（隙間を考慮して49%） */
        height: auto !important;
        margin-bottom: 10px;
        margin-top: 0;
        /* PC用のマージンリセット */
    }

    .side_banner_item img {
        width: 100%;
        height: auto;
    }
}