/* ==========================================================================
   🎨 共通変数 & 基本リセット（Kopitiamモダンテーマ）
   ========================================================================== */
:root {
    --primary-color: #2c5e43;   /* クラシック・コピティアムの深緑 */
    --accent-color: #d39e45;    /* 伝統的なトーストと珈琲の琥珀色 */
    --bg-light: #fdfbf7;        /* 温かみのあるアンティークホワイト */
    --text-dark: #2b2520;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --transition: all 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ==========================================================================
   🌐 言語切り替え & 🔲 ヒーローヘッダー
   ========================================================================== */
.lang-switch {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    gap: 6px;
}
.btn-lang {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0,0,0,0.1);
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 20px;
    transition: var(--transition);
}
.btn-lang.active, .btn-lang:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

header {
    text-align: center;
    padding: 120px 20px; /* 上下の余白を少し広げて画像が見えやすいように調整 */
    color: #fff;
    position: relative;
    
    /* 背景画像の設定：文字が見やすくなるように黒い半透明グラデーションを重ねています */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), 
                url('../images/back.jpg') center/cover no-repeat;
}
header h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ==========================================================================
   📦 メインレイアウト & 🔍 フィルターセクション
   ========================================================================== */
.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}

.search-filter-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.03);
}

#btn-nearme {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 20px;
    transition: var(--transition);
}
#btn-nearme:hover {
    opacity: 0.9;
}

.filter-group {
    margin-bottom: 18px;
}
.filter-group h3 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding-left: 4px;
}

/* エリアボタン水平スクロール/ラップ並び */
.area-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.btn-area {
    background: #f0ede6;
    border: none;
    padding: 6px 14px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition);
}
.btn-area.active, .btn-area:hover {
    background: var(--primary-color);
    color: white;
}

/* チェックボックス・ラジオボタン並び */
.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    background: #faf8f5;
    padding: 10px 14px;
    border-radius: 8px;
}
.filter-options label {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.filter-options input {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

/* 入力欄 */
#search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    background: #fafafa;
}
#search-input:focus {
    border-color: var(--primary-color);
    background: #fff;
}

/* 結果表示見出し */
.results-header {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}
#count-num {
    color: var(--accent-color);
    font-weight: 800;
}

/* ==========================================================================
   🎴 店舗グリッド & カード
   ========================================================================== */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.store-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.store-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
/* --- カード内情報のスタイル強化 --- */
.store-desc {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 12px;
    line-height: 1.4;
}

.store-meta {
    font-size: 0.85rem;
    color: #666;
    background: #fdfcf9;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px dashed #e4ded4;
}
.store-meta strong {
    color: var(--primary-color);
}

.card-tags-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.feature-badge {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
}

.distance-badge-inline {
    font-size: 0.8rem;
    background: #eef5f1;
    color: #27ae60;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.card-body {
    padding: 18px;
}
.card-header-flex {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.area-badge {
    background: #eef5f1;
    color: var(--primary-color);
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
}
.price-badge {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.9rem;
}
.store-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}
.rating-flex {
    display: flex;
    align-items: center;
    gap: 12px;
}
.stars {
    font-weight: bold;
    font-size: 0.95rem;
}
.distance-badge {
    font-size: 0.85rem;
    color: #666;
}

/* カードアクションボタン群 */
.card-footer-actions {
    display: flex;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid #f5f5f5;
    background: #fbfbfa;
}
.btn-action {
    flex: 1;
    text-align: center;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 10px;
    border-radius: 6px;
    transition: var(--transition);
}
.btn-visit {
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.btn-visit:hover {
    background: var(--primary-color);
    color: white;
}
.btn-maps {
    background: #eae3d5;
    color: #5c4e3c;
    border: 1px solid transparent;
}
.btn-maps:hover {
    background: #dddec6;
}
.btn-disabled {
    background: #f0ede6;
    color: #aaa;
    border: 1px solid transparent;
    cursor: not-allowed;
}

/* ==========================================================================
   📱 モバイル（スマホ）環境：ファーストビュー超省スペース・コンパクト調整
   ========================================================================== */
@media (max-width: 768px) {
    header {
        padding: 25px 15px !important;
    }
    header h1 {
        font-size: 1.4rem !important;
        margin-bottom: 6px !important;
    }
    header p {
        font-size: 0.9rem !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
    }
    .lang-switch .btn-lang {
        padding: 4px 10px !important;
        font-size: 0.8rem !important;
    }

    .main-container {
        padding: 15px 10px !important;
    }

    .search-filter-section {
        padding: 15px !important;
        margin-bottom: 20px !important;
    }

    #btn-nearme {
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
        margin-bottom: 15px !important;
        width: auto !important;
        display: inline-flex !important;
    }

    .filter-group {
        margin-bottom: 12px !important;
    }
    .filter-group h3 {
        font-size: 0.9rem !important;
        margin-bottom: 6px !important;
        padding-left: 6px !important;
    }

    .btn-area {
        padding: 4px 10px !important;
        font-size: 0.8rem !important;
    }

    .filter-options {
        gap: 10px 15px !important;
    }
    .filter-options label {
        font-size: 0.85rem !important;
    }

    #search-input {
        padding: 8px 12px !important;
        font-size: 0.9rem !important;
    }

    .results-header {
        font-size: 1rem !important;
        margin-bottom: 12px !important;
    }

    .card-footer-actions {
        flex-direction: row !important;
        gap: 8px !important;
        padding: 12px !important;
    }
    .card-footer-actions a {
        padding: 8px !important;
        font-size: 0.8rem !important;
    }
}
/* ==========================================================================
   🧦 サイトフッター & シェアエリア（追記分）
   ========================================================================== */
.site-footer {
    background-color: #f0ede6; /* コピティアムテーマに合わせた落ち着いたベージュ */
    color: var(--text-dark);
    padding: 40px 20px;
    margin-top: 50px;
    border-top: 2px solid var(--primary-color);
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}

/* シェアセクション */
.share-section h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.share-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* シェアボタンの基本スタイル */
.btn-share {
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    transition: var(--transition);
    min-width: 110px;
}

.btn-share:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* 各ブランドカラー */
.btn-share.whatsapp {
    background-color: #25D366;
}
.btn-share.wechat {
    background-color: #07C160;
}
.btn-share.line {
    background-color: #06C755;
}
.btn-share.copy {
    background-color: var(--accent-color);
}

/* 免責事項セクション */
.disclaimer-section {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.6);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px dashed #ced4da;
}

#disclaimer-text {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

#disclaimer-text strong {
    color: #c0392b;
}

/* コピーライト */
.footer-bottom {
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 15px;
}

/* スマホ用レスポンシブ微調整 */
@media (max-width: 768px) {
    .site-footer {
        padding: 30px 15px;
        margin-top: 30px;
    }
    .share-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .btn-share {
        padding: 8px 10px;
        font-size: 0.8rem;
        min-width: unset;
    }
}