/* ショップページ専用CSS */

/* 1. 背景画像を「なし」に強制上書き */
.shop_kv.kv_under_01::after {
    background-image: none !important; /*  */
}

/* 2. 固定の高さを「0」にして領域を消す */
.shop_kv.kv_under_01::after {
    height: 0 !important;      /* [cite: 6] */
    display: none !important;  /* 念のため要素自体を非表示にする */
}

.sp_br {
    display: none;
}

/* 1. 共通（KV画像など） */
@media screen and (max-width: 749px) {
    #contents {
        padding-bottom: 255px;
    }

    /* #shopList {
        margin-top: 13.33333vw;
    } */
}

@media screen and (min-width: 750px) {
    #contents {
        padding-bottom: 232px;
    }

    #shopList {
        width: 950px;
        margin-top: 80px;
    }
}

#shopList {
    border-bottom: 1px solid #b5b5b5;
}

/* 2. 店舗一覧の見出し（中央・ボーダー付き） */
.shop_list_title {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.37;
    letter-spacing: 0.05em;
    color: #333;
    margin: 100px auto 0;
    padding-bottom: 99px;
    border-bottom: 1px solid #B5B5B5;
    font-family: "Noto Sans JP", sans-serif;
}

/* 3. 「株式会社キャメル珈琲」の見出し */
.company_name_title {
    text-align: left;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    /* margin: 60px 0; */
    font-family: "Noto Sans JP", sans-serif;
    line-height: 1.4;
}

/* 4. 各店舗ブロックの基本設定（ロゴやテキスト） */
.shop_item_block {
    margin-bottom: 60px;
}

.shop_header {
    display: flex;
    align-items: center;
    gap: 39px;
    margin-bottom: 24px;
}

