@import url(common.css);

/* ///////////////////////////////////

条件で絞り込むsection

/////////////////////////////////// */

#search_filter {
  padding: 1em 0 2em;
}
/* フィルター（件数の上） */
.filter-box {
  width: calc(100% - 40px);
  max-width: 820px;
  margin: 0 auto;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.filter-box h2 {
  margin: 0.2em 0 10px;
  font-size: 16px;
}
.filter-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 1em;
}
.filter-row .col-4 {
  grid-column: span 4;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
}
.filter-row .col-12 {
  grid-column: span 12;
}
.filter-box label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin: 0 0 4px;
}
.filter-box select {
  width: 100%;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-tags .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 13px;
  color: #334155;
}

/* この条件で絞り込むボタン */
.btn-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  background: #2d7c2f;
  color: #fff;
  font-weight: 700;
  border: 0;
}
.btn-primary:hover {
  opacity: 0.95;
}

/* 件数/並び替え */
.sort {
  font-size: 14px;
}
.result-head {
  width: calc(100% - 40px);
  max-width: 820px;
  margin: 1em auto;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* 全〇〇社 */
.result-count {
  font-weight: 700;
  color: #334155;
}

/* ///////////////////////////////////


工事店カード
検索結果


/////////////////////////////////// */

/* リスト */
.cards {
  width: calc(100% - 40px);
  max-width: 820px;
  margin: 0 auto;
  box-sizing: border-box;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
}

/* カード：画像＆CTAサイズ統一（PC: 320×240 / SP: 16:9） */
.card {
  display: grid;
  grid-template-columns: 250px 1fr auto;
  gap: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  align-items: center;
}
.cards .area_regions {
  padding: 1.5em 0 1em;
}

/* カード全面を1リンクに */
.cards .card {
  position: relative;
}
.cards .card .card-overlay {
  position: absolute;
  inset: 0; /* 上下左右ぜんぶ0で全面 */
  z-index: 1;
  display: block;
}
/* カード全面リンクの基本（参考） */
.cards .card {
  position: relative;
}

.cards .card .card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  text-decoration: none;
}
.cards .card:hover,
.cards .card .card-overlay:hover {
  cursor: pointer;
}

/* CTAボタン風（pをボタン風に） */

.cards .card .cta p {
  max-width: 300px;
  margin: auto;
  text-align: center;
  padding: 10px 14px;
  margin-top: 12px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e5e7eb;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  position: relative;
  z-index: 2;
  font-size: clamp(14px, 1.8vw, 16px);
  color: #686868;
}

/* ★カード全体にホバー/フォーカスが乗ったらCTAの見た目を変える */
.cards .card:hover {
  background-color: #e9f3e3a2;
}
.cards .card:hover .cta p,
.cards .card:focus-within .cta p {
  background: var(--just_green);
  color: #fff;
  border-color: var(--just_green);
  transform: translateY(-1px);
}

/* クリック中の押し込み感 */
.cards .card:active .cta p {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2);
}

/* キーボードフォーカス時の見やすいアウトライン */
.cards .card .card-overlay:focus {
  outline: 2px solid var(--just_green);
  outline-offset: 4px;
  border-radius: 8px;
}

/* 既に .cta を削除したので z-index の上げ下げは不要だが、
   将来カード内に別リンクを入れるときに備えての互換指定 */
.cards .card a:not(.card-overlay),
.cards .card button {
  position: relative;
  z-index: 2;
}

.card .thumb {
  max-width: 250px;
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f5;
  display: block;
}
.card .thumb img {
  max-width: 250px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card h2.name {
  margin: 0 0 6px;
  font-size: 18px;
}
.card h2.name a {
  color: #444;
}
.card .areas {
  font-size: 13px;
}
.card .areas span {
  display: block;
  font-size: 10px;
}

.kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 10px;
  margin-top: 8px;
}
.kv dt {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}
.kv dd {
  margin: 0;
}

/* 対応工事カテゴリーアイコン風 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.footer-note {
  width: calc(100% - 40px);
  max-width: 820px;
  margin: 3em auto 0;
  box-sizing: border-box;
  color: var(--aside_gray);
  font-size: 13px;
}
@media screen and (max-width: 1024px) {
  #content #main #main_right {
    width: 100%;
    padding: unset;
    margin: 0 auto;
    box-shadow: unset;
  }
  .card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .card .thumb {
    width: 100%;
    aspect-ratio: 16/9;
  }
}
@media (max-width: 768px) {
  .result-head {
    display: block;
  }
  .card .thumb,
  .card .thumb img {
    max-width: 460px;
  }
}
