/* ===== 全局防盗：禁止选中文本、禁止拖拽图片 ===== */
* {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #f4f5f7;
  color: #1f2329;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

canvas, img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* ===== 溯源水印层：全屏透明浮动，截图自带信息 ===== */
#watermark {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.38;
  background-repeat: repeat;
}

/* ===== 头部 ===== */
.site-header {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  background: #ffffff;
  border-bottom: 1px solid #e6e8eb;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px 12px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  margin: 0;
  line-height: 0;
}

.brand-logo-svg {
  height: 28px;
  width: auto;
  display: block;
}

.menu-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #1f2329;
  border-radius: 8px;
  cursor: pointer;
}

.menu-toggle:hover {
  background: #f0f1f3;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ===== 产品目录悬浮菜单面板 ===== */
.menu-panel {
  position: absolute;
  top: 100%;
  right: 24px;
  width: 500px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  z-index: 30;
}

.menu-panel[hidden] {
  display: none;
}

.menu-panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #ffffff;
  border-bottom: 1px solid #eceef1;
  font-size: 15px;
  font-weight: 700;
}

.menu-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 24px;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
}

.menu-close:hover {
  background: #f0f1f3;
}

.menu-list {
  padding: 8px 0 12px;
}

.menu-group {
  border-bottom: 1px solid #f0f1f3;
}

.menu-group-head {
  display: block;
  width: 100%;
  padding: 12px 18px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: #b60201;
  cursor: pointer;
}

.menu-group-head::before {
  content: '▸ ';
  font-weight: 700;
}

.menu-group.open .menu-group-head::before {
  content: '▾ ';
}

.menu-group-body {
  display: none;
}

.menu-group.open .menu-group-body {
  display: block;
}

.menu-item {
  display: block;
  width: 100%;
  padding: 10px 18px 10px 30px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
  color: #1f2329;
  cursor: pointer;
}

.menu-item:hover {
  background: #f4f5f7;
  color: #b60201;
}

/* ===== 产品面板（全屏滑动） ===== */
.catalog {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  flex: 1 1 auto;
}

.panel-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.panel {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.panel-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
  background: #ffffff;
}

.panel-section {
  margin-bottom: 0;
}

.panel-section-title {
  margin: 0 0 14px;
  padding-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b60201;
  border-bottom: 2px solid #b60201;
}

.panel-section-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-right: 8px;
  background: #b60201;
  border-radius: 2px;
  vertical-align: -0.1em;
}

.panel-product-title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  color: #b60201;
}

.panel-product-model {
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #1f2329;
}

.panel-type-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 10px;
  background: #b60201;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 6px;
  vertical-align: middle;
}

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

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.5;
}

.info-label {
  color: #6b7280;
  flex-shrink: 0;
}

.info-value {
  color: #1f2329;
  text-align: right;
  word-break: break-word;
}

.panel-layout {
  display: grid;
  grid-template-columns: 30% 1fr;
  grid-template-areas:
    "left header"
    "left right";
  column-gap: 24px;
  row-gap: 26px;
  align-items: start;
}

.panel-left {
  grid-area: left;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.panel-right {
  grid-area: right;
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

.panel-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;
}

.panel-media {
  grid-area: media;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-header {
  grid-area: header;
}

.panel-info {
  grid-area: info;
  min-width: 0;
}

.panel-tech .panel-grid {
  grid-template-columns: 1fr;
}

.panel-image {
  width: 100%;
  border: 1px solid #eceef1;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f1f3;
  cursor: pointer;
}

.panel-image canvas {
  width: 100%;
  height: auto;
  display: block;
}

.panel-list {
  margin: 0;
  padding-left: 20px;
  color: #1f2329;
  font-size: 14px;
  line-height: 1.7;
}

.panel-list--numbered {
  list-style: none;
  padding-left: 0;
  counter-reset: feature;
}

.panel-list--numbered li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 8px;
  counter-increment: feature;
}

.panel-list--numbered li::before {
  content: counter(feature);
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #b60201;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.panel-indicator {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 4px 12px;
  font-size: 13px;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #eceef1;
  border-radius: 999px;
}

.empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 15px;
}

/* ===== 图片查看弹层 ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-inner {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-stage {
  max-width: 88vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage canvas {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -18px;
  right: -8px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.lightbox-nav button {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.lightbox-index {
  color: #fff;
  font-size: 14px;
}

/* ===== 响应式：1024px 为 PC 端与移动端临界点 ===== */
@media (max-width: 1023px) {
  .header-inner {
    padding: 14px 16px 10px;
  }

  .brand-logo-svg {
    height: 28px;
  }

  .menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }

  .catalog {
    overflow: hidden;
  }

  .panel-inner {
    padding: 16px;
  }

  .panel-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "left"
      "right";
    column-gap: 0;
    row-gap: 20px;
  }

  .panel-left {
    gap: 0;
  }

  .panel-right {
    gap: 20px;
  }

  .panel-media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .panel-row {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 20px;
  }

  .panel-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .info-row {
    font-size: 13px;
  }
}