.logo_container {
    width: 142px;
    height: 107px;
    background: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo_container img {
    max-width: 110px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.shop_header h3 {
    /* フォント指定：Noto Sans JP, Bold(700), 20px */
    font-family: "Noto Sans JP", sans-serif;
    font-size: 20px;
    font-weight: 700;
    
    /* XDの「30」を行送りとして反映 (30/20=1.5) */
    line-height: 1.5;
    
    /* XDの「left」を反映 */
    text-align: left;
    
    /* XDの「0 30 0」の左右の0（段落前後）をマージンに反映 */
    margin: 0;
    
    /* 色指定 */
    color: #333;
}

.shop_text p {
    /* フォント指定：Noto Sans JP, Medium(500), 15px */
    font-family: "Noto Sans JP", sans-serif;
    font-size: 15px;
    font-weight: 500;
    
    /* XDの「26」を行送りとして反映 (26/15=1.733...) */
    line-height: 1.73;
    
    /* XDの「left」を反映 */
    text-align: left;
    
    /* XDの「0 26 0」の左右の0をマージンに反映 */
    margin-top: 0;
    margin-bottom: 0;
    
    /* テキストの色（一般的によく使われる色ですが、XDで指定があれば変えてください） */
    color: #333;
}

.section_title_gray {
    text-align: left;
    font: normal normal 500 40px/58px "Noto Sans JP", sans-serif;
    color: #B5B5B5;
    margin: 97px 0 63px 0;
    text-transform: uppercase;
}

/* 会社ごとのグループ囲い */
.company_group {
    padding-top: 60px;
    border-top: 1px solid #B5B5B5; /* ★上側に区切り線を追加 */
    margin-top: 90px;
}

/* 最初のグループだけは、上の「店舗一覧」との間に線を出さない */
.shop_list_title + .company_group {
    border-top: none;
    margin-top: 0;
    padding-top: 62px;
}

/* 会社名の見出しスタイル（微調整） */
.company_name_title {
    text-align: left;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 60px; /* 下の店舗画像との距離 */
    font-family: "Noto Sans JP", sans-serif;
}

/* 店舗ブロック間の余白（同じグループ内の店舗同士） */
.company_group .shop_item_block {
    margin-bottom: 60px;
}


/* 7. ボタンの設定 */
a.btn {
    min-width: 140px;
    background: #f6f6f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1em;
    min-height: 3.08em;
    padding: 0 1.5em;
    margin-top: 42px;
    color: #000;
    box-sizing: border-box;
    text-decoration: none;
}

a.btn:hover {
    background: #000;
    color: #fff;
}

a.btn[target="_blank"]::after {
    content: "";
    display: inline-block;
    width: 0.923em;
    height: 0.923em;
    margin-left: 0.4em;
    vertical-align: middle;
    background-image: url('/img/common/icon_blank_01.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.btn_link {
    display: inline-flex;
    align-items: center;
    padding: 12px 40px;
    background: #F6F6F6 0% 0% no-repeat padding-box;
    text-decoration: none;
    color: #333;
    transition: 0.3s;
}

.btn_link:hover {
    background: #eee;
}


/* 5. PC版のレイアウト（横並びにする） */
@media screen and (min-width: 750px) {
    .shop_item_block {
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 66px;
        margin-bottom: 90px;
    }

    .shop_image {
        flex: 0 0 320px;
    }

    .shop_image img {
        width: 320px;
        height: 213px;
        object-fit: cover;
    }

    .shop_text {
        flex: 1;
        margin-top: 0;
    }

    .shop_header {
        margin-top: 0;
    }
}

/* 6. スマホ版のレイアウト（縦並びにする） */
@media screen and (max-width: 749px) {
    #shopList {
        /* shopList全体のボーダーは一旦消すか、調整が必要 */
        border-bottom: none !important; 
        /* padding: 0 5.5vw;
        overflow: hidden;  */
        padding: 0 !important; /* 親の余白を消して、線が端まで届くようにする */
        width: 100% !important;
    }

    /* 店舗ブロック全体のレイアウト */
    #shopList .shop_item_block {
        display: block;
        margin-bottom: 50px;
        text-align: center; /* 全体を中央寄せ */
    }

    /* 画像エリア：ロゴを重ねるための基準にする */
    #shopList .shop_image {
        position: relative;
        margin: 0 auto;       /* ★左右オートで中央寄せ */
        width: 320px;         /* ★横幅を320pxに固定 */
        max-width: 100%;      /* 念のため、超小型画面で突き抜けないようガード */
    }

    #shopList .shop_image img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* ロゴコンテナ：画像の下中央に重なるように配置 */
    .logo_container {
        position: relative;
        margin: 10px auto 10px; /* ★ネガティブマージンで画像に被せる数値を調整 */
        z-index: 10;
        background: #FFFFFF;
        /* box-shadow: 0 4px 10px rgba(0,0,0,0.1); */
        /* サイズを少しコンパクトに調整（必要に応じて） */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #shopList .logo_container img {
        max-width: 80% !important;  /* 枠の幅の8割までに制限 */
        max-height: 80% !important; /* 枠の高さの8割までに制限 */
        width: auto !important;     /* 比率を維持 */
        height: auto !important;    /* 比率を維持 */
        object-fit: contain;        /* 枠内に収める */
    }

    /* ヘッダー部分：ロゴと店名を縦並びにする */
    .shop_header {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-bottom: 20px;
    }

    .shop_header h3 {
        /* font-size: 1.6rem; */
        text-align: center;
    }

    /* テキストと見出し */
    .shop_text p {
        /* font-size: 1.2rem; */
        text-align: left;
        line-height: 1.7;
        /* margin-bottom: 15px; */
    }

    /* 会社ごとのグループ囲い */
    #shopList .company_group {
        position: relative;
        /* padding-top: 50px; */
        margin-top: 80px;
        /* ★重要：ボーダーを親のpaddingを無視して画面端へ伸ばす設定 */
        /* border-top: 1px solid #B5B5B5; */
        /* border-bottom: none; */
        border-top: none;
        /* border-top: none; */
        /* margin-left: -4vw;
        margin-right: -4vw;
        padding-left: 4vw;
        padding-right: 4vw; */
        padding: 50px 55px 0; /* 左右に 55px の余白を一括設定 */
    }

    #shopList .company_group::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        /* タイトル側と同じく左右12pxの余白 */
        width: calc(100% - 24px); 
        height: 1px;
        background-color: #B5B5B5;
    }


    /* 最初のグループのボーダーは非表示 */
    #shopList .shop_list_title + .company_group {
        border-top: none !important;
        margin-top: 0;
        /* padding-top: 20px; */
    }

    #shopList .shop_list_title {
        /* フォント指定：Noto Sans JP, Medium(500), 25px */
        font-size: 25px; 
        font-weight: 500;
        text-align: left; /* 修正：左揃え */
        
        /* XDの「41」を行送りとして反映 (41/25=1.64) */
        line-height: 1.64;
        margin-top: 58px;
        padding-bottom: 52px;

        padding-left: 28px;
        padding-right: 28px;
        /* margin:52px 0; */
        border-bottom: none;
    }

    #shopList .shop_list_title::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        /* 左右12pxずつ空ける ＝ 全体(100%)から 24px 引く */
        width: calc(100% - 24px); 
        height: 1px;
        background-color: #B5B5B5;
    }

    /* それ以外のコンテンツ（会社名、店舗、テキスト）：左右余白 55px */
    /* .company_name_title,
    .shop_item_block,
    .shop_text p {
        padding-left: 55px;
        padding-right: 55px;
        box-sizing: border-box;
    } */

    .company_group {
    padding-top: 40px;
    margin-top: 40px;
    }

    .company_name_title {
        /* フォント指定：Noto Sans JP, Bold(700), 24px */
        font-family: "Noto Sans JP", sans-serif;
        font-size: 24px; 
        font-weight: 700;
        
        /* XDの「35」を行送りとして反映 (35/24=1.458...) */
        line-height: 1.46;
        text-align: center; /* 会社名も中央寄せに */
        /* margin-top: 10px; */
        margin-bottom: 50px; /* 画像に被る白い箱があるため、少し余裕を持たせる */
        /* padding: 0 15px; */
        /* 親の左右padding(55px)を打ち消し、36pxの地点まで戻す計算 */
        /* 55 - 36 = 19px 分だけ外側に飛び出させる */
        margin-left: -19px;
        margin-right: -19px;

        /* 改行させないための指定（これでも入り切らない場合は文字が端まで伸びます） */
        white-space: nowrap;
    }

    a.btn {
        margin-top: 30px;
    }
}

/* 画面幅が430px以下になった時だけ改行を有効にする */
@media screen and (max-width: 429px) {
    .sp_br {
        display: block;
    }
    
    #shopList .shop_list_title {
        /* 改行した時に文字が重ならないよう行間を確保 */
        line-height: 1.64; 
        /* 左揃え */
        text-align: center;
    }

    .company_name_title {
        /* はみ出すくらいなら、36pxの余白を守って折り返す */
        white-space: normal !important;
        /* 少しだけ文字を小さくして、2行になっても圧迫感が出ないようにする */
        font-size: 22px; 
    }
}


/* CSSの一番最後に追加してください */

/* 全デバイス共通：最後のグループ自体の線を消す */
#shopList .company_group:last-of-type {
    border-bottom: none;
    /* border-top: 1px solid #B5B5B5; */
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 最後のグループ内にある、最後の店舗ブロックの線を消す */
#shopList .company_group:last-of-type .shop_item_block:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* もし #shopList 自体に線がついている場合も消す */
#shopList {
    border-bottom: none;
}