/* =========================================================
DISEÑO EDITORIAL EXCLUSIVO - ESTILO REVISTA DE ARQUITECTURA
============================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@200;300;400;500;600;700&display=swap');

/* Reset general */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #F9F7F2;
  color: #2D2D2D;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* BLOQUEO DE DESPLAZAMIENTO LATERAL */
  max-width: 100vw;
  position: relative; /* Necesario para anclar el grid de fondo */
}

/* ============================================================
REJILLA DE TILES ESTÁTICA (GRID ARCHITECTURAL)
============================================================ */
#grid-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background-color: #F9F7F2; /* Fondo base de la subpágina */
  background-image: 
    linear-gradient(to right, rgba(45, 45, 45, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(45, 45, 45, 0.04) 1px, transparent 1px);
  background-size: 89px 89px; /* Mismo tamaño de tile que el original */
}

/* Scrollbar minimalista y sobria */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #F9F7F2;
}
::-webkit-scrollbar-thumb {
  background: #D1D1D1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #A0A0A0;
}

/* ============================================================
DISEÑO DEL CONTENEDOR PRINCIPAL (GRID OBLIGATORIO) 
============================================================ */
#main-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 40px;
  /* Eliminado background-color para dejar ver el grid trasero */
  background-color: transparent; 
  transition: all 0.3s ease;
}

#content-column {
  animation: fadeInEffect 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#sticky-sidebar {
  position: sticky;
  top: 40px;
  align-self: start;
  transition: all 0.3s ease;
}

/* ============================================================
ESTILOS DE SECCIÓN: GALLERY HERO 
============================================================ */
#gallery-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.gallery-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #D1D1D1;
  padding-bottom: 15px;
}

.badge-exclusivity {
  background-color: #2D2D2D;
  color: #F9F7F2;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 5px 12px;
}

.property-meta-id {
  color: #7E7E7E;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gallery-interactions {
  display: flex;
  gap: 15px;
}

.btn-interaction {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #2D2D2D;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-interaction:hover {
  background-color: rgba(45, 45, 45, 0.05);
}

.btn-interaction.saved {
  color: #D32F2F;
}

.hero-viewport-container {
  overflow: hidden;
  position: relative;
  border: 1px solid #D1D1D1;
  border-radius: 4px;
  height: 520px;
  cursor: pointer;
  background-color: #000000;
}

/* Gestos táctiles: el desplazamiento vertical es de la página; el horizontal, de la galería */
.hero-viewport-container,
.lightbox-central-viewport {
  touch-action: pan-y;
}

/* Capas del hero: cada foto entra con fundido cruzado sobre la anterior */
.hero-stage,
.hero-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-layer {
  transition: opacity 0.7s ease;
}

.hero-layer.is-entering {
  opacity: 0;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-viewport-container:hover .hero-image {
  transform: scale(1.02);
}

/* Verticales: foto entera sobre su propia versión desenfocada */
.hero-layer--blur .hero-backdrop {
  position: absolute;
  inset: -60px;
  background-size: cover;
  background-position: center;
  filter: blur(38px) brightness(0.55) saturate(1.15);
  transform: scale(1.1);
}

.hero-layer--blur .hero-image {
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45));
}

/* Planos y documentos: passe-partout sobre fondo claro */
.hero-layer--paper {
  background-color: #EEE9DF;
}

.hero-paper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 28px 84px;
}

.hero-layer--paper .hero-image {
  position: static;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background-color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 12px 28px rgba(0, 0, 0, 0.14);
}

/* Crédito de la imagen: discreto, abajo a la derecha */
.hero-credit {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

.hero-layer--paper .hero-credit {
  color: #7E7E7E;
}

.photo-credit {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.photo-credit:empty {
  display: none;
}

.hero-viewport-container.is-doc .hero-gradient-overlay {
  opacity: 0;
}

.hero-viewport-container.is-doc .hero-viewport-info span {
  color: #7E7E7E !important;
}

.hero-viewport-container.is-doc .hero-viewport-info h3 {
  color: #2D2D2D !important;
}

.hero-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 38%);
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-viewport-info {
  position: absolute;
  bottom: 24px;
  left: 24px;
  color: #FFFFFF;
  pointer-events: none;
}

.hero-viewport-info span {
  font-size: 9px;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
  color: #D1D1D1 !important;
  display: block;
  margin-bottom: 4px;
}

.hero-viewport-info h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #FFFFFF !important;
}

