/* Runtime CSS para planos interactivos con hotspots */
.pb-hotspot {
  --accent: #c1ab87;
  --bg: #0f0f12;
  --fg: #e9e9ed;
  --muted: #a7a7b0;
  --font-family: system-ui, -apple-system, sans-serif;
  
  position: relative;
  width: 100%;
  max-width: 100%;
  font-family: var(--font-family);
  color: var(--fg);
  background: var(--bg);
  border-radius: 12px;
  overflow: visible;
}

.pb-hotspot__stage {
  position: relative;
  width: 100%;
  display: block;
  z-index: 1;
  overflow: visible;
}

.pb-hotspot__plan {
  width: 100%;
  display: block;
  user-select: none;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.pb-hotspot__point {
  position: absolute !important;
  background: var(--accent) !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  border-radius: 50% !important;
  border: 3px solid var(--bg) !important;
  cursor: pointer !important;
  transform: translate(-50%, -50%) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  outline: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pb-hotspot__point:hover {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  z-index: 1001;
}

.pb-hotspot__point:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Iconos de hotspot */
.pb-hotspot__icon-dot {
  width: 8px;
  height: 8px;
  background: var(--bg);
  border-radius: 50%;
}

.pb-hotspot__icon-pin {
  width: 12px;
  height: 12px;
  fill: var(--bg);
}

.pb-hotspot__icon-svg {
  width: 16px;
  height: 16px;
  fill: var(--bg);
}

/* Lightbox */
.pb-hotspot__lightbox {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.92) !important;
  z-index: 99999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.pb-hotspot__lightbox.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: all !important;
  visibility: visible !important;
}

.pb-hotspot__lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  z-index: 1;
}

.pb-hotspot__lightbox-header {
  color: var(--fg);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pb-hotspot__lightbox-gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  max-height: 80vh;
}

.pb-hotspot__lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.pb-hotspot__lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  color: var(--bg);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.pb-hotspot__lightbox-nav:hover {
  opacity: 0.9;
  transform: translateY(-50%) scale(1.1);
}

.pb-hotspot__lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pb-hotspot__lightbox-nav--prev {
  left: -60px;
}

.pb-hotspot__lightbox-nav--next {
  right: -60px;
}

.pb-hotspot__lightbox-close {
  position: absolute !important;
  top: 20px !important;
  right: 20px !important;
  background: var(--accent) !important;
  color: var(--bg) !important;
  border: none !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  font-size: 24px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  z-index: 100001 !important;
  pointer-events: all !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.pb-hotspot__lightbox-close:hover {
  opacity: 0.9 !important;
  transform: scale(1.1) !important;
  background: var(--accent) !important;
}

.pb-hotspot__lightbox-close:active {
  transform: scale(0.95) !important;
}

.pb-hotspot__lightbox-counter {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pb-hotspot__lightbox-alt {
  margin-top: 8px;
  color: var(--fg);
  font-size: 14px;
  text-align: center;
  max-width: 600px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
  .pb-hotspot__point {
    width: 20px;
    height: 20px;
  }

  .pb-hotspot__lightbox-nav--prev {
    left: 10px;
  }

  .pb-hotspot__lightbox-nav--next {
    right: 10px;
  }

  .pb-hotspot__lightbox-close {
    top: 10px;
    right: 10px;
  }

  .pb-hotspot__lightbox-header {
    font-size: 18px;
  }
}

/* Animaciones */
@keyframes pb-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

.pb-hotspot__point--pulse {
  animation: pb-pulse 2s ease-in-out infinite;
}

/* Tarjeta Informativa */
.pb-hotspot__card {
  position: absolute;
  background: #ffffff;
  color: #333333;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(10px);
}

.pb-hotspot__card.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* Tarjeta sin imagen del producto - diseño más visual y destacado para contenido solo texto */
.pb-hotspot__card--title-only {
  width: auto;
  min-width: 280px;
  max-width: 400px;
  padding: 0;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.pb-hotspot__card--title-only .pb-hotspot__card-header {
  padding: 32px 40px 24px 40px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-direction: column;
  text-align: center;
  gap: 20px;
}

.pb-hotspot__card-header--centered {
  flex-direction: column;
  text-align: center;
  gap: 20px;
}

.pb-hotspot__card--title-only .pb-hotspot__card-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent, #c1ab87) 0%, rgba(193, 171, 135, 0.8) 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin: 0 auto;
}

.pb-hotspot__card--title-only .pb-hotspot__card-icon svg {
  width: 36px !important;
  height: 36px !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.pb-hotspot__card--title-only .pb-hotspot__card-title {
  flex: none;
  width: 100%;
}

.pb-hotspot__card--title-only .pb-hotspot__card-title h3 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: #333333;
  margin: 0;
  letter-spacing: -0.02em;
}

.pb-hotspot__card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.03);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 12px;
  backdrop-filter: blur(1px);
}

