/* SaraHome / 莎拉家 — Desktop overrides (Plan C Plus §R-N+8xx+1, 2026-08-12)
   對位 §R-N+164 結構性反饋 chain + §R-N+290 style consistency + §R-N+420 scoped-ancestor pattern.

   Strategy: forward-only migration.
   0 抽 style.css 內既有 ≥769 @media block (對位 §7.1 cascade clobber, 88 @media block 跨度 10026 行 interleaved).
   純 forward-only: 新 desktop  寫入本 file, base.html 載入序 _base.css → desktop.css → style.css → mobile.css.

   Cascade 守住 (P131-G8 source-order):
   - _base.css 提供 :root token def + global reset + global components (header/footer/buttons/forms/flash)
   - desktop.css 提供 desktop chain (≥1024 breakpoint structural layout)
   - style.css 提供 page-specific content + desktop default + 既有 mobile chain (留 base chain chain)
   - mobile.css 提供 mobile-first chain (≤768 override, 對位 §R-N+347 mobile-first 守則)

   §R-N+420 scoped-ancestor 對位: 新 rule 用 `.desktop-scope .selector` 包裝提高 specificity 對抗 style.css base rule,
   避免撞到既有 selector (e.g. `.search-results .listing-grid-v2 { 1fr }` 喺 V25 ancestor-scoped).
*/

/* ============================================================
   Desktop breakpoint  真值 (§R-N+8xx+1, 2026-08-12)
   ============================================================ */

/* ============================================================
   §R-N+8xx+5 (2026-08-12) Plan C Plus C-5: desktop.css density chain
   對位 §P-MD-06 mobile-density chain + §R-N+164 結構性反饋 chain.

   Disk-truth  audit (2026-08-12 Playwright 375x667):
   - .hero-v3 40px (mobile.css 已收緊, desktop 待 ship)
   - .featured-v3 48px (mobile.css 已收緊, desktop 待 ship)
   - .categories-v3 48px (mobile.css 已收緊, desktop 待 ship)
   - .mortgage-inline-v3 48px (mobile.css 已收緊 1.5rem, ✅)
   - .site-footer 116px 🔴 (pb=96px desktop chain 結構性過鬆)
   ============================================================ */

@media (min-width: 769px) {
    /* Site footer 收緊 pb 96→48px (對位 mobile chain 20+48=68px 對齊) */
    .site-footer {
        padding: 1.25rem 0 3rem;
    }

    /* Hero / featured / categories / mortgage desktop 收緊
       統一 desktop chain, mobile chain 留 mobile.css */
    .hero-v3 {
        padding: 3rem 0 2rem;
    }
    .featured-v3 {
        padding: 2rem 0;
    }
    .categories-v3 {
        padding: 2rem 0;
    }
    .mortgage-inline-v3 {
        padding: 2rem 0;
    }
}

/* Container  (desktop ≥1024 收緊 layout) */
@media (min-width: 1024px) {
    .container {
        max-width: 1280px;
    }
}

/* Hero  (desktop ≥769) */
@media (min-width: 769px) {
    .hero-v3 {
        padding: 4rem 0 3rem;
    }
    .hero-v3-title {
        font-size: var(--sarahome-v3-font-xl);
    }
    .hero-v3-subtitle {
        font-size: 1.125rem;
    }
    .hero-v3-search-row {
        display: grid;
        grid-template-columns: 1fr 1fr auto;
        gap: var(--sarahome-v3-space-3);
        align-items: end;
    }
    .hero-v3-search-field-wide {
        grid-column: span 2;
    }
}

/* Featured grid — 欄數現由 css/style.css §R-N+4xxx+40 單一管理
   (base 4 欄 / tablet 769-1024 2 欄 / mobile ≤768 橫滑 rail)。
   2026-09-15 移除本檔 duplicate: desktop.css (769-1023 → 3 欄) 同 style.css
   (769-1024 → 2 欄) 兩層 overlap, 而 home.css (source-order 後於 style.css)
   再加一層 3 欄 → tablet 永遠 3 欄 (CEO「同精選一致」verdict 失效真因,
   live E2E 900px 實拍捕到; 對位 §R-N+416 結構性反饋 — 同一 selector 3 處定義)。 */

/* Categories grid  (desktop ≥769 6-col) */
@media (min-width: 769px) {
    .categories-v3-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: var(--sarahome-v3-space-4);
    }
}

/* Mortgage inline  (desktop ≥769 2-col) */
@media (min-width: 769px) {
    .mortgage-inline-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--sarahome-v3-space-8);
        align-items: start;
    }
    .mortgage-inline-fields {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--sarahome-v3-space-3);
    }
}

/* ============================================================
   Audit log
   ============================================================
   §R-N+8xx+1 (2026-08-12): desktop.css infrastructure ship
   - 對位 Plan C Plus stage C-1
   - Forward-only: 0 改 style.css
   - base.html 載入序 _base.css → desktop.css → style.css → mobile.css
   - Stage C-2: home.css 補完 hero/featured/categories  (本 file 唔重複)
*/