/* ESTILOS GENERALES Y RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: #f7f7f7;
  color: #8F5003;
}

.hidden {
  display: none !important;
}

.btn-primary {
  padding: 12px 24px;
  background-color: #ff385c;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.main-preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* PÁGINA DE RECORRIDO FOTOGRÁFICO */
.tour-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Oculta el scroll global de la pantalla */
}

/* HEADER FIJO Y CENTRADO */
.tour-header {
  position: relative;
  background: #ffffff;
  display: flex;
  justify-content: center; /* Centra el contenedor/textos de h1 y h2 */
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #e0e0e0;
  z-index: 10;
  flex-shrink: 0; /* Impide que el header cambie de tamaño */
}

/* BOTÓN DE VOLVER JUSTIFICADO A LA IZQUIERDA */
.btn-back-to-property {
  position: absolute;
  left: 24px;
  color: #222222;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.btn-back-to-property:hover {
  background-color: #f2f2f2;
  color: #000000;
}

.tour-header h1 {
  font-size: 30px;
  margin: 0;
  font-weight: 700;
  color: #8F5003;
  text-align: center;
}

.tour-header h2 {
  font-size: 26px;
  margin: 0;
  font-weight: 700;
  color: #8F5003;
  text-align: center;
}

i {
  font-size: 22px;
  line-height: 0;
  margin-right: 8px;
  color: var(--accent-color);
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  margin-right: 20px;
  line-height: 1;
}

/* TIRA SUPERIOR DE CATEGORÍAS */
.categories-strip {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 24px;
  z-index: 9;
  flex-shrink: 0; /* Impide que se reduzca su alto */
}

.strip-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
}

.strip-item {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}

.strip-item img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
}

.strip-item span {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  white-space: nowrap;
}

.strip-item.active {
  opacity: 1;
}

.strip-item.active img {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

/* ESTRUCTURA DEL CONTENIDO CON SCROLL PROPIO */
.tour-content {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px;
  flex: 1; /* Ocupa el espacio restante en pantalla */
  overflow-y: auto; /* La barra de scroll aparece a partir de esta clase */
  scroll-behavior: smooth; /* Permite el scroll suave al hacer clic en categorías */
}

.space-section {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: start;
  scroll-margin-top: 16px; /* Espaciado superior tras hacer scroll automático */
}

/* INFORMACIÓN DEL ESPACIO - FIJA DENTRO DEL CONTENEDOR DE SCROLL */
.space-info {
  position: sticky;
  top: 0px;
}

.space-info img {
  position: static;
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 4px;
}

.space-info h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.space-info p {
  color: #6a6a6a;
  font-size: 14px;
  line-height: 1.5;
}

/* GALERÍA DE IMÁGENES DERECHA */
.space-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.space-gallery img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  cursor: pointer;
  transition: filter 0.2s;
}

.space-gallery img:hover {
  filter: brightness(0.95);
}

/* VISOR FULL-SCREEN (MODAL 2) */
.full-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
}

.close-btn.white {
  color: #ffffff;
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 210;
}

.viewer-counter {
  position: absolute;
  top: 24px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

.viewer-image-container {
  max-width: 85vw;
  max-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.viewer-image-container img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  font-size: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.2s;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.prev-btn { left: 24px; }
.next-btn { right: 24px; }

/* DISEÑO RESPONSIVO */
@media (max-width: 768px) {
  .space-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .space-info {
    position: static;
  }
}