.btn-fullscreen {
  position: absolute;
  top: 24px;
  right: 24px;
  background-color: rgba(45, 45, 45, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.btn-fullscreen:hover {
  background-color: #2D2D2D;
}

/* Contenedor principal del carrusel de miniaturas */
.thumbnail-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%; /* CONTENCIÓN FLEXBOX */
  max-width: 100%;
}

/* La tira de miniaturas: pasa de grid a flexbox horizontal */
.gallery-thumbnail-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  flex: 1; /* TOMA EL ESPACIO RESTANTE SIN PASARSE */
  min-width: 0; /* CORRECCIÓN DEL BLOWOUT FLEXBOX */
  scroll-snap-type: x mandatory; /* la tira siempre se detiene en una miniatura entera */
  -ms-overflow-style: none;  /* IE y Edge */
  scrollbar-width: none;  /* Firefox */
}
.gallery-thumbnail-strip::-webkit-scrollbar {
  display: none; /* Chrome, Safari y Opera */
}

/* Los botones de las miniaturas */
.thumbnail-button {
  background: none;
  border: 1px solid #D1D1D1;
  padding: 0;
  cursor: pointer;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 2px;
  transition: all 0.3s ease;
  flex: 0 0 calc(20% - 8px); 
  min-width: 0; 
  scroll-snap-align: start;
}

.thumbnail-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.thumbnail-button:hover img {
  opacity: 1;
}

.thumbnail-button.active {
  border: 2px solid #2D2D2D !important;
}

.thumbnail-button.active img {
  opacity: 1;
}

/* Flechas de navegación del carrusel */
.thumb-nav-arrow {
  background-color: #FFFFFF;
  border: 1px solid #D1D1D1;
  color: #2D2D2D;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-size: 1.2rem;
  font-family: serif;
  z-index: 2;
}

.thumb-nav-arrow:hover {
  background-color: #2D2D2D;
  color: #FFFFFF;
}

/* ============================================================
ESTILOS DE SECCIÓN: PROPERTY HEADER 
============================================================ */
#property-header {
  padding-bottom: 40px;
  border-bottom: 1px solid #D1D1D1;
  margin-bottom: 40px;
}

.header-category-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
  color: #7E7E7E !important;
  margin-bottom: 8px;
}

.header-category-separator {
  color: #D1D1D1 !important;
}

.headline-badge-active {
  color: #2E7D32 !important;
  font-weight: 800;
  background-color: #E8F5E9;
  padding: 1px 6px;
  border-radius: 2px;
}

h1.property-main-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: #2D2D2D;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.address-locator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5C5C5C !important;
  font-weight: 300;
  font-size: 1.05rem;
}

.address-locator svg {
  color: #7E7E7E;
}

.pricing-and-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 35px;
  padding-top: 15px;
}

.stat-item {
  border-left: 1px solid #D1D1D1;
  padding-left: 20px;
}

.stat-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: #7E7E7E !important;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 500;
  color: #2D2D2D;
}

.stat-unit {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  color: #7E7E7E;
  font-weight: 400;
}

.secondary-specs-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 35px;
  padding-top: 15px;
  border-top: 1px solid #EFECE5;
}

.spec-inline-item {
  font-size: 11px;
}

.spec-inline-item .lbl {
  color: #7E7E7E;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-right: 8px;
}

.spec-inline-item .val {
  font-weight: 600;
  color: #2D2D2D;
}

/* ============================================================
ESTILOS DE SECCIÓN: PROPERTY DESCRIPTION 
============================================================ */
#property-description {
  margin-bottom: 50px;
}

.section-label {
  font-size: 9px;
  letter-spacing: 0.3em;
  font-weight: 700;
  text-transform: uppercase;
  color: #7E7E7E !important;
  margin-bottom: 8px;
  display: block;
}

.section-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.35;
  color: #2D2D2D;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.editorial-paragraphs {
  font-size: 15px;
  line-height: 1.75;
  color: #4A4A4A;
  margin-bottom: 35px;
  text-align: justify;
}

.editorial-paragraphs p {
  margin-bottom: 18px;
}

.highlight-box-container {
  background-color: #FFFFFF;
  border: 1px solid #D1D1D1;
  border-left: 3px solid #2D2D2D;
  border-radius: 4px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.01);
}

