/**
 * 廠區動線導覽 — Figma node 125:201（tour 區塊）
 * 僅用於 index-copy.html
 */

.pub-section--tgm-tour-v2 {
  --tour-v2-rail-gutter: clamp(24px, calc((100% - 1160px) / 2), 120px);
  padding:
    0
    var(--tour-v2-rail-gutter)
    120px !important;
  background: #fff;
}

.pub-section--tgm-tour-v2 .pub-section__inner--tgm-tour {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* ── Header ── */
.pub-tour-v2__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 640px;
  margin: 0 auto 16px;
  text-align: center;
}

.pub-tour-v2__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 16.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e60012;
}

.pub-tour-v2__eyebrow-mark {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  background: #e60012;
}

.pub-tour-v2__title {
  margin: 0;
  font-family: 'Noto Sans TC', 'PingFang TC', sans-serif;
  font-size: 36px;
  font-weight: 600;
  line-height: 48px;
  color: #111;
}

/* ── 廠區 tabs ── */
.pub-section--tgm-tour-v2 .pub-factory-tabs--v2 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 24px;
  padding: 3px;
  background: transparent;
  border: none;
  border-radius: 9999px;
}

.pub-section--tgm-tour-v2 .pub-factory-tabs--v2 .pub-factory-tabs__pill {
  padding: 8px 16px;
  border: none;
  border-radius: 9999px;
  background: transparent;
  font-family: 'Noto Sans TC', 'PingFang TC', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 18.2px;
  color: rgba(17, 17, 17, 0.6);
  box-shadow: none;
  cursor: default;
}

.pub-section--tgm-tour-v2 .pub-factory-tabs--v2 .pub-factory-tabs__pill--active {
  border-radius: 0;
  border-bottom: 2px solid #df2f2f;
  background: transparent;
  color: #111;
  font-weight: 600;
  box-shadow: none;
}

/* ── 主舞台 ── */
.pub-vtour-tgm--v2 {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__layout {
  display: grid;
  grid-template-columns: minmax(0, 484px) 24px minmax(0, 651px);
  align-items: stretch;
  justify-content: center;
  min-height: 467px;
  max-width: calc(484px + 24px + 651px);
  margin: 0 auto;
}

/* ── 左：廠區地圖卡 ── */
.pub-vtour-tgm--v2 .pub-vtour-tgm__model-col {
  grid-column: 1;
  flex: none;
  max-width: none;
  padding: 0;
  border: none;
  overflow: visible;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__model-wrap {
  position: relative;
  width: 100%;
  height: 467px;
  min-height: 467px;
  border-radius: 8px;
  overflow: hidden;
  background: #f9f9f9;
  box-shadow: none;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__model-wrap canvas {
  display: block;
  width: 100%;
  height: calc(100% - 52px);
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__poi-layer {
  position: absolute;
  inset: 0;
  bottom: 52px;
  z-index: 2;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__poi {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__poi-tip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  font-family: 'PingFang TC', 'Noto Sans TC', sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  color: #fff;
  white-space: nowrap;
  box-shadow: none;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__poi-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #9aa3af;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__poi--active .pub-vtour-tgm__poi-tip {
  background: #df2f2f;
  box-shadow: 0 4px 6px rgba(214, 107, 99, 0.45);
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__poi--active .pub-vtour-tgm__poi-dot {
  width: 36px;
  height: 36px;
  background: #df2f2f;
  font-size: 15px;
  box-shadow:
    0 0 0 3px rgba(214, 107, 99, 0.35),
    0 6px 17px rgba(214, 107, 99, 0.5);
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__map-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 12px;
  pointer-events: none;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__map-footer-line {
  width: calc(100% - 18px);
  height: 1px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.1);
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__map-footer-label {
  margin: 0;
  font-family: 'Noto Sans TC', 'PingFang TC', sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 21px;
  color: #111;
}

/* ── 右：環景 ── */
.pub-vtour-tgm--v2 .pub-vtour-tgm__pano-col {
  grid-column: 3;
  flex: none;
  max-width: none;
  padding: 0;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__viewer {
  height: 100%;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__canvas {
  position: relative;
  width: 100%;
  height: 467px;
  min-height: 467px;
  border-radius: 8px;
  overflow: hidden;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__pano {
  position: absolute;
  inset: 0;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__scene-overlay {
  position: absolute;
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  height: 113px;
  z-index: 2;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__drag-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  font-family: 'PingFang TC', 'Noto Sans TC', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__drag-badge-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: block;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__scene-info {
  position: absolute;
  left: 35px;
  right: 69px;
  bottom: 24px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  pointer-events: none;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__scene-tag,
.pub-vtour-tgm--v2 .pub-vtour-tgm__poster,
.pub-vtour-tgm--v2 .pub-vtour-tgm__toolbar,
.pub-vtour-tgm--v2 [data-vtour-tgm-advance] {
  display: none !important;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__scene-title {
  margin: 0;
  font-family: 'PingFang TC', 'Noto Sans TC', sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 25px;
  letter-spacing: -0.4px;
  color: #fff;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__scene-desc {
  margin: 0;
  font-family: 'PingFang TC', 'Noto Sans TC', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  color: rgba(255, 255, 255, 0.8);
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__nav-round {
  position: absolute;
  right: 17px;
  bottom: 24px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__nav-round-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__nav-round-btn svg {
  width: 14px;
  height: 14px;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__nav-round-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.pub-vtour-tgm--v2 .pub-vtour-tgm__nav-round-btn:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1160px) {
  .pub-vtour-tgm--v2 .pub-vtour-tgm__layout {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 651px;
  }

  .pub-vtour-tgm--v2 .pub-vtour-tgm__model-col,
  .pub-vtour-tgm--v2 .pub-vtour-tgm__pano-col {
    grid-column: 1;
  }

  .pub-vtour-tgm--v2 .pub-vtour-tgm__model-wrap,
  .pub-vtour-tgm--v2 .pub-vtour-tgm__canvas {
    height: clamp(360px, 52vw, 467px);
    min-height: 360px;
  }
}

@media (max-width: 767px) {
  .pub-section--tgm-tour-v2 {
    padding-top: 0 !important;
    padding-bottom: 120px !important;
  }

  .pub-tour-v2__title {
    font-size: clamp(28px, 7vw, 36px);
    line-height: 1.25;
  }
}
