/* ════════════════════════════════
   輪播器
════════════════════════════════ */
.slider {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 30px;
  background: #000;
}

.slider__track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

@media (max-width: 768px) {
  .slider{
    border-radius: 0;
  }
  .slider__track { aspect-ratio: 4 / 3; }
}

@media (max-width: 640px) {
  .slider__track { aspect-ratio: 6 / 4; }
  .slider {
    border-radius: 0;
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    overflow: hidden;
  }
}

.slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.slider__slide.active { opacity: 1; }
.slider__slide img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ── 箭頭 ── */
.slider__btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff; border: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.slider__btn:hover { background: rgba(0,0,0,0.7); }
.slider__btn--prev { left: 14px; }
.slider__btn--next { right: 14px; }

@media (max-width: 640px) {
  .slider__btn { width: 34px; height: 34px; font-size: 0.8rem; }
  .slider__btn--prev { left: 25px; }
  .slider__btn--next { right: 25px; }
}

/* ── 圓點 ── */
.slider__dots {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 2;
  flex-wrap: wrap; justify-content: center;
  max-width: 80%;
}
.slider__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.slider__dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* ════════════════════════════════
   Detail 頁面
════════════════════════════════ */
.property_container{
  max-width:900px;
  margin: 85px auto 50px;
  overflow-x: hidden;
}

/* .detail__main {
    max-width: 900px;
    margin: 0 20px;
}

.detail {
  padding: 90px 0 80px;
} */

.prop-card__price_detail{
  font-family: var(--font-body); 
  font-size: 30px; 
  font-weight: 600;
  margin-top: 10px;
}

.prop-card__price--original {
    text-decoration: line-through;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 30px;
    margin-right: 8px;
}

.prop-card__price--sale {
    color: #e74c3c;
    font-weight: 600;
    font-size: 30px;
}

@media (max-width: 768px) {
  .navbar { 
    margin-bottom: 0 !important; 
  }

  /* 2. 移除 Detail 容器上方的內距或外距 */
  .detail {
    padding-top: 0;    
  }

  .detail__main{
    margin: 0 20px;
  }

  .detail {
    padding-top: 0 !important;
  }

  /* 3. 如果是用 Slider (輪播器) 顯示圖片，確保它沒有 margin-top */
  .slider {
    margin-top: 70px !important;
  }

  /* 4. 如果導覽列是固定定位 (fixed)，確保容器的頂部剛好貼齊導覽列高度 */
  .property_container {
    margin-top: 0 !important;
  }

}

/* ── 標題區 ── */
.detail__header {
  display: flex; flex-wrap: wrap;
  gap: 8px; margin-bottom: 20px;
}
.prop-card__badge{
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.detail__addr {
  font-size: 1.75rem; font-weight: 700;
  line-height: 1.3;
}
.detail__area {
  font-size: 20px; color: var(--primary);
  letter-spacing: 1px; text-transform: uppercase;
  margin: 10px 0;
}
.detail__price {
  font-size: 1.75rem; font-weight: 700;
  color: var(--primary); margin-bottom: 28px;
}

@media (max-width: 640px) {
  .detail__addr  { font-size: 1.35rem; }
  .detail__price { font-size: 1.4rem; }
}

/* ── 規格表格 ── */
/* .detail__specs {
  width: 100%; border-collapse: collapse;
  margin-bottom: 32px; font-size: 0.9rem;
}
.detail__specs th,
.detail__specs td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left; vertical-align: middle;
}
.detail__specs th {
  width: 100px; color: var(--text-muted);
  font-weight: 500; white-space: nowrap;
}

@media (max-width: 480px) {
  .detail__specs th { width: 80px; }
  .detail__specs th,
  .detail__specs td { padding: 8px 10px; font-size: 0.85rem; }
} */

/* ── 說明文字 ── */

.detail__desc { margin-bottom: 32px; }
.detail__desc h2 {
  font-size: 1.1rem; font-weight: 600;
  margin-bottom: 20px; padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}
.detail__desc p {
  font-size: 0.9rem; line-height: 1.8;
  color: var(--text-muted);
  white-space: pre-line; /* 📍 建議增加：保留銷售文換行 */
}

/* ── 標籤 (Badge) ── */
.badge {
  /* display: inline-block; */
  padding: 4px 12px; border-radius: 20px;
  font-size: 1rem; font-weight: 600;
}

.detail__specs tr td:nth-child(2) {
  border-right: 1px solid #f0f0f0;
}

/* ── 返回按鈕 ── */
.a_back {
  display: flex ; 
  justify-content: space-around; 
  align-items: center;
  /* gap: 30px;  */
  margin-top: 40px;
  color: var(--primary ); 
  text-decoration: none;
  font-size: 18px;

}


/* 新增：Grid 規格表佈局 */
.detail__specs-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 2fr;
    width: 100%;
    margin: 20px 0 30px;
    box-sizing: border-box;
}

.spec-label, .spec-value {
    padding: 12px 14px;
    border-top: 1px solid #f0f0f0;    /* 頂部線 */
    border-left: 1px solid #f0f0f0;   /* 左側線 */
    border-bottom: 1px solid #f0f0f0; /* 底部線 */
    border-right: 1px solid #f0f0f0;  /* 右側線 */
    
    /* 📍 新增：修正相鄰邊框重疊變粗的問題 */
    margin-top: -1px;
    margin-left: -1px;
    box-sizing: border-box;
}

.spec-label {
    display: flex;       /* 或是 inline-flex */
    align-items: center;
    background-color: #fafafa;
    color: var(--text-muted);
    gap: 8px;
}


