/* ========================================
   物件一覧表示システム - スタイルシート
   ======================================== */

/* ベーススタイル */
* {
  box-sizing: border-box;
}

/* コンテナ */
#property-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
.propertyListTtl{
  margin-top: 1em;
  font-size:4rem ;
  text-align: center;
  line-height: 1;
  color: #8C733A;
  font-weight: 500;
}
.propertyListTtl small{
  display:block;
  font-size: .6em;
  margin-top:.2em ;
}

.property-loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* エラー表示 */
.property-error {
  text-align: center;
  padding: 40px;
  color: #d32f2f;
  background-color: #ffebee;
  border-radius: 8px;
  margin: 20px 0;
}

/* アコーディオン */
.property-accordion {
  grid-column: 1 / -1;
  margin-top: 20px;
}

.property-accordion-btn {
  position: relative;
  z-index: 0;
  width: 100%;
  padding: 15px 20px;
  background-color: #8C733A;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: background-color 0.3s ease;
}

.property-accordion-btn:hover {
  background-color: #bd9c4e;
}

.accordion-icon {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.property-accordion-content {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-height: 0;
  overflow: visible;
  opacity: 0;
  transition: max-height 0.5s ease-out, opacity 0.3s ease-out, margin-top 0.5s ease-out;
}

.property-accordion-content.expanded {
  max-height: 5000px; /* 十分大きな値に設定 */
  opacity: 1;
  margin-top: 20px;
}

.property-accordion-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.property-accordion-close-btn {
  grid-column: 1 / -1;
  margin-top: 20px;
}

/* グリッドレイアウト */
.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
  /* position: relative;
  z-index: -1; */
}

/* 物件カード */
.property-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 物件画像 */
.property-image {
  position: relative;
  width: 100%;
  padding-top: 66.67%; /* 3:2 アスペクト比 */
  overflow: hidden;
  background: #f5f5f5;
}

.property-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.property-card:hover .property-image img {
  transform: scale(1.05);
}

/* 物件情報エリア */
.property-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 区（地域名） */
.property-area {
  font-size: 14px;
  font-weight: 600;
  color: #8C733A;
  margin: 0;
}

/* 物件名 */
.property-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 価格 */
.property-price {
  font-size: 2.2rem;
  font-weight: 700;
  color: #E53E3E;
  margin: 0 0 .5em;
}

/* その他の詳細情報 */
.property-layout,
.property-space,
.property-balcony {
  font-size: 1.6rem;
  font-weight: 600;
  color: #666;
  margin: 0;
  line-height: 1.2;
}

/* 日付 */
.property-date {
  font-size: 12px;
  color: #999;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

/* お得額表示 */
.commission-savings {
  width: 100%;
  /* background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); */
  background: rgba(140, 115, 58, 0.8);
  color: white;
  padding: 8px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 1.8rem;
  position: absolute;
  bottom: 0px;
  left: 0;
  z-index: 0;
  /* box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3); */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* お得額の数字部分を大きく */
.commission-savings .savings-number {
  font-size: 1.4em; /* 1.5倍のサイズ */
  font-weight: 900;
  padding-inline: .1em;
}

/* 物件リンク */
.property-card a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

/* データなし表示 */
.property-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
}

/* ========================================
   レスポンシブデザイン
   ======================================== */

/* タブレット (768px - 1023px) */
@media (max-width: 1023px) {
  .property-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .property-accordion-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .property-accordion-content.expanded {
    max-height: 4000px;
  }

  .property-accordion-close-btn {
    grid-column: 1 / -1;
  }

  #property-container {
    padding: 16px;
  }
}

/* スマートフォン (768px以下) */
@media (max-width: 768px) {
  .property-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .property-accordion-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .property-accordion-content.expanded {
    max-height: none; /* SPでは高さ制限なし */
  }

  .property-accordion-close-btn {
    grid-column: 1 / -1;
  }

  .property-accordion-btn {
    font-size: 14px;
    padding: 12px 16px;
  }

  #property-container {
    padding: 12px;
  }

  .propertyListTtl{
  font-size:3rem ;
}
  
  .property-title {
    font-size: 15px;
  }
  
  .property-details {
    font-size: 13px;
  }
  
  .commission-savings {
    font-size: 1.6rem;
    padding: 6px 10px;
    bottom: 0;
    left: 0;
  }

  .commission-savings .savings-number {
    font-size: 1.4em; /* スマホでも1.5倍 */
    font-weight: 900;
  }
  
  .property-info {
    padding: 14px;
    gap: 5px;
  }

  .property-area {
    font-size: 13px;
  }

  .property-name {
    font-size: 2rem;
  }

  .property-price {
    font-size: 2.4rem;
  }

  .property-layout,
  .property-space,
  .property-balcony {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
  }

  .property-date {
    font-size: 11px;
  }
}

/* 極小画面 (320px以下) */
@media (max-width: 320px) {
  .property-area {
    font-size: 12px;
  }

  .property-name {
    font-size: 1.5rem;
  }

  .property-price {
    font-size: 1.6rem;
  }

  .property-layout,
  .property-space,
  .property-balcony {
    font-size: 11px;
  }

  .property-date {
    font-size: 10px;
  }

  .commission-savings {
    font-size: 1.1rem;
    padding: 6px 8px;
    bottom: 0;
    left: 0;
  }

  .commission-savings .savings-number {
    font-size: 1.4em; /* 極小画面でも1.5倍 */
    font-weight: 900;
  }
}

/* ========================================
   印刷用スタイル
   ======================================== */

@media print {
  .property-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .property-card:hover {
    transform: none;
  }
  
  .property-grid {
    gap: 16px;
  }
}

/* ========================================
   アクセシビリティ
   ======================================== */

/* フォーカス時のスタイル */
.property-card a:focus {
  outline: 3px solid #4A90E2;
  outline-offset: 2px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
  .property-card {
    border: 2px solid #000;
  }
  
  .commission-savings {
    border: 2px solid #000;
  }
}

/* ダークモード対応（オプション） */
/* @media (prefers-color-scheme: dark) {
  .property-card {
    background: #2c2c2c;
    color: #fff;
  }
  
  .property-title {
    color: #fff;
  }
  
  .property-details {
    color: #ccc;
  }
  
  .property-details strong {
    color: #fff;
  }
  
  .property-error {
    background-color: #3d1f1f;
    color: #ff6b6b;
  }
} */

/* ========================================
   カスタマイズ用クラス
   ======================================== */

/* 画像なし時のプレースホルダー */
.property-image.no-image {
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  background:#8C733A;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 600;
}

/* バッジ表示（新着、価格改定など） */
.property-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #FF6B6B;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 1.4rem;
  font-weight: 700;
  z-index: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.property-badge.price-reduced {
  background: linear-gradient(135deg, #E53E3E 0%, #C53030 100%);
  border: 1px solid #C53030;
  animation: pulse-badge 2s ease-in-out infinite;
}

.property-badge.new {
  background: #FF9800;
}

/* 価格改定バッジのアニメーション */
@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 6px rgba(229, 62, 62, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.6);
  }
}
