/* ==================
   モデルハウス一覧専用スタイル
   共通スタイルは /public/assets/css/style.css を参照
   ================== */

/* ==== モデルハウス特有のスタイル ==== */

/* 追加のギャップクラス */
.g-12 {
  gap: 12px;
}

/* サイドバー */
header .sideBar {
  margin-bottom: 30px;
}

/* ================== モデルハウス専用コンポーネント ================== */

/* カスタムセレクト */
.select-form {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 30px;
  font-size: 13px;
}

.custom-select-wrapper {
  width: 200px;
  position: relative;
  font-family: sans-serif;
}

.custom-select {
  border: 1px solid #ccc;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-select .arrow {
  font-size: 12px;
  color: #888;
}

.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  border: 1px solid #ccc;
  border-top: none;
  background: white;
  z-index: 1000;
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.custom-options li {
  padding: 10px;
  cursor: pointer;
  border-top: 1px solid #eee;
}

.custom-options li:hover {
  background-color: #f0f0f0;
}

/* 地図表示 */
main .map {
  display: none;
  width: 100%;
  margin-bottom: 30px;
}

main .map img {
  width: 100%;
  height: auto;
}

.map-show {
  display: block !important;
}

/* ステータスグループ */
.status-group {
  gap: 4px;
  margin-bottom: 8px;
}

.status {
  padding: 2px 8px;
  background-color: rgba(221, 219, 214, 1);
  color: rgba(28, 26, 16, 1);
  font-size: 14px;
  font-weight: 600;
  border-radius: 3px;
}

.card-info-txt {
  margin-bottom: 8px;
}

.com-name p:nth-of-type(2) {
  font-weight: normal;
  margin-left: 4px;
}

/* 検索ボタングループ */
main .sBtn-group {
  width: max-content;
  gap: 12px;
}

main .searchBtn:hover {
  background-color: rgba(103, 130, 174, 1);
  color: #ffffff;
}

/* フィルターボタン（並び替えボタン） */
.filter-button {
  font-size: 12px;
  font-weight: 600;
  width: 105px;
  height: 32px;
  border: 1px solid #989483;
  border-radius: 16px;
  background-color: #ffffff;
  cursor: pointer !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-sizing: border-box;
  pointer-events: auto !important;
  z-index: 10;
  position: relative;
}

.filter-button:hover {
  background-color: rgba(103, 130, 174, 1);
  color: #ffffff;
}

/* ソートモーダル */
.sortModal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer; /* オーバーレイがクリック可能であることを示す */
}

.sortModal-overlay.show {
  display: flex;
}

.sortModal-box {
  background: white;
  border-radius: 8px;
  padding: 20px;
  min-width: 300px;
  max-width: 90%;
  position: relative;
  cursor: default; /* モーダルボックス内では通常のカーソル */
}

.sortModal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer !important;
  color: #666;
  z-index: 10001;
  pointer-events: auto !important;
  width: 30px;
  height: 30px;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.sortModal-close:hover {
  background-color: #f0f0f0;
  border-radius: 50%;
}

.sortModal-header {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
}

.sortModal-item {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sortModal-item:hover {
  background-color: #f5f5f5;
}

.sortModal-item:last-child {
  border-bottom: none;
}

/* マーカーアイコン */
.marker {
  width: 12px;
  height: auto;
  cursor: pointer;
  transition: all 0.3s ease;
}

.marker path {
  transition: fill 0.3s, stroke 0.3s;
}

.marker circle {
  transition: fill 0.3s;
}

.marker:hover path {
  fill: #ffffff;
}

.marker:hover circle {
  fill: rgba(103, 130, 174, 1);
}

/* いいねボタンアクティブ状態 */
.like-btn-act {
  background-color: #2f689d !important;
  color: #ffffff !important;
}

/* フィルター下部ボタン */
.filter-bottom-btn {
  width: 100%;
  padding-inline: 12.5px;
  padding-block: 12px;
}

.filter-bottom-btn a {
  background-color: #ff7c00;
  width: 365px;
  height: 51px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 4px;
}

/* ソートボタン */
.sort-button {
  padding: 12px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}

/* ソートモーダル */
.sortModal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: flex-end;
  z-index: 999;
}

