/* 跑鞋比對頁（compare.php，8 語系共用）— 2026-11 */
.cmp-page { --ink:#0f172a; --sub:#64748b; --line:#e2e8f0; --bg:#f6f8fb; --blue:#2563eb; --green:#059669; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; max-width: 1240px; }
.cmp-page h1 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; letter-spacing: -.01em; margin: 0; }
.cmp-page h1 i { color: var(--blue); }
.cmp-page > .alert-warning { border: 0; border-radius: 14px; background: #fffbeb; color: #92400e; font-size: 14px; }
.cmp-page .btn-secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--line); border-radius: 12px; font-weight: 700; }
.cmp-page .btn-secondary:hover { border-color: var(--blue); color: var(--blue); background: #eff6ff; }

.cmp-tools { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.cmp-switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; cursor: pointer; margin: 0; user-select: none; }
.cmp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cmp-switch span { position: relative; width: 42px; height: 24px; border-radius: 999px; background: #cbd5e1; transition: background .15s; flex: none; }
.cmp-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.cmp-switch input:checked + span { background: var(--blue); }
.cmp-switch input:checked + span::after { transform: translateX(18px); }
.cmp-switch input:focus-visible + span { outline: 3px solid #93c5fd; outline-offset: 2px; }

.cmp-page .table-responsive { background: #fff; border-radius: 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 28px rgba(15,23,42,.06); max-height: 80vh; overflow: auto; }
.cmp-page .compare-table { border-collapse: separate !important; border-spacing: 0; margin: 0 !important; font-size: 14px; }
.cmp-page .compare-table th, .cmp-page .compare-table td { border: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 12px 14px !important; vertical-align: middle; background: #fff; }
.cmp-page .compare-table tbody th { position: sticky; left: 0; z-index: 2; background: var(--bg) !important; color: #334155; font-weight: 700; font-size: 13px; white-space: nowrap; width: 130px; }
.cmp-page .compare-table tbody th[colspan] { position: static; background: #fff !important; color: var(--blue) !important; font-size: 12px !important; text-transform: uppercase; letter-spacing: .06em; padding-top: 22px !important; }
.cmp-page .compare-table thead th { position: sticky; top: 0; z-index: 3; background: #fff !important; border-bottom: 2px solid var(--line) !important; }
.cmp-page .compare-table thead th:first-child { left: 0; z-index: 4; background: var(--bg) !important; }
.cmp-page .compare-table tbody td { text-align: center; font-variant-numeric: tabular-nums; min-width: 170px; }
.cmp-page .compare-table tbody tr:hover td { background: #f8fbff; }
.cmp-page .compare-shoe-card { position: relative; text-align: center; min-width: 170px; }
.cmp-page .compare-shoe-card img { width: 140px !important; height: 105px !important; max-height: none !important; object-fit: contain; mix-blend-mode: multiply; border: 0 !important; }
.cmp-page .compare-shoe-card h5 { font-size: 12px !important; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: .04em; margin: 6px 0 2px; }
.cmp-page .compare-shoe-card p strong { font-size: 16px; }
.cmp-page .compare-shoe-card .btn { border-radius: 10px; font-weight: 700; }
.cmp-remove { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--bg); color: var(--sub); font-size: 18px; line-height: 1; cursor: pointer; }
.cmp-remove:hover { background: #fee2e2; color: #b91c1c; }
.cmp-page td.cmp-best { background: #ecfdf5 !important; color: #047857; font-weight: 800; }
.cmp-page td.cmp-best::after { content: ' ★'; color: #10b981; font-size: 11px; }
.cmp-page .compare-table .badge { border-radius: 999px; font-weight: 700; background: var(--bg); color: #334155; padding: 4px 8px; margin: 2px; }
.cmp-page .card { border: 0; border-radius: 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 28px rgba(15,23,42,.06); overflow: hidden; }
.cmp-page .card > .card-header { background: #fff !important; color: var(--ink) !important; border-bottom: 1px solid var(--line); padding: 16px 22px; }
.cmp-page .card > .card-header h5 { font-weight: 800; }
.cmp-page .card > .card-header i { color: var(--blue); }
@media (max-width: 767px) {
    .cmp-page .d-flex.mb-4 { flex-wrap: wrap; gap: 10px; }
    .cmp-page .compare-table tbody th { width: 92px; white-space: normal; font-size: 12px; }
    .cmp-page .compare-table tbody td, .cmp-page .compare-shoe-card { min-width: 140px; }
    .cmp-page .compare-shoe-card img { width: 110px !important; height: 82px !important; }
}
