/* Section: tour_360 — mockup EXALCO-Showroom "360 tour" (poster, rotating 360° badge, click-to-load viewer). */

.ex-tour-360__eyebrow { margin-bottom: 14px; }
.ex-tour-360__title { margin: 0 0 18px; font-size: var(--ex-fs-h2-md); line-height: 1.05; }

.ex-tour-360__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 8;
  border: 1.5px solid var(--ex-ink);
  background: var(--ex-dark);
}
.ex-tour-360__poster { position: absolute; inset: 0; }
.ex-tour-360__poster-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ex-tour-360__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(32, 35, 43, .35) 0%, rgba(32, 35, 43, .1) 45%, rgba(32, 35, 43, .6) 100%);
  pointer-events: none;
}

/* ---- Badge: dashed ring rotating once every 14s around "360°" ---- */
.ex-tour-360__badge { position: relative; display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; transition: transform var(--ex-t-slow) var(--ex-ease-out); }
.ex-tour-360__ring { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255, 255, 255, .85); animation: ex-tour-360-spin 14s linear infinite; }
.ex-tour-360__badge-text { position: relative; font-size: 22px; font-weight: 900; line-height: 1; letter-spacing: .02em; color: var(--ex-white); }
.ex-tour-360__hint {
  padding: 8px 14px;
  background: rgba(32, 35, 43, .65);
  color: var(--ex-white);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .18em;
  text-align: center;
  transition: background var(--ex-t-base);
}

/* poster only (no tour URL): centred badge, nothing clickable */
.ex-tour-360__static { position: absolute; top: 50%; left: 50%; z-index: var(--ex-z-raised); transform: translate(-50%, -50%); pointer-events: none; }

/* click-to-load: the whole frame is the button */
.ex-tour-360__load {
  position: absolute;
  inset: 0;
  z-index: var(--ex-z-raised);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ex-white);
  font: inherit;
  cursor: pointer;
}
.ex-tour-360__load:hover .ex-tour-360__badge,
.ex-tour-360__load:focus-visible .ex-tour-360__badge { transform: scale(1.08); }
.ex-tour-360__load:hover .ex-tour-360__hint,
.ex-tour-360__load:focus-visible .ex-tour-360__hint { background: var(--ex-red); }
.ex-tour-360__load:focus-visible { outline: 2px solid var(--ex-white); outline-offset: -6px; }

/* ---- Viewer (iframe inserted by JS) ---- */
.ex-tour-360__viewer { position: absolute; inset: 0; z-index: 3; background: var(--ex-dark); }
.ex-tour-360__viewer iframe { display: block; width: 100%; height: 100%; border: 0; }
.ex-tour-360__frame.is-loading .ex-tour-360__ring { animation-duration: 1.6s; }
.ex-tour-360__frame.is-loaded .ex-tour-360__poster,
.ex-tour-360__frame.is-loaded .ex-tour-360__shade,
.ex-tour-360__frame.is-loaded .ex-tour-360__load { display: none; }

.ex-tour-360__fullscreen {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--ex-touch);
  height: var(--ex-touch);
  margin: 0;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, .6);
  border-radius: 0;
  background: rgba(32, 35, 43, .65);
  color: var(--ex-white);
  cursor: pointer;
  transition: background var(--ex-t-base), border-color var(--ex-t-base);
}
.ex-tour-360__fullscreen:hover,
.ex-tour-360__fullscreen:focus-visible { border-color: var(--ex-red); background: var(--ex-red); }
.ex-tour-360__frame:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; border: 0; }

/* no-JS fallback link */
.ex-tour-360__fallback {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  transform: translateX(-50%);
  padding: 12px 18px;
  background: var(--ex-white);
  color: var(--ex-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-align: center;
}

@keyframes ex-tour-360-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---- Responsive (proposal — not designed) ---- */
@media (max-width: 899px) {
  .ex-tour-360__frame { aspect-ratio: 16 / 10; }
}
@media (max-width: 599px) {
  .ex-tour-360__frame { aspect-ratio: 4 / 3; }
  .ex-tour-360__badge { width: 76px; height: 76px; }
  .ex-tour-360__badge-text { font-size: 18px; }
  .ex-tour-360__hint { font-size: 10px; letter-spacing: .14em; }
  .ex-tour-360__fullscreen { right: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ex-tour-360__ring { animation: none; }
  .ex-tour-360__badge,
  .ex-tour-360__hint,
  .ex-tour-360__fullscreen { transition: none; }
  .ex-tour-360__load:hover .ex-tour-360__badge,
  .ex-tour-360__load:focus-visible .ex-tour-360__badge { transform: none; }
}
