    /* ------------------------------------------------ */
/* コンテンツエリアとサイドバーの幅設定（最重要）     */
/* ------------------------------------------------ */
    
    /* ------------------------------------------------ */
    /* 1. Storefront標準サイドバーはfunction.phpにて投稿ページ以外は無効化（干渉防止） */
    /* ------------------------------------------------ */
    /* WooCommerce関連のページでサイドバーのスペースを消す */
    .woocommerce-page #primary {
        width: 100% !important;
        float: none !important;
    }

    .woocommerce-page #secondary {
        display: none !important;
    }

    
@media screen and (min-width: 769px) {
    /* ------------------------------------------------ */
    /* 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 {
        background-color: #a9a9a9;
        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: stretch;
    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 {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

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

.pickup-image img {
    height:100%;
    width: 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{
    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;
}

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

}

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

/* 都道府県の青いバー */
.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: 860px) {
    .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;
    }
}


/* ==========================================
   お知らせ一覧・投稿ページの共通スタイル
   ========================================== */

/* 背景を少しグレーにして、記事とサイドバーの「箱」を際立たせる（お好みで） */
.category .site-content, .single-post .site-content {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* 記事（カード）のスタイル */
.site-main article,
.category .site-main article {
    background: #fff;
    padding: 25px 30px;
    margin-bottom: 40px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06)
}

.hentry.type-page .entry-header,
.hentry .entry-header {
    border-bottom: 2px solid #eeeeeee6;
}

.hentry.type-page .entry-header{
    margin-bottom: 20px;
}

/* 日付の表示 */
.category .entry-meta, .single-post .entry-meta {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 10px;
}

/* タイトルの装飾（青文字・下線なし） */
.category .entry-title a {
    color: #333;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: bold;
}

.category .entry-title a:hover {
    color: #004d8c;
}

/* ==========================================
   サイドバー固定（sticky）
   ========================================== */

#secondary {
    position: sticky;
    top: 250px; /* ヘッダー高さに合わせて調整 */
    align-self: flex-start;
    height: fit-content;
}


/* ==========================================
   サイドバー（カテゴリ一覧）の装飾
   ========================================== */

#secondary .widget {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    width: 14rem;
}

/* 「カテゴリ」という見出し */
#secondary .widget-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    padding-left: 15px;
    margin-bottom: 20px;
}

/* カテゴリリストの調整 */
#secondary .widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#secondary .widget_categories li {
    padding: 10px 20px;
    border-bottom: 1px dotted #ccc;
    font-size: 0.95rem;
}

#secondary .widget_categories li:last-child {
    border-bottom: none;
}

#secondary .widget_categories li:hover {

    background: #f6f6f6;
    border-radius: 4px;

}

#secondary .widget_categories li a {
    color: #444;
    text-decoration: none;
    display: block;
}

#secondary .widget_categories li a:hover {
    padding-left: 5px; /* ホバー時に少し動く演出 */
    transition: all 0.3s;
}

/* カテゴリ名の横の投稿数 ( ) のスタイル */
.post_count {
    font-size: 0.8rem;
    color: #004d8c;
    margin-left: 5px;
}

/* 一覧ページ（カテゴリーアーカイブ）の本文エリアを制限 */
/* 記事抜粋 */

.blog .entry-content,
.category .site-main .entry-content  {

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;

    overflow: hidden;

    line-height: 1.8;
    color: #666;

    margin-top: 15px;
}

.blog .site-main article,
.category .site-main article,
.archive .site-main article {

    position: relative;
    background: #fff;
    padding: 30px 35px 70px;
    margin-bottom: 40px;

    border-radius: 10px;
    border: 1px solid #eaeaea;

    box-shadow: 0 4px 10px rgba(0,0,0,0.05);

    transition: all 0.25s ease;
}

/* 記事タイトル */
.entry-title a {
    color: #222;
    text-decoration: none;
}

.entry-title {
    font-size: 2rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.entry-title a:hover {
    color: #004d8c;
}

/* 投稿日 */

.entry-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
}

/* ボタンを右側に寄せるためのコンテナ */
.view-full-post-container {
    position: absolute;
    right: 30px; /* articleのpaddingと同じに */
    bottom: 25px; /* articleのpaddingと同じに */
    text-align: right;
    margin-top: 0;
}

/* 「全文を見る」ボタンのスタイル */
.view-full-post-btn {
    display: inline-block;

    padding: 8px 18px;

    font-size: 0.85rem;
    font-weight: bold;

    color: #444;

    background: #f2f2f2;

    border-radius: 5px;

    text-decoration: none;

    transition: all 0.25s ease;
}

.view-full-post-btn:hover {
    background: #004d8c;
    color: #fff;
    transform: translateY(-2px);
}

/* スマホ表示での調整 */
@media screen and (max-width: 768px) {
    .site-content {

        display: flex;
        flex-direction: column;

    }

    /* サイドバーを先に表示 */

    .col-full{
    display:flex;
    flex-direction:column;
    }

    #secondary {
        order: -1;
        width: 100%;
        margin-bottom: 30px;
        position: static;
    }

    #secondary .widget {

    width: 100%;
    }

    /* 記事エリア */

    .content-area {
        width: 100%;
    }

    .view-full-post-btn {
        width: 100%; /* スマホでは押しやすいよう全幅にするのもアリです */
        text-align: center;
    }
    .blog .site-main article,
    .category .site-main article {

        padding: 25px 20px 70px;

    }

    .entry-title {
        font-size: 1.3rem;
}
}
