/* CardWise — WalletHub 風格（香港版） */
:root {
  --navy: #17406e;
  --navy-dark: #0d2b4d;
  --navy-light: #1f5c96;
  --orange: #f7a600;
  --orange-dark: #e08e00;
  --green: #1a9e5c;
  --red: #d9534f;
  --bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #1d2733;
  --text-light: #5a6b7b;
  --border: #e3e8ef;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(23, 64, 110, 0.08);
  --shadow-hover: 0 6px 24px rgba(23, 64, 110, 0.14);
  --font: "Helvetica Neue", Helvetica, Arial, "PingFang HK", "Microsoft JhengHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--navy-light); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; }

/* ===== Header ===== */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-logo { width: 34px; height: 34px; background: var(--orange); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.brand-name em { font-style: normal; color: var(--orange); }
.brand-badge { background: rgba(255,255,255,.18); padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { color: rgba(255,255,255,.82); padding: 8px 14px; border-radius: 8px; font-size: 14.5px; font-weight: 600; }
.main-nav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.main-nav a.active { background: var(--orange); color: var(--navy-dark); }

/* ===== Hero ===== */
.hero { background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%); color: #fff; padding: 64px 0 58px; position: relative; overflow: hidden; }
.hero::after { content: "💳"; position: absolute; right: -30px; bottom: -50px; font-size: 260px; opacity: .07; transform: rotate(-12deg); }
.hero h1 { font-size: 42px; font-weight: 800; line-height: 1.25; margin-bottom: 14px; letter-spacing: -.5px; }
.hero h1 .hl { color: var(--orange); }
.hero-sub { font-size: 17px; color: rgba(255,255,255,.85); margin-bottom: 28px; max-width: 640px; }
.hero-stats { display: flex; gap: 40px; margin-bottom: 30px; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 30px; font-weight: 800; color: var(--orange); }
.stat-label { font-size: 13px; color: rgba(255,255,255,.75); }
.search-box { max-width: 560px; position: relative; }
.search-box input { width: 100%; padding: 14px 20px 14px 46px; border-radius: 30px; border: none; font-size: 15px; background: rgba(255,255,255,.96); box-shadow: 0 4px 18px rgba(0,0,0,.18); outline: none; }
.search-box::before { content: "🔍"; position: absolute; left: 17px; top: 50%; transform: translateY(-50%); font-size: 16px; }

/* ===== Section common ===== */
.section { padding: 44px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 8px; }
.section-head h2 { font-size: 26px; font-weight: 800; color: var(--navy-dark); }
.section-head .link { font-size: 14px; font-weight: 700; }

/* ===== Spotlight (速覽) ===== */
.spotlight-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.spot-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; gap: 14px; align-items: flex-start; transition: box-shadow .2s, transform .2s; }
.spot-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.spot-badge { background: var(--orange); color: var(--navy-dark); font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 20px; display: inline-block; margin-bottom: 8px; }
.spot-card img { width: 64px; height: 40px; object-fit: contain; border-radius: 6px; background: #fff; }
.spot-name { font-size: 15.5px; font-weight: 700; line-height: 1.35; color: var(--navy-dark); }
.spot-meta { font-size: 12.5px; color: var(--text-light); margin-top: 3px; }
.spot-rating { font-size: 13px; font-weight: 800; color: var(--green); margin-top: 6px; }
.spot-rating .stars { color: var(--orange); }
.spot-link { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--navy-light); }

/* ===== Card block (WalletHub 大卡塊) ===== */
.card-block { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 24px; overflow: hidden; transition: box-shadow .2s; }
.card-block:hover { box-shadow: var(--shadow-hover); }
.cb-head { padding: 22px 26px 18px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cb-img { width: 84px; height: 53px; object-fit: contain; background: #fff; border-radius: 8px; }
.cb-title { flex: 1; min-width: 220px; }
.cb-bank { font-size: 12.5px; font-weight: 700; color: var(--navy-light); letter-spacing: .4px; text-transform: uppercase; }
.cb-name { font-size: 21px; font-weight: 800; color: var(--navy-dark); margin: 2px 0 4px; }
.cb-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 20px; background: #eef2f7; color: var(--navy); }
.tag.badge { background: var(--orange); color: var(--navy-dark); }
.cb-rating { text-align: center; min-width: 96px; }
.cb-score { font-size: 34px; font-weight: 800; color: var(--green); line-height: 1.1; }
.cb-score small { font-size: 15px; color: var(--text-light); font-weight: 600; }
.cb-rating-label { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }
.cb-stars { color: var(--orange); font-size: 14px; letter-spacing: 1px; }
.cb-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 700; border: none; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: var(--navy-dark); }
.btn-primary:hover { background: var(--orange-dark); color: var(--navy-dark); }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* 資料格 */
.cb-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fafbfd; }
.cb-fact { padding: 14px 20px; border-right: 1px solid var(--border); }
.cb-fact:nth-child(3n) { border-right: none; }
.cb-fact-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-light); margin-bottom: 3px; }
.cb-fact-value { font-size: 14.5px; font-weight: 700; color: var(--text); }
.cb-fact-value .sub { display: block; font-size: 12px; font-weight: 400; color: var(--text-light); }

