
/* ========================================
   基本設定
======================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Yu Gothic",
    "YuGothic",
    "Meiryo",
    sans-serif;
  color: #333;
  background: #f7f7f7;
  line-height: 1.7;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}


/* ========================================
   共通
======================================== */

.section-inner,
.header-inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

section {
  padding: 32px 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}


/* ========================================
   ヘッダー
======================================== */

.page-header {
  padding: 42px 0;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.sub-title {
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: bold;
}

h1 {
  margin-bottom: 12px;
  font-size: 32px;
  line-height: 1.4;
}

.intro {
  max-width: 720px;
  margin-bottom: 0;
}


/* ========================================
   検索
======================================== */

.search-section {
  background: #ffffff;
}

.search-section h2,
.map-section h2,
.shop-section h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.search-label,
.category-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

#keyword {
  flex: 1;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid #cccccc;
  border-radius: 8px;
  background: #ffffff;
  font-size: 16px;
}

#keyword:focus {
  outline: 2px solid #555555;
  outline-offset: 1px;
}

.clear-button {
  padding: 10px 16px;
  border: 1px solid #cccccc;
  border-radius: 8px;
  background: #ffffff;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-button {
  padding: 9px 16px;
  border: 1px solid #cccccc;
  border-radius: 999px;
  background: #ffffff;
}

.category-button:hover {
  background: #eeeeee;
}

.category-button.active {
  color: #ffffff;
  background: #333333;
  border-color: #333333;
}


/* ========================================
   MAP
======================================== */

.map-section {
  background: #f7f7f7;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.result-count {
  margin-bottom: 18px;
  font-weight: bold;
}

#map {
  width: 100%;
  height: 520px;
  border-radius: 14px;
  overflow: hidden;
  background: #dddddd;
}

.map-note {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 13px;
}


/* ========================================
   MAP吹き出し
======================================== */

.popup-content {
  min-width: 190px;
}

.popup-name {
  margin-bottom: 4px;
  font-size: 16px;
}

.popup-category {
  margin-bottom: 10px;
  font-size: 12px;
}

.popup-button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: #333333;
}


/* ========================================
   店舗一覧
======================================== */

.shop-section {
  background: #ffffff;
}

#shopList {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.shop-card {
  padding: 22px;
  border: 1px solid #e2e2e2;
  border-radius: 14px;
  background: #ffffff;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.shop-card.highlight {
  box-shadow:
    0 0 0 3px #555555;
  transform: translateY(-2px);
}

.shop-category {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eeeeee;
  font-size: 12px;
  font-weight: bold;
}

.shop-name {
  margin-bottom: 4px;
  font-size: 21px;
}

.shop-genre {
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: bold;
}

.shop-info {
  margin-bottom: 10px;
}

.shop-label {
  display: block;
  margin-top: 15px;
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: bold;
}

.shop-notice {
  padding: 12px;
  border-radius: 8px;
  background: #f5f5f5;
}

.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.shop-actions button,
.shop-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 7px;
  text-decoration: none;
}

.map-button {
  border: 0;
  color: #ffffff;
  background: #333333;
}

.phone-button,
.web-button {
  border: 1px solid #cccccc;
  background: #ffffff;
}


/* ========================================
   0件・読込中・エラー
======================================== */

.no-results,
.loading,
.error-message {
  grid-column: 1 / -1;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  background: #f5f5f5;
}

.error-message {
  border: 1px solid #cccccc;
}


/* ========================================
   フッター
======================================== */

footer {
  padding: 30px 16px;
  text-align: center;
  background: #333333;
  color: #ffffff;
  font-size: 12px;
}

footer p {
  margin-bottom: 0;
}


/* ========================================
   スマートフォン
======================================== */

@media (max-width: 700px) {
  .section-inner,
  .header-inner {
    width: min(100% - 24px, 1100px);
  }

  section {
    padding: 25px 0;
  }

  .page-header {
    padding: 30px 0;
  }

  h1 {
    font-size: 25px;
  }

  .search-section h2,
  .map-section h2,
  .shop-section h2 {
    font-size: 21px;
  }

  .search-box {
    display: block;
  }

  #keyword {
    width: 100%;
    margin-bottom: 8px;
  }

  .clear-button {
    width: 100%;
  }

  .category-buttons {
    gap: 6px;
  }

  .category-button {
    padding: 8px 12px;
    font-size: 13px;
  }

  .section-heading-row {
    display: block;
  }

  .result-count {
    margin-top: -10px;
  }

  #map {
    height: 400px;
  }

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

  .map-button {
    grid-column: 1 / -1;
  }
}


/* ========================================
   店舗一覧を画面幅に関係なく1列で表示
======================================== */

#shopList {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 4px;
  width: 100%;
}