.highlight-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #2D2D2D;
  margin-bottom: 20px;
}

.highlight-bullet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.bullet-icon {
  margin-top: 3px;
  background-color: #2D2D2D;
  color: #F9F7F2;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  flex-shrink: 0;
}

.bullet-content {
  font-size: 13.5px;
  color: #4A4A4A;
  font-weight: 400;
}

/* Desglose de superficies (Catastro) */
.surfaces-box {
  margin-top: 20px;
}

.surface-list {
  margin: 0;
}

.surface-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #EEEAE2;
}

.surface-row dt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0; /* deja que el texto largo baje de línea en vez de desbordar */
}

.surface-label {
  font-size: 13.5px;
  color: #2D2D2D;
}

.surface-detail {
  font-size: 11.5px;
  color: #7E7E7E;
}

.surface-row dd {
  margin: 0;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  color: #2D2D2D;
}

.surface-row.is-total {
  border-bottom: none;
}

.surface-row.is-total:first-of-type,
.surface-row:not(.is-total) + .surface-row.is-total {
  border-top: 1px solid #2D2D2D;
  margin-top: 4px;
}

.surface-row.is-total .surface-label {
  font-weight: 600;
}

.surface-row.is-total dd {
  font-size: 1.25rem;
}

.surface-source {
  margin-top: 14px;
  font-size: 10.5px;
  color: #7E7E7E;
}

/* ============================================================
ESTILOS DE SECCIÓN: PROPERTY FEATURES 
============================================================ */
#property-features {
  padding-top: 40px;
  border-top: 1px solid #D1D1D1;
}

.features-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #D1D1D1;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.tabs-filter-container {
  display: flex;
  background-color: #EFECE5;
  padding: 4px;
  border-radius: 4px;
  gap: 4px;
}

.btn-tab-trigger {
  background: none;
  border: none;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: #7E7E7E;
  padding: 8px 18px;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.25s ease;
}

.btn-tab-trigger.active {
  background-color: #FFFFFF;
  color: #2D2D2D;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tab-grid-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 40px;
}

.amenity-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: #FFFFFF;
  border: 1px solid #D1D1D1;
  padding: 18px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.amenity-card:hover {
  border-color: #A0A0A0;
}

.amenity-icon-wrapper {
  width: 36px;
  height: 36px;
  background-color: #F9F7F2;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2D2D2D;
  flex-shrink: 0;
}

.amenity-text {
  font-size: 13.5px;
  font-weight: 400;
  color: #4A4A4A;
  line-height: 1.4;
}

.pdf-brochures-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding-top: 30px;
  border-top: 1px solid #D1D1D1;
}

.brochure-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #D1D1D1;
  padding: 16px 20px;
  background-color: #F9F7F2;
  cursor: pointer;
  transition: all 0.25s ease;
}

.brochure-card:hover {
  background-color: #FFFFFF;
  border-color: #2D2D2D;
}

.brochure-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brochure-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(45, 45, 45, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2D2D2D;
}

.brochure-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #2D2D2D;
  margin-bottom: 2px;
}

.brochure-meta {
  font-size: 10px;
  color: #7E7E7E;
}

.brochure-arrow {
  color: #7E7E7E;
  transition: transform 0.2s ease;
}

.brochure-card:hover .brochure-arrow {
  transform: translateX(4px);
  color: #2D2D2D;
}

/* ============================================================
ESTILOS COLOMLATERIAL: COMPACT BAR / FORMULARIOS
============================================================ */
.desktop-only-form {
  background-color: #FFFFFF !important;
  border: 1px solid #D1D1D1 !important;
  border-radius: 6px !important;
  padding: 28px 24px !important;
  box-shadow: 0 12px 36px rgba(45, 45, 45, 0.05) !important;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-form-header {
  border-bottom: 1px solid #D1D1D1;
  padding-bottom: 15px;
}

.form-pre-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #7E7E7E !important;
  display: block;
  margin-bottom: 4px;
}

.form-main-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: #2D2D2D;
}

.success-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 10px;
  gap: 15px;
  animation: fadeInEffect 0.5s ease-out;
}

.check-circle-icon {
  width: 50px;
  height: 50px;
  background-color: #2D2D2D;
  color: #F9F7F2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2D2D2D;
}

