:root{
  --chip-blue-bg:#ffe5e5;
  --chip-blue-border:#c38181;
  --chip-text:#1f2a44;
  --crumb-bg:#fff8d5;
  --brand-red:#d53838;
}

/* ================= 基本版面 ================= */
.exam-page{padding:32px 0 80px;}
.exam-page .container{max-width:1200px}
.exam-breadcrumb{background:var(--crumb-bg);border-radius:10px;padding:10px 14px;font-size:14px;color:#6b7280}
.exam-breadcrumb a{color:#3b82f6;text-decoration:none}
.exam-breadcrumb a:hover{text-decoration:underline}
.exam-heading{margin:22px 0 18px}
.exam-title{font-size:24px;font-weight:700;color:#111827;margin:0;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.exam-title .tag{color:var(--brand-red);font-weight:800}
.exam-hr{width:100%;height:3px;background:var(--brand-red);margin-top:12px;border-radius:2px}
.course-grid{display:grid;gap:35px;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));margin:24px}
.course-card{background:#fff;border:2px solid #e5e7eb;border-radius:14px;box-shadow:var(--card-shadow);overflow:hidden;transition:transform .15s ease,box-shadow .15s ease}
.course-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(0,0,0,.10)}
.course-thumb{display:block;position:relative;overflow:hidden;aspect-ratio:16/9;background:#e5e7eb}
.course-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.course-body{padding:14px 16px 12px}
.course-name{font-size:16px;font-weight:700;color:#1f2937;margin:0 0 10px}
.course-name a{color:inherit;text-decoration:none}
.course-name a:hover{color:var(--brand-red)}
.course-meta{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:#6b7280}
.course-price{font-weight:800;color:#d53838;font-size:18px}
.section-title{font-weight:800;color:#111827;font-size:18px;margin:18px 0 -10px 6px}
.search-wrap{margin-left:auto;display:flex;gap:8px;align-items:center}
.search-input{height:36px;border:1px solid #cfd7e6;border-radius:10px;padding:0 10px;font-size:18px;}
.kw-label{font-size:14px;font-weight:600;color:#374151}
@media (max-width:576px){.exam-title{font-size:20px}}
.exam-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));margin:14px}
.exam-chip{display:flex;align-items:center;justify-content:center;min-height:56px;padding:12px 14px;border-radius:16px;font-weight:700;letter-spacing:.5px;text-decoration:none;text-align:center;color:var(--chip-text);border:2px solid var(--chip-blue-border);background:var(--chip-blue-bg);margin:0 5pt;font-size:1rem;cursor:pointer;user-select:none;transition:transform .12s ease,box-shadow .12s ease,background-color .12s ease,color .12s ease,border-color .12s ease}
.exam-chip:hover{transform:translateY(-2px)}
@media (max-width: 768px) {
  .exam-title { justify-content: center; text-align: center; }
  .search-wrap { width: 100%; display: flex; justify-content: center; margin-top: 10px; }
  .search-input { width: 80%; max-width: 400px; }
}

/* ================= 價格版面） ================= */

/* 價格容器 */
.price-box {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 6px;
  min-height: 52px; /* 固定高度避免跳動 */
}

/* 左：原價（灰色 + 刪除線） */
.price-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 48px; /* 固定高度避免右側往下掉 */
}

.price-left-line {
  font-size: 13px;
  color: #9ca3af;
  white-space: nowrap;
}

/* 當沒有原價時，用透明文字佔位避免版面亂跑 */
.price-left-placeholder {
  font-size: 13px;
  color: transparent; 
  user-select: none;
}

/* 右：售價 / 特價 */
.price-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

/* 每列：小字 + 大字 */
.price-right-line {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

/* 小字 */
.price-right-small {
  font-size: 13px;
  font-weight: 600;
  margin-right: 4px;
}

/* 小字：售價(黑) 與 特價(紅) */
.price-right-small--plain { color: #111; }
.price-right-small--sale  { color: #d53838; }

/* 大字 */
.price-right-big {
  font-size: 22px;
  font-weight: 800;
}

/* 大字：售價(黑) 與 特價(紅) */
.price-right-big--plain { color: #111; }
.price-right-big--sale  { color: #d53838; }