:root {
  color-scheme: dark;
  --bg: #090a09;
  --bg-soft: #10120f;
  --panel: #151611;
  --panel-2: #1b1a15;
  --line: rgba(211, 177, 102, 0.24);
  --gold: #d5ad62;
  --gold-strong: #f0cc7a;
  --text: #f6f1e7;
  --muted: #b7afa1;
  --dim: #777167;
  --danger: #d57566;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.38);
  font-family: "Noto Serif TC", "Songti TC", "Microsoft JhengHei", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 70% 10%, rgba(213, 173, 98, 0.12), transparent 30rem),
    linear-gradient(180deg, #090a09 0%, #10110e 45%, #090a09 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 76px;
  padding: 0 48px;
  border-bottom: 1px solid rgba(213, 173, 98, 0.2);
  background: rgba(7, 8, 7, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  gap: 2px;
  color: var(--gold);
}

.brand-mark {
  font-size: 42px;
  line-height: 0.85;
  letter-spacing: 0;
}

.brand-copy {
  font-size: 10px;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 14px;
  color: #f4ead6;
}

.nav-links a,
.admin-link {
  transition: color 160ms ease;
}

.nav-links a:hover,
.admin-link:hover {
  color: var(--gold-strong);
}

.admin-link {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(15, 16, 13, 0.5);
  color: var(--gold);
  cursor: pointer;
}

.admin-link svg {
  width: 22px;
  height: 22px;
}

.hero {
  min-height: clamp(540px, 62vh, 720px);
  display: flex;
  align-items: center;
  padding: 86px 8vw 118px;
  background:
    linear-gradient(90deg, rgba(5, 6, 5, 0.9) 0%, rgba(5, 6, 5, 0.72) 35%, rgba(5, 6, 5, 0.18) 100%),
    url("/assets/cover.png") center center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  width: min(640px, 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 13px;
  letter-spacing: 2.8px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: 4px;
}

h3 {
  margin-bottom: 10px;
}

.hero-subtitle {
  max-width: 560px;
  color: #e6ded1;
  font-size: clamp(20px, 2.2vw, 31px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(15, 16, 13, 0.68);
  color: var(--gold-strong);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 204, 122, 0.7);
}

.button.primary {
  background: linear-gradient(180deg, #d9b66f, #a8803e);
  color: #15110a;
  border-color: transparent;
  font-weight: 700;
}

.button.ghost {
  color: #f2dfb5;
}

.catalog-shell {
  width: calc(100% - 64px);
  max-width: 1720px;
  margin: 0 auto;
  padding: 56px 0 20px;
}

.content-band {
  width: min(1440px, calc(100% - 56px));
  margin: 0 auto;
  padding: 56px 0 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.result-summary {
  color: var(--muted);
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 14px;
}

.section-copy {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--muted);
  font-family: "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
}

.section-link {
  color: var(--gold-strong);
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 14px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(15, 16, 13, 0.82);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 280px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(213, 173, 98, 0.2);
  border-radius: 4px;
  background: #090a09;
  color: var(--text);
  padding: 0 11px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(240, 204, 122, 0.64);
}

.price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  min-height: 380px;
}

.product-card,
.content-card {
  overflow: hidden;
  border: 1px solid rgba(213, 173, 98, 0.17);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(25, 25, 20, 0.96), rgba(13, 15, 14, 0.96));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.product-area,
.product-card {
  min-width: 0;
}

.product-image,
.content-image {
  position: relative;
  aspect-ratio: 1.48 / 1;
  overflow: hidden;
  background: #0b0b0a;
}

.product-image img,
.content-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--image-position, center 30%);
  display: block;
  filter: saturate(0.88) contrast(1.05);
}

.status-pill {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(5, 5, 4, 0.78);
  color: #f2d18d;
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 12px;
}

.product-body,
.content-body {
  padding: 15px 16px 17px;
}

.product-title {
  margin-bottom: 6px;
  color: #fff8eb;
  font-size: 18px;
  line-height: 1.35;
}

.product-meta,
.content-meta {
  min-height: 20px;
  color: var(--muted);
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

.usage-row.product-flags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(207, 171, 91, 0.38);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--gold-strong);
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 12px;
}

.product-price {
  margin: 12px 0 14px;
  color: var(--gold-strong);
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-actions .button {
  min-height: 36px;
  padding: 0 10px;
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 13px;
}

.detail-actions {
  margin-top: 16px;
}

.detail-actions .share-feedback {
  grid-column: 1 / -1;
}

.share-feedback {
  min-height: 18px;
  margin: 0;
  color: var(--gold-strong);
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 13px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.pagination button[aria-current="page"] {
  background: var(--gold);
  color: #111;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.video-grid,
.video-cinematic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.video-cinematic-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(213, 173, 98, 0.22);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(24, 23, 18, 0.98), rgba(8, 10, 9, 0.98));
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
}

.video-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(213, 173, 98, 0.16), transparent 36%),
    linear-gradient(180deg, #171511, #060706);
}

.video-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--image-position, center);
  transform: scale(1.01);
  transition: transform 220ms ease, filter 220ms ease;
  filter: saturate(0.86) contrast(1.06);
}

.video-cinematic-card:hover .video-card-media img {
  transform: scale(1.055);
  filter: saturate(0.96) contrast(1.12);
}

.video-play-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  font-size: 24px;
  text-indent: 3px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.video-card-body {
  display: grid;
  gap: 7px;
  padding: 16px 17px 18px;
}

