@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
  --sidebar-w: 220px;
  --gold: #c9a84c;
  --gold-light: #e8d08a;
  --gold-dim: #8a6e2a;
  --bg: #0a0a0a;
  --bg-2: #101010;
  --bg-3: #181818;
  --bg-4: #222222;
  --text: #e8e8e8;
  --text-2: #aaaaaa;
  --text-3: #666666;
  --border: #252525;
  --border-2: #333333;
  --red: #c0392b;
  --blue: #2980b9;
  --green: #27ae60;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }

/* ─── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text);
}

.sidebar-logo .logo-en {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
}

.sidebar-logo .logo-zh {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.sidebar-logo .logo-sub {
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: .5px;
  margin-top: 2px;
}

.sidebar-home {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  letter-spacing: .5px;
  transition: all .2s;
}

.sidebar-home:hover, .sidebar-home.active {
  color: var(--gold);
  background: rgba(201,168,76,.06);
}

.sidebar-home svg { flex-shrink: 0; }

.sidebar-group {
  padding: 14px 16px 5px;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
}

.sidebar-item {
  display: block;
  padding: 7px 16px 7px 20px;
  color: var(--text-2);
  font-size: 12px;
  transition: all .2s;
  border-left: 2px solid transparent;
  line-height: 1.4;
}

.sidebar-item:hover {
  color: var(--gold);
  background: rgba(201,168,76,.06);
  border-left-color: var(--gold-dim);
}

.sidebar-item.active {
  color: var(--gold);
  background: rgba(201,168,76,.08);
  border-left-color: var(--gold);
  font-weight: 500;
}

.sidebar-item .item-brand {
  font-size: 10px;
  color: var(--text-3);
  display: block;
  letter-spacing: .5px;
  margin-bottom: 1px;
}

.sidebar-item.active .item-brand { color: var(--gold-dim); }

/* ─── MAIN ────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: calc(100vw - var(--sidebar-w));
}

/* ─── HOMEPAGE ────────────────────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, #0a0a0a 0%, #141414 50%, #0d0c08 100%);
  padding: 50px 40px 50px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-banner .label {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.hero-banner h1 {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-banner h1 span { color: var(--gold); }

.hero-banner .hero-sub {
  font-size: 15px;
  color: var(--text-2);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-stat .num {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  color: var(--gold);
  line-height: 1;
}

.hero-stat .label2 {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 1px;
}

/* HAQ Intro */
.haq-intro {
  padding: 40px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-2), transparent);
}

.haq-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.haq-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 22px;
  transition: border-color .2s;
}

.haq-card:hover { border-color: var(--gold-dim); }

.haq-card h3 {
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 10px;
  letter-spacing: .5px;
}

.haq-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8;
}

/* Comparison Table */
.comparison-section {
  padding: 40px 40px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 24px;
}

table.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 660px;
}

.comp-table thead tr {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border-2);
}

.comp-table th {
  padding: 11px 12px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  font-weight: 600;
}

.comp-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.comp-table tbody tr { transition: background .2s; }
.comp-table tbody tr:hover { background: rgba(201,168,76,.04); }
.comp-table tbody tr:last-child td { border-bottom: none; }

.comp-table .watch-thumb-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  transition: color .2s;
}

.comp-table a.watch-thumb-cell:hover { color: var(--gold); }
.comp-table a.watch-thumb-cell:hover .watch-name { color: var(--gold); }
.comp-table a.watch-thumb-cell:hover img { border-color: var(--gold-dim); }

.comp-table .watch-thumb-cell img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: border-color .2s;
  flex-shrink: 0;
}

