/* =========================================================
   SHOP3D UI + LOADER STYLES
   Location: /css/shop3d.css
   Philosophy:
   - Minimal DOM
   - GPU-friendly transitions
   - Touch-first, desktop-enhanced
   - No scroll trapping
   - High contrast / readable
========================================================= */

:root {
  --neon: #00ff99;
  --bg: rgba(0,0,0,0.92);
  --panel: rgba(10,10,10,0.9);
  --border: rgba(255,255,255,0.12);
  --muted: #777;
  --danger: #ff4d4d;
  --font-mono: 'Space Mono', system-ui, monospace;
}

/* ===============================
   RESET / SAFETY
=============================== */
html, body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #fff;
  overscroll-behavior: none;
  touch-action: manipulation;
}

/* ===============================
   LOADER
=============================== */
#shop3d-loader {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0.85),
    rgba(0,0,0,1)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-family: var(--font-mono);
}

#shop3d-loader.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.loader-inner {
  width: min(360px, 90vw);
  text-align: center;
}

.loader-title {
  letter-spacing: 4px;
  font-size: 0.9rem;
  color: var(--neon);
  margin-bottom: 24px;
}

.loader-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--neon),
    transparent
  );
  transition: width 0.3s ease;
}

.loader-status {
  margin-top: 16px;
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: #aaa;
}

.loader-skip {
  margin-top: 30px;
  background: transparent;
  border: 1px solid var(--border);
  color: #aaa;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.6rem;
  letter-spacing: 2px;
  cursor: pointer;
}

.loader-skip:hover {
  border-color: var(--neon);
  color: var(--neon);
}

/* ===============================
   3D UI ROOT
=============================== */
#shop3d-ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  font-family: var(--font-mono);
}

#shop3d-ui.visible {
  pointer-events: auto;
}

/* ===============================
   PRODUCT PANEL
=============================== */
.shop3d-panel {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 20px;
  min-width: 260px;
  max-width: 90vw;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.shop3d-panel.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.shop3d-meta {
  margin-bottom: 14px;
}

.shop3d-title {
  font-size: 0.8rem;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.shop3d-price {
  color: var(--neon);
  font-size: 0.75rem;
}

.shop3d-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* ===============================
   BUTTONS
=============================== */
.shop3d-btn {
  flex: 1;
  border: 1px solid var(--border);
  background: transparent;
  color: #fff;
  padding: 10px 8px;
  font-family: inherit;
  font-size: 0.6rem;
  letter-spacing: 2px;
  cursor: pointer;
}

.shop3d-btn.primary {
  border-color: var(--neon);
  color: var(--neon);
}

.shop3d-btn.secondary {
  color: #ccc;
}

.shop3d-btn:hover {
  background: rgba(255,255,255,0.06);
}

.shop3d-btn.pulse {
  animation: pulse 0.8s ease;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 rgba(0,255,153,0); }
  50% { box-shadow: 0 0 14px rgba(0,255,153,0.6); }
  100% { box-shadow: 0 0 0 rgba(0,255,153,0); }
}

/* ===============================
   EXIT BUTTON
=============================== */
.shop3d-exit {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  pointer-events: auto;
}

.shop3d-exit:hover {
  border-color: var(--neon);
  color: var(--neon);
}

/* ===============================
   MOBILE MODE
=============================== */
.shop3d-mobile .shop3d-panel {
  bottom: 20px;
}

.shop3d-mobile .shop3d-exit {
  top: auto;
  bottom: 20px;
  right: 20px;
}

.shop3d-mobile .shop3d-btn {
  font-size: 0.65rem;
  padding: 12px 10px;
}

/* ===============================
   SAFETY / FALLBACK
=============================== */
@media (prefers-reduced-motion: reduce) {
  .shop3d-panel,
  .loader-fill {
    transition: none !important;
  }
}
