:root {
  --accent: #2f6f8f;
  --bg: #f6f8fa;
  --card: #ffffff;
  --text: #1d2730;
  --muted: #5d6b78;
  --line: #dde3e9;
  --danger: #b3261e;
  --ok: #2e7d32;
  --radius: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* header */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.sitenav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.sitenav a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: .95rem; }
.sitenav a.active { background: var(--accent); color: #fff; }

/* hero */
.hero { background: linear-gradient(135deg, var(--accent), #12212b); color: #fff; padding: 56px 0 72px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero p { margin: 0; opacity: .9; max-width: 640px; }
.hero .meta { margin-top: 16px; font-size: .9rem; opacity: .8; }

main { margin-top: -40px; padding-bottom: 64px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.card h2 { margin: 0 0 16px; font-size: 1.25rem; }
.step { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; align-items: center; justify-content: center; font-size: .85rem; margin-right: 8px; }

/* form */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { min-height: 80px; resize: vertical; }
.btn {
  display: inline-block; border: 0; background: var(--accent); color: #fff; padding: 12px 22px;
  border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.small { padding: 6px 14px; font-size: .9rem; }

/* items */
.items { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.item { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.item.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.item.soldout { opacity: .5; }
.item h3 { margin: 0; font-size: 1.05rem; }
.item .desc { color: var(--muted); font-size: .9rem; flex: 1; }
.price { font-weight: 700; font-size: 1.1rem; }
.price small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.badge { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: #eef2f5; color: var(--muted); }
.badge.low { background: #fff1e6; color: #9a4a00; }
.badge.out { background: #fde8e7; color: var(--danger); }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.1rem; cursor: pointer; }
.qty span { min-width: 24px; text-align: center; font-weight: 600; }

/* summary */
.summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.summary .total { font-size: 1.5rem; font-weight: 700; }
.lines { margin: 0 0 12px; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.lines li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 6px 0; }

.notice { padding: 12px 16px; border-radius: 8px; background: #eef2f5; font-size: .95rem; }
.notice.error { background: #fde8e7; color: var(--danger); }
.notice.ok { background: #e7f4e8; color: var(--ok); }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.done { text-align: center; padding: 40px 24px; }
.done .code { font-size: 1.8rem; font-weight: 700; letter-spacing: .05em; margin: 8px 0 16px; }
.crosssell { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; text-align: left; }
.crosssell a { display: block; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); text-decoration: none; color: var(--text); background: #fff; }
.crosssell a strong { display: block; }

footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .9rem; background: var(--card); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; }

@media (max-width: 600px) {
  .card { padding: 18px; }
  .sitenav { margin-left: 0; }
}

/* 付款方式 */
.paybox { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 16px 0 0; }
.paybox legend { color: var(--muted); font-size: .9rem; padding: 0 4px; }
.payopt { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 1rem; margin: 6px 0; cursor: pointer; }
.payopt input { width: auto; }
.badge.ok { background: #e7f4e8; color: var(--ok); }

/* 雪具：租借者卡片與品項勾選 */
.renter { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; background: #fbfcfd; }
.renter-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.gearpick { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 14px; }
.gearopt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; cursor: pointer; color: var(--text); margin: 0; }
.gearopt.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.gearopt input { width: auto; flex-shrink: 0; }
.gearopt > span:nth-of-type(1) { flex: 1; display: flex; flex-direction: column; font-size: .95rem; }
.gearopt small { color: var(--muted); font-weight: 400; font-size: .8rem; }
.gearopt .price { font-size: .95rem; white-space: nowrap; }
