/* ==========================================================================
   MOORGEN (摩根智能) 全新豪华产品目录站与定制工坊样式表
   Design Language: Minimalist Luxury / Architectural Hi-Tech
   ========================================================================== */

:root {
  --bg-main: #0c0d12;
  --bg-surface: #14161f;
  --bg-card: #1b1e2b;
  --bg-card-hover: #222636;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(212, 175, 55, 0.4);
  --accent-gold: #d4af37;
  --accent-gold-hover: #e5c158;
  --accent-gold-dim: rgba(212, 175, 55, 0.12);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --panel-backlight: rgba(212, 175, 55, 0.6);
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --modal-bg: rgba(12, 13, 18, 0.85);
  --badge-bg: rgba(255, 255, 255, 0.06);
  --header-bg: rgba(12, 13, 18, 0.92);
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #f1f5f9;
  --bg-card-hover: #e2e8f0;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(179, 137, 56, 0.4);
  --accent-gold: #b38938;
  --accent-gold-hover: #99732b;
  --accent-gold-dim: rgba(179, 137, 56, 0.12);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --panel-backlight: rgba(179, 137, 56, 0.4);
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  --modal-bg: rgba(248, 250, 252, 0.88);
  --badge-bg: rgba(0, 0, 0, 0.05);
  --header-bg: rgba(255, 255, 255, 0.94);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s;
}

.nav-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.1);
}

[data-theme="light"] .brand-logo {
  filter: invert(1) brightness(0.2);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-main);
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Nav Tabs */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
}

.nav-btn:hover {
  color: var(--text-main);
  background: var(--badge-bg);
}

.nav-btn.active {
  color: var(--accent-gold);
  background: var(--accent-gold-dim);
  font-weight: 600;
}

.nav-btn .badge {
  font-size: 0.7rem;
  background: var(--accent-gold);
  color: #000;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-bar-wrap {
  position: relative;
  width: 260px;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem 0.45rem 2.2rem;
  border-radius: 20px;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--accent-gold);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-gold-dim);
  width: 320px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.icon-btn:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.icon-btn .counter-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-toggle-btn {
  width: auto !important;
  min-width: 42px;
  height: 36px !important;
  padding: 0 10px !important;
  border-radius: 18px !important;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.8px;
  border: 1px solid var(--accent-gold) !important;
  color: var(--accent-gold) !important;
  background: rgba(212, 175, 55, 0.08) !important;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

.lang-toggle-btn:hover {
  background: var(--accent-gold) !important;
  color: #000 !important;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.4);
}

.badge-overseas-model {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
}

.badge-overseas-sub {
  font-size: 0.68rem;
  font-family: var(--font-mono, monospace);
  color: var(--text-dim);
  background: var(--badge-bg);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  display: inline-block;
}

.model-extra-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed rgba(212, 175, 55, 0.45);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   App Overall Layout & Primary Left Sidebar (Original Site Architecture)
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: calc(100vh - 65px);
  width: 100%;
}

.app-sidebar {
  width: 185px;
  min-width: 185px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 1.5rem 0.5rem 1.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
  flex-shrink: 0;
  user-select: none;
  z-index: 20;
}

.sidebar-menu-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
  line-height: 1.3;
}

.sidebar-nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-item.active {
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
  font-weight: 600;
}

[data-theme="light"] .app-sidebar {
  background: #f4f4f6;
  border-right: 1px solid #e2e4e8;
}

[data-theme="light"] .sidebar-nav-item {
  color: #374151;
}

[data-theme="light"] .sidebar-nav-item:hover {
  color: #111827;
  background: #eaebef;
}

[data-theme="light"] .sidebar-nav-item.active {
  color: #111827;
  background: #ffffff;
  border-color: #d1d5db;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.sidebar-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.75rem 0.4rem;
}

.sidebar-count {
  font-size: 0.7rem;
  opacity: 0.75;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-count.gold-badge {
  background: var(--accent-gold);
  color: #000;
  font-weight: 700;
}

.sidebar-nav-item.active .sidebar-count {
  background: rgba(212, 175, 55, 0.25);
  color: var(--accent-gold);
}

.app-main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Catalog Main Area: Series Bar + System Sections + Product Cards
   ========================================================================== */
.catalog-content-wrap {
  padding: 1.75rem 2.5rem;
  max-width: 1600px;
  width: 100%;
}

.catalog-top-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.catalog-category-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.catalog-category-count {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-left: 0.75rem;
}

/* Series Filter Chips Bar */
.series-chips-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 2px 0;
}

.series-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  user-select: none;
}

.series-chip-btn:hover {
  color: var(--text-main);
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.05);
}

.series-chip-btn.active {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.12);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

.series-chip-count {
  font-size: 0.7rem;
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 10px;
}

.series-chip-btn.active .series-chip-count {
  background: rgba(212, 175, 55, 0.25);
  color: var(--accent-gold);
}

/* Series Block & System Sections */
.series-block {
  margin-bottom: 2.75rem;
}

.series-block-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.series-block-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.series-block-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.system-section {
  margin-bottom: 2rem;
}

.system-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.02em;
}