/* Editors' Thoughts */
.cb-editor { padding: 20px 26px 22px; }
.cb-editor h4 { font-size: 15px; font-weight: 800; color: var(--navy-dark); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.cb-editor h4::before { content: "✍️"; }
.cb-editor p { font-size: 14.5px; color: var(--text); margin-bottom: 10px; }
.cb-pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 12px 0 4px; }
.cb-pc h5 { font-size: 13.5px; font-weight: 800; margin-bottom: 8px; }
.cb-pc.pros h5 { color: var(--green); }
.cb-pc.cons h5 { color: var(--red); }
.cb-pc ul { list-style: none; }
.cb-pc li { font-size: 13.5px; padding: 4px 0 4px 22px; position: relative; color: var(--text); }
.cb-pc.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.cb-pc.cons li::before { content: "✕"; position: absolute; left: 0; color: var(--red); font-weight: 800; }
.cb-who { margin-top: 14px; background: #f0f7f4; border-left: 4px solid var(--green); padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: 13.5px; }
.cb-who strong { color: var(--green); }

/* ===== Compare 頁 ===== */
.compare-layout { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: start; }
.filter-panel { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; position: sticky; top: 80px; }
.filter-panel h3 { font-size: 15px; font-weight: 800; color: var(--navy-dark); margin-bottom: 14px; border-bottom: 2px solid var(--orange); padding-bottom: 8px; display: inline-block; }
.filter-group { margin-bottom: 16px; }
.filter-group-label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-light); letter-spacing: .4px; margin-bottom: 7px; }
.filter-opt { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13.5px; cursor: pointer; }
.filter-opt input { accent-color: var(--navy); }
.filter-opt .cnt { margin-left: auto; color: var(--text-light); font-size: 12px; }
.filter-actions { display: flex; gap: 8px; margin-top: 6px; }
.filter-actions button { flex: 1; padding: 8px 0; border-radius: 8px; border: none; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-reset { background: #eef2f7; color: var(--navy); }
.btn-reset:hover { background: #dfe6ee; }

.compare-main { min-width: 0; }
.compare-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.compare-count { font-size: 14px; color: var(--text-light); font-weight: 600; }
.compare-sort select { padding: 9px 14px; border-radius: 8px; border: 1px solid var(--border); font-size: 13.5px; background: #fff; color: var(--text); cursor: pointer; }

/* 比較列表卡 */
.cmp-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 14px; display: flex; gap: 16px; align-items: center; }
.cmp-card img { width: 72px; height: 45px; object-fit: contain; }
.cmp-info { flex: 1; min-width: 0; }
.cmp-name { font-size: 16px; font-weight: 800; color: var(--navy-dark); }
.cmp-meta { font-size: 12.5px; color: var(--text-light); margin-top: 2px; }
.cmp-facts { display: flex; gap: 22px; margin-top: 8px; flex-wrap: wrap; }
.cmp-fact { font-size: 13px; }
.cmp-fact b { color: var(--navy-dark); }
.cmp-fact-label { display: block; font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: .3px; }
.cmp-rating { text-align: center; min-width: 70px; }
.cmp-score { font-size: 24px; font-weight: 800; color: var(--green); }
.cmp-stars { color: var(--orange); font-size: 12px; }
.cmp-action { display: flex; flex-direction: column; gap: 8px; }
.cmp-action .btn { padding: 8px 16px; font-size: 13px; white-space: nowrap; }

/* ===== Grid (首頁全部卡) ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.simple-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; transition: box-shadow .2s, transform .2s; cursor: pointer; }
.simple-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.simple-card img { width: 100%; height: 70px; object-fit: contain; margin-bottom: 12px; }
.simple-card .bank-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; }
.simple-card h3 { font-size: 15.5px; font-weight: 700; color: var(--navy-dark); line-height: 1.35; margin-bottom: 6px; }
.simple-card .simple-meta { font-size: 12.5px; color: var(--text-light); }
.simple-card .simple-rating { font-size: 13px; font-weight: 700; color: var(--green); margin-top: 6px; }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.tab { padding: 8px 16px; border-radius: 22px; border: 1.5px solid var(--border); background: #fff; font-size: 13.5px; font-weight: 700; color: var(--text-light); cursor: pointer; transition: all .15s; }
.tab:hover { border-color: var(--navy-light); color: var(--navy); }
.tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ===== Trust bar ===== */
.trust-bar { background: var(--navy); color: #fff; padding: 26px 0; }
.trust-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-icon { font-size: 24px; }
.trust-item h4 { font-size: 14.5px; font-weight: 800; margin-bottom: 3px; }
.trust-item p { font-size: 12.5px; color: rgba(255,255,255,.75); }

/* ===== Ad disclosure ===== */
.disclosure { background: #fff8ec; border: 1px solid #f0d9a8; border-radius: 8px; padding: 12px 16px; font-size: 12px; color: #7a6a45; margin: 18px 0; }

/* ===== Modal ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(13,43,77,.6); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-overlay[hidden] { display: none; }
.modal { background: #fff; border-radius: 14px; max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 26px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-close { position: absolute; top: 14px; right: 16px; background: #eef2f7; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 15px; cursor: pointer; color: var(--navy); }
.modal-close:hover { background: #dfe6ee; }
.modal-header { margin-bottom: 16px; padding-right: 40px; }
.modal-bank { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.modal-title { font-size: 22px; font-weight: 800; color: var(--navy-dark); margin: 2px 0 8px; }
.modal-img-wrap { text-align: center; margin: 10px 0; }
.modal-img-wrap img { height: 80px; object-fit: contain; }
.modal-section { margin-bottom: 14px; }
.modal-section h3 { font-size: 13px; font-weight: 800; color: var(--navy-light); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.modal-section ul { padding-left: 18px; font-size: 14px; }
.modal-section li { margin-bottom: 3px; }
.modal-welcome, .modal-rebate, .modal-income, .modal-fee { font-size: 14px; font-weight: 600; }
.modal-apply { display: block; text-align: center; background: var(--orange); color: var(--navy-dark); padding: 13px; border-radius: 10px; font-weight: 800; font-size: 15px; margin-top: 18px; }
.modal-apply:hover { background: var(--orange-dark); color: var(--navy-dark); text-decoration: none; }
.modal-source { font-size: 11.5px; color: var(--text-light); margin-top: 10px; word-break: break-all; }
.modal-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.modal-rating .score { font-size: 26px; font-weight: 800; color: var(--green); }
.modal-rating .stars { color: var(--orange); font-size: 15px; }
.modal-pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-pros-cons h4 { font-size: 13px; font-weight: 800; margin-bottom: 5px; }
.modal-pros-cons .pros h4 { color: var(--green); }
.modal-pros-cons .cons h4 { color: var(--red); }
.modal-pros-cons ul { padding-left: 18px; font-size: 13.5px; }
.modal-thoughts { background: #f5f8fc; border-radius: 10px; padding: 14px 16px; font-size: 14px; margin-bottom: 14px; border-left: 4px solid var(--navy-light); }

/* ===== Page hero (inner) ===== */
.page-hero { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: #fff; padding: 38px 0 34px; }
.page-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.page-hero .sub { color: rgba(255,255,255,.8); font-size: 15px; max-width: 720px; }
.page-hero .byline { margin-top: 12px; font-size: 12.5px; color: rgba(255,255,255,.65); }
.page-hero .byline b { color: var(--orange); }

/* ===== Footer ===== */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.75); padding: 40px 0 30px; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 30px; }
.footer-brand .brand-name { color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: rgba(255,255,255,.75); font-size: 14px; }
.footer-links a:hover { color: var(--orange); }
.footer-note { grid-column: 1 / -1; font-size: 12px; color: rgba(255,255,255,.5); border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; }

/* ===== Utils ===== */
.loading, .empty { text-align: center; padding: 50px 20px; color: var(--text-light); font-size: 15px; }
.empty .icon { font-size: 40px; display: block; margin-bottom: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 15px; border-radius: 20px; border: 1.5px solid var(--border); background: #fff; font-size: 13px; font-weight: 600; color: var(--text-light); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--navy-light); color: var(--navy); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

@media (max-width: 860px) {
  .hero h1 { font-size: 30px; }
  .cb-facts { grid-template-columns: repeat(2, 1fr); }
  .cb-fact:nth-child(3n) { border-right: 1px solid var(--border); }
  .cb-fact:nth-child(2n) { border-right: none; }
  .cb-pros-cons { grid-template-columns: 1fr; }
  .compare-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .cmp-card { flex-wrap: wrap; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .hero-stats { gap: 24px; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 8px 9px; font-size: 13px; }
}
