/* --------------------------------------------------------------------------
   7. INTERFAZ DEL VISOR PÚBLICO (SIMULADOR VECTORIAL)
   -------------------------------------------------------------------------- */
.product-preview {
  position: relative;
  width: 100%;
}

.preview-window {
  width: 100%;
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.hero-product-shot {
  position: relative;
  margin: 0;
  background: #e2e8f0;
  overflow: hidden;
}

.hero-product-shot::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.hero-product-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: top center;
  transition: transform var(--transition-slow);
}

.preview-window:hover .hero-product-shot img {
  transform: scale(1.015);
}

.hero-product-shot figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.78);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-product-shot figcaption span {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--primary-emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Barra de herramientas */
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background-color: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-controls span {
  width: 11px;
  height: 11px;
  border-radius: var(--radius-full);
}

.window-controls span:nth-child(1) {
  background-color: #ef4444;
}

.window-controls span:nth-child(2) {
  background-color: #eab308;
}

.window-controls span:nth-child(3) {
  background-color: #22c55e;
}

.preview-toolbar p {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark-slate);
}

.live-status {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  animation: pulseDot 1.5s infinite;
}

/* Estructura del mapa */
.map-interface {
  display: grid;
  grid-template-columns: 210px 1fr;
  height: 400px;
  background-color: var(--body-bg);
}

/* Sidebar del Mapa */
.map-sidebar {
  background-color: var(--bg-panel);
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
}

.map-kicker {
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.08em;
}

.map-sidebar h2 {
  font-size: 1.1rem;
  margin-top: -6px;
}

.map-search-label {
  display: none;
}

.map-search {
  background-color: white;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.75rem;
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.map-search:hover {
  border-color: var(--primary);
}

/* Lista de capas catastrales */
.layer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.layer-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
}

.layer-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.layer-green {
  background-color: rgba(16, 185, 129, 0.7);
  border: 1.5px solid #10b981;
}

.layer-blue {
  background-color: rgba(10, 116, 184, 0.7);
  border: 1.5px solid #0a74b8;
}

.layer-cyan {
  background-color: rgba(0, 188, 212, 0.6);
  border: 1.5px solid #00bcd4;
}

/* Tarjeta del predio seleccionado */
.parcel-card {
  margin-top: auto;
  background-color: white;
  border: 1px solid rgba(10, 116, 184, 0.12);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.parcel-card small {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.parcel-card strong {
  display: block;
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 800;
}

.parcel-card div {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-top: 6px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding-top: 6px;
}

.parcel-card b.verified {
  color: #10b981;
}

/* Lienzo del Mapa (Canvas) */
.map-canvas {
  position: relative;
  background-color: #e2e8f0;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.05);
}

/* Cuadrículas e infraestructura */
.map-canvas::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 24px 24px;
  background-image: radial-gradient(rgba(0, 0, 0, 0.08) 1.5px, transparent 1.5px);
}

/* Calles */
.map-road {
  position: absolute;
  background-color: #cbd5e1;
}

.road-one {
  top: 80px;
  left: 0;
  width: 100%;
  height: 24px;
  transform: rotate(-10deg);
}

.road-two {
  top: 0;
  left: 180px;
  width: 28px;
  height: 100%;
}

.road-three {
  bottom: 60px;
  left: 0;
  width: 100%;
  height: 20px;
}

/* Lotes (Predios) */
.parcel {
  position: absolute;
  border-radius: 4px;
  background-color: rgba(203, 213, 225, 0.6);
  border: 1.5px dashed rgba(71, 85, 105, 0.4);
  transition: all var(--transition-normal);
}

.parcel-one {
  top: 20px;
  left: 30px;
  width: 80px;
  height: 50px;
}

.parcel-two {
  top: 120px;
  left: 20px;
  width: 90px;
  height: 70px;
}

.parcel-three {
  top: 110px;
  left: 230px;
  width: 80px;
  height: 90px;
}

.parcel-four {
  top: 220px;
  left: 240px;
  width: 90px;
  height: 80px;
}

/* Lote Activo (Seleccionado y Resaltado) */
.parcel-active {
  top: 210px;
  left: 50px;
  width: 100px;
  height: 80px;
  background-color: rgba(10, 116, 184, 0.12);
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseActiveParcel 3s infinite;
}

.parcel-active span {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-dark);
  background-color: white;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

/* Pin del Mapa */
.map-pin {
  position: absolute;
  top: 230px;
  left: 95px;
  transform: translate(-50%, -100%);
  animation: bouncePin 2s infinite;
}

.map-pin span {
  display: block;
  width: 16px;
  height: 16px;
  background-color: var(--accent);
  border: 2px solid white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

.map-pin::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 2px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
}

/* Controles de mapa */
.map-controls {
  position: absolute;
  right: 14px;
  top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-controls span {
  width: 26px;
  height: 26px;
  background-color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--dark-slate);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition: all var(--transition-fast);
}

.map-controls span:hover {
  background-color: #f8fafc;
  color: var(--primary);
}

.map-scale {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--dark-slate);
  background-color: rgba(255, 255, 255, 0.85);
  padding: 3px 8px;
  border: 1.5px solid var(--dark-slate);
  border-top: none;
  border-radius: 0 0 3px 3px;
}

/* Tarjetas métricas flotantes */
.floating-metric {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-glass);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-glass);
  transition: transform var(--transition-normal);
}

.floating-metric:hover {
  transform: translateY(-5px);
}

.metric-one {
  top: -24px;
  left: -24px;
}

.metric-two {
  bottom: -24px;
  right: -24px;
}

.metric-symbol {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.floating-metric p {
  display: flex;
  flex-direction: column;
}

.floating-metric strong {
  font-size: 0.9rem;
  color: var(--dark);
  font-weight: 800;
}

.floating-metric small {
  font-size: 0.72rem;
  color: var(--text-muted);
}