
@media screen and (min-width: 769px) {
    /* ------------------------------------------------ */
    /* コンテンツエリアとサイドバーの幅設定（最重要）     */
    /* ------------------------------------------------ */
    
    /* サイドバーエリアの幅設定をリセットし、親要素（.site-content）のflexに委ねる */
    /* ------------------------------------------------ */
    /* 1. Storefront標準サイドバーの無効化（干渉防止） */
    /* ------------------------------------------------ */
    /* Storefrontの標準サイドバーは非表示にする（フックを使用していない場合は不要） */
    .right-sidebar .widget-area {
        display: none;
    }
    /* #primary .content-area を100%幅に戻す（横並びの親にしない） */
    .right-sidebar .content-area {
        width: 100%;
    }


    /* ------------------------------------------------ */
    /* 2. ピックアップカテゴリとカスタムウィジェットの横並び */
    /* ------------------------------------------------ */
    .pickup-and-sidebar-wrap {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 40px; /* 必要に応じて調整 */
    }

    /* ピックアップカテゴリ（Flexアイテムの左側）*/
    .home-pickup-categories {
        width: 70%; 
        flex: 0 0 70%;
    }
    
    /* カスタムウィジェットエリア（Flexアイテムの右側）*/
    .widget-area-custom {
        width: 30%; 
        margin-left: 20px;
    }

    .col-full {
	    padding: 0;
    }


}

    .site-content{
        padding:0 10px;
    }

    .content-area, .site-main{
        margin-bottom: 0;
    }
     /* ------------------------------------------------ */
    /* 1. 全幅化CSSの最終版（.col-fullの制限を打ち破る） */
    /* ------------------------------------------------ */
    /* スライダーと最新情報セクションに適用 */
    .home-slider-wrap.full-width-element,
    .home-latest-news.full-width-element {
        
        /* 1. 画面の端から端まで広げる (100vwが最も確実だが、ズレる場合はこの方法で) */
        width: 100vw; 
        
        /* 2. 要素を中央に配置する（ズレ解消の鍵） */
        position: relative;
        left: 50%;
        margin-left: -50vw; /* 左に画面半分の幅をマイナスでずらす */
        
        /* 3. 親要素のパディングによるズレを微調整（もしあれば）*/
        padding-left: 0;
        padding-right: 0;
        
        /* 最新情報セクションのFlexboxによる横並びを確実に解除 */
        flex-basis: 100%; 
        box-sizing: border-box; 
    }
    
    /* ------------------------------------------------ */
    /* 2. メタスライダー内の画像の幅を調整 */
    /* ------------------------------------------------ */
    .home-slider-wrap .metaslider {
        width: 100%; 
    }
    .home-slider-wrap .slides li img {
        width: 100%;
        height: auto;
    }

        /* ------------------------------------------------ */
    /* 3. 最新情報の調整 */
    /* ------------------------------------------------ */

    .home-latest-news{
        text-align: center;
        background-color: #f7f8f8;
        height: auto;
    }

    .home-latest-news > h2{
        padding-top: 40px;
    }

    .latest-news-list {
        list-style: none; /* リストの黒丸を削除 */
        padding-left: 0;
        padding-bottom: 30px;
    }

    .latest-news-body{
        width:50em;
        text-align: left;
        margin: auto;
    }

/* 各リストアイテム */
    .latest-news-list li {
        display: flex; /* 日付とタイトルを横並びにする */
        margin-bottom: 8px;
        padding-bottom: 8px;
        border-bottom: 1px dashed #000; /* 下線を追加 */
    }

    /* 日付のスタイル */
    .latest-news-list .news-date {
        flex: 0 0 100px; /* 日付の幅を固定 */
        margin-right: 20px;
        color: #000;
        font-size: 0.9em;
    }

    /* タイトルのスタイル */
    .latest-news-list .news-title {
        flex-grow: 1; /* 残りのスペースをタイトルが占める */
    }

    .latest-news-list .news-title a {
        text-decoration: none;
        color: #333;
    }
    .latest-news-list .news-title a:hover {
        text-decoration: underline;
    }
    .home-slider-sp{
        display:none;
    }   

@media screen and (max-width: 768px) {
    .home-slider-wrap{
        padding-top: 0;
    }
    .widget-area-custom{
        margin:20px;
    }

    .latest-news-body{
        width:auto;
        padding: 20px;
    }

    .latest-news-list {
        margin: 0 1em 1.41575em 1em;   
    }

    .latest-news-list .news-title a {
        
        /* 1. 要素をインラインではなく、ブロックとして扱い幅を適用できるようにする */
        display: block; 
        
        /* 2. 要素の幅を超えるテキストを隠す */
        overflow: hidden; 
        
        /* 3. テキストを強制的に1行に収める */
        white-space: nowrap;
        
        /* 4. 隠された部分の代わりに「...」を表示する（最重要） */
        text-overflow: ellipsis; 
    }

    .latest-news-list li {
        display: block;
        padding-top: 5px; /* 上部に少し余白を追加 */
    }

    .latest-news-list .news-date {
        display: block;
        margin-right: 0;
        margin-bottom: 3px; /* タイトルとの間に少し余白 */
    }
    .home-slider-pc{
        display:none;
    }   
    .home-slider-sp{
        display:block;
    }   
}



