
/* 版面概念：左側是用途與品牌的入口，右側是可直接加入詢價的規格列。像工具型錄，不像宣傳頁。 */
:root {
  --bg: #14171a;
  --surface: #1c2024;
  --surface-2: #252a2f;
  --line: #333a41;
  --fg: #e8ebed;
  --muted: #98a1a9;
  --steel-hi: #d5dadf;
  --steel-lo: #7d868e;
  --accent: #ff7a1a;
  --accent-fg: #1b1005;
  --ok: #5fc58b;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --font-display: "Barlow Condensed", "Noto Sans TC", sans-serif;
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eceff1; --surface: #ffffff; --surface-2: #e2e6e9; --line: #ccd2d7;
    --fg: #1a1e22; --muted: #566069; --steel-hi: #f4f6f7; --steel-lo: #8a949c;
    --accent: #d65c00; --accent-fg: #ffffff; --ok: #1f8a52; --shadow: 0 10px 30px rgba(20,30,40,.18);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #eceff1; --surface: #ffffff; --surface-2: #e2e6e9; --line: #ccd2d7;
  --fg: #1a1e22; --muted: #566069; --steel-hi: #f4f6f7; --steel-lo: #8a949c;
  --accent: #d65c00; --accent-fg: #ffffff; --ok: #1f8a52; --shadow: 0 10px 30px rgba(20,30,40,.18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.2; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 20px; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.eyebrow { font-size: 12px; letter-spacing: .14em; color: var(--muted); font-weight: 500; }

/* ── header ── */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.logo { font-size: 22px; font-weight: 700; letter-spacing: .5em; text-decoration: none; padding-left: .5em; white-space: nowrap; }
.logo small { display: block; font: 500 10px/1 var(--font-display); letter-spacing: .28em; color: var(--muted); margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 4px; color: var(--muted); font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); background: var(--surface-2); }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--accent); background: transparent; color: var(--accent); padding: 8px 14px; border-radius: 4px; cursor: pointer; font-weight: 700; white-space: nowrap; }
.cart-btn:hover { background: var(--accent); color: var(--accent-fg); }
.cart-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding-inline: 6px; border-radius: 12px; background: var(--accent); color: var(--accent-fg); font: 700 15px/1 var(--font-display); }
.cart-btn:hover .cart-count { background: var(--accent-fg); color: var(--accent); }
@keyframes bump { 40% { transform: scale(1.35); } }
.bump { animation: bump .35s; }