.pb-hotspot__card-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Cuando la tarjeta solo tiene título, hacer el overlay aún más sutil o eliminarlo */
.pb-hotspot__card--title-only ~ .pb-hotspot__card-overlay,
.pb-hotspot:has(.pb-hotspot__card--title-only.active) .pb-hotspot__card-overlay {
  background: rgba(0, 0, 0, 0.01);
  backdrop-filter: none;
}

.pb-hotspot__card-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.pb-hotspot__card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pb-hotspot__card-icon svg {
  width: 28px !important;
  height: 28px !important;
  display: block !important;
}

.pb-hotspot__card-title {
  flex: 1;
}

.pb-hotspot__card-title h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333333;
}

.pb-hotspot__card-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.pb-hotspot__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pb-hotspot__card-body {
  padding: 16px;
}

.pb-hotspot__card--title-only .pb-hotspot__card-body {
  padding: 24px 40px 32px 40px;
  text-align: center;
}

.pb-hotspot__card-fields {
  margin-bottom: 12px;
}

.pb-hotspot__card-field {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pb-hotspot__card-field:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pb-hotspot__card-field-label {
  font-weight: 600;
  color: #333333;
  min-width: 80px;
}

.pb-hotspot__card-field-value {
  flex: 1;
  color: #333333;
  opacity: 0.8;
}

.pb-hotspot__card-description {
  margin-top: 12px;
  color: #333333;
  opacity: 0.9;
  line-height: 1.6;
}

.pb-hotspot__card-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.pb-hotspot__card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent, #c1ab87);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.2s;
}

.pb-hotspot__card-link:hover {
  opacity: 0.8;
}

.pb-hotspot__card-link svg {
  width: 16px;
  height: 16px;
}

.pb-hotspot__card-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  color: #333333;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.pb-hotspot__card-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Responsive para tarjetas */
@media (max-width: 768px) {
  .pb-hotspot__card {
    position: fixed !important;
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    top: auto !important;
    max-height: 70vh !important;
    margin: 0 !important;
    transform: translateY(0) !important;
    z-index: 9999 !important;
  }
  
  .pb-hotspot__card.active {
    transform: translateY(0) !important;
  }
  
  .pb-hotspot__card--title-only {
    min-width: auto !important;
    max-width: calc(100vw - 32px) !important;
    width: calc(100vw - 32px) !important;
  }
  
  .pb-hotspot__card--title-only .pb-hotspot__card-header {
    padding: 20px 16px 16px 16px !important;
    gap: 12px !important;
  }
  
  .pb-hotspot__card--title-only .pb-hotspot__card-body {
    padding: 16px 16px 20px 16px !important;
  }
  
  .pb-hotspot__card--title-only .pb-hotspot__card-icon {
    width: 48px !important;
    height: 48px !important;
  }
  
  .pb-hotspot__card--title-only .pb-hotspot__card-icon svg {
    width: 28px !important;
    height: 28px !important;
  }
  
  .pb-hotspot__card--title-only .pb-hotspot__card-title h3 {
    font-size: 20px !important;
  }
  
  .pb-hotspot__card-header {
    padding: 12px 40px 12px 12px !important;
  }
  
  .pb-hotspot__card-body {
    padding: 12px !important;
  }
  
  .pb-hotspot__card-image {
    height: 150px !important;
  }
  
  .pb-hotspot__card-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 24px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    transition: background 0.2s, transform 0.2s !important;
  }
  
  .pb-hotspot__card-close:hover,
  .pb-hotspot__card-close:active {
    background: rgba(0, 0, 0, 0.9) !important;
    transform: scale(1.1) !important;
  }
  
  .pb-hotspot__card-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9998 !important;
    pointer-events: none !important;
  }
  
  .pb-hotspot__card-overlay.active {
    pointer-events: all !important;
  }
  
  .pb-hotspot__point {
    z-index: 10000 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .pb-hotspot__point:hover {
    z-index: 10001 !important;
  }
}

@media (max-width: 480px) {
  .pb-hotspot__card {
    width: calc(100vw - 24px) !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    max-height: 75vh !important;
  }
  
  .pb-hotspot__card--title-only {
    max-width: calc(100vw - 24px) !important;
    width: calc(100vw - 24px) !important;
  }
  
  .pb-hotspot__card-close {
    width: 44px !important;
    height: 44px !important;
    font-size: 26px !important;
    top: 6px !important;
    right: 6px !important;
  }
}