.success-description {
  font-size: 12.5px;
  color: #7E7E7E;
  line-height: 1.5;
}

.form-field-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-toggle-choice {
  background-color: #F9F7F2;
  border: 1px solid #D1D1D1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-toggle-choice.active {
  background-color: #2D2D2D;
  color: #F9F7F2;
  border-color: #2D2D2D;
}

.input-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-field-wrapper label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #7E7E7E !important;
}

.input-relative-box {
  position: relative;
}

.input-relative-box svg {
  position: absolute;
  left: 12px;
  top: 13px;
  color: #7E7E7E;
  pointer-events: none;
  z-index: 1; /* por encima del campo envuelto por Flatpickr */
}

.form-input-element {
  width: 100%;
  background-color: #FCFAF7;
  border: 1px solid #D1D1D1;
  border-radius: 3px;
  padding: 11px 12px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: #2D2D2D;
  transition: all 0.25s ease;
}

.form-input-element.has-icon {
  padding-left: 38px;
}

.form-input-element:focus {
  border-color: #2D2D2D;
  background-color: #FFFFFF;
  outline: none;
}

/* ============================================================
CALENDARIO DE CITAS (Flatpickr con la estética de la ficha)
============================================================ */
.form-field-hint {
  font-size: 10.5px;
  line-height: 1.4;
  color: #7E7E7E;
}

.form-field-error {
  font-size: 11px;
  font-weight: 600;
  color: #B3261E;
}

.flatpickr-wrapper {
  display: block;
  width: 100%;
}

.date-picker-input {
  cursor: pointer;
}

.flatpickr-calendar {
  font-family: 'Inter', sans-serif;
  background: #FFFFFF;
  border: 1px solid #D1D1D1;
  border-radius: 3px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.flatpickr-calendar.static {
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  width: 100%;
  max-width: 340px;
}

.flatpickr-calendar.static::before,
.flatpickr-calendar.static::after {
  display: none;
}

/* Rejilla fluida: se adapta al ancho del formulario (escritorio y panel móvil) */
.flatpickr-calendar.static .flatpickr-innerContainer,
.flatpickr-calendar.static .flatpickr-rContainer,
.flatpickr-calendar.static .flatpickr-days,
.flatpickr-calendar.static .dayContainer {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.flatpickr-calendar.static .flatpickr-day {
  flex-basis: 14.2857%;
  max-width: none;
  height: 38px;
  line-height: 36px;
}

.flatpickr-months {
  padding: 6px 4px 2px;
}

.flatpickr-current-month {
  font-size: 15px;
}

.flatpickr-current-month span.cur-month {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  color: #2D2D2D;
}

.flatpickr-current-month input.cur-year {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  color: #2D2D2D;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  top: 6px;
}

.flatpickr-months .flatpickr-prev-month {
  left: 6px;
}

.flatpickr-months .flatpickr-next-month {
  right: 6px;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  fill: #7E7E7E;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: #2D2D2D;
}

span.flatpickr-weekday {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7E7E7E;
}

.flatpickr-day {
  color: #2D2D2D;
  border-radius: 2px;
  font-size: 13px;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
  background: #F2EEE6;
  border-color: #F2EEE6;
}

.flatpickr-day.today {
  border-color: #D1D1D1;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
  background: #2D2D2D;
  border-color: #2D2D2D;
  color: #F9F7F2;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: rgba(45, 45, 45, 0.3);
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: rgba(45, 45, 45, 0.22);
  background: transparent;
  border-color: transparent;
}

/* Domingos y festivos: tachados, para que se entienda por qué no se pueden elegir */
.flatpickr-day.is-closed {
  text-decoration: line-through;
  text-decoration-color: rgba(45, 45, 45, 0.35);
}

.form-textarea-element {
  width: 100%;
  background-color: #FCFAF7;
  border: 1px solid #D1D1D1;
  border-radius: 3px;
  padding: 11px 12px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: #2D2D2D;
  resize: none;
  transition: all 0.25s ease;
}

.form-textarea-element:focus {
  border-color: #2D2D2D;
  background-color: #FFFFFF;
  outline: none;
}

.btn-submit-booking {
  width: 100%;
  background-color: #2D2D2D;
  color: #F9F7F2;
  border: none;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-submit-booking:hover {
  background-color: #4A4A4A;
}

.form-office-credits {
  text-align: center;
  font-size: 10px;
  color: #7E7E7E;
}

/* WhatsApp Owner Card */
.owner-whatsapp-profile-card {
  border-top: 1px solid #D1D1D1;
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.whatsapp-icon-round-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #E8F5E9;
  border: 1px solid #A5D6A7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2E7D32;
  flex-shrink: 0;
}

.owner-contact-details {
  display: flex;
  flex-direction: column;
}

.owner-contact-details .profile-title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #2E7D32;
  display: flex;
  align-items: center;
  gap: 6px;
}

.owner-contact-details .profile-phone {
  font-size: 14.5px;
  font-weight: 700;
  color: #2D2D2D;
  margin-top: 2px;
}

.pulsate-dot {
  width: 6px;
  height: 6px;
  background-color: #4CAF50;
  border-radius: 50%;
  animation: pulser 1.5s infinite;
}

@keyframes pulser {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Compact Mobile Static Footer bar (Hidden on Desktop) */
.mobile-bar-compact {
  display: none;
}

/* ============================================================
VENTANA MODAL LIGHTBOX DE FOTOS 
============================================================ */
.lightbox-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(12, 12, 11, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox-backdrop.raw-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}

.lightbox-brand-info h4 {
  font-size: 9px;
  letter-spacing: 0.3em;
  font-weight: 700;
  text-transform: uppercase;
  color: #7E7E7E !important;
  margin-bottom: 3px;
}

.lightbox-brand-info h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: #FFFFFF !important;
  font-weight: 400;
}

.btn-lightbox-close {
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.btn-lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.10);
}

.lightbox-central-viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 1100px;
  margin: 30px auto;
  width: 100%;
}

