/*
 * 詳細頁（single-cars）版型與通用樣式 — 原「全域 Simple CSS」抽出
 *
 * 由 enqueue.php 於 is_singular( 'cars' ) 條件載入。
 * 與同目錄另兩支詳細頁 CSS 分工（皆 is_singular('cars') 載入）：
 *   - vehicle-detail.css      ：Pods Template 內嵌 <style> 抽出（Lightbox／購車聲明／里程 Modal，wave1）
 *   - vehicle-detail-cta.css  ：.jiamacar-cta-container（綠色聯絡 CTA 卡）+ 隱藏 HFP 重複注入
 *   - 本檔                    ：原全域 Simple CSS 的詳細頁版型（.single-cars 主容器／規格／油耗／
 *                               內容段落／里程徽章／整備清單／價格區塊）＋「分享此車」按鈕
 *
 * 「分享此車」.car-share-* 由 vehicle-detail.js 驅動
 * （.car-share-btn[data-share-*] / #car-share-toast），兩者同在 is_singular('cars')
 * 載入，故樣式置於本檔。
 *
 * 依賴：全站 Z-index 變數 --z-toast（.car-share-toast 用），定義在「全域 WP 原生附加 CSS」的 :root。
 *
 * 不含（刻意排除）：
 *   - 週年慶 .car-price-block--ann / .ann-detail-*（限時活動，續留 Simple CSS，CLAUDE.md §3.2／§6.3）
 *   - 貸款試算器 .loan-calc-* / .loan-*（耦合度高，本輪不抽，續留 Simple CSS）
 *   - 側欄比例 body.single-cars .content-area/.widget-area（詳細頁已由 no-sidebar.php 拔除側欄，
 *     原為死碼，搬遷時已刪除）
 *   - 紅色 8891 鈕 a.car-cta-btn（功能已下線，原為死碼，搬遷時已刪除）
 *
 * 對應原始：全域 Simple CSS（原註記「全域_simple.css」）。
 * 相關文件：_detail-page.md / _overview.md
 */

/* ── 詳細頁的分享此車 ── */
.car-share-wrap {
  margin: 16px 0;
}

.car-share-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #ddd;
  background: #fff;
  color: #333;
  text-decoration: none;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent; /* 手機點擊不閃藍框 */
}
.car-share-btn:active {
  opacity: 0.7;
}

/* Toast */
.car-share-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  z-index: var(--z-toast);
}
.car-share-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================================================
   主容器
   ================================================ */
.car-single-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ================================================
   輪播圖
   ================================================ */
.car-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0;
}

/* ================================================
   主卡片
   ================================================ */
.car-main-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8e5de;
  padding: 18px 16px 16px;
  margin: 14px 0 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

/* ================================================
   規格格線
   ================================================ */
.car-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.car-specs-grid .spec-item {
  background: #f8f7f4;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #f0ede6;
}

.car-specs-grid .spec-item.spec-full-width {
  grid-column: 1 / -1;
}

.spec-label {
  display: block;
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.spec-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}

/* ================================================
   輔助文字
   ================================================ */
.trans-code-text,
.dim-x {
  font-size: 12px;
  color: #aaa;
  font-weight: 400;
}

.tax-info-text {
  font-size: 11.5px;
  color: #888;
  margin-top: 5px;
  line-height: 1.55;
}

/* 里程查核徽章 */
.miles-verified-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #1a6b33;
  background: #d4edda;
  border-radius: 20px;
  padding: 2px 9px;
  margin-top: 5px;
  font-weight: 500;
}

/* ================================================
   油耗區塊
   ================================================ */
.fuel-data-box {
  background: linear-gradient(135deg, #eef5ff 0%, #f0f8f4 100%);
  border: 1px solid #cce0f5;
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
}

.fuel-box-title {
  font-size: 12px;
  font-weight: 700;
  color: #2a6496;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.fuel-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fuel-stat-item {
  background: #fff;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.fuel-label {
  display: block;
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}

.fuel-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1a6b33;
  line-height: 1.2;
}

.fuel-value small {
  font-size: 11px;
  font-weight: 400;
  color: #999;
}

/* 油耗三格字體統一 */
.fuel-stat-item .fuel-value,
.primary-stat .fuel-value {
  font-size: 18px !important;
  color: #1a6b33 !important;
}

