/* =============================================
   店舗一覧セクション スタイル（画像デザイン準拠）
   ============================================= */

/* 店舗一覧内のbutton要素のリセット（既存CSSの button{opacity:0;visibility:hidden} を上書き） */
.lp-shoplist button {
  position: static !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s !important;
}

/* セクション全体 */
.lp-shoplist {
  background-color: #FCFAE2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  width: 100%;
  max-width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  /* 下部固定ボタン（line-fixed: 70px）にページネーションが隠れないよう余白を確保 */
  padding-bottom: 70px;
}

/* セクションヘッダー */
.lp-shoplist .shoplist-header {
  background-color: #43211A;
  color: #fff;
  font-weight: bold;
  text-align: center;
  padding: 1.2vh 1vw;
  font-size: clamp(18px, 3vh, 22px) !important;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

/* ===== 現在地ボタンエリア ===== */
.shoplist-nearby-area {
  display: flex;
  justify-content: center;
  padding: 8px 12px 6px;
  flex-shrink: 0;
  min-height: 50px;
  align-items: center;
  background-color: #FCFAE2;
}

#nearby-shop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #fff;
  color: #F29300;
  border: 2px solid #F29300;
  border-radius: 30px;
  padding: 9px 28px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  box-shadow: 0 2px 8px rgba(242, 147, 0, 0.2);
  letter-spacing: 0.03em;
}

#nearby-shop-btn:hover {
  background-color: #F29300;
  color: #fff;
}

#nearby-shop-btn.active {
  background-color: #F29300;
  color: #fff;
}

#nearby-shop-btn.loading {
  opacity: 0.7;
  cursor: wait;
}

/* ===== 都道府県フィルターエリア ===== */
.shoplist-filter-area {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px 8px 4px;
  flex-shrink: 0;
  min-height: 42px;
  background-color: #FCFAE2;
  position: relative;
}

/* 矢印ボタン */
.filter-arrow-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  background-color: #fff;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  z-index: 1;
}

.filter-arrow-btn:hover {
  border-color: #F29300;
  color: #F29300;
}

/* フィルターボタン群 */
#shop-filter-container {
  display: flex;
  flex: 1;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

#shop-filter-container::-webkit-scrollbar {
  display: none;
}

.shop-filter-btn {
  flex-shrink: 0;
  background-color: #fff;
  color: #555;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.shop-filter-btn:hover {
  border-color: #F29300;
  color: #F29300;
}

.shop-filter-btn.active {
  background-color: #F29300;
  color: #fff;
  border-color: #F29300;
}

/* ===== 件数・ページ情報 ===== */
.shoplist-count-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2px 14px 2px;
  flex-shrink: 0;
  min-height: 22px;
}

.shoplist-count-row span {
  font-size: 11px;
  color: #888;
}

/* ===== グリッドエリア（スクロール可能） ===== */
.shoplist-scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 10px 4px;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

/* スクロールバー */
.shoplist-scroll-area::-webkit-scrollbar {
  width: 4px;
}
.shoplist-scroll-area::-webkit-scrollbar-track {
  background: #f1e8d8;
  border-radius: 4px;
}
.shoplist-scroll-area::-webkit-scrollbar-thumb {
  background: #F29300;
  border-radius: 4px;
}

/* ===== 店舗グリッド ===== */
#shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 0 6px;
  width: 100%;
  box-sizing: border-box;
}

/* ===== 店舗カード ===== */
.shop-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.shop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
}

/* ハートアイコン */
.shop-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ccc;
  transition: color 0.2s;
  z-index: 2;
}

.shop-heart:hover,
.shop-heart.liked {
  color: #F29300;
}

/* カード本文 */
.shop-card-body {
  padding: 10px 10px 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* 都道府県バッジ */
.shop-pref-badge {
  display: inline-block;
  background-color: #FFF0D6;
  color: #F29300;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 3px;
  align-self: flex-start;
}

/* 市町村ラベル */
.shop-city-label {
  display: inline-block;
  font-size: 10px;
  color: #888;
  margin-left: 4px;
  margin-bottom: 3px;
  font-weight: normal;
}

/* ブランド・施設名 */
.shop-brand {
  font-size: 10px;
  color: #888;
  margin: 0 0 1px;
  line-height: 1.3;
}

/* 店舗名 */
.shop-name {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  margin: 0 0 8px;
  line-height: 1.4;
}

/* 距離表示 */
.shop-distance {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background-color: #FFF0D6;
  color: #F29300;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid #F29300;
  margin-bottom: 6px;
}

/* 求人ボタン */
.shop-recruit-btn {
  display: block;
  background-color: #F29300;
  color: #fff;
  text-align: center;
  padding: 9px 4px;
  font-size: 11px;
  font-weight: bold;
  text-decoration: none;
  margin-top: auto;
  transition: background-color 0.2s;
  border-radius: 0 0 12px 12px;
  line-height: 1.4;
}

.shop-recruit-btn:hover {
  background-color: #d97f00;
  text-decoration: none;
  color: #fff;
}

.shop-recruit-btn .recruit-sub {
  display: block;
  font-size: 9px;
  font-weight: normal;
  opacity: 0.9;
  margin-top: 2px;
}

/* 0件メッセージ */
.shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #888;
  font-size: 13px;
  padding: 24px 0;
}

