/* JJR 3D Studio · 前台樣式（依 web_design playbook 04/06/20 章）
   結構：reset → :root → header → hero → sections → cards → forms → cart/checkout → member → footer → motion → 所有 @media 集中最底部 */
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }   /* hidden 屬性優先，避免被 display:flex 蓋掉 */

:root {
  --brand: #ff6a2a;          /* 線材橘 */
  --brand-dark: #d9531b;
  --brand-soft: #fff1ea;
  --accent: #19b9c9;         /* 湖水綠 */
  --accent-dark: #128d9a;
  --ink: #14161c;            /* 主字 / 深色區 */
  --ink-2: #1f232c;
  --text: #1b1e24;
  --muted: #6b7280;
  --muted-2: #9aa0aa;
  --bg: #f6f7f9;
  --bg-2: #eef0f3;
  --card: #ffffff;
  --line: #e5e7eb;
  --line-2: #d6d9df;
  --ok: #2f9e5f;
  --danger: #d64545;
  --sb-thumb: #d4d1ca;
  --sb-thumb-hover: #9a978f;
  --r-sm: 8px; --r: 14px; --r-lg: 20px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --shadow: 0 16px 40px rgba(20,22,28,.10);
  --font-en: "Space Grotesk", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--sb-thumb) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sb-thumb); border-radius: 999px; border: 2px solid #fff; transition: background .2s ease; }
::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); }
::-webkit-scrollbar-corner { background: transparent; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, .hero-title, .section-title, .p-title, .pd-name, .page-hero h1 {
  font-family: var(--font-en);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.25;
  color: var(--ink);
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; }
:focus { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { box-shadow: 0 0 0 3px rgba(255,106,42,.28); border-radius: 6px; }

.section-inner, .nav, .footer-main, .footer-bottom { max-width: 1200px; margin: 0 auto; }

/* ---------- Notice bar ---------- */
.notice-bar {
  background: var(--ink); color: #fff; font-size: 13px; letter-spacing: .04em;
  text-align: center; padding: 8px 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.notice-bar strong { color: var(--brand); font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--line);
  /* 不用 backdrop-filter：會鎖住 fixed 抽屜（11-pitfalls） */
}
.nav {
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #ff9a5c);
  color: #fff; font-family: var(--font-en); font-weight: 700; font-size: 15px; letter-spacing: -.02em;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(255,106,42,.35);
  position: relative; overflow: hidden;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(255,255,255,.14) 3px 4px);
}
.brand-logo { height: 44px; width: auto; display: block; }
.brand-text h1 { font-size: 18px; letter-spacing: .02em; font-weight: 700; line-height: 1.1; }
.brand-text p { font-size: 11px; color: var(--muted); letter-spacing: .18em; text-transform: uppercase; font-family: var(--font-en); }

.menu { display: flex; gap: 2px; list-style: none; align-items: center; }
.menu > li { position: relative; }
.menu > li > a {
  display: block; text-decoration: none; color: var(--text);
  padding: 10px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: .02em;
  transition: all .25s var(--ease);
}
.menu > li > a:hover, .menu > li > a.active { background: var(--brand-soft); color: var(--brand-dark); }

/* 下拉（CSS hover，bridge 補滿間距，避免閃退） */
.has-dropdown > a::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
}
.nav-dropdown {
  position: absolute; top: calc(100% + 18px); left: -16px;
  min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 10px 0; z-index: 60;
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.nav-dropdown::before { content: ""; position: absolute; top: -18px; left: 0; width: 100%; height: 18px; background: transparent; }
.has-dropdown:hover .nav-dropdown, .has-dropdown:focus-within .nav-dropdown { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); transition: opacity .18s ease, transform .18s ease, visibility 0s linear 0s; }
.nav-dropdown a {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text);
  padding: 10px 16px 10px 32px; font-size: 14px; transition: background .15s, color .15s, padding-left .2s;
}
.nav-dropdown a:hover { background: var(--bg); color: var(--brand-dark); padding-left: 36px; }
.nav-dropdown a.dd-all { color: var(--brand-dark); font-family: var(--font-en); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; border-bottom: 1px solid var(--line); margin: 0 12px 6px; padding-left: 20px; }
.nav-dropdown a.dd-all:hover { padding-left: 20px; }
.dd-thumb { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; background: var(--bg-2); flex-shrink: 0; }

.nav-utility { display: flex; align-items: center; gap: 6px; margin-left: auto; padding-left: 16px; border-left: 1px solid var(--line); }
.util-item {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: var(--ink); text-decoration: none;
  position: relative; transition: all .2s;
}
.util-item:hover { background: var(--bg-2); transform: translateY(-1px); }
.util-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.cart-count {
  display: none; position: absolute; top: 0; right: -2px;
  min-width: 18px; height: 18px; padding: 0 5px; line-height: 18px; text-align: center;
  background: var(--brand); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700;
  border: 2px solid #fff; box-sizing: content-box; font-family: var(--font-en);
}
.cart-count.is-on { display: inline-block; }
.cart-count.bump { animation: bump .4s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.nav-toggle {
  display: none; width: 44px; height: 44px; background: transparent; border: none;
  cursor: pointer; padding: 0; position: relative; z-index: 110;
}
.nav-toggle span { display: block; position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); border-radius: 2px; transition: all .3s; }
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
.drawer-only { display: none; }
.nav-backdrop { position: fixed; inset: 0; background: rgba(20,22,28,.55); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 99; }
.nav-backdrop.show { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px; background: var(--brand); color: #fff; text-decoration: none;
  border-radius: 999px; font-weight: 600; font-size: 15px; letter-spacing: .04em;
  border: 1.5px solid var(--brand); cursor: pointer; transition: all .25s var(--ease);
  font-family: var(--font);
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255,106,42,.35); }
.btn-outline { background: transparent; color: var(--brand-dark); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; border-color: #000; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.btn-ghost { background: #fff; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--ink); background: #fff; color: var(--ink); box-shadow: none; }
.btn-light { background: #fff; border-color: #fff; color: var(--ink); }
.btn-light:hover { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-dark); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.link-btn { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px 8px; text-decoration: underline; font-size: 14px; }
.link-btn:hover { color: var(--danger); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 560px; display: flex; align-items: center;
  overflow: hidden; background: var(--ink); color: #fff;
}
.hero-large { min-height: calc(100vh - 70px); max-height: none; }   /* 電腦版滿版：header 約 74px，下方不露白 */
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(.5); animation: heroZoom 18s ease-out forwards; }
.hero-overlay { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(20,22,28,.85) 0%, rgba(20,22,28,.55) 45%, rgba(20,22,28,.15) 100%); }
.hero-glow { position: absolute; width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; right: -15vw; top: -20vw;
  background: radial-gradient(circle, rgba(255,106,42,.32) 0%, rgba(255,106,42,0) 60%); pointer-events: none; }