.system-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--accent-gold);
  border-radius: 2px;
}

.product-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-gold);
}

.btn-clear-search-tag {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.btn-clear-search-tag:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.logs-page-wrap {
  padding: 2rem;
}

/* ==========================================================================
   Product Cards & Grid
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s, border-color 0.25s;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--card-shadow);
}

.card-top-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
  pointer-events: none;
}

.series-badge {
  background: rgba(12, 13, 18, 0.75);
  backdrop-filter: blur(8px);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.system-tag {
  background: var(--badge-bg);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

/* Image Container */
.product-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.product-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

/* Card Body */
.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  border-top: 1px solid var(--border-subtle);
}

.product-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  cursor: pointer;
}

.product-title:hover {
  color: var(--accent-gold);
}

.product-model-code {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.product-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Swatches Preview on Card */
.card-swatches {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.swatch-dot:hover {
  transform: scale(1.2);
  border-color: var(--accent-gold);
}

.swatches-more {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: 0.25rem;
}

/* Card Actions */
.card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-primary-sm {
  flex: 1;
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.btn-primary-sm:hover {
  background: var(--accent-gold);
  color: #000;
}

.btn-icon-sm {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon-sm:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

/* ==========================================================================
   Product Detail Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--modal-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  width: 95vw;
  max-width: 1360px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  position: relative;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    transform: translateY(20px) scale(0.98);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  color: #fff;
  background: #e11d48;
}

.modal-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 2.25rem;
  padding: 2.25rem;
}

.modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.modal-main-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.4));
  transition: opacity 0.2s;
}

.color-variants-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.color-variants-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
}

.swatches-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.swatch-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s;
}

.swatch-chip:hover {
  border-color: var(--accent-gold);
}

.swatch-chip.active {
  border-color: var(--accent-gold);
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  font-weight: 600;
}

/* Modal Info Panel */
.modal-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  width: 100%;
}

.modal-series-tag {
  font-size: 0.8rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.modal-model-badge {
  font-family: monospace;
  font-size: 1.05rem;
  color: var(--accent-gold);
  background: var(--badge-bg);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  background: var(--bg-card);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.meta-field {
  display: flex;
  flex-direction: column;
}

.meta-field-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.meta-field-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Parameter Spec Table */
.spec-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--text-main);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.spec-table th, .spec-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.spec-table th {
  color: var(--text-dim);
  font-weight: 500;
  width: 130px;
  min-width: 110px;
  vertical-align: top;
}

.spec-table td {
  color: var(--text-main);
  vertical-align: top;
  line-height: 1.5;
}

/* Accessories Annexes & Grouping */
.annex-section-container {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.annex-section-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.annex-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.annex-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  font-family: inherit;
}

.annex-tab-btn:hover {
  color: var(--text-main);
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.05);
}

.annex-tab-btn.active {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.12);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

.annex-tab-count {
  font-size: 0.68rem;
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 10px;
}

.annex-tab-btn.active .annex-tab-count {
  background: rgba(212, 175, 55, 0.25);
  color: var(--accent-gold);
}

.annex-groups-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.annex-group-section {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.annex-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed var(--border-subtle);
}

.annex-group-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.02em;
  min-width: 0;
}

.annex-group-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.annex-group-badge {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.2);
  font-weight: 500;
  flex-shrink: 0;
}

.annexes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.75rem;
}

.annex-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  position: relative;
  min-width: 0;
  box-sizing: border-box;
}

.annex-item:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.annex-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.annex-info-block {
  min-width: 0;
  flex: 1;
}

.annex-name {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 3px;
  white-space: normal;
  word-break: break-word;
}

.annex-model {
  font-size: 0.7rem;
  color: var(--accent-gold);
  font-family: monospace;
  font-weight: 500;
}

.annex-domestic-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: monospace;
}

.annex-btn-bom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--accent-gold);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  margin-left: auto;
}

.annex-btn-bom:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.45);
}

.annex-btn-bom:active {
  transform: scale(0.92);
}

[data-theme="light"] .annex-btn-bom {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #b38938;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .annex-btn-bom:hover {
  background: var(--accent-gold);
  color: #ffffff;
  border-color: var(--accent-gold);
  box-shadow: 0 3px 10px rgba(179, 137, 56, 0.35);
}