.video-card-body h3 {
  margin: 0;
  color: #fff8eb;
  font-size: 19px;
  line-height: 1.35;
}

.video-card-body span {
  color: var(--muted);
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 40px;
  margin-top: 70px;
  padding: 42px 8vw;
  border-top: 1px solid var(--line);
  background: #080908;
  color: var(--muted);
  font-family: "Microsoft JhengHei", sans-serif;
}

.video-page {
  background:
    radial-gradient(circle at 78% 0%, rgba(213, 173, 98, 0.13), transparent 30rem),
    linear-gradient(180deg, #080908 0%, #11120f 48%, #080908 100%);
}

.video-header {
  position: sticky;
}

.video-app {
  width: min(1180px, calc(100% - 56px));
  margin: 0 auto;
  padding: 46px 0 82px;
}

.video-hero,
.video-detail-hero,
.video-missing {
  min-height: 320px;
  display: grid;
  align-content: center;
  gap: 14px;
  margin-bottom: 30px;
  padding: 52px 0;
  border-bottom: 1px solid var(--line);
}

.video-hero h1,
.video-detail-hero h1,
.video-missing h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.08;
}

.video-hero p:not(.eyebrow),
.video-detail-hero p:not(.eyebrow) {
  max-width: 720px;
  color: #ded5c7;
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 18px;
  line-height: 1.8;
}

.video-index-section,
.video-related-section,
.video-text-section,
.video-cta {
  margin-top: 34px;
}

.video-loading {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--muted);
}

.video-back-link {
  display: inline-flex;
  width: max-content;
  margin-bottom: 24px;
  color: var(--gold-strong);
  font-family: "Microsoft JhengHei", sans-serif;
}

.video-player-shell {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(213, 173, 98, 0.34);
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
}

.video-player-shell iframe,
.video-player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.external-video-panel {
  height: 100%;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 32px;
  text-align: center;
}

.video-text-section {
  display: grid;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.video-text-section h2,
.video-related-section h2,
.video-cta h2 {
  margin: 0;
  font-size: 28px;
}

.video-text-section p,
.video-cta p {
  margin: 0;
  color: var(--muted);
  font-family: "Microsoft JhengHei", sans-serif;
  line-height: 1.9;
  white-space: pre-line;
}

.video-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.video-product-card {
  overflow: hidden;
  border: 1px solid rgba(213, 173, 98, 0.17);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(24, 24, 19, 0.96), rgba(11, 12, 10, 0.96));
}

.video-product-card img {
  width: 100%;
  aspect-ratio: 1.45 / 1;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.video-product-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.video-product-body h3,
.video-product-body p {
  margin: 0;
}

.video-product-body p {
  color: var(--muted);
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 13px;
}

.video-product-price {
  color: var(--gold-strong);
}

.video-cta {
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(19, 19, 15, 0.72);
}

.site-footer a,
.site-footer p {
  display: block;
  margin: 0 0 10px;
}

.footer-brand {
  margin-bottom: 18px;
  color: var(--gold);
}

.product-dialog {
  width: min(980px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0c0a;
  color: var(--text);
  box-shadow: var(--shadow);
}

.product-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.entry-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0c0d0b;
  color: var(--text);
  box-shadow: var(--shadow);
}

.entry-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.entry-panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 28px;
}

.entry-panel h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 2px;
}

.entry-panel p {
  margin: 0;
  color: var(--muted);
  font-family: "Microsoft JhengHei", sans-serif;
}

.entry-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 22px;
}

.entry-error {
  min-height: 20px;
  color: var(--danger) !important;
  font-size: 13px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
}

.detail-gallery {
  display: grid;
  gap: 10px;
  padding: 22px;
  background: #070806;
}

.gallery-main-button {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.detail-gallery img {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  border-radius: 5px;
  object-fit: cover;
  object-position: center 20%;
}

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.gallery-thumb {
  min-height: 0;
  padding: 0;
  border-color: rgba(213, 173, 98, 0.22);
  background: #0c0d0a;
}

.gallery-thumb.is-active,
.gallery-thumb[aria-current="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(213, 173, 98, 0.42);
}

.thumb-strip img {
  aspect-ratio: 1.4 / 1;
}

.gallery-nav {
  display: flex;
  gap: 8px;
}

.gallery-nav button {
  flex: 1;
}

.detail-copy {
  padding: 34px 28px;
}

.spec-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0;
  font-family: "Microsoft JhengHei", sans-serif;
}

.spec-list div {
  padding: 10px;
  border: 1px solid rgba(213, 173, 98, 0.14);
  border-radius: 4px;
}

.spec-list span {
  display: block;
  color: var(--dim);
  font-size: 12px;
  margin-bottom: 3px;
}

.empty-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  border: 1px dashed var(--line);
  color: var(--muted);
}

@media (max-width: 1024px) {
  .catalog-shell {
    width: min(100% - 32px, 100%);
  }

  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    max-width: none;
  }
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 20px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 72px 24px 96px;
    background-position: 62% 0;
  }

  .content-band,
  .video-app {
    width: min(100% - 28px, 720px);
  }

  .detail-layout,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }
}

@media (max-width: 560px) {
  .catalog-shell {
    width: min(100% - 24px, 100%);
  }

  .brand-mark {
    font-size: 34px;
  }

  .section-heading,
  .hero-actions,
  .card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .price-row,
  .spec-list {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .content-grid,
  .video-cinematic-grid,
  .video-product-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .video-hero,
  .video-detail-hero,
  .video-missing {
    min-height: 260px;
    padding: 38px 0;
  }
}