/* ======================================= */
/* 1. Gridコンテナ (2列表示) */
/* ======================================= */
.pickup-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 4列表示 */
    gap: 20px; /* カード間の余白 */
    margin-bottom: 40px;
}

/* ======================================= */
/* 2. カテゴリカード (Flexboxで縦並び) */
/* ======================================= */
.category-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between; /* コンテンツを上下に広げる */
    height: 100%;                   /* 親要素の高さに合わせる（重要） */
    
    /* 共通スタイル */
    border: 1px solid #c0c0c0;
    text-decoration: none;
    transition: all 0.2s;
}

.category-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/* ======================================= */
/* 3. 画像ラッパーと画像 (<img>タグ対応) */
/* ======================================= */

.category-image, .pickup-image{
    width:40%;
    height: 100%;
}

.category-image img {
    /* 縦横比を維持し、親要素の境界内に収める */
    width: 100%; 
    height: 150px;
    object-fit: contain; 
}

.pickup-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* ======================================= */
/* 4. カテゴリ情報 (タイトルとフッターを分ける) */
/* ======================================= */

.category-info {
    width:60%;
    flex-grow: 1; /* 画像の下の残りのスペース全体を占有 */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* タイトルとフッターを上下に分離 */
    padding:10px;
}

.category-title {
    font-size: 1em;
    margin: 0 0 10px 0; /* 下に余白を追加 */
    color: #333;
}
/* ======================================= */
/* 5. カードフッター (左右分離) */
/* ======================================= */
.category-footer {
    /* 水平線と余白 */
    border-top: 1px solid #eee; 
    padding-top: 10px;
    margin-top: 10px;
    color: #777;
    text-align: end;
}

.view-more-link {
    white-space: nowrap;
    font-size: 0.9em;
    font-weight: bold;
}

.category-desc {
    font-size: 0.9em;
    color: #555;
    line-height: 1.6;
}

/* モバイル対応（2列に切り替え）*/
@media screen and (max-width: 768px) {
    .pickup-categories-grid {
        display:block;
    }
    .category-card{
        margin-bottom: 1rem;
    }
}

/* ======================================= */
/*一覧・詳細切り替えボタン */
/* ======================================= */
.tab-wrapper{
    display: flex;
    align-items: center;
}

.tab-wrapper h2{
    padding-right: 20px;
}

.tab-button{
    background-color: #fff;
    padding: 0;
    margin:0 10px;
    height:100%;
}

.tab-button:hover, 
.tab-button:focus{
  text-decoration: underline; /* クリック時のみ下線を表示 */
  background-color: #fff;
  border: none;
}

.tab-content{
  display: none; /* 初期状態では非表示にする */
  padding: 20px;
  margin-top: 10px;
}

.tab-content.active{
  display: block; /* 初期状態では非表示にする */

}

/* ======================================= */
/*一覧表示 */
/* ======================================= */
.child-category-list {
    column-count: 2;       /* カラム数 */
    column-gap: 20px;      /* カラム間の余白 */
}

.category-list-content {
    display: inline-block; /* カラム内でブロック表示 */
    width: 100%;           /* カラム幅に合わせる */
    margin-bottom: 20px;   /* 下余白 */
}

.child-category-list,
.grandchild-category-list{
    list-style: none;
    margin:0;
}

.grandchild-category-list li{
    margin:10px 0;
}

.child-title{
    font-weight: bold;
    font-size: 18px;
    border-bottom: 1px solid #c0c0c0;
}

.child-category-list a ,
.grandchild-item a{
    color: #000;
    display: flex;
}

.grandchild-item img{
    height: auto;
    width: 50px;
    margin-right :20px;
    object-fit: contain;
}

@media screen and (max-width: 768px) {
.child-category-list {
    display: block;
    column-count: auto; 
}

.category-list-content {
    display: block; /* カラム内でブロック表示 */
    width: 100%;           /* カラム幅に合わせる */
}
.tab-content{
    padding: 0;
}

}

/* ======================================= */
/*販売店様一覧表示 */
/* ======================================= */

/* 都道府県の青いバー */
.pref-heading {
    background-color: #5b9bd5; /* デザイン案の青色 */
    color: #fff;
    padding: 5px 15px;
    font-size: 16px;
    margin-top: 30px;
}

/* 各店舗の行 */
.shop-row {
    display: flex;
    border-bottom: 1px dotted #c1c7c6;
    padding: 15px 0;
    align-items: center;
}

/* 3カラム調整 */
.shop-col { flex: 1; padding: 0 10px; font-size: 16px; }
.name-col { flex: 0.7; font-weight: bold; }
.contact-col { flex: 0.6; text-align: right; }

/* ボタン */
.shop-btn {
    display: inline-block;
    background: #d9d9d9;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    margin-top: 5px;
    width: 100%;
    text-align: center;
}

.pref-filter {
    margin-bottom: 1rem;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .shop-row { 
        flex-direction: column; 
        align-items: flex-start; 
    }
    
    .shop-col { 
        width: 100%; 
        padding: 5px 0; 
        text-align: left !important; 
    }
    
    .pref-filter {
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
        padding: 0.75rem;
        border-bottom: 1px solid #ddd;
    }
}

