/* ==========================================================
   販売物件（#estate）専用：スマホ最終調整
   横95%に“見せる”＋高さ統一＋点線区切り
========================================================== */
@media (max-width: 600px) {

  /* ▼ 多重ネストの flex を見た目で無効化（重要） */
  #estate .estate-wrap {
    display: block !important;
  }

  /* ▼ 物件カードに左右ガターを作る → 見た目が95%になる */
  #estate .estate-box {
    box-sizing: border-box !important;
    padding-left: 2.5% !important;
    padding-right: 2.5% !important;
  }

  /* ▼ 画像ボックスは親いっぱいに（ガターは estate-box 側で確保） */
  #estate .estate-box .img {
    width: 100% !important;
    margin: 0 auto 12px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
  }

  /* ▼ 画像は高さ固定＋トリミング（縦横バラつき完全解消） */
  #estate .estate-box .img img {
    width: 100% !important;
    max-width: 100% !important;
    height: 220px !important;        /* ← 高さはここで調整可能 */
    object-fit: cover !important;
    display: block !important;
  }

  /* ▼ 物件と物件の区切り（薄い点線） */
  #estate .estate-box {
    padding-bottom: 22px !important;
    margin-bottom: 24px !important;
    border-bottom: 1px dotted #ccc !important;
  }

  /* 最後の物件だけ線を消す */
  #estate .estate-box:last-of-type {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}
/* ================================
販売物件 強制リセットCSS（HTML壊さず修正）
================================ */

/* 多重ネストされた estate-wrap をすべて横並び解除 */
#estate .estate-wrap {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* 内側に入り込んだ estate-wrap は無効化 */
#estate .estate-wrap .estate-wrap {
  display: contents !important;
}

/* 物件カードを統一 */
#estate .estate-box {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 画像サイズを強制統一 */
#estate .estate-box .img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

#estate .estate-box .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* カテゴリラベル固定 */
#estate .estate-box .category {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

/* テキストをカード内に収める */
#estate .estate-box h3 {
  font-size: 16px;
  padding: 12px 12px 4px;
}

#estate .estate-box .item-list {
  padding: 0 12px 12px;
}

#estate .estate-box .item {
  font-size: 13px;
  line-height: 1.6;
}

/* 価格のズレ防止 */
#estate .estate-box .cost strong,
#estate .estate-box .cost span {
  white-space: nowrap;
}

/* スマホ1列固定 */
@media (max-width: 768px) {
  #estate .estate-wrap {
    grid-template-columns: 1fr;
  }
}
/* ▼ スマホだけ写真をさらに縦長にする */
@media (max-width: 768px) {
  #estate .estate-box .img {
    height: 280px !important;   /* ← ここを調整（300〜380くらいまでOK） */
  }
}
