:root {
    --primary-red: #A72126;  /* クラシオンレッド */
    --light-grey: #F7F7F7;
    --active-pink: #FFF0F0;
    --text-color: #333;
    --sidebar-width: 380px;
}

* { box-sizing: border-box; }

body, html {
    margin: 0; padding: 0; height: 100%; width: 100%;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: var(--text-color);
    overflow: hidden;
}

.container { display: flex; height: 100vh; width: 100vw; position: relative; }

/* --- サイドバー --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.search-box { padding: 20px; border-bottom: 1px solid #eee; }

/* タイトルスタイル */
.brand-title {
    font-size: 20px;
    margin: 0 0 4px 0;
    color: var(--primary-red);
    font-weight: 800;
}
.sub-title {
    font-size: 13px;
    margin: 0 0 15px 0;
    color: #666;
    font-weight: bold;
}

.search-box input, .filter-group select {
    width: 100%; padding: 12px; margin-bottom: 10px;
    border: 1px solid #ccc; border-radius: 8px; font-size: 14px; outline: none;
}

.search-box input:focus, .filter-group select:focus { border-color: var(--primary-red); }

.btn-current-loc {
    width: 100%; padding: 12px; background-color: var(--primary-red);
    color: white; border: none; border-radius: 50px; font-weight: bold; cursor: pointer;
}

/* 店舗リスト */
.store-list { flex: 1; overflow-y: auto; background: #fff; }

.store-item {
    padding: 24px 20px; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: 0.2s;
}

.store-item:hover { background-color: var(--light-grey); }

.store-item.active {
    background: var(--active-pink) !important;
    border-left: 6px solid var(--primary-red);
}

.store-item h3 { margin: 0 0 5px 0; font-size: 17px; }
.store-item p { margin: 2px 0; font-size: 13px; color: #666; line-height: 1.5; }

/* --- 地図 --- */
#map { flex: 1; height: 100%; z-index: 1; }

/* ポップアップUI：横幅を300pxに固定してボタン間隔を確保 */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    min-width: 300px;
}

.popup-address {
    font-size: 12px; color: #666; margin: 8px 0 12px 0;
    white-space: normal; line-height: 1.5;
}

/* ポップアップ内の3ボタン */
.popup-actions {
    display: flex; justify-content: space-between;
    margin-top: 10px; border-top: 1px solid #eee; padding-top: 12px;
}

.popup-actions a {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: var(--text-color); font-size: 11px;
}

.popup-actions a i {
    font-size: 22px; margin-bottom: 6px; color: var(--primary-red);
}

/* 赤いしずく型ピン（小ぶり・真ん中白） */
.custom-marker svg {
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
    transition: transform 0.2s ease-out;
}

.selected-marker svg {
    transform: scale(1.3);
    z-index: 1000 !important;
}

/* --- スマホ専用設定 --- */
.mobile-controls { display: none; }

@media (max-width: 768px) {
    .sidebar, #map {
        position: absolute; top: 0; left: 0;
        width: 100%; height: calc(100% - 60px);
    }
    .sidebar { z-index: 1001; opacity: 1; }
    #map { z-index: 1000; opacity: 0; }

    body.map-mode .sidebar { opacity: 0; pointer-events: none; }
    body.map-mode #map { opacity: 1; pointer-events: all; z-index: 1001; }

    .mobile-controls {
        display: flex; position: fixed; bottom: 0; left: 0;
        width: 100%; height: 60px; background: #fff;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 2000; justify-content: center; align-items: center;
    }

    #toggleViewBtn {
        background-color: var(--primary-red); color: white;
        border: none; padding: 10px 30px; border-radius: 30px;
        font-weight: bold; font-size: 14px; display: flex; align-items: center; gap: 8px;
    }
}