.hero-grid { position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 70% 50%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 30%, transparent 75%); }
@keyframes heroZoom { from { transform: scale(1.1); } to { transform: scale(1); } }
.hero-inner { position: relative; z-index: 1; max-width: 1200px; width: 100%; margin: 0 auto; padding: 100px 32px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; font-family: var(--font-en); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: #ffd2bf; margin-bottom: 22px; background: rgba(255,255,255,.04);
}
.hero-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(255,106,42,.25); }
.hero-title { color: #fff; font-size: clamp(38px, 6vw, 76px); line-height: 1.08; letter-spacing: -.01em; margin-bottom: 22px; max-width: 760px; }
.hero-title em { font-style: normal; color: var(--brand); }
.hero-sub { font-size: 17px; max-width: 560px; color: rgba(255,255,255,.78); margin-bottom: 34px; line-height: 1.9; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-large .hero-tag { animation: heroIn 1s var(--ease-out) backwards; }
.hero-large .hero-title { animation: heroIn 1s var(--ease-out) .1s backwards; }
.hero-large .hero-sub { animation: heroIn 1s var(--ease-out) .25s backwards; }
.hero-large .hero-actions { animation: heroIn 1s var(--ease-out) .4s backwards; }
@keyframes heroIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.hero-stats { display: flex; gap: 36px; margin-top: 48px; flex-wrap: wrap; animation: heroIn 1s var(--ease-out) .55s backwards; }
.hero-stat b { display: block; font-family: var(--font-en); font-size: 30px; color: #fff; line-height: 1; }
.hero-stat span { font-size: 13px; color: rgba(255,255,255,.6); letter-spacing: .06em; }
.hero-scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2; }
.hero-scroll span { display: block; width: 2px; height: 44px; background: linear-gradient(to bottom, transparent, var(--brand)); position: relative; overflow: hidden; }
.hero-scroll span::after { content: ""; position: absolute; left: 0; right: 0; top: -50%; height: 50%; background: var(--brand); animation: scrollDot 2s ease-in-out infinite; }
@keyframes scrollDot { 0% { top: -50%; } 100% { top: 100%; } }
/* three.js 版本：canvas 鋪滿 hero */
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-canvas-hint { position: absolute; right: 32px; bottom: 28px; z-index: 2; font-family: var(--font-en); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.5); display: flex; align-items: center; gap: 8px; }
.hero-canvas-hint::before { content: ""; width: 24px; height: 1px; background: rgba(255,255,255,.4); }

/* ---------- Page hero（內頁） ---------- */
.page-hero { position: relative; min-height: 300px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--ink); text-align: center; color: #fff; }
.page-hero .hero-bg { filter: brightness(.42); animation: none; }
.page-hero-inner { position: relative; z-index: 1; padding: 70px 24px; }
.page-hero .kicker { font-family: var(--font-en); font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 4.6vw, 50px); letter-spacing: .04em; }
.page-hero p { color: rgba(255,255,255,.72); margin-top: 12px; font-size: 15px; max-width: 620px; margin-left: auto; margin-right: auto; }
.breadcrumb { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: rgba(255,255,255,.55); margin-top: 18px; font-family: var(--font-en); }
.breadcrumb a { color: rgba(255,255,255,.75); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { opacity: .5; }

/* ---------- Sections ---------- */
.section { padding: 90px 32px; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark .section-title { color: #fff; }
.section-dark .section-desc { color: rgba(255,255,255,.7); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head.left { text-align: left; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section-kicker { font-family: var(--font-en); font-size: 12px; color: var(--brand-dark); letter-spacing: .26em; text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 14px; letter-spacing: -.005em; }
.section-desc { max-width: 680px; margin: 0 auto; color: var(--muted); }
.section-head.left .section-desc { margin: 0; }
.more-link { font-family: var(--font-en); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--ink); padding-bottom: 2px; white-space: nowrap; }
.more-link:hover { color: var(--brand-dark); border-color: var(--brand-dark); }
.layer-lines { background-image: repeating-linear-gradient(180deg, transparent 0 5px, rgba(20,22,28,.035) 5px 6px); }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cat-card {
  position: relative; display: block; text-decoration: none; color: #fff;
  border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/3; background: var(--ink-2);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,22,28,0) 35%, rgba(20,22,28,.85) 100%); }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.cat-card:hover img { transform: scale(1.06); }
.cat-body { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 1; }
.cat-body small { display: block; font-family: var(--font-en); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.cat-body h3 { color: #fff; font-size: 22px; margin-bottom: 4px; }
.cat-body p { font-size: 13px; color: rgba(255,255,255,.75); line-height: 1.6; }
.cat-body .arrow { position: absolute; right: 0; bottom: 4px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; transition: background .2s; }
.cat-card:hover .arrow { background: var(--brand); }
.cat-body .arrow svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; }

/* ---------- Product cards ---------- */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.p-card {
  background: var(--card); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.p-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.p-img { aspect-ratio: 1/1; overflow: hidden; background: var(--bg-2); position: relative; }
.p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.p-card:hover .p-img img { transform: scale(1.06); }
.p-badge { position: absolute; top: 12px; left: 12px; background: var(--brand); color: #fff; padding: 4px 10px; border-radius: 999px; font-family: var(--font-en); font-size: 11px; letter-spacing: .12em; font-weight: 700; z-index: 1; }
.p-badge.soldout { background: var(--ink); }
.p-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.p-cat { font-family: var(--font-en); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.p-title { font-size: 17px; margin-bottom: 4px; }
.p-desc { color: var(--muted); font-size: 13px; margin-bottom: 14px; line-height: 1.6; }
.p-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-price { font-family: var(--font-en); font-size: 20px; font-weight: 700; color: var(--ink); }
.p-price small { font-size: 12px; color: var(--muted); font-weight: 400; margin-right: 2px; }
.p-price del { color: var(--muted-2); font-size: 13px; font-weight: 400; margin-left: 6px; }
.p-go { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-2); display: inline-flex; align-items: center; justify-content: center; transition: all .2s; }
.p-go svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 2; }
.p-card:hover .p-go { background: var(--brand); }
.p-card:hover .p-go svg { stroke: #fff; }

/* ---------- Steps / features ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 26px; position: relative; overflow: hidden; }
.step-num { font-family: var(--font-en); font-size: 48px; font-weight: 700; color: var(--brand-soft); line-height: 1; position: absolute; right: 20px; top: 14px; }
.step-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.step-ico svg { width: 24px; height: 24px; stroke: var(--brand-dark); fill: none; stroke-width: 1.8; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--muted); line-height: 1.7; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-lg); padding: 26px; }
.feature h3 { color: #fff; font-size: 18px; margin-bottom: 8px; }
.feature p { color: rgba(255,255,255,.7); font-size: 14px; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,106,42,.15); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature .ico svg { width: 22px; height: 22px; stroke: var(--brand); fill: none; stroke-width: 1.8; }

/* ---------- Works gallery ---------- */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.work-card { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1/1; background: var(--bg-2); display: block; }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.work-card:hover img { transform: scale(1.05); }
.work-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 18px; background: linear-gradient(180deg, transparent, rgba(20,22,28,.85)); color: #fff; }
.work-cap small { font-family: var(--font-en); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--brand); display: block; margin-bottom: 4px; }
.work-cap h3 { color: #fff; font-size: 17px; }
.work-cap p { font-size: 12px; color: rgba(255,255,255,.75); }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 44px; }
.filter-btn { padding: 9px 20px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; cursor: pointer; text-decoration: none; transition: all .25s; }
.filter-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.filter-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.n-img { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-2); }
.n-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.news-card:hover .n-img img { transform: scale(1.05); }
.n-body { padding: 20px 22px 22px; }
.n-date { font-family: var(--font-en); font-size: 12px; letter-spacing: .14em; color: var(--brand-dark); margin-bottom: 8px; }
.n-title { font-size: 18px; margin-bottom: 8px; line-height: 1.4; }
.n-sum { font-size: 14px; color: var(--muted); }
.article { max-width: 820px; margin: 0 auto; }
.article-cover { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/9; margin-bottom: 36px; background: var(--bg-2); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.rich { font-size: 16px; line-height: 1.95; color: var(--text); overflow-wrap: break-word; }
.rich h2, .rich h3 { margin: 32px 0 12px; font-size: 22px; }
.rich h3 { font-size: 19px; }
.rich p { margin-bottom: 16px; }
.rich ul, .rich ol { margin: 0 0 16px 22px; }
.rich li { margin-bottom: 6px; }
.rich img { border-radius: var(--r); margin: 16px 0; }
.rich a { color: var(--brand-dark); }
.rich blockquote { border-left: 3px solid var(--brand); padding: 8px 18px; color: var(--muted); margin: 20px 0; background: var(--bg); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ---------- Story ---------- */
.story-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.story-split.reverse .story-img { order: 2; }
.story-img { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16/11; background: var(--bg-2); }
.story-img img { width: 100%; height: 100%; object-fit: cover; }
.story-text h2 { font-size: 32px; margin-bottom: 18px; }
.story-text p { color: var(--muted); margin-bottom: 14px; }
.story-list { list-style: none; margin: 22px 0; }
.story-list li { padding: 8px 0 8px 28px; position: relative; }
.story-list li::before { content: ""; position: absolute; left: 0; top: 19px; width: 14px; height: 2px; background: var(--brand); }
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-item b { display: block; font-family: var(--font-en); font-size: 44px; color: var(--brand); line-height: 1; margin-bottom: 8px; }
.stat-item span { color: rgba(255,255,255,.7); font-size: 14px; letter-spacing: .06em; }
.machines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.machine { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.machine small { font-family: var(--font-en); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--brand-dark); }
.machine h4 { font-size: 17px; margin: 6px 0 8px; }
.machine p { font-size: 13px; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(135deg, var(--ink) 0%, #2a1d16 100%); color: #fff; text-align: center; padding: 90px 32px; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 6px, rgba(255,255,255,.025) 6px 7px); pointer-events: none; }
.cta > * { position: relative; }
.cta h2 { color: #fff; font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 14px; }
.cta p { color: rgba(255,255,255,.7); margin-bottom: 30px; }
.cta .btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Product detail ---------- */
.pd-wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }
.pd-gallery { position: sticky; top: 100px; }
.pd-main { aspect-ratio: 1/1; border-radius: var(--r-lg); overflow: hidden; background: #fff; border: 1px solid var(--line); position: relative; }
.pd-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-main canvas { width: 100%; height: 100%; display: block; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pd-thumb { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #fff; padding: 0; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.active, .pd-thumb:hover { border-color: var(--brand); }
.pd-thumb.is-3d { display: flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-family: var(--font-en); font-size: 12px; letter-spacing: .1em; font-weight: 700; }
.pd-view-toggle { position: absolute; left: 14px; top: 14px; z-index: 2; display: flex; gap: 6px; }
.pd-view-toggle button { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: rgba(20,22,28,.65); color: #fff; font-size: 12px; cursor: pointer; font-family: var(--font-en); letter-spacing: .08em; }
.pd-view-toggle button.active { background: var(--brand); border-color: var(--brand); }
.pd-3d-hint { position: absolute; right: 14px; bottom: 14px; z-index: 2; font-size: 11px; color: rgba(255,255,255,.75); background: rgba(20,22,28,.55); padding: 5px 10px; border-radius: 999px; font-family: var(--font-en); letter-spacing: .1em; }
.pd-kicker { font-family: var(--font-en); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--brand-dark); margin-bottom: 10px; }
.pd-kicker a { color: inherit; text-decoration: none; }
.pd-name { font-size: clamp(26px, 3vw, 36px); margin-bottom: 6px; }
.pd-sub { color: var(--muted); margin-bottom: 18px; }
.pd-price { font-family: var(--font-en); font-size: 32px; font-weight: 700; color: var(--ink); display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.pd-price small { font-size: 14px; color: var(--muted); font-weight: 400; }
.pd-price del { font-size: 16px; color: var(--muted-2); font-weight: 400; }
.pd-price .save { font-size: 12px; background: var(--brand-soft); color: var(--brand-dark); padding: 3px 8px; border-radius: 999px; font-family: var(--font); }
.pd-summary { color: var(--text); margin-bottom: 24px; padding: 16px 18px; background: #fff; border-left: 3px solid var(--brand); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.opt-group { margin-bottom: 18px; }
.opt-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; }
.opt-label b { color: var(--ink); font-weight: 600; }
.opt-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-pill { cursor: pointer; }
.opt-pill input { display: none; }
.opt-pill span { display: inline-block; padding: 8px 16px; border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff; font-size: 14px; transition: all .2s; }
.opt-pill span em { font-style: normal; color: var(--muted); font-size: 12px; margin-left: 4px; font-family: var(--font-en); }
.opt-pill input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.opt-pill input:checked + span em { color: rgba(255,255,255,.7); }
.pd-buy { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 26px 0 18px; }
.qty-box { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; background: #fff; }
.qty-btn { width: 40px; height: 40px; border: none; background: var(--bg); color: var(--ink); font-size: 20px; font-weight: 600; cursor: pointer; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.qty-btn:hover { background: var(--brand); color: #fff; }
.qty-btn:active { transform: scale(.92); }
.qty-btn:disabled { opacity: .35; cursor: not-allowed; background: var(--bg); color: var(--muted); }
.qty-num { width: 48px; text-align: center; font-weight: 600; font-size: 16px; user-select: none; font-family: var(--font-en); }
.pd-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 26px; }
.pd-meta b { color: var(--ink); font-weight: 600; }
.pd-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.pd-tab { padding: 10px 18px; border: none; background: none; cursor: pointer; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.pd-tab.active { color: var(--ink); border-color: var(--brand); }
.pd-panel { display: none; }
.pd-panel.active { display: block; }
.spec { background: #fff; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; }
.spec-row { display: grid; grid-template-columns: 140px 1fr; border-bottom: 1px solid var(--line); }
.spec-row:last-child { border-bottom: none; }
.spec-row > div { padding: 13px 18px; font-size: 14px; }
.spec-row > div:first-child { background: var(--bg); color: var(--muted); }

/* ---------- Products list header ---------- */
.list-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.list-count { color: var(--muted); font-size: 14px; }
.list-count b { color: var(--ink); font-family: var(--font-en); }
.sort-wrap { width: 200px; }
.search-form { display: flex; gap: 8px; }
.search-form input { padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 999px; font-family: inherit; font-size: 14px; width: 240px; background: #fff; }
.search-form input:focus { border-color: var(--brand); }
.empty-state { text-align: center; padding: 70px 20px; background: #fff; border-radius: var(--r-lg); border: 1px dashed var(--line-2); color: var(--muted); }
.empty-state h3 { margin-bottom: 8px; font-size: 20px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text); font-weight: 500; }
.form-group label .req { color: var(--danger); margin-left: 2px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 10px;
  font-family: inherit; font-size: 15px; background: #fff; color: var(--text); transition: all .2s;
  -webkit-appearance: none; appearance: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,106,42,.12); }
.form-group input[readonly] { background: var(--bg); color: var(--muted); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 6px; }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.alert-error { background: #fdecec; color: #a33; border: 1px solid #f5c2c2; }
.alert-ok { background: #e9f7ee; color: #1f6b3a; border: 1px solid #bfe5cc; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.addr-grid { display: grid; grid-template-columns: 100px 150px 170px; gap: 14px 14px; align-items: end; }
.addr-grid .form-group { margin-bottom: 0; }
.addr-grid .addr-detail { grid-column: 1 / -1; }

/* 自訂 checkbox / radio / switch（16-form-elements：不留原生） */
.wj-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 15px; }
.wj-check input { display: none; }
.wj-check .box { width: 20px; height: 20px; border: 2px solid var(--line-2); border-radius: 6px; background: #fff; display: inline-flex; align-items: center; justify-content: center; transition: all .2s; flex-shrink: 0; }
.wj-check input:checked + .box { background: var(--brand); border-color: var(--brand); }
.wj-check .box::after { content: ""; width: 10px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; transition: opacity .2s; }
.wj-check input:checked + .box::after { opacity: 1; }
.wj-radios { display: flex; flex-wrap: wrap; gap: 10px; }
.wj-radio { flex: 1 1 calc(33% - 10px); min-width: 120px; display: block; cursor: pointer; position: relative; }
.wj-radio input { display: none; }
.wj-radio span { display: block; padding: 12px 14px; text-align: center; border: 1.5px solid var(--line-2); border-radius: 10px; color: var(--muted); background: #fff; transition: all .2s; font-size: 14px; }
.wj-radio span small { display: block; font-size: 12px; color: var(--muted-2); margin-top: 2px; font-family: var(--font-en); }
.wj-radio:hover span { border-color: var(--brand); color: var(--brand-dark); }
.wj-radio input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 3px rgba(255,106,42,.12); }
.wj-radio input:disabled + span { opacity: .45; cursor: not-allowed; }

/* 自訂 select（app.js enhance；開啟時 re-render options） */
.wj-select-wrap { position: relative; width: 100%; }
.wj-select-wrap > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; width: 100%; height: 100%; }
select.wj-select:not([data-enhanced]) {
  -webkit-appearance: none; appearance: none; width: 100%; padding: 12px 44px 12px 16px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'><path fill='none' stroke='%236b7280' stroke-width='2' d='M1 1l6 6 6-6'/></svg>") no-repeat right 16px center;
  background-size: 14px 8px; font-family: inherit; font-size: 15px; color: var(--text); cursor: pointer;
}
.wj-select-trigger {
  width: 100%; padding: 12px 44px 12px 16px; border: 1px solid var(--line-2); border-radius: 10px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'><path fill='none' stroke='%236b7280' stroke-width='2' d='M1 1l6 6 6-6'/></svg>") no-repeat right 16px center;
  background-size: 14px 8px; font-family: inherit; font-size: 15px; color: var(--text); text-align: left; cursor: pointer;
  transition: all .2s; display: flex; align-items: center; justify-content: space-between;
}
.wj-select-trigger:hover { border-color: var(--ink); }
.wj-select-wrap.open > .wj-select-trigger { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,106,42,.12); }
.wj-select-value { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 14px; }
.wj-select-value.placeholder { color: var(--muted); }
.wj-select-panel {
  position: fixed; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); max-height: 280px; overflow-y: auto; z-index: 1000; padding: 6px;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: all .18s var(--ease);
  min-width: 160px; width: max-content;
}
.wj-select-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.wj-select-option { padding: 10px 14px; border-radius: 8px; color: var(--text); font-size: 14px; cursor: pointer; transition: all .15s; display: flex; align-items: center; justify-content: space-between; gap: 12px; white-space: nowrap; }
.wj-select-option:hover { background: var(--bg); color: var(--brand-dark); }
.wj-select-option.selected { background: var(--ink); color: #fff; }
.wj-select-option.selected::after { content: "✓"; font-weight: 700; }
.wj-select-option.disabled { color: var(--muted-2); cursor: not-allowed; opacity: .5; }
.wj-select-panel::-webkit-scrollbar { width: 6px; }
.wj-select-wrap.sm .wj-select-trigger { padding: 8px 32px 8px 12px; font-size: 14px; background-size: 10px 6px; background-position: right 10px center; }

/* 自訂檔案上傳 */
.wj-file { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 22px; text-align: center; background: #fff; cursor: pointer; transition: all .2s; position: relative; }
.wj-file:hover, .wj-file.drag { border-color: var(--brand); background: var(--brand-soft); }
.wj-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.wj-file .ico { width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 12px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; }
.wj-file .ico svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.8; }
.wj-file strong { display: block; font-size: 14px; }
.wj-file span { font-size: 12px; color: var(--muted); }
.wj-file .fname { margin-top: 8px; font-size: 13px; color: var(--brand-dark); font-family: var(--font-en); word-break: break-all; }

/* ---------- Custom / inquiry page ---------- */
.custom-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.c-card { background: #fff; padding: 36px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.c-card h3 { font-size: 22px; margin-bottom: 20px; }
.price-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-table th, .price-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.price-table th { font-weight: 500; color: var(--muted); font-size: 13px; }
.price-table td.num { font-family: var(--font-en); font-weight: 600; text-align: right; }
.stl-preview { background: var(--ink); border-radius: var(--r); aspect-ratio: 4/3; position: relative; overflow: hidden; margin-top: 14px; display: none; }
.stl-preview.show { display: block; }
.stl-preview canvas { width: 100%; height: 100%; display: block; }
.stl-info { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 14px; font-family: var(--font-en); font-size: 12px; color: #fff; background: rgba(20,22,28,.6); padding: 6px 12px; border-radius: 999px; }
.stl-info b { color: var(--brand); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; }
.c-info { background: var(--ink); color: #fff; padding: 40px; border-radius: var(--r-lg); }
.c-info h3 { color: #fff; font-size: 22px; margin-bottom: 24px; }
.c-row { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; gap: 16px; font-size: 15px; }
.c-row:last-child { border-bottom: none; }
.c-label { min-width: 72px; color: var(--brand); font-size: 13px; letter-spacing: .1em; font-family: var(--font-en); text-transform: uppercase; padding-top: 2px; }
.c-value { flex: 1; color: rgba(255,255,255,.9); }
.c-value a { color: #fff; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.35); }
.c-value a:hover { color: var(--brand); }
.social-row { display: flex; gap: 10px; margin-top: 22px; }
.social-row a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: all .2s; }
.social-row a:hover { background: var(--brand); border-color: var(--brand); }
.social-row svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; margin: 0 auto; }
.faq-group h3 { font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: var(--brand-dark); font-family: var(--font-en); margin: 36px 0 14px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; padding: 18px 22px; background: none; border: none; cursor: pointer; font-size: 16px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--font); }
.faq-q::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s; flex-shrink: 0; }
.faq-item.open .faq-q::after { transform: rotate(-135deg); }
.faq-a { display: none; padding: 0 22px 20px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.faq-item.open .faq-a { display: block; }

/* ---------- Cart ---------- */
.cart-wrap { max-width: 1100px; margin: 0 auto; }
.cart-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.cart-table th, .cart-table td { padding: 18px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table th { background: var(--bg); color: var(--muted); font-weight: 500; font-size: 13px; letter-spacing: .06em; }
.cart-table tr:last-child td { border-bottom: none; }
.cart-table td.num { font-family: var(--font-en); font-weight: 600; }
.cart-prod { display: flex; gap: 16px; align-items: center; }
.cart-thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--bg-2); flex-shrink: 0; }
.cart-prod-name { font-weight: 600; margin-bottom: 2px; text-decoration: none; color: var(--ink); display: block; }
.cart-prod-sub { color: var(--muted); font-size: 13px; }
.cart-summary { margin-top: 24px; background: #fff; padding: 26px 30px; border-radius: var(--r-lg); border: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.cart-total-label { color: var(--muted); font-size: 14px; }
.cart-total-num { font-family: var(--font-en); font-size: 30px; font-weight: 700; color: var(--ink); }
.cart-summary .note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.cart-empty { background: #fff; padding: 80px 40px; border-radius: var(--r-lg); text-align: center; border: 1px solid var(--line); }
.cart-empty h3 { font-size: 22px; margin-bottom: 10px; }
.cart-empty p { color: var(--muted); margin-bottom: 24px; }

/* ---------- Checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; }
.co-card { background: #fff; padding: 30px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.co-card + .co-card { margin-top: 20px; }
.co-card h3 { font-size: 18px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.co-card h3 .n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-en); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; }
.co-side { position: sticky; top: 100px; }
.co-items { max-height: 320px; overflow-y: auto; margin-bottom: 14px; }
.co-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.co-item img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.co-item .ci-name { font-weight: 600; font-size: 14px; }
.co-item .ci-opt { color: var(--muted); font-size: 12px; }
.co-item .ci-line { margin-left: auto; font-family: var(--font-en); font-weight: 600; white-space: nowrap; }
.co-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: var(--muted); }
.co-row b { color: var(--ink); font-family: var(--font-en); font-weight: 600; }
.co-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 15px; color: var(--ink); }
.co-row.total b { font-size: 26px; color: var(--brand-dark); }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-methods .wj-radio { flex: none; min-width: 0; }
.invoice-extra { margin-top: 14px; }

/* ---------- Status pages ---------- */
.status-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 70px 24px; }
.status-box { max-width: 560px; width: 100%; background: #fff; padding: 56px 44px; border-radius: var(--r-lg); text-align: center; border: 1px solid var(--line); box-shadow: var(--shadow); }
.status-icon { width: 88px; height: 88px; margin: 0 auto 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.status-icon svg { width: 40px; height: 40px; stroke-width: 2.4; fill: none; }
.status-icon.ok { background: #e9f7ee; } .status-icon.ok svg { stroke: var(--ok); }
.status-icon.fail { background: #fdecec; } .status-icon.fail svg { stroke: var(--danger); }
.status-icon.wait { background: var(--brand-soft); } .status-icon.wait svg { stroke: var(--brand-dark); }
.status-box h2 { font-size: 28px; margin-bottom: 10px; }
.status-box p { color: var(--muted); margin-bottom: 6px; }
.status-info { background: var(--bg); border-radius: 12px; padding: 16px 18px; margin: 22px 0; text-align: left; }
.status-info .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; gap: 12px; }
.status-info .row span:first-child { color: var(--muted); }
.status-info .row span:last-child { font-weight: 500; font-family: var(--font-en); text-align: right; }
.status-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.pay-redirect { text-align: center; padding: 60px 20px; }
.spinner { width: 44px; height: 44px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; margin: 0 auto 20px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; background: #fff; padding: 44px 40px; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth-tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 999px; margin-bottom: 30px; }
.auth-tab { flex: 1; padding: 10px 16px; border: none; background: transparent; border-radius: 999px; color: var(--muted); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500; transition: all .25s; }
.auth-tab.active { background: var(--ink); color: #fff; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 18px; font-size: 13px; }
.auth-foot a { color: var(--muted); }
.demo-hint { margin-top: 18px; padding: 10px 14px; background: var(--bg); border-radius: 10px; font-size: 12px; color: var(--muted); font-family: var(--font-en); text-align: center; }
.sso-divider { display: flex; align-items: center; margin: 22px 0 14px; gap: 14px; color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.sso-divider::before, .sso-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sso-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; font-family: inherit; font-size: 14px; color: var(--text); transition: all .2s; }
.sso-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.sso-btn .ic { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; color: #fff; font-weight: 700; font-size: 12px; font-family: var(--font-en); }
.sso-btn.line .ic { background: #06c755; }
.sso-btn.google .ic { background: #fff; color: #4285f4; border: 1px solid #e6e6e6; }

/* ---------- Member ---------- */
.mem-grid { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.mem-side { background: #fff; padding: 26px 22px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.mem-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #ff9a5c); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-en); font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.mem-hello { font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.mem-email { color: var(--muted); font-size: 13px; margin-bottom: 20px; word-break: break-all; }
.mem-nav { list-style: none; }
.mem-nav li { margin-bottom: 4px; }
.mem-nav a, .mem-nav button { display: block; width: 100%; text-align: left; padding: 10px 14px; text-decoration: none; color: var(--text); border-radius: 10px; transition: all .2s; font-size: 15px; background: none; border: none; cursor: pointer; font-family: inherit; }
.mem-nav a:hover, .mem-nav a.active { background: var(--ink); color: #fff; }
.mem-nav button { color: var(--danger); }
.mem-nav button:hover { background: #fdecec; }
.mem-main { background: #fff; padding: 34px 32px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.mem-main h2 { font-size: 24px; margin-bottom: 22px; }
.order-card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 14px; text-decoration: none; color: inherit; display: block; transition: border-color .2s; }
.order-card:hover, .order-card.highlight { border-color: var(--brand); }
.order-card-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px dashed var(--line-2); }
.order-id { font-family: var(--font-en); font-weight: 600; letter-spacing: .04em; }
.order-date { color: var(--muted); font-size: 13px; font-family: var(--font-en); }
.order-status { padding: 4px 12px; border-radius: 999px; font-size: 12px; background: var(--brand); color: #fff; font-weight: 600; }
.order-status.paid { background: var(--ok); }
.order-status.shipped { background: #3b7cbf; }
.order-status.done { background: #888; }
.order-status.canceled { background: var(--danger); }
.order-status.pending { background: var(--brand); }
.order-row { display: flex; justify-content: space-between; padding: 5px 0; color: var(--muted); font-size: 14px; gap: 12px; }
.order-total { text-align: right; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); font-family: var(--font-en); font-size: 20px; font-weight: 700; }
.order-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.od-box { background: var(--bg); border-radius: 12px; padding: 16px 18px; font-size: 14px; }
.od-box h4 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-family: var(--font-en); margin-bottom: 10px; }
.od-box p { margin-bottom: 4px; }

/* ---------- Toast ---------- */
.wj-toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 13px 26px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 9999; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.wj-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Modal（確認框，取代 confirm） ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 500; background: rgba(20,22,28,.55); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal { background: #fff; border-radius: var(--r-lg); max-width: 440px; width: 100%; padding: 30px; transform: scale(.96); transition: transform .2s; box-shadow: 0 30px 70px rgba(0,0,0,.25); }
.modal-backdrop.show .modal { transform: scale(1); }
.modal h3 { font-size: 20px; margin-bottom: 10px; }
.modal p { color: var(--muted); margin-bottom: 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9bec8; padding: 64px 32px 28px; }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand .brand-text p { color: #9aa0aa; }
.footer-brand > p { color: #c9cdd6; font-size: 14px; margin: 6px 0; line-height: 1.8; }
.footer-brand .ft-contact { margin-top: 16px; }
.footer-brand .ft-contact p { font-size: 15px; }
.ft-link { color: #fff; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.35); padding-bottom: 1px; transition: all .2s; }
.ft-link:hover { color: var(--brand); border-bottom-color: var(--brand); }
.ft-copy { cursor: copy; }
.footer-col h5 { color: #fff; font-family: var(--font-en); letter-spacing: .18em; text-transform: uppercase; font-size: 12px; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #d5d9e0; text-decoration: none; font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: var(--brand); }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: all .2s; }
.footer-social a:hover { background: var(--brand); border-color: var(--brand); }
.footer-social svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.footer-bottom { padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: #9aa0aa; font-size: 13px; }
.footer-bottom .links a { color: #c9cdd6; text-decoration: none; margin: 0 8px; }
.footer-bottom .links a:hover { color: var(--brand); }
.footer-pay { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.footer-pay span { border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 2px 8px; font-size: 11px; font-family: var(--font-en); letter-spacing: .06em; color: #c9cdd6; }

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 100px 24px; }
.nf b { display: block; font-family: var(--font-en); font-size: 120px; line-height: 1; color: var(--brand); letter-spacing: -.04em; }
.nf h2 { font-size: 26px; margin: 10px 0 8px; }
.nf p { color: var(--muted); margin-bottom: 26px; }

/* ---------- 20-motion 動效基本款 ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); will-change: opacity, transform; }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal-stagger] > * { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.js [data-reveal-stagger].is-in > * { opacity: 1; transform: none; }
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageFadeIn .35s ease; }
body.page-leaving { opacity: 0; transition: opacity .22s ease; }


/* ---------- 改善 50 項新增（base 規則，@media 在底部） ---------- */
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }

/* 加入購物車小視窗 */
.cart-modal { max-width: 480px; }
.cm-item { display: flex; gap: 12px; align-items: center; background: var(--bg); border-radius: 12px; padding: 12px; margin: 6px 0 12px; }
.cm-item img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.cm-name { font-weight: 600; }
.cm-opt { font-size: 12px; color: var(--muted); }
.cm-line { margin-left: auto; font-family: var(--font-en); font-weight: 700; }
.cm-sub { font-size: 14px; color: var(--muted); }
.cm-sub b { color: var(--ink); font-family: var(--font-en); }
.cart-modal .modal-foot { flex-wrap: wrap; }

/* 收藏 / 評分 / 低庫存 */
.p-wish { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform .2s; }
.p-wish svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 1.8; transition: all .2s; }
.p-wish:hover { transform: scale(1.08); }
.p-wish.on svg { fill: var(--brand); stroke: var(--brand); }
.p-wish.big { position: static; width: 44px; height: 44px; background: #fff; border: 1px solid var(--line); flex-shrink: 0; }
.p-badge.low { background: #d64545; }
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars i { width: 14px; height: 14px; display: inline-block; background: var(--line-2); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.stars i.on { background: #f5a623; }
.stars i.half { background: linear-gradient(90deg, #f5a623 50%, var(--line-2) 50%); }
.stars-n { font-size: 12px; color: var(--muted); margin-left: 6px; font-family: var(--font-en); }
.p-rating { margin-bottom: 10px; }
.pd-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 14px; }
.pd-rating a { color: var(--muted); }
.pd-urgent { display: inline-block; background: #fdecec; color: #a33; padding: 6px 12px; border-radius: 999px; font-size: 13px; margin-bottom: 16px; }
.pd-urgent b { font-family: var(--font-en); }

/* 商品圖輪播 / 放大鏡 / 影片 / 尺寸對照 */
.pd-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255,255,255,.9); font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.pd-nav.prev { left: 12px; } .pd-nav.next { right: 12px; }
.pd-main img { cursor: zoom-in; }
.pd-zoom-lens { display: none; position: absolute; inset: 0; background-repeat: no-repeat; background-size: 220%; pointer-events: none; z-index: 1; }
.pd-thumb.is-video { display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--brand); font-size: 18px; }
.pd-video { aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; margin-top: 12px; background: #000; }
.pd-video iframe { width: 100%; height: 100%; border: 0; }
.size-compare { margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.sc-row { display: flex; align-items: flex-end; gap: 28px; height: 110px; padding: 0 8px; border-bottom: 1px solid var(--line-2); }
.sc-obj { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sc-obj i { display: block; background: var(--line-2); border-radius: 4px; }
.sc-obj.coin i { width: 20px; height: 20px; border-radius: 50%; background: #d9b25c; }
.sc-obj.phone i { width: 34px; height: 92px; border-radius: 6px; background: var(--ink); }
.sc-obj.item i { width: 30px; height: calc(var(--h, 8) * 6px); max-height: 100px; background: var(--brand); border-radius: 6px 6px 2px 2px; }
.sc-obj small { font-size: 11px; color: var(--muted); }
.size-compare p { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* 評價 */
.review-form { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin-bottom: 30px; max-width: 720px; }
.review-form h3 { font-size: 18px; margin-bottom: 12px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin-bottom: 14px; }
.star-input input { display: none; }
.star-input label { font-size: 30px; color: var(--line-2); cursor: pointer; transition: color .15s; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #f5a623; }
.review-list { display: grid; gap: 14px; }
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.rv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mem-avatar.sm { width: 36px; height: 36px; font-size: 15px; margin: 0; }
.rv-date { font-size: 12px; color: var(--muted); font-family: var(--font-en); }
.rv-imgs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rv-imgs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; cursor: zoom-in; }
.rv-reply { margin-top: 10px; background: var(--bg); padding: 10px 14px; border-radius: 8px; font-size: 14px; color: var(--muted); }

/* 最近瀏覽 */
.recent-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.recent-card { flex: 0 0 160px; scroll-snap-align: start; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.recent-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.recent-card span { display: block; font-size: 13px; padding: 8px 10px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-card b { display: block; padding: 2px 10px 10px; font-family: var(--font-en); font-size: 14px; }

/* 燈箱 */
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(20,22,28,.92); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; cursor: pointer; }
.lb-close { top: 18px; right: 18px; } .lb-prev { left: 18px; top: 50%; transform: translateY(-50%); } .lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox button:hover { background: var(--brand); }

/* 電子報 */
.footer-news { max-width: 1200px; margin: -20px auto 40px; background: linear-gradient(135deg, var(--brand), #ff9a5c); border-radius: var(--r-lg); padding: 28px 32px; color: #fff; }
.fn-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.fn-inner h4 { color: #fff; font-size: 20px; margin-bottom: 4px; }
.fn-inner p { font-size: 14px; color: rgba(255,255,255,.85); }
.fn-form { display: flex; gap: 8px; flex: 0 1 420px; }
.fn-form input[type="email"] { flex: 1; padding: 12px 16px; border-radius: 999px; border: none; font-family: inherit; font-size: 15px; }
.fn-form .btn { background: var(--ink); border-color: var(--ink); }

/* 結帳：折扣碼 / 點數 / 超商門市 */
.coupon-row { display: flex; gap: 8px; margin: 14px 0 4px; }
.coupon-row input { flex: 1; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; font-family: var(--font-en); font-size: 14px; }
.points-row { margin: 12px 0; padding: 12px 14px; background: var(--brand-soft); border-radius: 10px; }
.points-row b { font-family: var(--font-en); }
.cvs-pick { background: var(--bg); border-radius: 12px; padding: 16px; }
.cvs-store { margin-bottom: 12px; }
.cvs-store b { display: block; font-size: 16px; }
.cvs-store span { font-size: 13px; color: var(--muted); }

/* 客製進度 / 時間軸 */
.stage-track { display: flex; gap: 0; margin: 20px 0 8px; }
.stage-track .st { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 12px; color: var(--muted); text-align: center; }
.stage-track .st::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--line-2); z-index: 0; }
.stage-track .st:first-child::before { display: none; }
.stage-track .st i { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-style: normal; font-family: var(--font-en); font-size: 12px; position: relative; z-index: 1; }
.stage-track .st.done i, .stage-track .st.done::before { background: var(--brand); border-color: var(--brand); color: #fff; }
.stage-track .st.cur { color: var(--brand-dark); font-weight: 600; }
.stage-track .st.cur i { box-shadow: 0 0 0 4px rgba(255,106,42,.2); }
.timeline { list-style: none; border-left: 2px solid var(--line-2); margin-left: 8px; padding-left: 18px; }
.timeline li { position: relative; padding-bottom: 16px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.timeline time { display: block; font-size: 12px; color: var(--muted); font-family: var(--font-en); }
.tl-img img { width: 160px; border-radius: 8px; margin-top: 8px; cursor: zoom-in; }
.confirm-box { background: var(--brand-soft); border-radius: 10px; padding: 12px 14px; margin-top: 8px; }
.confirm-box textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; font-family: inherit; font-size: 14px; }

/* 首頁 Banner 輪播 */
.hero-slide { opacity: 0; transition: opacity 1s ease; animation: none; }
.hero-slide.active { opacity: 1; animation: heroZoom 18s ease-out forwards; }
.hero-copy { display: none; }
.hero-copy.active { display: block; }
.hero-dots { position: absolute; left: 32px; bottom: 30px; z-index: 2; display: flex; gap: 8px; }
.hero-dots button { width: 28px; height: 4px; border-radius: 2px; border: none; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; }
.hero-dots button.active { background: var(--brand); }

/* 會員 */
.mem-points { display: flex; justify-content: space-between; align-items: center; background: var(--brand-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; color: var(--brand-dark); }
.mem-points b { font-family: var(--font-en); font-size: 18px; }

/* 多檔上傳預覽 / STL 工具列 */
.file-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.file-previews .fp { width: 84px; font-size: 11px; color: var(--muted); text-align: center; }
.file-previews .fp .box { width: 84px; height: 84px; border-radius: 8px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; overflow: hidden; font-family: var(--font-en); font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.file-previews .fp img { width: 100%; height: 100%; object-fit: cover; }
.file-previews .fp span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stl-tools { position: absolute; left: 12px; top: 12px; z-index: 2; display: flex; gap: 14px; align-items: center; background: rgba(20,22,28,.6); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12px; }
.stl-tools label { display: flex; align-items: center; gap: 6px; }
.stl-tools .wj-select-wrap { width: 120px; }
.stl-tools .wj-select-trigger { padding: 4px 26px 4px 10px; font-size: 12px; background-color: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.stl-tools input[type="range"] { width: 90px; accent-color: var(--brand); }
model-viewer { --poster-color: transparent; }

/* ======================================================================
   所有 @media 集中在最底部（04/11 章：@media 必須在 base 規則之後）
   斷點：900 漢堡 / 820 grid 2 欄 / 640 padding 縮 / 540 footer 兩排 / 480 brand 副標隱藏
   ====================================================================== */
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .pd-wrap { gap: 36px; }
}

@media (max-width: 900px) {
  .nav { padding: 12px 16px; gap: 6px; justify-content: flex-start; flex-wrap: nowrap; }
  .brand { margin-right: auto; gap: 10px; min-width: 0; flex: 0 1 auto; }
  .brand-text h1 { font-size: 16px; }
  .brand-text p { font-size: 10px; }
  .nav-toggle { display: block; flex-shrink: 0; }
  .nav-utility { order: 0; margin-left: 0; padding-left: 0; border-left: none; gap: 2px; flex-shrink: 0; }
  .util-item { width: 38px; height: 38px; }

  .menu {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 82vw);
    background: #fff; flex-direction: column; flex-wrap: nowrap;
    padding: 84px 20px 40px; gap: 4px; align-items: stretch;
    transform: translateX(100%); transition: transform .35s var(--ease);
    box-shadow: -20px 0 40px rgba(0,0,0,.15); border-left: 1px solid var(--line);
    overflow-x: hidden; overflow-y: auto; z-index: 105;
  }
  .menu.open { transform: translateX(0); }
  .menu > li { width: 100%; }
  .menu > li > a { display: block; padding: 13px 16px; font-size: 16px; border-radius: 10px; }
  .has-dropdown > a::after { display: none; }
  .nav-dropdown { position: static; opacity: 1; visibility: visible; pointer-events: auto; transform: none; box-shadow: none; border: none; padding: 0 0 6px 10px; min-width: 0; background: transparent; transition: none; }
  .nav-dropdown::before { display: none; }
  .nav-dropdown a { padding: 9px 16px 9px 22px; font-size: 14px; color: var(--muted); }
  .nav-dropdown a:hover { padding-left: 22px; }
  .nav-dropdown a.dd-all { margin: 0 0 4px; border: none; padding-left: 22px; }
  .drawer-only { display: block; }
  .drawer-user { padding: 0 0 14px !important; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
  .du-top { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 6px; font-size: 14px; }
  .du-top strong { color: var(--brand-dark); }
  .du-logout { color: var(--danger); font-size: 12px; text-decoration: none; padding: 4px 10px; border: 1px solid #f0c4c4; border-radius: 6px; background: none; cursor: pointer; font-family: inherit; }
  .du-links { display: flex; gap: 10px; padding: 0 4px; font-size: 13px; }
  .du-links a { color: var(--muted); text-decoration: none; }
  .du-login-btn { display: block; background: var(--ink); color: #fff !important; padding: 12px; text-align: center; border-radius: 10px; font-size: 14px; text-decoration: none; font-weight: 600; }
  .drawer-cart { margin-bottom: 12px; }
  .dc-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg); border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; }
  .dc-link svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.7; }
  .dc-sub { display: block; font-size: 12px; color: var(--muted); }
  .drawer-heading { padding: 16px 6px 6px; color: var(--muted); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; font-family: var(--font-en); border-top: 1px solid var(--line); margin-top: 10px; }
  .drawer-only > a.dl { display: block; padding: 9px 16px; font-size: 14px; color: var(--muted); text-decoration: none; border-radius: 8px; }
  .drawer-only > a.dl:hover { background: var(--bg); color: var(--ink); }
  .drawer-contact { padding: 16px 6px; margin-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
  .drawer-contact a { color: var(--ink); text-decoration: none; }

  .cat-grid, .works-grid, .news-grid, .features, .machines { grid-template-columns: repeat(2, 1fr); }
  .pd-wrap { grid-template-columns: 1fr; }
  .pd-gallery { position: static; }
  .checkout-grid { grid-template-columns: 1fr; }
  .co-side { position: static; }
  .custom-grid, .contact-grid { grid-template-columns: 1fr; }
  .mem-grid { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .hero-large { min-height: 72vh; }
  .hero-canvas-hint { display: none; }
}

@media (max-width: 820px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .story-split { grid-template-columns: 1fr; gap: 28px; }
  .story-split.reverse .story-img { order: 0; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 16px; border-bottom: 1px solid var(--line); }
  .cart-table td { padding: 0; border: none; }
  .cart-table td.c-prod { grid-column: 1 / -1; }
  .cart-table td.c-remove { text-align: right; }
  .order-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 60px 20px; }
  .section-head { margin-bottom: 36px; }
  .hero-inner { padding: 70px 20px; }
  .hero-stats { gap: 22px; }
  .page-hero { min-height: 240px; }
  .page-hero-inner { padding: 50px 20px; }
  .steps { grid-template-columns: 1fr; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .addr-grid { grid-template-columns: 80px 1fr 1fr; gap: 10px; }
  .spec-row { grid-template-columns: 1fr; }
  .spec-row > div:first-child { padding-bottom: 4px; }
  .pay-methods { grid-template-columns: 1fr; }
  .c-card, .co-card, .mem-main, .auth-wrap, .c-info { padding: 24px 20px; }
  .status-box { padding: 40px 24px; }
  .list-tools { flex-direction: column; align-items: stretch; }
  .search-form input { width: 100%; }
  .sort-wrap { width: 100%; }
  .cta { padding: 64px 20px; }
  .nf b { font-size: 84px; }
}

@media (max-width: 540px) {
  .site-footer { padding: 44px 20px 24px; }
  .footer-main { grid-template-columns: 1fr 1fr 1fr; gap: 22px 14px; padding-bottom: 24px; }
  .footer-brand { grid-column: 1 / -1; text-align: center; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .footer-brand .brand { justify-content: center; }
  .footer-social { justify-content: center; }
  .footer-col h5 { font-size: 11px; margin-bottom: 12px; }
  .footer-col a { font-size: 14px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 10px; }
  .footer-bottom > div { width: 100%; }
  .footer-pay { justify-content: center; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .p-body { padding: 14px; }
  .p-title { font-size: 15px; }
  .p-price { font-size: 17px; }
  .cat-grid, .works-grid, .news-grid, .features, .machines { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .brand-mark { width: 38px; height: 38px; font-size: 13px; border-radius: 10px; }
  .brand-text h1 { font-size: 15px; }
  .brand-text p { display: none; }
  .util-item { width: 34px; height: 34px; }
  .util-item svg { width: 20px; height: 20px; }
  .hero-title { font-size: 34px; }
  .sso-btns { grid-template-columns: 1fr; }
}

@media (hover: none) {
  .p-card:hover, .cat-card:hover, .news-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  body, .js [data-reveal], .js [data-reveal-stagger] > * { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .fn-inner { flex-direction: column; align-items: stretch; }
  .fn-form { flex: 1; }
  .footer-news { margin: 0 0 36px; padding: 22px 20px; }
  .stage-track .st span { font-size: 10px; }
  .hero-dots { left: 20px; }
  .review-form { padding: 18px; }
  .sc-row { gap: 18px; }
}
