/* ==========================================================================
   Nik Darou Spadana (NDS) - 100% Spatial 3D Interface Stylesheet
   Local Vazirmatn Font Integration (Offline-Ready & High Speed)
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary-3d: #0284c7;
  --primary-glow: rgba(2, 132, 199, 0.45);
  --accent-red: #dc2626;
  --accent-red-glow: rgba(220, 38, 38, 0.5);
  --accent-green: #10b981;
  --bg-deep: #040914;
  --hud-bg: rgba(6, 17, 34, 0.78);
  --hud-border: rgba(56, 189, 248, 0.22);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  font-family: 'Vazirmatn', -apple-system, Tahoma, sans-serif;
  direction: rtl;
  color: #ffffff;
}

/* Fixed Fullscreen 3D WebGL Canvas */
#spatial-canvas-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  cursor: grab;
}

#spatial-canvas-container:active {
  cursor: grabbing;
}

/* UI Overlay Container (pointer-events: none, children enable it) */
.spatial-ui-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 2rem;
}

.interactive-ui {
  pointer-events: auto;
}

/* Top Header Bar */
.spatial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.spatial-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--hud-bg);
  backdrop-filter: blur(16px);
  padding: 0.6rem 1.4rem;
  border-radius: 9999px;
  border: 1px solid var(--hud-border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px var(--primary-glow);
}

.spatial-brand-img {
  height: 38px;
  width: auto;
}

.spatial-brand-text {
  display: flex;
  flex-direction: column;
}

.spatial-brand-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
}

.spatial-brand-sub {
  font-size: 0.72rem;
  color: #38bdf8;
  letter-spacing: 1px;
}

/* Top Spatial Room Nav */
.spatial-nav-pills {
  display: flex;
  gap: 0.5rem;
  background: var(--hud-bg);
  backdrop-filter: blur(16px);
  padding: 0.4rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid var(--hud-border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.zone-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.zone-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.zone-btn.active {
  background: linear-gradient(135deg, var(--accent-red) 0%, #b91c1c 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--accent-red-glow);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Left Sector Waypoint HUD */
.spatial-left-hud {
  position: fixed;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  background: var(--hud-bg);
  backdrop-filter: blur(16px);
  padding: 1.5rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--hud-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.hud-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #64748b;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.hud-dot:hover, .hud-dot.active {
  background-color: var(--primary-3d);
  border-color: #ffffff;
  box-shadow: 0 0 12px var(--primary-3d);
  transform: scale(1.3);
}

.hud-dot-label {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(3, 7, 18, 0.9);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 1px solid var(--hud-border);
}

.hud-dot:hover .hud-dot-label {
  opacity: 1;
}

/* Holographic Spatial Panels (Active for each Zone) */
.spatial-panel {
  position: absolute;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92) translateY(20px);
}

.spatial-panel.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

/* Zone 1: Home Center Hero Card */
#panel-home {
  right: 5%;
  bottom: 12%;
  max-width: 580px;
  background: var(--hud-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hud-border);
  border-radius: 20px;
  padding: 2.25rem 2.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 30px var(--primary-glow);
}

.panel-tag {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.4);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.panel-title {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.panel-desc {
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

/* Zone 2: Products Showcase HUD */
#panel-products {
  right: 4%;
  bottom: 8%;
  max-width: 480px;
  background: var(--hud-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hud-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.7), 0 0 25px var(--primary-glow);
}

.bottle-switcher-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.bottle-nav-btn {
  flex: 1;
  padding: 0.55rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.bottle-nav-btn.active {
  background: var(--primary-3d);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* Zone 3: About Terminal */
#panel-about {
  right: 6%;
  top: 18%;
  max-width: 520px;
  background: var(--hud-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hud-border);
  border-radius: 20px;
  padding: 2.25rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.7);
}

/* Zone 4: Distributors Terminal */
#panel-distributors {
  left: 6%;
  top: 16%;
  max-width: 500px;
  background: var(--hud-bg);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 20px;
  padding: 2.25rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.7), 0 0 30px var(--accent-red-glow);
}

/* Zone 5: Blog Knowledge */
#panel-blog {
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%) scale(0.92);
  width: 90%;
  max-width: 980px;
  background: var(--hud-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hud-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.7);
}

#panel-blog.active {
  transform: translateX(-50%) scale(1);
}

/* Zone 6: Contact Radar Panel */
#panel-contact {
  right: 6%;
  bottom: 10%;
  max-width: 480px;
  background: var(--hud-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hud-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.7);
}

/* Futuristic 3D Action Buttons */
.btn-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-3d-red {
  background: linear-gradient(135deg, var(--accent-red) 0%, #b91c1c 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px var(--accent-red-glow);
}

.btn-3d-red:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--accent-red-glow);
}

.btn-3d-cyan {
  background: linear-gradient(135deg, var(--primary-3d) 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-3d-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--primary-glow);
}

.btn-3d-glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-3d-glass:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Bottom Spatial Control Bar */
.spatial-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--hud-bg);
  backdrop-filter: blur(16px);
  padding: 0.6rem 1.75rem;
  border-radius: 9999px;
  border: 1px solid var(--hud-border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  font-size: 0.85rem;
  color: #94a3b8;
}

.footer-hint {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-hint kbd {
  background: rgba(255, 255, 255, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  color: #38bdf8;
  font-family: inherit;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .spatial-nav-pills {
    display: none;
  }
  #panel-home, #panel-products, #panel-about, #panel-distributors, #panel-contact {
    right: 1rem;
    left: 1rem;
    bottom: 4.5rem;
    max-width: none;
    top: auto;
  }
  .spatial-left-hud {
    display: none;
  }
}
