/* ==========================================================================
   Assorted Marketplace - Fixed Luxury Showroom & True 3D Three.js Studio
   ========================================================================== */

.showroom-fixed-container {
  background: #080b11;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(229, 184, 66, 0.15);
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

/* ==========================================================================
   Top Showroom Bar
   ========================================================================== */
.showroom-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: #0d1118;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
  z-index: 20;
}

.showroom-zone-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.showroom-zone-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.showroom-zone-btn:hover {
  color: #ffffff;
  border-color: var(--border-gold);
}

.showroom-zone-btn.active {
  background: var(--accent-gold);
  color: #07090d;
  border-color: var(--accent-gold);
  box-shadow: 0 0 14px var(--accent-gold-glow);
}

.showroom-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.775rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(5, 150, 105, 0.15);
  border: 1px solid var(--accent-emerald-light);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.7); opacity: 0.4; }
}

/* ==========================================================================
   Fixed Showroom Viewport with 3D Hotspot Badges
   ========================================================================== */
.showroom-fixed-viewport {
  position: relative;
  height: 520px;
  width: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: background-image 0.5s ease-in-out;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Interactive Hotspots: anchor dot + auto-placed label card + leader line.
   Cards are positioned in JS (layoutHotspots) so they never overlap each
   other, the viewport edges, or the bottom guide.
   -------------------------------------------------------------------------- */
.hotspot-leader-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
  overflow: visible;
}

.hotspot-leader {
  stroke: rgba(229, 184, 66, 0.6);
  stroke-width: 1.25;
  stroke-dasharray: 3 4;
  transition: stroke 0.2s ease;
}

.hotspot-leader.is-active {
  stroke: rgba(229, 184, 66, 1);
  stroke-dasharray: none;
}

/* The anchor dot sits exactly on the product in the photo */
.showroom-hotspot-dot {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  padding: 0;
  border-radius: 50%;
  background: rgba(11, 15, 22, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  cursor: pointer;
  z-index: 12;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 14px rgba(229, 184, 66, 0.35);
  transition: var(--transition-fast);
}

.showroom-hotspot-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
  animation: pinRingPulse 2.2s infinite;
  pointer-events: none;
}

.showroom-hotspot-dot:hover,
.showroom-hotspot-dot.is-active {
  background: var(--accent-gold);
  color: #07090d;
  transform: scale(1.12);
  box-shadow: 0 6px 20px rgba(229, 184, 66, 0.6);
}

@keyframes pinRingPulse {
  0% { transform: scale(0.95); opacity: 0.75; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Label card — JS assigns left/top in px */
.showroom-hotspot-card {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.4rem 0.65rem;
  background: rgba(11, 15, 22, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
  border-radius: 0.7rem;
  text-align: left;
  cursor: pointer;
  z-index: 11;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font-body);
}

.showroom-hotspot-card.is-placed {
  opacity: 1;
}

.showroom-hotspot-card:hover,
.showroom-hotspot-card.is-active {
  background: rgba(229, 184, 66, 0.96);
  z-index: 14;
  box-shadow: 0 10px 26px rgba(229, 184, 66, 0.45);
}

.showroom-hotspot-card:hover .hc-name,
.showroom-hotspot-card.is-active .hc-name,
.showroom-hotspot-card:hover .hc-price,
.showroom-hotspot-card.is-active .hc-price {
  color: #07090d;
}

.hc-name {
  font-size: 0.775rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hc-price {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Bottom guide pinned left so the fixed WhatsApp CTA never sits on top of it */
.showroom-bottom-guide {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background: rgba(11, 15, 22, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  max-width: calc(100% - 1.5rem);
  overflow: hidden;
  z-index: 9;
}

.showroom-bottom-guide i {
  color: var(--accent-gold);
  flex-shrink: 0;
}

.guide-long { display: inline; }
.guide-short { display: none; }

/* ==========================================================================
   3D Interactive Studio Modal
   ========================================================================== */
.studio-modal-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 11, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.studio-modal-drawer.active {
  opacity: 1;
  pointer-events: auto;
}

.studio-drawer-inner {
  background: #0d1118;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  max-height: 94vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(229, 184, 66, 0.2);
  display: flex;
  flex-direction: column;
  transform: scale(0.96);
  transition: var(--transition-smooth);
}

.studio-modal-drawer.active .studio-drawer-inner {
  transform: scale(1);
}

.studio-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: #11151f;
  flex-shrink: 0;
}

.studio-header-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.studio-drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.studio-drawer-close-btn:hover {
  background: var(--accent-gold);
  color: #07090d;
}

/* Product Selector Row */
.studio-product-selector-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #090c12;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.studio-product-selector-row::-webkit-scrollbar {
  display: none;
}

.studio-select-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.studio-select-item:hover {
  color: #ffffff;
  border-color: var(--border-gold);
}

.studio-select-item.active {
  background: var(--accent-gold);
  color: #07090d;
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold-glow);
}

/* 3D Three.js WebGL Canvas Stage */
.studio-canvas-stage {
  position: relative;
  width: 100%;
  height: 380px;
  min-height: 320px;
  background: radial-gradient(circle at 50% 50%, #151b26 0%, #080b11 85%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  overflow: hidden;
  flex-shrink: 0;
}

.studio-canvas-stage:active {
  cursor: grabbing;
}

.studio-canvas-stage canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.studio-rotation-hint {
  position: absolute;
  bottom: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  padding: 0.4rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.785rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.studio-rotation-hint i {
  color: var(--accent-gold);
}

/* Studio Control Footer */
.studio-control-footer {
  padding: 1.5rem;
  background: #0e121a;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.studio-variant-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.picker-label {
  font-size: 0.825rem;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.swatches-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.studio-swatch-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.studio-swatch-chip:hover {
  border-color: var(--border-gold);
  color: #ffffff;
}

.studio-swatch-chip.active {
  background: rgba(229, 184, 66, 0.18);
  border-color: var(--accent-gold);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(229, 184, 66, 0.25);
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Footer Actions & Price */
.studio-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.studio-price-tag {
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-heading);
}

.studio-price-tag span {
  color: var(--accent-gold);
  font-size: 1rem;
}

.studio-btn-group {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Expandable Specs Panel */
.studio-specs-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.specs-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.specs-bullets li {
  font-size: 0.875rem;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.specs-bullets li i {
  color: var(--accent-gold);
  margin-top: 0.2rem;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 768px) {
  .showroom-fixed-viewport {
    height: 420px;
  }
  .showroom-hotspot-dot {
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    font-size: 0.7rem;
  }
  .showroom-hotspot-card {
    padding: 0.32rem 0.55rem;
    border-radius: 0.6rem;
  }
  .hc-name { font-size: 0.72rem; }
  .hc-price { font-size: 0.68rem; }
  .showroom-bottom-guide {
    font-size: 0.72rem;
    padding: 0.4rem 0.75rem;
  }
  .guide-long { display: none; }
  .guide-short { display: inline; }
  .studio-rotation-hint {
    font-size: 0.72rem;
    padding: 0.35rem 0.85rem;
  }
  .hint-long { display: none; }
  .studio-canvas-stage {
    height: 300px;
    min-height: 280px;
  }
  .studio-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .studio-btn-group {
    flex-direction: column;
  }
  .studio-btn-group .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .showroom-fixed-viewport {
    height: 360px;
  }
  .showroom-zone-btn span {
    font-size: 0.75rem;
  }
  .showroom-status-pill {
    display: none;
  }
  .studio-canvas-stage {
    height: 280px;
    min-height: 260px;
  }
}
