/* =============================================================
   JET OPTO — 產品線頁樣式（三語共用）
   每頁以 body[data-line] 決定主題色：ent / ckpt / safe
   ============================================================= */

body[data-line="ent"]  { --line-c: var(--ent);  --line-rgb: var(--ent-rgb); }
body[data-line="ckpt"] { --line-c: var(--ckpt); --line-rgb: var(--ckpt-rgb); }
body[data-line="safe"] { --line-c: var(--safe); --line-rgb: var(--safe-rgb); }

/* ---------- 產品 Hero ---------- */
.p-hero {
  position: relative; min-height: 74vh;
  display: flex; align-items: flex-end; overflow: hidden;
  padding: calc(var(--header-h) + 48px) 0 64px;
  background:
    radial-gradient(1000px 560px at 78% 30%, rgba(var(--line-rgb), .16), transparent 62%),
    radial-gradient(700px 420px at 12% 85%, rgba(var(--line-rgb), .08), transparent 60%),
    var(--ink-950);
}
.p-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(var(--line-rgb), .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--line-rgb), .04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(900px 600px at 70% 40%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(900px 600px at 70% 40%, #000, transparent 75%);
}
.p-hero-inner { position: relative; z-index: 3; }
.p-crumb {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--txt-mute); margin-bottom: 22px;
}
.p-crumb a { color: var(--txt-mute); transition: color .3s; }
.p-crumb a:hover { color: #fff; }
.p-crumb .sep { color: rgba(var(--line-rgb), .8); }
.p-hero h1 {
  font-size: clamp(40px, 6.4vw, 92px); font-weight: 900; line-height: 1.05; letter-spacing: -.02em;
}
.p-hero h1::after {
  content: ""; display: block; width: 74px; height: 5px; border-radius: 5px;
  background: var(--line-c); margin-top: 26px;
  box-shadow: 0 0 22px 3px rgba(var(--line-rgb), .65);
}
.p-hero .p-en {
  position: absolute; right: 0; bottom: -1.5vw; z-index: 1;
  font-size: clamp(60px, 10vw, 168px); font-weight: 900; line-height: .9; letter-spacing: -.02em;
  white-space: nowrap; pointer-events: none; user-select: none;
  color: transparent; -webkit-text-stroke: 1px rgba(var(--line-rgb), .3);
  text-transform: uppercase;
}
.p-hero .p-lede { max-width: 560px; margin-top: 26px; color: var(--txt-dim); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.85; }
.p-hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.p-hero-tags span {
  padding: 8px 16px; border-radius: 99px; font-size: 12.5px; letter-spacing: .12em; font-weight: 600;
  border: 1px solid rgba(var(--line-rgb), .4); color: rgba(255, 255, 255, .85);
  background: rgba(var(--line-rgb), .08);
}

/* ---------- 圖庫 ---------- */
.p-gallery-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.p-gallery { position: sticky; top: calc(var(--header-h) + 24px); }
.p-stage {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--ink-900);
  aspect-ratio: 4 / 3;
}
.p-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04); transition: opacity .7s var(--ease-out), transform 1.1s var(--ease-out);
}
.p-stage img.active { opacity: 1; transform: scale(1); }
.p-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(var(--line-rgb), .18);
  border-radius: var(--radius-lg);
}
.p-thumbs { display: flex; gap: 12px; margin-top: 14px; }
.p-thumbs button {
  position: relative; width: 88px; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); opacity: .55;
  transition: opacity .3s, border-color .3s, transform .3s;
}
.p-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.p-thumbs button:hover { opacity: .85; transform: translateY(-2px); }
.p-thumbs button.active { opacity: 1; border-color: rgba(var(--line-rgb), .8); box-shadow: 0 0 0 1px rgba(var(--line-rgb), .5); }

/* ---------- 特色清單 ---------- */
.p-block h2 {
  display: flex; align-items: center; gap: 14px;
  font-size: clamp(20px, 1.8vw, 26px); font-weight: 800; margin-bottom: 24px;
}
.p-block h2 .no { font-family: var(--font-mono); font-size: 13px; color: rgb(var(--line-rgb)); letter-spacing: .2em; }
.p-block + .p-block { margin-top: 44px; }
.p-list { display: grid; gap: 2px; }
.p-list li {
  position: relative; padding: 13px 4px 13px 34px;
  color: var(--txt-dim); font-size: 15px; line-height: 1.7;
  border-bottom: 1px solid var(--line);
  transition: color .3s, padding-left .35s var(--ease-out), border-color .35s;
}
.p-list li:hover { color: #fff; padding-left: 42px; border-color: rgba(var(--line-rgb), .45); }
.p-list li::before {
  content: ""; position: absolute; left: 4px; top: 21px;
  width: 14px; height: 8px;
  border-left: 2.5px solid rgb(var(--line-rgb));
  border-bottom: 2.5px solid rgb(var(--line-rgb));
  transform: rotate(-45deg);
  filter: drop-shadow(0 0 6px rgba(var(--line-rgb), .7));
  transition: left .35s var(--ease-out);
}
.p-list li:hover::before { left: 12px; }

/* ---------- OEM/ODM chips ---------- */
.p-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.p-chips span {
  padding: 12px 20px; border-radius: 14px;
  font-size: 14px; font-weight: 600; color: var(--txt-dim);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-850), var(--ink-900));
  transition: transform .4s var(--ease-out), border-color .35s, color .35s, box-shadow .4s;
}
.p-chips span:hover {
  transform: translateY(-4px); color: #fff;
  border-color: rgba(var(--line-rgb), .6);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4), 0 0 0 1px rgba(var(--line-rgb), .25);
}

/* ---------- 相關產品線 ---------- */
.p-related { border-top: 1px solid var(--line); }
.p-related .spectrum-deck { min-height: 420px; margin-top: 46px; }

/* ---------- 產品頁 CTA ---------- */
.p-cta {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--line-rgb), .35);
  background:
    radial-gradient(700px 300px at 85% 110%, rgba(var(--line-rgb), .22), transparent 65%),
    linear-gradient(160deg, var(--ink-850), var(--ink-900));
  padding: clamp(40px, 6vw, 72px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
}
.p-cta h2 { font-size: clamp(24px, 3vw, 42px); font-weight: 900; line-height: 1.2; }
.p-cta p { margin-top: 12px; color: var(--txt-dim); max-width: 460px; }

@media (max-width: 900px) {
  .p-gallery-wrap { grid-template-columns: 1fr; }
  .p-gallery { position: static; }
  .p-hero { min-height: 60vh; }
  .p-hero .p-en { opacity: .5; }
}