/* Caja de alto fijo: las fotos se apilan centradas para el fundido cruzado */
.lightbox-main-img-box {
  position: relative;
  width: 100%;
  height: 65vh;
}

.lightbox-main-img-box img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: opacity 0.7s ease;
}

.lightbox-main-img-box img.is-entering,
.lightbox-main-img-box img.is-leaving {
  opacity: 0;
}

.btn-lightbox-nav {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 1.5rem;
  font-family: serif;
}

.btn-lightbox-nav:hover {
  background-color: #2D2D2D;
  border-color: #FFFFFF;
}

.btn-lightbox-nav.prev-control {
  left: -20px;
}

.btn-lightbox-nav.next-control {
  right: -20px;
}

.lightbox-footer-nav {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.lightbox-text-caption {
  font-size: 12.5px;
  color: #D1D1D1;
  margin-bottom: 15px;
}

.lightbox-thumbnail-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;                                   /* Firefox */
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

/* Centrado seguro: con "justify-content: center" el principio de la tira quedaba fuera de
   alcance al desbordar. Los márgenes automáticos centran solo cuando sobra sitio. */
.lightbox-thumbnail-strip button:first-child { margin-left: auto; }
.lightbox-thumbnail-strip button:last-child { margin-right: auto; }

/* Barra discreta sobre el fondo oscuro del visor */
.lightbox-thumbnail-strip::-webkit-scrollbar { height: 6px; }
.lightbox-thumbnail-strip::-webkit-scrollbar-track { background: transparent; }
.lightbox-thumbnail-strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 3px;
}
.lightbox-thumbnail-strip::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.45); }

.lightbox-thumbnail-strip button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0;
  width: 60px;
  height: 45px;
  overflow: hidden;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.lightbox-thumbnail-strip button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.lightbox-thumbnail-strip button:hover img {
  opacity: 1;
}

.lightbox-thumbnail-strip button.active {
  border-color: #FFFFFF;
}

.lightbox-thumbnail-strip button.active img {
  opacity: 1;
}

/* ============================================================
ESTILOS DE SECCIÓN: UBICACIÓN (mapa)
============================================================ */
#property-location {
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid #D1D1D1;
}

.location-intro {
  font-size: 14px;
  color: #4A4A4A;
  line-height: 1.7;
  margin: -8px 0 22px;
}

.location-map {
  height: 440px;
  border: 1px solid #D1D1D1;
  border-radius: 2px;
  background: #EEEAE2;
  z-index: 0;
}

/* Teselas apagadas para que el mapa entre en la paleta de la ficha */
.location-map .leaflet-tile-pane {
  filter: grayscale(0.5) sepia(0.12) brightness(1.04) contrast(0.94);
}