#shopList > .shop-card {
  display: block !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 10px !important;
  border: 1px solid #e2e2e2;
  border-radius: 14px !important;
  background: #ffffff;
}

/* 店舗概要は1行のまま表示 */
#shopList .shop-summary-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}


/* ========================================
   検索ボタンの形を元の丸型に固定
======================================== */

#categories .category-button,
#couponFilters .category-button,
#couponFilters .coupon-button {
  border-radius: 999px !important;
}

#categories .category-button,
#couponFilters .category-button,
#couponFilters .coupon-button {
  border: 1px solid #cccccc;
  background: #ffffff;
}

#categories .category-button.active,
#couponFilters .category-button.active,
#couponFilters .coupon-button.active {
  color: #ffffff;
  background: #333333;
  border-color: #333333;
}

#categories .category-button:hover,
#couponFilters .category-button:hover,
#couponFilters .coupon-button:hover {
  background: #eeeeee;
}

#categories .category-button.active:hover,
#couponFilters .category-button.active:hover,
#couponFilters .coupon-button.active:hover {
  background: #333333;
}

#keyword {
  border-radius: 8px;
}

#clearButton,
.clear-button {
  border-radius: 8px;
}

@media (max-width: 600px) {
  #shopList > .shop-card {
    padding: 6px 8px !important;
    border-radius: 14px !important;
  }
}


/* ========================================
   店舗詳細の文字サイズを調整
======================================== */

#shopList .shop-details {
  font-size: 13px;
  line-height: 1.55;
}

#shopList .shop-details p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#shopList .shop-details .shop-label {
  margin-top: 10px;
  margin-bottom: 3px;
  font-size: 12px;
  line-height: 1.4;
}

#shopList .shop-details .shop-notice {
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.55;
}

#shopList .shop-details .shop-info {
  margin-bottom: 7px;
  font-size: 12px;
}

/* 地図・電話・LINE・Instagram・Webサイトをボタンとして表示 */
#shopList .shop-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}

#shopList .shop-actions .map-button,
#shopList .shop-actions .phone-button,
#shopList .shop-actions .web-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #bdbdbd;
  border-radius: 7px;
  background: #ffffff;
  color: #333333;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}

#shopList .shop-actions .map-button {
  border-color: #333333;
  background: #333333;
  color: #ffffff;
}

#shopList .shop-actions .phone-button:hover,
#shopList .shop-actions .web-button:hover {
  background: #f0f0f0;
}

#shopList .shop-actions .map-button:hover {
  background: #555555;
}

@media (max-width: 600px) {
  #shopList .shop-details,
  #shopList .shop-details p {
    font-size: 12px;
  }

  #shopList .shop-details .shop-label,
  #shopList .shop-details .shop-info,
  #shopList .shop-details .shop-notice {
    font-size: 11px;
  }

  #shopList .shop-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  #shopList .shop-actions .map-button,
  #shopList .shop-actions .phone-button,
  #shopList .shop-actions .web-button {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 11px;
  }
}


/* ========================================
   店舗一覧をさらにコンパクトにする
   枠の角丸は14pxのまま維持
======================================== */

#shopList {
  gap: 3px !important;
}

#shopList > .shop-card {
  padding: 4px 8px !important;
  border-width: 1px !important;
  border-radius: 14px !important;
}

#shopList .shop-summary-row {
  gap: 4px !important;
  padding: 0 !important;
  min-height: 22px;
  line-height: 1.2 !important;
}

#shopList .shop-category {
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

#shopList .shop-name {
  margin-bottom: 0 !important;
}

#shopList .shop-detail-toggle {
  padding: 2px 6px !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  border-radius: 5px;
}

@media (max-width: 600px) {
  #shopList {
    gap: 3px !important;
  }

  #shopList > .shop-card {
    padding: 3px 6px !important;
    border-radius: 14px !important;
  }

  #shopList .shop-summary-row {
    gap: 3px !important;
    min-height: 20px;
  }
}

/* ========================================
   店舗一覧の縦位置を中央揃えにする
======================================== */

#shopList .shop-summary-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  min-height: 24px;
  line-height: 1.2 !important;
}

/* カテゴリー・商品券バッジを中央揃え */
#shopList .shop-category,
#shopList .coupon-badge,
#shopList .voucher-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

/* 店舗名を中央揃え */
#shopList .shop-name {
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1.2 !important;
}

/* ジャンル・詳細ボタンを中央揃え */
#shopList .shop-genre,
#shopList .shop-detail-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1.2 !important;
}

/* 一覧カード内の要素の縦位置を統一 */
#shopList > .shop-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

/* スマートフォンでも中央揃え */
@media (max-width: 600px) {
  #shopList .shop-summary-row {
    align-items: center !important;
    min-height: 24px;
  }
}
