/* 地板比較表 —— 客人頁面和後台共用（顏色變數兩邊都有定義） */
.cmp-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 12px; cursor: pointer; }
.cmp-toggle input { width: auto; margin: 0; }

.cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp { border-collapse: collapse; width: 100%; table-layout: fixed; }
.cmp.cols-2 { min-width: 520px; }
.cmp.cols-3 { min-width: 680px; }
.cmp th, .cmp td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-size: 0.9rem; line-height: 1.5; }

/* 左側欄位名稱：橫向捲動時固定在左邊 */
.cmp thead th:first-child, .cmp tbody th { width: 112px; position: sticky; left: 0; background: var(--paper); z-index: 1; }
.cmp tbody th { color: var(--ink-soft); font-weight: 600; font-size: 0.82rem; }

.cmp thead th { border-bottom: 2px solid var(--wood-light); vertical-align: bottom; }
.cmp thead img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: var(--cream); border-radius: 8px; display: block; margin-bottom: 8px; user-select: none; -webkit-user-drag: none; }
.cmp-noimg { width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; margin-bottom: 8px; background: linear-gradient(135deg, var(--ph-a, #ede3d3), var(--ph-b, #dcc9a9)); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: var(--ink-soft); font-weight: 400; }
.cmp-name { font-weight: 700; font-size: 0.98rem; color: var(--ink); }

/* 各款不一樣的列：淡淡的底色，一眼看出差異 */
.cmp tr.diff td, .cmp tr.diff th[scope="row"] { background: var(--diff-bg, #fbf3e4); }
.cmp tr.diff th[scope="row"] { color: var(--wood-dark); }
.cmp.only-diff tbody tr:not(.diff) { display: none; }

.cmp-chip { display: inline-block; background: var(--cream); border: 1px solid var(--border); color: var(--wood-dark); font-size: 0.78rem; padding: 1px 8px; border-radius: 999px; margin: 0 4px 4px 0; }
.cmp-empty { color: #b8a998; }
.cmp-price { color: var(--wood-dark); font-size: 1.05rem; letter-spacing: 0.04em; }

@media (max-width: 480px) {
  .cmp thead th:first-child, .cmp tbody th { width: 84px; }
  .cmp th, .cmp td { padding: 8px; font-size: 0.85rem; }
}
