:root {
  --white: #ffffff;
  --blue: #2463eb;
  --blue-hover: #1d4ed8;
  --blue-soft: rgba(36, 99, 235, 0.08);
  --blue-muted: rgba(36, 99, 235, 0.14);
  --bg: #ffffff;
  --bg-alt: #f0f6ff;
  --surface: #ffffff;
  --surface-2: #f5f9ff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --shadow: 0 12px 40px rgba(36, 99, 235, 0.1);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--white) 28%, var(--white) 100%);
  line-height: 1.6;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--blue-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code {
  font-size: 0.9em;
  background: var(--blue-soft);
  color: var(--blue-hover);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--blue-muted);
}

.wrap {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(36, 99, 235, 0.06);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--blue);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  line-height: 1;
  white-space: nowrap;
}

.lang-toggle:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue-hover);
}

@media (max-width: 850px) {
  .header-right {
    order: 1;
  }
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  position: relative;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px auto;
  transition: all 0.3s ease;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--blue);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.btn-primary:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  text-decoration: none;
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  border-color: var(--blue);
  color: var(--blue);
}

.btn-secondary:hover {
  background: var(--blue-soft);
  text-decoration: none;
  color: var(--blue-hover);
}

.hero {
  padding: 3.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 1.5rem;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.doc-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-visual {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin-inline: auto;
}

.hero-visual img {
  border-radius: calc(var(--radius) - 6px);
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.video-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.video-container video {
  width: 100%;
  border-radius: calc(var(--radius) - 6px);
  display: block;
}

section {
  padding: 3rem 0;
}

section:nth-of-type(even) {
  background: var(--bg-alt);
  border-block: 1px solid var(--blue-muted);
}

.section-title {
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.section-sub {
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 70ch;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--text);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.gallery-layout {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 1rem;
  align-items: start;
}

/* V1: Vertical Scroll */
.gallery-layout--v1 {
  grid-template-columns: 1fr 130px;
}

.gallery-layout--v1 .thumbs {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom Scrollbar for Vertical */
.gallery-layout--v1 .thumbs::-webkit-scrollbar {
  width: 6px;
}
.gallery-layout--v1 .thumbs::-webkit-scrollbar-track {
  background: var(--surface-2);
  border-radius: 10px;
}
.gallery-layout--v1 .thumbs::-webkit-scrollbar-thumb {
  background: var(--blue-muted);
  border-radius: 10px;
}

/* V2: Horizontal Scroll */
.gallery-layout--v2 {
  grid-template-columns: 1fr;
}

.gallery-layout--v2 .thumbs {
  flex-direction: row;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.gallery-layout--v2 .thumbs button,
.gallery-layout--v2 .thumbs .gthumb {
  flex: 0 0 120px;
  scroll-snap-align: start;
}

/* Custom Scrollbar for Horizontal */
.gallery-layout--v2 .thumbs::-webkit-scrollbar {
  height: 6px;
}
.gallery-layout--v2 .thumbs::-webkit-scrollbar-track {
  background: var(--surface-2);
  border-radius: 10px;
}
.gallery-layout--v2 .thumbs::-webkit-scrollbar-thumb {
  background: var(--blue-muted);
  border-radius: 10px;
}

@media (max-width: 700px) {
  .gallery-layout,
  .gallery-layout--v1 {
    grid-template-columns: 1fr;
  }

  .thumbs,
  .gallery-layout--v1 .thumbs {
    flex-direction: row !important;
    overflow-x: auto;
    max-height: none;
  }
}

.stage {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.stage img {
  max-height: min(420px, 55vh);
  width: auto;
  margin-inline: auto;
}

.thumbs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.thumbs button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.thumbs button:hover,
.thumbs button.is-active {
  opacity: 1;
  border-color: var(--blue);
}

.thumbs img {
  width: 100%;
  height: auto;
}

/* ========================================
   Gallery Manager
   ======================================== */

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gallery-cats {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.gallery-cats button {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.gallery-cats button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.gallery-cats button.is-active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.gallery-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-sm.btn-primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.btn-sm:hover {
  border-color: var(--blue);
}

.btn-sm.btn-primary:hover {
  background: var(--blue-hover);
}

.gthumb {
  position: relative;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.gthumb:hover,
.gthumb.is-active {
  opacity: 1;
  border-color: var(--blue);
}

.gthumb img {
  width: 100%;
  height: auto;
  display: block;
}

.thumb-cat {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  text-align: center;
  padding: 2px 0;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.thumb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 0;
  transition: background 0.12s ease;
}

.thumb-del:hover {
  background: #b91c1c;
}

.stage {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  flex-direction: column;
}

.stage img {
  max-height: min(420px, 55vh);
  width: auto;
  margin-inline: auto;
}

.stage-category {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: var(--blue);
  color: var(--white);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 600;
  pointer-events: none;
}

.stage {
  position: relative;
}

.stage-edit-overlay {
  position: absolute;
  z-index: 5;
}

.stage-edit-top-right {
  top: 0.5rem;
  right: 0.5rem;
}

.stage-edit-bottom-right {
  bottom: 0.5rem;
  right: 0.5rem;
}

.stage-cat-select {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--blue);
  border-radius: 6px;
  font-size: 0.82rem;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.stage-cat-select:focus {
  outline: none;
  border-color: var(--blue-hover);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.stage-del-btn {
  padding: 0.3rem 0.7rem;
  border: none;
  border-radius: 6px;
  background: #dc2626;
  color: #fff;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.12s ease;
}

.stage-del-btn:hover {
  background: #b91c1c;
}

.gallery-empty {
  color: var(--muted);
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .gallery-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .gallery-cats {
    justify-content: center;
  }
  .gallery-actions {
    justify-content: center;
  }
}

/* ========================================
   Empty State (gallery / video / docs)
   ======================================== */

.module-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.module-empty-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ========================================
   Video Manager
   ======================================== */

.video-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.video-cats {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.video-cats button {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.video-cats button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.video-cats button.is-active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.video-actions {
  display: flex;
  gap: 0.4rem;
}

.video-area {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1rem;
  align-items: start;
}

.video-player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.video-player {
  width: 100%;
  max-height: 420px;
  display: block;
}

.video-placeholder {
  color: #999;
  font-size: 0.9rem;
  text-align: center;
  position: absolute;
  margin: 0;
}

.video-list {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.vlist-group {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vlist-group-header {
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--blue-hover);
  background: var(--blue-soft);
  border-bottom: 1px solid var(--blue-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  z-index: 1;
}

.vlist-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s ease;
}

.vlist-item:last-child {
  border-bottom: none;
}

.vlist-item:hover {
  background: var(--blue-soft);
}

.vlist-num {
  width: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  flex-shrink: 0;
}

.vlist-label {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text);
  word-break: break-word;
  line-height: 1.3;
}

.vlist-actions {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  flex-shrink: 0;
}

.vlist-cat-select {
  padding: 0.15rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  background: var(--white);
  color: var(--text);
}

.vlist-del-btn {
  display: inline-flex;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease;
}

.vlist-del-btn:hover {
  background: #b91c1c;
}

@media (max-width: 800px) {
  .video-area {
    grid-template-columns: 1fr;
  }
  .video-list {
    max-height: 200px;
  }
}

@media (max-width: 700px) {
  .video-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .video-cats {
    justify-content: center;
  }
  .video-actions {
    justify-content: center;
  }
}

/* ========================================
   Document Manager
   ======================================== */

.doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.doc-cats {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.doc-cats button {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.doc-cats button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.doc-cats button.is-active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.doc-toolbar-actions {
  display: flex;
  gap: 0.4rem;
}

.doc-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.doc-group-header td {
  padding: 0.6rem 1rem;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--blue-hover);
  background: var(--blue-soft);
  border-bottom: 2px solid var(--blue-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.doc-row td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.doc-row:last-child td {
  border-bottom: none;
}

.doc-num {
  width: 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.doc-fmt {
  width: 6rem;
}

.doc-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-pdf { background: #fee2e2; color: #b91c1c; }
.badge-图片 { background: #dbeafe; color: #1d4ed8; }
.badge-word { background: #e0e7ff; color: #4338ca; }
.badge-excel { background: #dcfce7; color: #15803d; }
.badge-markdown { background: #f3e8ff; color: #7e22ce; }
.badge-其它 { background: #f1f5f9; color: #475569; }

.doc-name a {
  color: var(--text);
  text-decoration: none;
}

.doc-name a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.doc-action {
  width: 10rem;
  text-align: right;
  white-space: nowrap;
}

.doc-cat-select {
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.78rem;
  background: var(--white);
  color: var(--text);
  margin-right: 0.4rem;
}

.doc-dl-btn {
  display: inline-flex;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 0.78rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  transition: background 0.12s ease;
  white-space: nowrap;
}

.doc-dl-btn:hover {
  background: var(--blue-hover);
}

.doc-del-btn {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  transition: background 0.12s ease;
}

.doc-del-btn:hover {
  background: #b91c1c;
}

@media (max-width: 700px) {
  .doc-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .doc-cats {
    justify-content: center;
  }
  .doc-toolbar-actions {
    justify-content: center;
  }
  .doc-fmt {
    display: none;
  }
  .doc-num {
    width: 1.8rem;
  }
  .doc-action {
    width: auto;
  }
}

.spec-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

table.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--white);
}

table.spec th,
table.spec td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}

table.spec thead th {
  width: 33.33%;
  color: var(--muted);
  font-weight: 600;
}

table.spec tbody th {
  width: 32%;
  color: var(--muted);
  font-weight: 500;
}

table.spec tr:last-child th,
table.spec tr:last-child td {
  border-bottom: none;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 800px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.faq details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.faq details p {
  margin: 0.6rem 0 0;
  color: var(--muted);
}

#contact {
  scroll-margin-top: 5.5rem;
}

.contact-info {
  font-style: normal;
  max-width: 40rem;
  line-height: 1.85;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.contact-info a {
  color: var(--blue);
  font-weight: 500;
}

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 3px solid var(--blue);
  background: var(--blue);
  color: rgba(255, 255, 255, 0.95);
}

.footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-cta h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--white);
}

.footer-cta p {
  margin: 0.25rem 0 0;
  color: rgba(255, 255, 255, 0.88);
}

.footer-meta {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.footer-meta code {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--blue);
  color: var(--white);
  z-index: 100;
  outline: 2px solid var(--white);
}

body.modal-open {
  overflow: hidden;
}

/* ========================================
   Catalogue-specific styles
   ======================================== */

.catalog-hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--blue) 0%, #1a4fa8 100%);
  color: #fff;
}

.catalog-hero__title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.catalog-hero__title span {
  color: rgba(255,255,255,0.85);
  font-weight: 400;
}

.catalog-hero__lead {
  font-size: 1.1rem;
  margin: 0 auto 1rem;
  max-width: 56ch;
  opacity: 0.9;
}

.catalog-hero__count {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 0.35rem 1rem;
  font-size: 0.9rem;
  color: #fff;
  margin: 0;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.catalog-toolbar__actions {
  display: flex;
  gap: 0.5rem;
}

/* ========================================
   Print-style catalogue index table
   ======================================== */

.catalog-index {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.catalog-index__row {
  display: grid;
  grid-template-columns: 48px 1fr 2.2fr 80px 160px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.catalog-index__row:last-child {
  border-bottom: none;
}

.catalog-index__row:not(.catalog-index__header):hover {
  background: var(--blue-soft);
}

.catalog-index__header {
  background: var(--surface-2);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--blue-muted);
}

.catalog-index__cell {
  padding: 0.7rem 0.6rem;
  font-size: 0.92rem;
  line-height: 1.3;
}

.catalog-index__cell--page {
  text-align: center;
  font-weight: 700;
  color: var(--blue-hover);
  font-size: 0.85rem;
}

.catalog-index__cell--sku {
  font-weight: 600;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.85rem;
}

.catalog-index__cell--sku a,
.catalog-index__cell--name a {
  color: var(--text);
  text-decoration: none;
}

.catalog-index__cell--sku a:hover,
.catalog-index__cell--name a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.catalog-index__cell--actions {
  text-align: center;
}

.catalog-index__dl {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.12s ease;
}

.catalog-index__dl:hover {
  background: var(--blue-hover);
  text-decoration: none;
  color: var(--white);
}

.catalog-index__dl--na {
  background: transparent;
  color: var(--muted);
  font-weight: 400;
}

.catalog-index__dl--wide {
  min-width: 7.5rem;
  text-align: center;
  white-space: nowrap;
}

.catalog-index__cell--docs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.catalog-del-btn {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #dc2626;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
  opacity: 0.5;
}

.catalog-del-btn:hover {
  background: #dc2626;
  color: #fff;
  opacity: 1;
}

.prod-name-mobile,
.hdr-name-mobile {
  display: none;
}

@media (max-width: 700px) {
  .catalog-index__row {
    grid-template-columns: 36px 1fr 60px 100px;
  }
  .catalog-index__cell--name {
    display: none;
  }
  .catalog-index__header .catalog-index__cell--name {
    display: none;
  }
  .catalog-index__cell {
    padding: 0.4rem 0.3rem;
    font-size: 0.82rem;
  }
  .catalog-index__cell--page {
    font-size: 0.78rem;
  }
  .catalog-index__cell--sku {
    font-size: 0.78rem;
    line-height: 1.3;
  }
  .prod-name-mobile {
    display: block;
    font-size: 0.68rem;
    color: var(--muted);
    margin-top: 0.1rem;
    word-break: break-word;
  }
  .prod-name-mobile a {
    color: var(--muted);
    font-weight: 400;
  }
  .hdr-name-mobile {
    display: inline;
    font-weight: 400;
    font-size: 0.68rem;
  }
  .catalog-index__dl {
    font-size: 0.6rem;
    padding: 0.2rem 0.25rem;
  }
  .catalog-index__dl--wide {
    min-width: auto;
    font-size: 0.6rem;
    padding: 0.2rem 0.3rem;
  }
  .catalog-del-btn {
    width: 20px;
    height: 20px;
    font-size: 0.85rem;
  }
}

/* ========================================
   Phone (<600px) — compact everything
   ======================================== */
@media (max-width: 600px) {
  .wrap {
    width: 94vw;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .hero h1 {
    font-size: clamp(1.4rem, 5.5vw, 1.8rem);
    margin-bottom: 0.4rem;
  }

  .lead {
    font-size: 0.92rem;
    margin-bottom: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-visual {
    padding: 0.5rem;
  }

  .hero-visual img {
    aspect-ratio: auto;
    max-height: 280px;
  }

  section {
    padding: 1.5rem 0;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .section-sub {
    font-size: 0.88rem;
    margin-bottom: 1rem;
  }

  .highlights {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 0.85rem 1rem;
  }

  .card h3 {
    font-size: 0.95rem;
  }

  .card p {
    font-size: 0.85rem;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  table.spec {
    font-size: 0.82rem;
  }

  table.spec th,
  table.spec td {
    padding: 0.45rem 0.55rem;
  }

  .gallery-layout--v2 .thumbs button,
  .gallery-layout--v2 .thumbs .gthumb {
    flex: 0 0 72px;
  }

  .btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.88rem;
  }

  /* Catalog mobile */
  .catalog-hero {
    padding: 2.5rem 0 2rem;
  }

  .catalog-hero__title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .catalog-hero__lead {
    font-size: 0.95rem;
  }

  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-toolbar__actions .btn {
    width: 100%;
  }

  .contact-info {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
  }

  .footer-meta {
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
  }
}

/* Page number badge on product detail pages */
.page-badge {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--blue-hover);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

/* Documents dropdown */
.docs-dropdown {
  position: relative;
  display: inline-block;
}

.docs-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
}

.docs-dropdown__item {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.docs-dropdown__item:last-child {
  border-bottom: none;
}

.docs-dropdown__item:hover {
  background: var(--blue-soft);
  text-decoration: none;
  color: var(--blue-hover);
}

/* ========================================
   Print / A4 styles  (used by window.print())
   ======================================== */
@page {
  size: A4;
  margin: 0.4in 0.35in;
}

@media print {
  * {
    background: transparent !important;
    box-shadow: none !important;
  }

  .site-header,
  .site-footer,
  .quote-modal,
  .btn-pdf,
  #quote-open-btn,
  .btn-secondary,
  .dl-link,
  .doc-note,
  .menu-toggle,
  .skip-link,
  .catalog-toolbar__actions,
  .catalog-card__actions,
  .thumbs,
  .gallery-toolbar,
  .stage-category,
  .stage-edit-overlay,
  .doc-toolbar,
  .doc-action {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 9.5pt;
    line-height: 1.35;
    margin: 0;
    padding: 0;
  }

  a {
    color: #000 !important;
    text-decoration: underline !important;
  }

  img {
    max-width: 100% !important;
    max-height: 100% !important;
    page-break-inside: avoid;
  }

  .wrap {
    width: 100% !important;
    max-width: 6.7in !important;
    margin: 0 auto !important;
  }

  section {
    padding: 0.12in 0 !important;
    page-break-inside: avoid;
  }

  section:nth-of-type(even) {
    background: none !important;
    border: none !important;
  }

  .hero {
    padding: 0 0 0.1in !important;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 0.15in !important;
  }

  .hero h1 {
    font-size: 14pt !important;
    margin: 0 0 3pt !important;
  }

  .lead {
    font-size: 8.5pt !important;
    margin: 0 0 6pt !important;
    max-width: none !important;
  }

  .hero-visual {
    border: 0.5pt solid #ccc !important;
    padding: 3pt !important;
  }

  .hero-visual img {
    max-height: 2.6in !important;
    aspect-ratio: auto !important;
  }

  .section-title {
    font-size: 12pt !important;
    margin-bottom: 1pt !important;
  }

  .section-sub {
    font-size: 8pt !important;
    margin-bottom: 4pt !important;
  }

  .highlights {
    grid-template-columns: 1fr 1fr !important;
    gap: 3pt !important;
  }

  .card {
    border: 0.5pt solid #ccc !important;
    padding: 3pt 5pt !important;
    page-break-inside: avoid;
  }

  .card h3 {
    font-size: 8.5pt !important;
    margin-bottom: 1pt !important;
  }

  .card p {
    font-size: 7.5pt !important;
    color: #000 !important;
  }

  .two-col {
    grid-template-columns: 1fr 1fr !important;
    gap: 3pt !important;
  }

  .stage {
    border: 0.5pt solid #ccc !important;
    padding: 3pt !important;
    min-height: auto !important;
  }

  .stage img {
    max-height: 2.8in !important;
  }

  .spec-table-wrap {
    border: 0.5pt solid #ccc !important;
  }

  table.spec {
    font-size: 7pt !important;
  }

  table.spec th,
  table.spec td {
    padding: 1.5pt 3pt !important;
    color: #000 !important;
    border-bottom: 0.5pt solid #ddd !important;
  }

  table.spec tbody th {
    color: #333 !important;
  }

  .page-badge {
    background: #eee !important;
    color: #333 !important;
    border: 0.5pt solid #ccc !important;
    font-size: 7pt !important;
    margin-bottom: 3pt !important;
  }

  .contact-info {
    border: 0.5pt solid #ccc !important;
    padding: 3pt 6pt !important;
    font-size: 7.5pt !important;
    line-height: 1.35 !important;
  }

  .contact-info a {
    color: #000 !important;
  }

  .video-player-wrap {
    border: 0.5pt solid #ccc !important;
  }

  .video-player {
    max-height: 2.2in !important;
  }

  .video-toolbar,
  .video-list,
  .video-actions {
    display: none !important;
  }

  /* Catalogue index print */
  .catalog-index {
    border: 0.5pt solid #ccc !important;
    border-radius: 3pt !important;
  }

  .catalog-index__row {
    grid-template-columns: 30pt 1fr 2fr 45pt 45pt !important;
    border-bottom: 0.5pt solid #ddd !important;
  }

  .catalog-index__header {
    background: #eee !important;
    border-bottom: 1pt solid #999 !important;
    font-size: 6.5pt !important;
  }

  .catalog-index__cell {
    padding: 3pt 2pt !important;
    font-size: 7pt !important;
  }

  .catalog-index__cell--page {
    font-size: 6.5pt !important;
  }

  .catalog-index__cell--sku {
    font-size: 6.5pt !important;
  }

  .catalog-index__dl {
    font-size: 5.5pt !important;
    padding: 1pt 2.5pt !important;
    background: #333 !important;
    color: #fff !important;
  }

  .catalog-index__dl--na {
    background: none !important;
    color: #999 !important;
  }

  .catalog-hero {
    padding: 0.15in 0 0.08in !important;
    background: none !important;
    color: #000 !important;
  }

  .catalog-hero__title {
    color: #000 !important;
    font-size: 16pt !important;
  }

  .catalog-hero__title span {
    color: #555 !important;
  }

  .catalog-hero__lead {
    color: #333 !important;
    font-size: 8.5pt !important;
  }

  .catalog-hero__count {
    background: #eee !important;
    color: #333 !important;
  }
}

.quote-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(1rem, 4vh) 1rem 2rem;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.quote-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.quote-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.quote-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  margin-top: 0.5rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.35rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.quote-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.quote-modal__close:hover {
  background: var(--blue-muted);
}

.quote-modal__title {
  margin: 0 2.75rem 0.5rem 0;
  font-size: 1.35rem;
  color: var(--text);
  padding-right: 0.5rem;
}

.quote-modal__lead {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.quote-form__row {
  margin-bottom: 1rem;
}

.quote-form__row label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.quote-form__row input,
.quote-form__row textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.quote-form__row input:focus,
.quote-form__row textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.quote-form__row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 520px) {
  .quote-form__row--half {
    grid-template-columns: 1fr;
  }
}

/* Quote modal mobile — full-screen overlay style */
@media (max-width: 480px) {
  .quote-modal {
    padding: 0;
    align-items: center;
  }
  .quote-modal__dialog {
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: 1.25rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    border: none;
  }
  .quote-modal__title {
    font-size: 1.15rem;
    margin-right: 0;
    padding-right: 2rem;
  }
  .quote-modal__lead {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
  .quote-form {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .quote-form__row {
    margin-bottom: 0.75rem;
  }
  .quote-form__row label {
    font-size: 0.82rem;
  }
  .quote-form__row input,
  .quote-form__row textarea {
    padding: 0.55rem 0.6rem;
    font-size: 0.92rem;
  }
  .quote-form__row--half {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .quote-form__actions {
    flex-direction: column;
    margin-top: auto;
    padding-top: 0.5rem;
  }
  .quote-form__actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }
}

.quote-form__hint {
  min-height: 1.25rem;
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--blue-hover);
}

.quote-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .quote-modal {
    transition: none;
  }
}

/* Mobile Navigation */
@media (max-width: 850px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: flex-start;
    z-index: 90;
  }

  .nav.is-active {
    right: 0;
  }

  .nav a {
    font-size: 1.1rem;
    font-weight: 500;
    width: 100%;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  /* Hamburger to X animation */
  .site-header .inner {
    flex-wrap: nowrap;
  }

  .site-header.nav-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .site-header.nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  .site-header.nav-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  
  body.nav-open {
    overflow: hidden;
  }
}