/* ================================================
   內容段落區塊（詳細頁專用）
   ================================================ */
.car-content-sections {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eeebe4;
  margin-top: 14px;
}

/* 詳細頁的 .car-section：加 .single-cars 前綴，避免與列表頁衝突 */
body.single-cars .car-section {
  background: #fff;
  padding: 16px;
  border-bottom: 1px solid #f0ede8;
}

body.single-cars .car-section:last-child {
  border-bottom: none;
}

.car-section-title {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #aaa !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px !important;
  display: flex;
  align-items: center;
  gap: 6px;
}

.car-section-title i {
  font-size: 14px;
}

.car-wysiwyg {
  font-size: 14px;
  color: #333;
  line-height: 1.75;
}

/* ================================================
   車輛狀況：帶左邊框引用塊
   ================================================ */
.condition-callout {
  background: #f8f7f4;
  border-left: 3px solid #3B6D11;
  border-radius: 0 8px 8px 0;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.75;
  color: #222;
}

/* ================================================
   重點配備：膠囊標籤
   ================================================ */
.equip-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.equip-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f2f8ec;
  border: 1px solid #c0dd97;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  color: #3B6D11;
  font-weight: 500;
}

.equip-tag i {
  font-size: 12px;
}

/* ================================================
   驗車里程：驗證徽章
   ================================================ */
.miles-verify-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #EAF3DE;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.miles-verify-badge>i {
  font-size: 22px;
  color: #3B6D11;
  flex-shrink: 0;
}

.mvb-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #3B6D11;
}

.mvb-sub {
  display: block;
  font-size: 11px;
  color: #639922;
  margin-top: 2px;
}

.miles-proof-img img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e5e3dc;
}

/* ================================================
   整備項目：打勾清單
   ================================================ */
.recon-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recon-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #222;
}

.recon-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #EAF3DE;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recon-check i {
  font-size: 13px;
  color: #3B6D11;
}

/* ================================================
   里程圖片
   ================================================ */
.miles-proof-img img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e3dc;
}

/* ================================================
   商用載重（若有）
   ================================================ */
.payload-box {
  grid-column: 1 / -1;
}

.payload-grid {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.payload-stat {
  flex: 1;
  text-align: center;
}

.p-label {
  display: block;
  font-size: 11px;
  color: #999;
}

.p-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.highlight-payload .p-value {
  color: #c0392b;
  font-weight: 700;
}

/* ================================================
   手機版調整
   ================================================ */
@media (max-width: 480px) {
  .car-specs-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .fuel-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .car-main-card {
    border-radius: 12px;
    padding: 14px 12px;
  }
}

@media (max-width: 768px) {

  /* 主卡片貼邊 */
  .car-main-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 12px;
  }

  /* 段落區塊貼邊 */
  body.single-cars .car-section {
    padding-left: 4px;
    padding-right: 4px;
  }

  /* 主題內距縮小 */
  body.single-cars .entry-content,
  body.single-cars .post-content {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  /* 主容器不加 padding */
  .car-single-wrap {
    padding: 0 !important;
  }

  /* 縮左右邊界 */
  body.single-cars #primary,
  body.single-cars .content-area {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  body.single-cars .inside-article {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}

/* ================================================
   車輛詳細頁 - 字體整體放大（長輩友善）
   ================================================ */
body.single-cars .car-specs-grid,
body.single-cars .car-wysiwyg,
body.single-cars .car-section,
body.single-cars .fuel-data-box {
  font-size: 24px;
}

body.single-cars .spec-value {
  font-size: 17px !important;
}

body.single-cars .spec-label {
  font-size: 14px !important;
}

body.single-cars .fuel-value {
  font-size: 22px !important;
}

body.single-cars .car-wysiwyg {
  font-size: 20px !important;
  line-height: 1.85;
}

/* ================================================
   車輛詳細頁 - 價格擺放
   ================================================ */
.car-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 20px;
  margin-bottom: 20px;
  background: #f0fdf4;
  /* 淡綠底，視覺錨點 */
  border-left: 4px solid #16a34a;
  border-radius: 8px;
}

.car-price-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.car-price-value {
  font-size: 28px;
  font-weight: 700;
  color: #15803d;
  line-height: 1.1;
}

.car-price-value small {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
}

.car-price-ref {
  font-size: 12px;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 1px dashed #9ca3af;
  margin-top: 4px;
}