/* ===== ページネーション ===== */
.shoplist-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 10px 8px;
  flex-shrink: 0;
  min-height: 44px;
  background-color: #FCFAE2;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1.5px solid #ddd;
  background-color: #fff;
  color: #555;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: #F29300;
  color: #F29300;
}

.page-btn.active {
  background-color: #F29300;
  color: #fff;
  border-color: #F29300;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* 近い順メモ */
#nearby-note {
  display: none;
  font-size: 10px;
  color: #F29300;
  text-align: center;
  padding: 0 12px 2px;
  flex-shrink: 0;
  line-height: 1.4;
}

/* ===== 市町村サブフィルターエリア ===== */
.shoplist-city-filter-area {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 5px 8px 5px;
  flex-shrink: 0;
  background-color: #FFF8E8;
  border-top: 1px solid #F5E0B0;
  border-bottom: 1px solid #F5E0B0;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.city-filter-label {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: bold;
  color: #F29300;
  background-color: #FFF0D6;
  border: 1px solid #F29300;
  border-radius: 10px;
  padding: 2px 8px;
  white-space: nowrap;
}

.city-filter-container {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 5px;
  padding: 2px 2px;
  overflow: visible;
}


.city-filter-btn {
  flex-shrink: 0;
  background-color: #fff;
  color: #666;
  border: 1.5px solid #ddd;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.city-filter-btn:hover {
  border-color: #F29300;
  color: #F29300;
}

.city-filter-btn.active {
  background-color: #F29300;
  color: #fff;
  border-color: #F29300;
}

/* レスポンシブ（狭い画面） */
@media (max-width: 360px) {
  #shop-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 地図モード ===== */

/* 地図モード切替バー（「一覧に戻る」ボタン） */
#shop-map-toggle-bar {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  flex-shrink: 0;
  background-color: #FCFAE2;
  border-bottom: 1px solid #F5E0B0;
}

#shop-map-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #fff;
  color: #F29300;
  border: 1.5px solid #F29300;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

#shop-map-back-btn:hover {
  background-color: #F29300;
  color: #fff;
}

/* 地図コンテナ */
#shop-map-container {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  /* 下部の固定ボタン（line-fixed: 70px）に帰属表示が隠れないよう余白を確保 */
  padding-bottom: 70px;
  box-sizing: border-box;
}

#shop-map {
  width: 100%;
  height: 100%;
}

/* Leafletポップアップのカスタムスタイル */
.shop-map-popup {
  min-width: 160px;
  max-width: 200px;
  font-family: inherit;
}

.shop-map-popup .popup-pref {
  display: inline-block;
  background-color: #FFF0D6;
  color: #F29300;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 7px;
  border-radius: 8px;
  margin-bottom: 3px;
}

.shop-map-popup .popup-city {
  font-size: 10px;
  color: #888;
  margin-left: 4px;
}

.shop-map-popup .popup-brand {
  font-size: 10px;
  color: #999;
  margin: 2px 0 1px;
  line-height: 1.3;
}

.shop-map-popup .popup-name {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  margin: 0 0 6px;
}

.shop-map-popup .popup-dist {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background-color: #FFF0D6;
  color: #F29300;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid #F29300;
  margin-bottom: 6px;
}

.shop-map-popup .popup-btn {
  display: block;
  background-color: #F29300;
  color: #fff !important;
  text-align: center;
  padding: 7px 4px;
  font-size: 11px;
  font-weight: bold;
  text-decoration: none !important;
  border-radius: 6px;
  transition: background-color 0.2s;
  margin-top: 4px;
}

.shop-map-popup .popup-btn:hover {
  background-color: #d97f00;
  color: #fff !important;
}

/* Leafletのデフォルトポップアップを調整 */
.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
}

.leaflet-popup-content {
  margin: 10px 12px !important;
}

/* 現在地ピン（青い点滅） */
.current-location-pin {
  background-color: #2196F3;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(33,150,243,0.6);
  animation: pulse-blue 1.8s infinite;
}

@keyframes pulse-blue {
  0%   { box-shadow: 0 0 0 0 rgba(33,150,243,0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(33,150,243,0); }
  100% { box-shadow: 0 0 0 0 rgba(33,150,243,0); }
}