.sortModal-overlay.show {
  display: flex;
}

.sortModal-box {
  background-color: white;
  width: 98%;
  border-radius: 12px 12px 0 0;
  padding: 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sortModal-header {
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 14px;
  margin-left: 10px;
  border-left: 3px solid rgba(103, 130, 174, 1);
  padding-left: 10px;
}

.sortModal-item {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sortModal-item span {
  color: rgba(103, 130, 174, 1);
}

.sortModal-item:first-of-type {
  border-top: none;
}

.sortModal-close {
  position: absolute;
  bottom: 350px;
  right: 20px;
  font-size: 40px;
  font-weight: 700;
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
}

/* ================== モデルハウス用カードスタイル ================== */

/* 価格情報の調整 */
.cardG .card .price-info {
    margin: 12px 0;
}

.cardG .card .price-info p {
    font-size: 14px;
    color: #666;
}

.cardG .card .price-info .price {
    font-size: 18px;
    font-weight: bold;
    color: #E94B08;
    margin-left: 8px;
}

.cardG .card .price-info .unit {
    font-size: 14px;
    font-weight: normal;
}

/* 所在地情報 */
.cardG .card .location-info {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.cardG .card .location-info p {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cardG .card .location-info p span {
    color: #333;
    font-weight: 500;
}

/* ステータスグループ */
.cardG .card .status-group {
    gap: 4px;
    margin-bottom: 8px;
}

/* ステータスバッジ - サンプルと同じデザイン */
.cardG .card .status-group .status {
    display: inline-block;
    padding: 2px 8px;
    background-color: rgba(221, 219, 214, 1);
    color: rgba(28, 26, 16, 1);
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 0;
}

/* カード全体の調整 - PCは元のデザイン維持 */
main .cardG .card {
    background-color: #ffffff;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

/* PC/モバイル表示切り替え */
.pc-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* PC表示の調整 */
@media (min-width: 769px) {
    .cardG .card .card-content {
        padding-left: 20px;
        flex: 1;
    }

    .cardG .card .card-image-slider {
        display: block !important;
        width: 280px;
        height: 200px;
        flex-shrink: 0;
    }

    /* スマホ用画像を非表示 */
    .cardG .card .cardImgG {
        display: none !important;
    }
}

/* レスポンシブ対応 - スマホ表示（works-archiveと完全同一） */
@media (max-width: 768px) {
    /* スマホ時のカード全体スタイル */
    main .cardG .card {
        background-color: #ffffff !important;
        border-radius: 0 !important;
        margin-bottom: 8px;
        box-shadow: 0px 1.5px 8.5px 0px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    /* PC用スライダーを非表示 */
    .cardG .card .card-image-slider {
        display: none;
    }

    /* スマホ用画像を表示 */
    .cardImgG {
        display: flex !important;
        width: 100%;
        gap: 0 !important;
    }

    /* コンテンツエリアの調整は共通CSSを使用 */

    .cardG .card .card-contentT {
        font-size: 14px;
        line-height: 1.6;
    }

    /* 所在地情報の調整 */
    .cardG .card .location-info {
        flex-direction: column;
        gap: 8px;
        padding-top: 8px;
    }

    .cardG .card .location-info p {
        font-size: 13px;
    }

    /* 価格情報の調整 */
    .cardG .card .price-info {
        margin: 0;
    }

    .cardG .card .price-info .price {
        font-size: 16px;
    }

    /* チェックボックスエリアの調整 */
    .cardG .card .cardTop {
        padding: 12px 16px;
    }

    /* topRのスマホ用スタイル - works-archiveと同一 */
    main .cardG .topR {
        position: absolute;
        top: 50%;
        right: 15px;
        transform: translateY(-50%);
        z-index: 10;
        background: none;
        border: none;
        padding: 0;
        width: 17px;
        height: 20px;
    }

    /* PC/モバイル表示切り替え */
    .pc-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .cardG .card .price-info .mobile-only {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
    }
}

/* お気に入りアイコンのスタイル（モデルハウス用） */
.favorite-icon {
  width: 17px;
  height: 20px;
  transition: all 0.2s ease;
}

.favorite-btn:hover .favorite-icon {
  transform: scale(1.1);
}

/* 地図エリアのアコーディオン表示 */
.mapArea_size01 {
    display: none;
    transition: all 0.3s ease;
}

.mapArea_size01.show {
    display: block;
}

/* 地図から探すボタン（モバイル） */
@media (max-width: 768px) {
    .searchBtn.mobile-only {
        font-size: 12px;
        font-weight: 600;
        width: 105px;
        height: 32px;
        border: 1px solid #989483;
        border-radius: 16px;
        background-color: #ffffff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        box-sizing: border-box;
        margin: 0 4px;
    }

    .searchBtn.mobile-only .marker {
        width: 12px;
        height: auto;
    }

    .searchBtn.mobile-only p {
        margin: 0;
        font-size: 12px;
        font-weight: 600;
    }

    .searchBtn.mobile-only:hover {
        background-color: rgba(103, 130, 174, 1);
        color: #ffffff;
    }

    /* カスタムセレクトのスマホ対応 */
    .custom-select-wrapper {
        position: relative;
        z-index: 1001;
    }

    .custom-options {
        z-index: 1002 !important;
        max-height: 200px;
        overflow-y: auto;
    }

    .custom-options li {
        padding: 12px 10px;
        font-size: 14px;
    }
}

/* ================== メディアクエリ（モデルハウス特有） ================== */
@media (max-width: 965px) {
  /* 価格情報を縦並びに */
  main .cardG .card .card-info-txt {
    flex-direction: column !important;
    gap: 8px !important;
  }

  main .cardG .card .card-info-txt p {
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  /* 価格情報を縦並びに */
  main .cardG .card .card-info-txt {
    flex-direction: column !important;
    gap: 8px !important;
  }

  main .cardG .card .card-info-txt p {
    width: 100% !important;
  }

  .select-form {
    display: none;
  }
}

/* ================== フィルター関連の追加スタイル ================== */

/* フィルター検索タイトル */
#filterContent .filter-searchT {
  text-align: center;
  margin: 30px 0;
}

#filterContent .filter-searchT p:first-child {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333333;
}

#filterContent .filter-searchT p:last-child {
  font-size: 16px;
  color: #666;
}

/* 検索タイトル（フィルターエリア内） */
main .searchT {
  font-size: 18px;
  font-weight: 600;
  width: 100%;
}

main .searchT p:nth-of-type(1) {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 45px;
}

main .searchT p:nth-of-type(1)::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 3px;
  background-color: #6782ae;
  top: 38px;
}

/* トグルボタン */
.toggle-button {
  cursor: pointer;
  background: none;
  border: none;
  color: #175fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.toggle-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

/* rotateクラスは共通CSSを使用 */

.toggle-section-wrapper {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 0;
  width: 100%;
}

.toggle-section {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
}

.toggle-section-wrapper.acodian-show {
  max-height: 200px; /* Adjust depending on content */
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  main .filterArea .searchT {
    display: none;
  }

  main .spN {
    display: none;
  }

  main #filterForm {
    border: none;
  }

  main .filterArea .container {
    background-color: rgba(28, 26, 16, 0.8);
    padding-top: 52px;
    position: relative;
    margin-bottom: 15px;
  }

  .rangeBar .sectionT {
    margin-bottom: 45px;
  }
}

@media (max-width: 700px) {
  .toggle-section {
    gap: 8px 10px;
  }
}

/* ================== PC・スマホ表示切り替え（価格情報用） ================== */
.price-info .pc-only {
  display: block;
}

.price-info .mobile-only {
  display: none;
}

/* 所在地情報のスタイル */
.location-info p {
  color: #666;
  font-size: 14px;
}

.location-info span {
  color: #333;
  font-weight: 500;
}

/* スマホ表示時 */
@media (max-width: 768px) {
  .price-info .pc-only {
    display: none;
  }

  .price-info .mobile-only {
    display: block;
  }

  .price-info .mobile-only p {
    margin-bottom: 8px;
  }
}

#mapArea {
  width: 100%;
  height: 500px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  #mapArea {
    height: 400px;
    height: min(400px, 70svh);
    margin-bottom: 10px;
  }
}