/* ── hero ── */
.hero { border-bottom: 1px solid var(--line); background:
  radial-gradient(900px 420px at 88% 0%, color-mix(in srgb, var(--steel-lo) 22%, transparent), transparent 70%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 32px; align-items: center; padding-block: 52px 56px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 700; letter-spacing: .02em; margin: 14px 0 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { color: var(--muted); max-width: 34em; }
.search { display: flex; gap: 0; margin-top: 26px; max-width: 520px; }
.search input { flex: 1; min-width: 0; padding: 13px 14px; background: var(--surface); border: 1px solid var(--line); border-right: 0; border-radius: 4px 0 0 4px; }
.search button { padding: 0 20px; background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 0 4px 4px 0; font-weight: 700; cursor: pointer; white-space: nowrap; }
.search-hints { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 3px 10px; border-radius: 99px; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.hero-blade { justify-self: center; width: min(100%, 360px); }
/* hero slides */
.hero-slides { width: 100%; }
.hs-stage { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #15181c; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.hs { position: absolute; inset: 0; padding: 0; border: 0; background: transparent; cursor: pointer; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.hs.on { opacity: 1; pointer-events: auto; }
.hs img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hs.contain img { object-fit: contain; }
.hs-cap { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; min-height: 1.5em; }
.hs-cap b { color: var(--fg); font-family: inherit; letter-spacing: .02em; }
.hs-dots { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
.hd { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.hd::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--line); transition: background .2s, transform .2s; }
.hd.on::after { background: var(--accent); transform: scale(1.25); }
@media (prefers-reduced-motion: reduce) { .hs { transition: none; } .bump { animation: none; } html { scroll-behavior: auto; } }

/* ── sections ── */
.section { padding-block: 56px; border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 700; }
.section-head p { color: var(--muted); max-width: 36em; }
.use-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.use-tile { text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: start; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; transition: border-color .15s, transform .15s; }
.use-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.use-tile h3 { font-size: 19px; font-weight: 700; }
.use-tile .count { font-family: var(--font-display); font-size: 34px; line-height: 1; color: var(--accent); font-weight: 600; }
.use-tile .count small { font: 500 12px var(--font-body); color: var(--muted); margin-left: 3px; }
.use-tile p { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; }
.brand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.brand-card { text-align: left; padding: 22px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.brand-card:hover { border-color: var(--steel-hi); }
.brand-card h3 { font: 700 26px/1.1 var(--font-display); letter-spacing: .06em; }
.brand-card .zh { font-size: 14px; color: var(--muted); margin-top: 4px; }
.brand-card .n { margin-top: 18px; font-size: 13px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.step { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.step::before { counter-increment: s; content: counter(s); font: 700 34px/1 var(--font-display); color: var(--accent); display: block; margin-bottom: 8px; }
.step h3 { font-size: 17px; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 14px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.about-grid p { color: var(--muted); max-width: 40em; }
.cat-list { display: grid; gap: 10px; }
.cat-list div { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.cat-list b { display: block; margin-bottom: 2px; }
.cat-list span { color: var(--muted); }
.video-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.video { position: relative; aspect-ratio: 16 / 10; display: grid; align-content: end; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.video:hover, .video:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.video .play { position: absolute; left: 50%; top: 40%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: var(--accent); }
.video .play::after { content: ''; position: absolute; left: 20px; top: 15px; border-left: 16px solid var(--accent-fg); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.video b { font-size: 15px; }
.video span { font-size: 12px; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.contact-item { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; }
.contact-item .eyebrow { margin-bottom: 6px; }
.contact-item .val { font-weight: 500; user-select: all; }
.contact-item button { margin-top: 10px; }
.btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); padding: 7px 14px; border-radius: 4px; cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--steel-hi); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); }
footer { padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 13px; }

/* ── products view ── */
.crumb { padding-block: 22px 6px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; justify-content: space-between; }
.crumb h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; }
.crumb p { color: var(--muted); font-size: 14px; }
.shop { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; padding-block: 18px 64px; }
.filters { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); display: grid; gap: 22px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; max-height: calc(100vh - 100px); overflow: auto; }
.filters label.field, .filters .grp-title { font-size: 12px; letter-spacing: .12em; color: var(--muted); font-weight: 500; display: block; margin-bottom: 8px; }
.filters input[type=search] { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; }
.opt-list { display: grid; gap: 4px; }
.opt { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; padding: 7px 10px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.opt:hover { background: var(--surface-2); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 700; }
.opt .c { color: var(--muted); font: 500 15px var(--font-display); }
.filter-toggle { display: none; }
.f-body { display: grid; gap: 22px; }
.result-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.result-bar b { color: var(--fg); font-family: var(--font-display); font-size: 20px; }
.group { margin-bottom: 26px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow: clip; }
.group-head { padding: 16px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.group-head h2 { font-size: 18px; font-weight: 700; }
.group-meta { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--muted); }
.group-meta b { color: var(--fg); font-weight: 500; }
.row { display: grid; grid-template-columns: 46px minmax(0, 1.1fr) minmax(0, 1.9fr) minmax(0, .9fr) minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.row.nometa { grid-template-columns: 46px minmax(0, 1.1fr) minmax(0, 2.6fr) 0 minmax(0, 1fr) auto; }
.group-head + .row { border-top: 0; }
.row:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.glyph { width: 44px; height: 44px; }
.glyph svg { width: 100%; height: 100%; display: block; }
.r-name { min-width: 0; }
.r-name .code { font: 600 19px/1.2 var(--font-display); letter-spacing: .04em; overflow-wrap: anywhere; }
.r-name .sub { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.r-spec { font: 500 17px/1.35 var(--font-display); letter-spacing: .02em; overflow-wrap: anywhere; }
.r-spec .nw { white-space: nowrap; }
.r-spec small { display: block; font: 400 12.5px/1.4 var(--font-body); color: var(--muted); letter-spacing: 0; }
.r-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 12px; border: 1px solid var(--line); color: var(--fg); margin-bottom: 3px; }
.tag.warn { border-color: var(--accent); color: var(--accent); }
.r-opts { display: grid; gap: 6px; min-width: 0; }
.r-opts label { font-size: 12px; color: var(--muted); display: grid; gap: 2px; }
.r-opts select.need { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.r-opts select { width: 100%; min-width: 0; padding: 6px 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; font-size: 13px; }
.r-act { display: flex; gap: 6px; align-items: center; }
.qty { width: 62px; padding: 8px; text-align: center; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; font-variant-numeric: tabular-nums; }
.add { padding: 8px 14px; border-radius: 4px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-weight: 700; cursor: pointer; white-space: nowrap; }
.add:hover { background: var(--accent); color: var(--accent-fg); }
.in-cart { font-size: 12px; color: var(--ok); grid-column: 1 / -1; text-align: right; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; }
.note { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ── cart drawer ── */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 50; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 20px; }
.drawer-body { flex: 1; overflow: auto; padding: 14px 18px; display: grid; gap: 10px; align-content: start; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.cart-line .t { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.cart-line .d { grid-column: 1; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.cart-line .d .unset { color: var(--accent); }
.cart-line .q { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 6px; }
.cart-line .q input { width: 56px; padding: 6px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.x { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; padding: 4px 8px; }
.x:hover { color: var(--accent); }
.drawer-foot { border-top: 1px solid var(--line); padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; max-height: 58%; overflow: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-grid .full { grid-column: 1 / -1; }
.fld { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.fld input, .fld textarea { width: 100%; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; font-size: 14px; color: var(--fg); }
.fld textarea { min-height: 62px; resize: vertical; }
.fld .err { color: var(--accent); }
.preview-note { font-size: 12.5px; color: var(--muted); }
.done pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 12px; font: 13px/1.6 var(--font-body); max-height: 48vh; overflow: auto; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 4px; font-weight: 500; box-shadow: var(--shadow); }


.thumb { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; overflow: hidden; cursor: zoom-in; background: #000; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { border-color: var(--accent); }
.scrim.z { z-index: 70; }
.lightbox { position: fixed; z-index: 71; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(94vw, 640px); max-height: 92vh; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.lb-close { position: absolute; top: 6px; right: 8px; z-index: 2; background: rgba(0,0,0,.55); color: #fff; border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; }
.lb-img { background: #050607; display: grid; place-items: center; min-height: 0; }
.lb-img img { max-width: 100%; max-height: 68vh; object-fit: contain; display: block; }
.lb-bar { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; }
.lb-tabs { display: flex; gap: 6px; }
.lb-tab { padding: 5px 14px; border-radius: 99px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 14px; }
.lb-tab[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 700; }
.lb-cap { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.lb-cap b { color: var(--fg); font-size: 18px; }

/* ── narrow ── */
@media (max-width: 1020px) {
  .row { grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-areas: "g n a" "s s s" "m m m" "o o o"; }
  .row .glyph { grid-area: g; } .row .r-name { grid-area: n; } .row .r-act { grid-area: a; }
  .row .r-spec { grid-area: s; } .row .r-meta { grid-area: m; } .row .r-opts { grid-area: o; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .use-grid, .brand-grid, .steps, .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-grid, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-blade { width: min(100%, 300px); order: -1; justify-self: center; }
  .shop { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; max-height: none; }
  .filters.collapsed .f-body { display: none; }
  .filter-toggle { display: inline-flex; justify-content: space-between; width: 100%; }
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
  .header-row { flex-wrap: wrap; padding-top: 8px; gap: 8px 12px; }
  .cart-btn { margin-left: auto; }
}
@media (max-width: 560px) {
  .use-grid, .brand-grid, .steps, .contact-grid, .video-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .r-act .qty { width: 54px; }
}

/* 正式版：影片縮圖、防機器人欄位、送出錯誤 */
.video { padding: 0; overflow: hidden; cursor: pointer; font: inherit; text-align: left; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video b { position: relative; align-self: end; padding: 28px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.78)); color: #fff; }
.video .play { top: 42%; }
.video.playing { padding: 0; cursor: default; }
.video.playing iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send-err { margin: 8px 0 0; color: #ff8b6b; font-size: 13.5px; }
#ts { margin: 8px 0; }
