* {
    box-sizing: border-box;
  }

  body {
    margin: 0;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background: #f5f5f5;
    color: #222;
  }

  .page {
    width: 100%;
    padding: 40px 0;
  }

  .hotspot-section {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
  }

  .hotspot-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 750;
    overflow: hidden;
    background: #ddd;
  }

  .hotspot-bg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hotspot-item {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 2;
    transform: translate(-50%, -50%);
  }

  .hotspot-dot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #651e7c;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 0 0 8px rgba(101, 30, 124, 0.22);
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .hotspot-dot::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: rgba(101, 30, 124, 0.18);
    animation: pulse 1.8s infinite;
    z-index: -1;
  }

  .hotspot-dot:hover,
  .hotspot-item.active .hotspot-dot {
    background: #581c87;
    transform: scale(1.08);
  }

  @keyframes pulse {
    0% {
      transform: scale(0.85);
      opacity: 0.8;
    }
    70% {
      transform: scale(1.4);
      opacity: 0;
    }
    100% {
      transform: scale(1.4);
      opacity: 0;
    }
  }

  .hotspot-card {
    position: absolute;
    width: 220px;
    padding: 12px;
    background: #fff;
    color: #333;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
  }

  .hotspot-card::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
  }

  .hotspot-card img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 10px;
  }

  .hotspot-card span {
    display: block;
    font-size: 15px;
    line-height: 1.4;
  }

  .hotspot-card:hover span {
    text-decoration: underline;
  }

  .card-right .hotspot-card {
    left: 48px;
    top: 50%;
    transform: translateY(calc(-50% + 10px));
  }

  .card-right .hotspot-card::before {
    left: -8px;
    top: 50%;
    margin-top: -8px;
  }

  .card-left .hotspot-card {
    right: 48px;
    top: 50%;
    transform: translateY(calc(-50% + 10px));
  }

  .card-left .hotspot-card::before {
    right: -8px;
    top: 50%;
    margin-top: -8px;
  }

  .card-top .hotspot-card {
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%) translateY(10px);
  }

  .card-top .hotspot-card::before {
    left: 50%;
    bottom: -8px;
    margin-left: -8px;
  }

  .hotspot-item:hover .hotspot-card,
  .hotspot-item.active .hotspot-card {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .card-right:hover .hotspot-card,
  .card-right.active .hotspot-card,
  .card-left:hover .hotspot-card,
  .card-left.active .hotspot-card {
    transform: translateY(-50%);
  }

  .card-top:hover .hotspot-card,
  .card-top.active .hotspot-card {
    transform: translateX(-50%) translateY(0);
  }

  @media (max-width: 768px) {
    .page {
      padding: 20px 12px;
    }

    /* 手机端允许产品卡片超出背景图区域，避免被热点图容器裁切 */
    .hotspot-image-wrap {
      overflow: visible;
    }

    .hotspot-dot {
      width: 26px;
      height: 26px;
      font-size: 20px;
      box-shadow: 0 0 0 6px rgba(101, 30, 124, 0.2);
    }

    .hotspot-card {
      width: min(68vw, 180px);
      max-width: 180px;
      padding: 8px;
    }

    .hotspot-card::before {
      display: none;
    }

    .hotspot-card span {
      font-size: 13px;
    }

    /* 手机端不再使用左、右、上方弹窗方向，统一交给 active 状态居中显示 */
    .card-right .hotspot-card,
    .card-left .hotspot-card,
    .card-top .hotspot-card {
      left: auto;
      right: auto;
      top: auto;
      bottom: auto;
      transform: none;
    }

    /* 手机端避免浏览器模拟 hover 时弹窗错位，只保留点击后的 active 显示 */
    .hotspot-item:hover:not(.active) .hotspot-card {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    /* 点击热点后，让当前热点铺满整张图片区域 */
    .hotspot-item.active {
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      z-index: 20;
      display: flex;
      align-items: center;
      justify-content: center;
      transform: none;
      pointer-events: none;
    }

    /* active 后隐藏当前被点击的热点按钮，避免它盖到居中的产品图片上 */
    .hotspot-item.active .hotspot-dot {
      display: none;
    }

    /* active 后，产品卡片统一在图片区域水平垂直居中 */
    .hotspot-item.active .hotspot-card {
      position: static;
      z-index: 3;
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: none !important;
    }
  }