.comp-table .watch-name { font-weight: 500; color: var(--text); }
.comp-table .watch-model { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.power-sub { font-size: 11px; color: var(--text-3); display: block; margin-top: 1px; }

/* 特色功能欄限寬換行 */
.comp-table th:nth-child(8),
.comp-table td:nth-child(8) {
  max-width: 270px;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

/* Sortable table headers */
.comp-table th[data-sortable] {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.comp-table th[data-sortable]:hover {
  color: var(--gold-light);
  background: rgba(201,168,76,.06);
}
.comp-table th[data-sortable]::after {
  content: ' ⇅';
  font-size: 9px;
  opacity: .35;
  vertical-align: middle;
}
.comp-table th[data-sortable][data-order="asc"]::after {
  content: ' ▲';
  opacity: 1;
  color: var(--gold);
}
.comp-table th[data-sortable][data-order="desc"]::after {
  content: ' ▼';
  opacity: 1;
  color: var(--gold);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3px;
}

.badge-gold { background: rgba(201,168,76,.15); color: var(--gold); border: 1px solid rgba(201,168,76,.3); }
.badge-blue { background: rgba(41,128,185,.15); color: #5dade2; border: 1px solid rgba(41,128,185,.3); }
.badge-green { background: rgba(39,174,96,.15); color: #58d68d; border: 1px solid rgba(39,174,96,.3); }
.badge-red { background: rgba(192,57,43,.15); color: #e74c3c; border: 1px solid rgba(192,57,43,.3); }
.badge-gray { background: rgba(102,102,102,.15); color: #aaa; border: 1px solid rgba(102,102,102,.3); }

.acc-text { font-weight: 500; color: var(--gold); }
.price-text { color: var(--text-2); }

/* ─── WATCH PAGE ──────────────────────────────────────── */
.watch-hero {
  position: relative;
  height: 420px;
  overflow: hidden;
  background: var(--bg-3);
}

.watch-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--bg-2);
}

.watch-hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent 0%, rgba(10,10,10,.92) 100%);
  padding: 30px 40px 28px;
}

.watch-brand-label {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.watch-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
}

.watch-model-label {
  font-size: 13px;
  color: var(--text-2);
  letter-spacing: 1px;
}

/* Watch body */
.watch-body {
  max-width: 900px;
  padding: 36px 40px 60px;
}

/* Quick specs strip */
.quick-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 40px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.qspec {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 78px;
  transition: border-color .2s;
}

.qspec:hover { border-color: var(--gold-dim); }
.qspec .qval { font-size: 15px; font-weight: 700; color: var(--gold); line-height: 1; }
.qspec .qlbl { font-size: 10px; color: var(--text-3); letter-spacing: .5px; margin-top: 3px; }

/* Watch sections */
.watch-section {
  margin-bottom: 50px;
}

.watch-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.watch-desc {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 2;
}

.watch-desc p { margin-bottom: 14px; }
.watch-desc p:last-child { margin-bottom: 0; }

.watch-desc strong { color: var(--text); font-weight: 500; }

/* Specs table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }

.specs-table td:first-child {
  width: 160px;
  padding: 12px 16px 12px 0;
  color: var(--text-3);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  vertical-align: top;
}

.specs-table td:last-child {
  padding: 12px 0;
  color: var(--text);
  vertical-align: top;
}

/* Two-col layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-3);
  transition: border-color .2s, transform .2s;
}

.gallery-item:hover {
  border-color: var(--gold-dim);
  transform: scale(1.01);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .3s;
}

.gallery-item:hover img { transform: scale(1.05); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,.8);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 30px;
  font-size: 28px;
  color: var(--text-2);
  cursor: pointer;
  transition: color .2s;
  background: none;
  border: none;
  line-height: 1;
}

.lightbox-close:hover { color: var(--gold); }

/* Highlight box */
.highlight-box {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
  padding: 18px 22px;
  margin: 20px 0;
}

.highlight-box p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.9;
  margin: 0;
}

/* Story / personal notes */
.personal-note {
  background: rgba(201,168,76,.05);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 6px;
  padding: 20px 24px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.9;
}

.personal-note .note-header {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 10px;
}

/* Feature tags */
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ftag {
  padding: 5px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-2);
  transition: border-color .2s, color .2s;
}

.ftag:hover { border-color: var(--gold-dim); color: var(--gold); }

/* Timeline on index */
.timeline {
  position: relative;
  padding-left: 20px;
  border-left: 1px solid var(--border);
  margin-top: 20px;
}

/* Collection grid on homepage */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 36px 40px;
  border-bottom: 1px solid var(--border);
}

.collection-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .25s, transform .25s;
  cursor: pointer;
}

.collection-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
}

.collection-card a { color: inherit; }

.card-img-wrap {
  height: 160px;
  overflow: hidden;
  background: var(--bg-3);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .3s;
  padding: 10px;
}

.collection-card:hover .card-img-wrap img { transform: scale(1.04); }

.card-info {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.card-brand {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

.card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-specs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card-specs .badge { font-size: 10px; padding: 2px 7px; }

/* Footer */
.page-footer {
  padding: 22px 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-3);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-footer a { color: var(--text-3); }
.page-footer a:hover { color: var(--gold); }

/* ─── MOBILE ──────────────────────────────────────────── */
.menu-toggle {
  display: none;
  position: fixed;
  top: 12px; left: 12px;
  z-index: 400;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 8px 11px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

/* Overlay that dims content when sidebar is open */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 150;
}
.sidebar-overlay.active { display: block; }

@media (max-width: 900px) {
  body { overflow-x: hidden; }

  .menu-toggle { display: block; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .28s ease;
    z-index: 200;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.6); }

  .main {
    margin-left: 0;
    max-width: 100vw;
    /* top padding so content doesn't hide under the hamburger */
    padding-top: 0;
  }

  /* Hero banner — push content below hamburger button */
  .hero-banner {
    padding: 52px 20px 32px;
  }
  .hero-banner h1 { font-size: 24px; line-height: 1.3; }
  .hero-banner .hero-sub { font-size: 13px; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 22px; }

  .haq-intro { padding: 28px 20px; }
  .haq-intro-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 18px; }
  .comparison-section { padding: 24px 16px; }
  .collection-grid { grid-template-columns: 1fr 1fr; padding: 24px 16px; gap: 10px; }
  .quick-specs { padding: 14px 16px; gap: 6px; }
  .qspec { min-width: 64px; padding: 8px 10px; }
  .qspec .qval { font-size: 13px; }
  .watch-body { padding: 20px 16px 50px; }
  .watch-hero { height: 220px; }
  .watch-hero-overlay { padding: 16px 16px 14px; }
  .watch-hero-title { font-size: 20px; }
  .watch-brand-label { font-size: 9px; letter-spacing: 2px; }
  .watch-model-label { font-size: 11px; }
  .watch-section-title { font-size: 16px; }
  .two-col { grid-template-columns: 1fr; gap: 18px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .page-footer { padding: 14px 16px; flex-direction: column; gap: 6px; text-align: center; font-size: 11px; }
  .specs-table td:first-child { width: 100px; font-size: 11px; }
  .specs-table { font-size: 13px; }
  /* Table: keep horizontal scroll within wrapper */
  .table-wrap { border-radius: 4px; }
  .comp-table { font-size: 11px; }
  .comp-table th { padding: 9px 8px; font-size: 9px; }
  .comp-table td { padding: 8px 8px; }
  .comp-table .watch-thumb-cell img { width: 36px; height: 36px; }
  .comp-table .watch-name { font-size: 11px; }
  .comp-table .watch-model { font-size: 10px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .hero-stats { gap: 16px; }
  .hero-banner h1 { font-size: 20px; }
  .watch-hero { height: 180px; }
  .watch-hero-title { font-size: 17px; }
}