@media (max-width: 640px) {
  
  .detail__back {
    margin-top: 30px;
    font-size: 18px;
  }


  .detail__specs-grid {
        /* 📍 強制改為兩欄，並確保寬度不超出 */
        grid-template-columns: 1.2fr 2fr !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        /* 📍 補足右側邊框 */
        border-right: 1px solid #f0f0f0; 
    }

    .spec-label, .spec-value {
        /* 📍 確保每個格子都有下線與右線 */
        border-bottom: 1px solid #f0f0f0;
        border-right: 1px solid #f0f0f0;
        padding: 10px 8px;
    }

    /* 📍 關鍵修正：移除最後一欄多出的右邊框，避免重複加粗 */
    .detail__specs-grid > .spec-value {
        border-right: none;
    }
}


/* ══════════════════════════════════════════
   追蹤物件浮動按鈕 & Modal
══════════════════════════════════════════ */
/* h1 旁邊的標題列 */
.detail__title-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* 說明區下方置中容器 */
.detail__track-center {
  text-align: center;
  margin-top: 24px;
}

/* inline 版（h1 旁）：小尺寸 */
.track-fab--inline {
  position: static;
  display: inline-flex;      /* 加這行 */
  align-items: center;       /* 加這行 */
  gap: 6px;
  padding: 6px 12px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  border-radius: 18px;
  background-color: var(--primary);
  color: var(--text-dark);
  cursor: pointer;
}

/* block 版（說明下方）：較寬 */
.track-fab--block {
  position: static;
  display: inline-flex;      /* 加這行 */
  align-items: center;       /* 加這行 */
  gap: 8px; 
  padding: 6px 12px;
  font-size: 19px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  border-radius: 20px;
  background-color: var(--primary);
  color: var(--text-dark);
  cursor: pointer;
}

/* 原本的浮動按鈕移除（已被這兩個取代） */
.track-fab:not(.track-fab--inline):not(.track-fab--block) {
  display: none;
}

/* Overlay */
.track-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
}
.track-modal-overlay.active { display: flex; }

/* Modal 本體 */
.track-modal {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: min(440px, 92vw);
  padding: 36px 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: modalIn .22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* 關閉按鈕 */
.track-modal__close {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none;
  font-size: 1.3rem; color: #888;
  cursor: pointer; line-height: 1;
}
.track-modal__close:hover { color: #333; }

/* Header */
.track-modal__header { text-align: center; margin-bottom: 24px; }
.track-modal__icon {
  font-size: 2.2rem; color: #c0392b;
  display: block; margin-bottom: 10px;
}
.track-modal__header h2 {
  font-size: 1.25rem; font-weight: 700;
  color: #222; margin: 0 0 6px;
}
.track-modal__header p {
  font-size: .875rem; color: #666;
  margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 兩個選項按鈕 */
.track-modal__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.track-option-btn {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  padding: 18px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .12s;
}
.track-option-btn:hover {
  transform: translateY(-2px);
}
.track-option-btn i { font-size: 1.8rem; }
.track-option-btn span { font-size: .95rem; font-weight: 600; color: #222; }
.track-option-btn small { font-size: .75rem; color: #888; }

.track-option-btn--email:hover { border-color: #c0392b; background: #fff5f5; }
.track-option-btn--email i { color: #c0392b; }
.track-option-btn--line:hover  { border-color: #06c755; background: #f0fff5; }
.track-option-btn--line i { color: #06c755; }

/* 返回按鈕 */
.track-back-btn {
  background: none; border: none;
  color: #888; font-size: .85rem;
  cursor: pointer; padding: 0;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
}
.track-back-btn:hover { color: #333; }

/* Email 表單 */
.track-modal__email-form label {
  display: block;
  font-size: .875rem; font-weight: 600;
  color: #444; margin-bottom: 8px;
}
.track-modal__email-form input[type="email"] {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid #ddd; border-radius: 8px;
  font-size: .95rem; outline: none;
  transition: border-color .18s;
  box-sizing: border-box;
}
.track-modal__email-form input[type="email"]:focus { border-color: #c0392b; }
.track-modal__hint {
  font-size: .78rem; color: #999;
  margin: 8px 0 16px;
}
.track-submit-btn {
  width: 100%;
  padding: 12px;
  background: #c0392b; color: #fff;
  border: none; border-radius: 8px;
  font-size: 1rem; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center;
  justify-content: center; gap: 8px;
  transition: background .18s;
}
.track-submit-btn:hover { background: #a93226; }
.track-submit-btn:disabled { background: #ccc; cursor: not-allowed; }

/* 回饋訊息 */
.track-modal__feedback {
  margin-top: 12px;
  font-size: .875rem; text-align: center;
  min-height: 20px;
}
.track-modal__feedback.success { color: #27ae60; }
.track-modal__feedback.error   { color: #c0392b; }

/* LINE 面板 */
.track-modal__line-desc {
  font-size: .9rem; color: #555;
  margin: 0 0 18px; line-height: 1.6;
}
.track-line-btn {
  display: flex; align-items: center;
  justify-content: center; gap: 10px;
  width: 100%; padding: 13px;
  background: #06c755; color: #fff;
  border-radius: 8px;
  font-size: 1rem; font-weight: 600;
  text-decoration: none;
  transition: background .18s;
}
.track-line-btn:hover { background: #05b34c; color: #fff; }
.track-line-btn i { font-size: 1.3rem; }
.track-modal__line-hint {
  font-size: .78rem; color: #999;
  text-align: center; margin-top: 12px;
}

/* 手機版調整 */
@media (max-width: 640px) {
  .track-modal { padding: 28px 20px 22px; }
  .track-modal__options { grid-template-columns: 1fr 1fr; gap: 10px; }
}