/**
 * shop-finder.css — ほぐし猫 店舗検索UI
 * [shop_finder] ショートコードで読み込まれる
 */

/* ── ラッパー ─────────────────────────────────────────────────────────────── */
#shop-finder {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  color: #222;
}

/* ── フィルターパネル ──────────────────────────────────────────────────────── */
.shop-finder__filters {
  background: #faf7f4;
  border: 1px solid #e8ddd4;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group > label:first-child,
.filter-group--tags > label:first-child {
  font-size: 12px;
  font-weight: 700;
  color: #888;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.filter-group select {
  padding: 9px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  min-width: 160px;
  appearance: auto;
  color: #333;
}

.filter-group select:focus {
  outline: 2px solid #e8661a;
  outline-offset: 1px;
}

/* タグチェックボックス */
.filter-group--tags {
  flex: 1;
}

.tag-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.tag-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  background: white;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  padding: 5px 13px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
  color: #555;
}

.tag-checkbox input[type="checkbox"] {
  display: none;
}

.tag-checkbox:has(input:checked) {
  background: #e8661a;
  border-color: #e8661a;
  color: white;
}

.tag-checkbox:hover:not(:has(input:checked)) {
  border-color: #e8661a;
  color: #e8661a;
}

/* リセットボタン */
.btn-reset {
  padding: 9px 18px;
  background: white;
  color: #888;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  align-self: flex-end;
}

.btn-reset:hover {
  background: #555;
  border-color: #555;
  color: white;
}

/* ── 結果ヘッダー ─────────────────────────────────────────────────────────── */
.results-header {
  font-size: 14px;
  color: #888;
  margin-bottom: 16px;
  font-weight: 500;
}

/* ── 店舗カードグリッド ───────────────────────────────────────────────────── */
.shop-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  transition: opacity 0.2s;
}

/* 店舗カード */
.sf-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.sf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.sf-card__image {
  display: block;
  height: 175px;
  overflow: hidden;
  background: #f0ebe6;
  flex-shrink: 0;
}

.sf-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.sf-card:hover .sf-card__image img {
  transform: scale(1.04);
}

.sf-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0;
}

.sf-no-image span {
  font-size: 52px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sf-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sf-card__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.5;
}

.sf-card__title a {
  color: #1a1a1a;
  text-decoration: none;
}

.sf-card__title a:hover {
  color: #e8661a;
}

/* タグバッジ */
.sf-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.sf-tag-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  background: #fff0e8;
  color: #e8661a;
}

/* メタ情報 */
.sf-card__meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.sf-card__rating { font-weight: 500; }

.sf-card__price {
  background: #f5f5f5;
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 600;
  color: #555;
}

.sf-card__area {
  font-size: 12px;
  color: #aaa;
  margin: 0 0 8px;
}

.sf-card__summary {
  font-size: 13px;
  color: #666;
  line-height: 1.65;
  margin: 0 0 12px;
  flex: 1;
}

.sf-card__btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #e8661a;
  text-decoration: none;
  margin-top: auto;
}

.sf-card__btn:hover {
  text-decoration: underline;
}

/* ── ページネーション ─────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}

.sf-page-btn {
  padding: 8px 16px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.sf-page-btn:hover {
  border-color: #e8661a;
  color: #e8661a;
}

.sf-page-btn--active {
  background: #e8661a;
  border-color: #e8661a;
  color: white;
  cursor: default;
}

/* ── ローディング・メッセージ ─────────────────────────────────────────────── */
.sf-loading {
  text-align: center;
  padding: 48px 20px;
  color: #aaa;
  font-size: 15px;
}

.sf-no-results,
.sf-error {
  text-align: center;
  padding: 48px 20px;
  color: #aaa;
  font-size: 15px;
  line-height: 1.8;
  grid-column: 1 / -1;
}

.sf-error {
  color: #c0392b;
}

/* ── レスポンシブ ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .shop-finder__filters {
    padding: 16px;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group select {
    min-width: 100%;
  }

  .btn-reset {
    align-self: flex-start;
  }

  .shop-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .sf-card__image {
    height: 150px;
  }

  .tag-checkboxes {
    gap: 6px;
  }

  .tag-checkbox {
    font-size: 12px;
    padding: 4px 10px;
  }
}