/* Modal Actions */
.modal-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-gold {
  background: var(--accent-gold);
  color: #000;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-gold:hover {
  background: var(--accent-gold-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* ==========================================================================
   Engraving Studio (刻字定制可视化工坊)
   ========================================================================== */
.engraving-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 360px 1fr 340px;
  gap: 1.75rem;
  min-height: calc(100vh - 80px);
}

.studio-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.studio-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.studio-stage {
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 75%);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Live Panel Mockup Container */
.panel-viewport {
  position: relative;
  width: 520px;
  height: 520px;
  max-width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
  transition: all 0.3s;
}

.panel-viewport.night-mode {
  filter: drop-shadow(0 0 45px rgba(212, 175, 55, 0.25)) drop-shadow(0 20px 40px rgba(0, 0, 0, 0.8));
}

.panel-bg-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Coordinates overlay */
.engraving-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.engrave-box-item {
  position: absolute;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 4px 8px;
  border: 1px dashed rgba(212, 175, 55, 0.25);
  border-radius: 4px;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.engrave-box-item:hover {
  border-color: var(--accent-gold);
  background-color: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.engrave-box-item.active {
  border: 2px solid var(--accent-gold);
  background-color: rgba(212, 175, 55, 0.18);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.box-text-content {
  width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.2;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  pointer-events: none;
  transition: color 0.2s, text-shadow 0.2s;
}

.panel-viewport.night-mode .box-text-content {
  text-shadow: 0 0 8px var(--panel-backlight), 0 0 14px var(--panel-backlight);
}

/* Quick Presets Chips */
.presets-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.preset-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preset-chip:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card-hover);
}

.preset-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Project BOM & Quotation Tool (空间清单与报价单)
   ========================================================================== */
.bom-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.bom-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.bom-rooms-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.room-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.room-tab-btn.active {
  background: var(--accent-gold);
  color: #000;
  font-weight: 600;
  border-color: var(--accent-gold);
}

.bom-table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
}

.bom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.bom-table th, .bom-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.bom-table th {
  background: var(--bg-card);
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.bom-product-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bom-thumb {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
}

.qty-btn {
  background: var(--bg-card);
  border: none;
  color: var(--text-main);
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-input {
  width: 38px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.85rem;
}

/* BOM Table Drag and Drop Reordering */
.bom-table-row {
  transition: background-color 0.15s ease;
  user-select: none;
}

.bom-table-row:hover {
  background: rgba(212, 175, 55, 0.035);
}

[data-theme="light"] .bom-table-row:hover {
  background: rgba(0, 0, 0, 0.025);
}

.bom-drag-handle {
  cursor: grab;
  user-select: none;
  white-space: nowrap;
}

.bom-drag-handle:active, .bom-table-row.dragging .bom-drag-handle {
  cursor: grabbing;
}

.drag-grip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.drag-grip-icon {
  font-size: 1.05rem;
  color: var(--text-dim);
  opacity: 0.4;
  transition: opacity 0.15s, color 0.15s, transform 0.15s;
  cursor: grab;
  line-height: 1;
}

.bom-table-row:hover .drag-grip-icon {
  opacity: 1;
  color: var(--accent-gold);
  transform: scale(1.15);
}

.bom-table-row.dragging {
  opacity: 0.35;
  background: rgba(212, 175, 55, 0.12) !important;
}

.bom-table-row.drag-over-top td {
  border-top: 2.5px solid var(--accent-gold) !important;
}

.bom-table-row.drag-over-bottom td {
  border-bottom: 2.5px solid var(--accent-gold) !important;
}

/* ==========================================================================
   Product Comparator (产品多维度对比)
   ========================================================================== */
.compare-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: 200px repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  overflow-x: auto;
}

.compare-row {
  display: contents;
}

.compare-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 1rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}

.compare-cell {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-main);
}

/* ==========================================================================
   Print / Export Styles for Quotation
   ========================================================================== */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .site-header, .hero-banner, .filter-sidebar, .card-actions, .modal-close-btn, .btn-gold, .btn-secondary {
    display: none !important;
  }
  .modal-overlay {
    position: static !important;
    background: none !important;
  }
  .modal-content, .bom-table-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .modal-grid {
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  .engraving-container {
    grid-template-columns: 1fr;
  }
  .modal-grid {
    grid-template-columns: 1fr;
    padding: 1.25rem;
    gap: 1.25rem;
  }
}

/* ============================================================
   Modal PDF Technical Document Box (Exquisite & Compact)
   ============================================================ */
.modal-pdf-box {
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}

.modal-pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-pdf-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.modal-pdf-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
}

.modal-pdf-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pdf-link-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  background: var(--badge-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.72rem;
  line-height: 1.2;
  transition: all 0.2s ease;
  min-height: 28px;
  box-sizing: border-box;
}

.pdf-link-chip:hover {
  background: var(--accent-gold-dim);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.pdf-link-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.pdf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.pdf-link-chip:hover .pdf-badge {
  background: rgba(212, 175, 55, 0.2);
  color: var(--accent-gold);
}

.pdf-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
  font-size: 0.72rem;
  transition: color 0.2s;
  flex: 1;
}

.pdf-link-chip:hover .pdf-name {
  color: var(--accent-gold);
}

.pdf-ext-icon {
  width: 12px !important;
  height: 12px !important;
  min-width: 12px !important;
  max-width: 12px !important;
  opacity: 0.45;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: opacity 0.2s, color 0.2s;
}

.pdf-link-chip:hover .pdf-ext-icon {
  opacity: 1;
  color: var(--accent-gold);
}

/* Universal SVG safety rules */
.w-3 { width: 0.75rem !important; }
.h-3 { height: 0.75rem !important; }
.w-3\.5 { width: 0.875rem !important; }
.h-3\.5 { height: 0.875rem !important; }
.w-4 { width: 1rem !important; }
.h-4 { height: 1rem !important; }
.w-5 { width: 1.25rem !important; }
.h-5 { height: 1.25rem !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