.location-credit {
  font-size: 11px;
  color: #7E7E7E;
  margin-top: 8px;
}

.map-pin {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.map-pin-dot {
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  align-self: flex-start;
  border-radius: 50%;
  background: #7E7E7E;
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.map-pin-label {
  font-family: Georgia, serif;
  font-size: 12.5px;
  color: #2D2D2D;
  background: rgba(251, 249, 245, 0.92);
  padding: 2px 7px;
  margin-top: -11px;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.map-pin--town .map-pin-label { font-weight: 700; letter-spacing: 0.02em; }

/* Nombres secundarios ocultos hasta acercar el zoom (el punto sigue visible y tiene título) */
.map-pin:not(.map-pin--town):not(.map-pin--home) .map-pin-label { display: none; }
.location-map.show-minor .map-pin--near .map-pin-label,
.location-map.show-golf .map-pin--golf .map-pin-label,
.location-map.show-detail .map-pin .map-pin-label { display: inline; }

/* Leyenda: cada categoría es un botón que muestra u oculta sus puntos */
.location-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.location-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  color: #2D2D2D;
  background: #FFFFFF;
  border: 1px solid #D1D1D1;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.location-chip:hover { border-color: #2D2D2D; }
.location-chip:focus-visible { outline: 2px solid #B07D4F; outline-offset: 2px; }
.location-chip[aria-pressed="false"] { opacity: 0.45; }
.location-chip[aria-pressed="false"] .location-chip-dot { background: transparent !important; }
.location-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid currentColor;
  flex-shrink: 0;
}
.location-chip--school .location-chip-dot { background: #8A6FA8; border-color: #8A6FA8; }
.location-chip--health .location-chip-dot { background: #B5524B; border-color: #B5524B; }
.location-chip--shop .location-chip-dot { background: #B07D4F; border-color: #B07D4F; }
.location-chip--golf .location-chip-dot { background: #6E8B5E; border-color: #6E8B5E; }
.location-chip--sport .location-chip-dot { background: #C9A43A; border-color: #C9A43A; }

.location-hint {
  font-size: 12px;
  color: #7E7E7E;
  margin-top: 10px;
}
.location-hint + .location-credit { margin-top: 2px; }

.map-tooltip {
  font-family: Georgia, serif;
  font-size: 12.5px;
  color: #2D2D2D;
  background: #FBF9F5;
  border: none;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  padding: 3px 8px;
}
.map-pin--school .map-pin-dot { background: #8A6FA8; }
.map-pin--health .map-pin-dot { background: #B5524B; }
.map-pin--sport .map-pin-dot { background: #C9A43A; }
.map-pin--beach .map-pin-dot { background: #5B8FA8; }
.map-pin--golf .map-pin-dot { background: #6E8B5E; }
.map-pin--shop .map-pin-dot { background: #B07D4F; }
.map-pin--road .map-pin-dot { background: #4A4A4A; border-radius: 2px; }

.map-pin--home .map-pin-dot {
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  background: #2D2D2D;
  border-width: 3px;
}
.map-pin--home { position: relative; }
/* Etiqueta de la casa a la izquierda del punto: al este está San Pedro */
.map-pin--home .map-pin-label {
  position: absolute;
  right: 16px;
  top: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: -9px;
  background: #2D2D2D;
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .location-map { height: 340px; }
  .map-pin-label { font-size: 11.5px; padding: 2px 5px; }
  .map-pin--home .map-pin-label { font-size: 11.5px; letter-spacing: 0.08em; }
  /* En pantalla estrecha algunas etiquetas se pisan: se ven al tocar el punto o al acercar */
  .location-map:not(.show-detail) .map-pin--wide-only .map-pin-label { display: none; }
}

/* ============================================================
CAJÓN FLOTANTE MÓVIL (MOBILE INQUIRY DRAWER)
============================================================ */
.mobile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(45, 45, 45, 0.6);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s ease;
}

.mobile-drawer-backdrop.raw-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-container {
  width: 100%;
  max-width: 480px;
  background-color: #FFFFFF;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  padding: 24px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  overflow-y: auto;
}

.mobile-drawer-backdrop.raw-open .mobile-drawer-container {
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #D1D1D1;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.btn-drawer-close {
  background: none;
  border: none;
  color: #7E7E7E;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
}

/* ============================================================
MEDIAS GENERALES Y RESPONSIVIDAD (UBLIGATORIA BAJO 900PX)
============================================================ */
@media (max-width: 900px) {
  #main-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    padding: 16px !important;
    padding-bottom: 120px !important; /* Espacio extra para que el sidebar bottom no tape el contenido */
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Desubicar barra de sidebar a la parte inferior de pantalla fijado */
  #sticky-sidebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    background-color: #FFFFFF !important;
    border-top: 1px solid #D1D1D1 !important;
    box-shadow: 0 -8px 30px rgba(45, 45, 45, 0.12) !important;
    padding: 16px 24px !important;
    z-index: 1999 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 15px !important;
  }

  /* El formulario complejo habitual de desktop se esconde en móvil */
  #sticky-sidebar .desktop-only-form {
    display: none !important;
  }

  /* La barra resumida móvil entra en acción */
  .mobile-bar-compact {
    display: flex !important;
    width: 100% !important;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-bar-pricing {
    display: flex;
    flex-direction: column;
  }

  .mobile-bar-address {
    font-size: 10px;
    letter-spacing: 0.15em;
    color: #7E7E7E;
    text-transform: uppercase;
    font-weight: 700;
  }
  
  .mobile-bar-cost {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2D2D2D;
  }

  .btn-mobile-trigger-drawer {
    background-color: #2D2D2D;
    color: #F9F7F2;
    border: none;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 2px;
  }

  /* Reducir columnas de especificaciones y galería en pantalla angosta */
  .hero-viewport-container {
    height: 380px;
  }

  .pricing-and-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .secondary-specs-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .highlight-bullet-grid {
    grid-template-columns: 1fr;
  }

  .tab-grid-content {
    grid-template-columns: 1fr;
  }

  .pdf-brochures-grid {
    grid-template-columns: 1fr;
  }

  .btn-lightbox-nav.prev-control {
    left: 10px;
  }

  .btn-lightbox-nav.next-control {
    right: 10px;
  }

  /* Corrección exclusiva para la cabecera de características generales */
  .features-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }

  .tabs-filter-container {
    width: 100% !important;
    display: flex !important;
  }

  .btn-tab-trigger {
    flex: 1 !important;
    text-align: center !important;
    padding: 8px 4px !important;
    font-size: 10px !important;
  }
}

/* Animaciones */
@keyframes fadeInEffect {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
  animation: fadeInEffect 0.3s ease-out forwards;
}

/* Efecto de escalado suave para el contacto de WhatsApp */
.owner-whatsapp-profile-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
  display: flex !important;
}

.owner-whatsapp-profile-card:hover {
  transform: scale(1.03);
  cursor: pointer;
}
/* Honeypot anti-spam: fuera de pantalla para personas, visible para bots (no usar display:none) */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
CIERRE DE PÁGINA: VOLVER ARRIBA (flecha grande centrada)
============================================================ */
.page-end {
  margin-top: 70px;
  padding: 40px 0 30px;
  border-top: 1px solid #D1D1D1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.back-to-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: none;
  border: none;
  color: #2D2D2D;
  cursor: pointer;
  font-family: inherit;
}

.back-to-top-arrow {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: back-to-top-bounce 2.4s ease-in-out infinite;
}

.back-to-top-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #7E7E7E;
  transition: color 0.2s ease;
}

.back-to-top:hover .back-to-top-text { color: #2D2D2D; }
.back-to-top:hover .back-to-top-arrow { animation-duration: 1.2s; }
.back-to-top:focus-visible { outline: 2px solid #B07D4F; outline-offset: 4px; }

@keyframes back-to-top-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top-arrow { animation: none; }
}

@media (max-width: 900px) {
  .page-end { margin-top: 40px; padding-bottom: 20px; }
}

/* ============================================================
PRIVACIDAD: aviso junto al botón del formulario y enlace al pie de la ficha
============================================================ */
.form-privacy-note {
  font-size: 10.5px;
  line-height: 1.5;
  color: #7E7E7E;
}
.form-privacy-note a {
  color: #2D2D2D;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-end-privacy {
  display: block;
  margin-top: 28px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7E7E7E;
  text-decoration: none;
}
.page-end-privacy:hover { color: #2D2D2D; }
