/* ==========================================================================
   TerreNet - Página de Detalle
   CSS limpio y moderno - v5.0 (reescrito desde cero)
   ========================================================================== */

:root {
  /* Colores */
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  
  --blue-50: #f0f9ff;
  --blue-100: #e0f2fe;
  --blue-600: #0284c7;
  
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Shortcuts */
  --primary: var(--green-600);
  --primary-light: var(--green-100);
  --bg: var(--slate-50);
  --card: #ffffff;
  --border: var(--slate-200);
  --text: var(--slate-800);
  --text-muted: var(--slate-500);

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --transition: 200ms ease;
}

/* ========== LAYOUT PRINCIPAL ========== */
* { box-sizing: border-box; }

.detail-page {
  min-height: 100vh;
  background: var(--bg);
}

/* Header detalle: fondo claro y logo con fondo blanco (más clean) */
.site-header--detail {
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.site-header--detail .brand-title { color: var(--green-600, #16a34a); }
.site-header--detail .brand-subtitle { color: var(--slate-500, #64748b); }
.site-header--detail .main-nav a { color: var(--slate-700, #334155); }
.site-header--detail .main-nav a:hover { color: var(--green-600, #16a34a); }
.brand-mark--light {
  background: #ffffff !important;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Contenedor del detalle: evita espacio blanco a la derecha y centra el contenido */
.detail-page-main,
main:has(#detail-root) {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  width: 100%;
}

.detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Wrapper del grid: ocupa todo el ancho del main */
.detail-layout {
  width: 100%;
}

/* Grid: Galería izquierda, Contacto derecha */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

@media (min-width: 1024px) {
  .detail-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
    align-items: start;
  }
}

/* Columnas */
.detail-col-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-col-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .detail-col-right {
    position: sticky;
    top: 1.5rem;
  }
}

/* ========== GALERÍA ========== */
.gallery {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--slate-100);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.gallery-main img:hover {
  transform: scale(1.02);
}

/* Badge de tipo */
.gallery-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gallery-badge--venta {
  background: var(--green-600);
  color: white;
}

.gallery-badge--alquiler {
  background: var(--blue-600);
  color: white;
}

/* Estado del terreno */
.gallery-estado {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.gallery-estado--reservado {
  background: #fef3c7;
  color: #92400e;
}

.gallery-estado--vendido {
  background: #fee2e2;
  color: #b91c1c;
}

/* Thumbnails */
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--card);
}

.gallery-thumb {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb:hover {
  border-color: var(--slate-300);
}

.gallery-thumb.active {
  border-color: var(--primary);
}

/* ========== CARD DE CONTACTO ========== */
.contact-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

/* Título y ubicación */
.contact-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.contact-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
}

.contact-location {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.contact-location svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Precio */
.contact-price {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* Badges */
.contact-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge--venta {
  background: var(--green-100);
  color: var(--green-700);
}

.badge--alquiler {
  background: var(--blue-100);
  color: var(--blue-600);
}

.badge--nuevo {
  background: #fef3c7;
  color: #92400e;
}

.badge--estado {
  background: #fef2f2;
  color: #b91c1c;
}

.btn-icon-share {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--slate-100);
  border: none;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-icon-share:hover {
  background: var(--green-100);
  color: var(--primary);
}

.contact-valores {
  margin-bottom: 1.5rem;
  background: var(--slate-50);
  padding: 1rem;
  border-radius: 10px;
}

.contact-valores-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

/* Vendedor */
.vendor-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.vendor-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.vendor-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500) 0%, var(--green-700) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.vendor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vendor-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.vendor-avatar .vendor-avatar-fallback {
  position: absolute;
  inset: 0;
}

.vendor-info {
  flex: 1;
  min-width: 0;
}

.vendor-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.125rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vendor-name-link {
  color: inherit;
  text-decoration: none;
}

.vendor-name-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.vendor-company {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Botones */
.contact-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp svg {
  width: 20px;
  height: 20px;
}

.btn-email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-email:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Acciones secundarias */
.contact-secondary {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.btn-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 0.5rem;
  background: var(--slate-50);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--card);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-secondary.active {
  background: var(--green-100);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-secondary svg {
  width: 16px;
  height: 16px;
}

/* ========== ESPECIFICACIONES ========== */
.specs-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.specs-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.specs-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.spec-item {
  background: var(--slate-50);
  padding: 0.875rem;
  border-radius: 10px;
  border: 1px solid var(--slate-100);
}

.spec-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.spec-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

/* ========== DESCRIPCIÓN ========== */
.description-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.description-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.description-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.description-content {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--slate-600);
  max-width: 100%;
  overflow-wrap: break-word;
}

.description-content p {
  margin: 0 0 1rem 0;
}

/* Evitar que la descripción se corte */
.description-section,
.card-section .description-content {
  overflow: visible;
}

/* ========== SERVICIOS ========== */
.services-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.services-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.services-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: var(--green-100);
  border: 1px solid var(--green-200);
  color: var(--green-700);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.service-tag svg {
  width: 14px;
  height: 14px;
}

/* ========== MAPA ========== */
.map-section {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.map-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.map-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.map-link {
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.map-link:hover {
  text-decoration: underline;
}

.map-frame {
  width: 100%;
  height: 350px;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ========== LIGHTBOX ========== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 1100px;
  width: 100%;
}

.lightbox-image {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 40px;
  height: 40px;
  background: white;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10000;
}

.lightbox-nav.prev,
.lightbox-prev { 
  left: -4rem; 
}

.lightbox-nav.next,
.lightbox-next { 
  right: -4rem; 
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,1);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
  position: absolute;
  bottom: -3rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(0,0,0,0.5);
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.lightbox-thumbs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
  overflow-x: auto;
  padding: 0.5rem;
}

.lightbox-thumb {
  width: 70px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: var(--transition);
}

.lightbox-thumb.active,
.lightbox-thumb:hover {
  opacity: 1;
  border-color: white;
}

/* ========== MOBILE STICKY CTA ========== */
.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, white 85%, transparent);
  z-index: 100;
  gap: 0.625rem;
}

.mobile-cta .btn-wa {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}

.mobile-cta .btn-call {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-100);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 1023px) {
  .mobile-cta {
    display: flex;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1023px) {
  .detail-container {
    padding: 1rem;
    padding-bottom: 5.5rem;
  }
  
  .detail-col-right {
    position: static;
  }
  
  .contact-title {
    font-size: 1.375rem;
  }
  
  .contact-price {
    font-size: 1.625rem;
  }
}

@media (max-width: 768px) {
  .detail-page-main,
  main:has(#detail-root) {
    padding: 1rem 0.875rem 5.5rem;
  }
  
  .detail-container {
    padding: 0.875rem;
    padding-bottom: 5.5rem;
  }
  
  .detail-grid {
    gap: 1.25rem;
  }
  
  .gallery-thumbs {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .contact-card {
    padding: 1.25rem;
  }
  
  .contact-title {
    font-size: 1.25rem;
  }
  
  .contact-price {
    font-size: 1.5rem;
  }
  
  .vendor-avatar {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
  
  .specs-section, .description-section, .services-section {
    padding: 1rem;
  }
  
  .description-content {
    font-size: 1rem;
    line-height: 1.8;
  }
  
  .map-frame {
    height: 280px;
  }
  
  .lightbox-nav.prev,
  .lightbox-prev { 
    left: 0.5rem; 
  }
  .lightbox-nav.next,
  .lightbox-next { 
    right: 0.5rem; 
  }
  .lightbox-counter {
    bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .detail-container {
    padding: 0.75rem;
    padding-bottom: 5rem;
  }
  
  .gallery-thumbs {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.375rem;
    padding: 0.5rem;
  }
  
  .contact-card {
    padding: 1rem;
  }
  
  .contact-title {
    font-size: 1.125rem;
  }
  
  .contact-price {
    font-size: 1.375rem;
  }
  
  .contact-secondary {
    flex-wrap: wrap;
  }
  
  .btn-secondary {
    flex: 1 1 calc(50% - 0.25rem);
    font-size: 0.7rem;
    padding: 0.5rem;
  }
  
  .specs-grid {
    gap: 0.5rem;
  }
  
  .spec-item {
    padding: 0.75rem;
  }
  
  .spec-value {
    font-size: 0.85rem;
  }
  
  .map-frame {
    height: 240px;
  }
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
}

.empty-state h3 {
  font-size: 1.125rem;
  color: var(--text);
  margin: 1rem 0 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ========== SCROLL TOP ========== */
.scroll-top-btn {
  position: fixed;
  bottom: 6rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 50;
  box-shadow: var(--shadow-md);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 1024px) {
  .scroll-top-btn {
    bottom: 2rem;
    right: 2rem;
  }
}

/* Responsive Utilities */
.mobile-only { display: block; }
.desktop-only { display: none; }
@media (min-width: 1024px) {
  .mobile-only { display: none !important; }
  .desktop-only { display: block !important; }
}

/* V4.0 OVERRIDES */
.gallery-main { height: 500px !important; aspect-ratio: auto !important; }
@media (max-width: 768px) { .gallery-main { height: 320px !important; } }
.contact-secondary { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.btn-secondary { width: 100%; justify-content: center; }
.description-content { font-size: 1.05rem; line-height: 1.8; color: #334155; letter-spacing: 0.01em; }
/* Responsive Util Overrides */
.mobile-only { display: block; }
.desktop-only { display: none; }
@media (min-width: 1024px) {
  .mobile-only { display: none !important; }
  .desktop-only { display: block !important; }
}

/* EXTENSION V4.1 - MISSING CLASSES & MOBILE BAR */
.card-section { background: white; border-radius: 12px; padding: 1.5rem; border: 1px solid #e2e8f0; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.section-title { font-size: 1.1rem; font-weight: 700; color: #1e293b; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #dcfce7; display: inline-block; }
.tech-specs-box table { width: 100%; border-collapse: collapse; }
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 0.75rem 1rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid #e2e8f0;
  z-index: 999;
  display: none;
  gap: 0.5rem;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 1023px) {
  .mobile-bottom-bar { display: flex; }
  .detail-col-right { display: none; }
}
.actions-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.detail-actions { margin-top: 0; }
.detail-actions .btn-lead-cta {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 14px 1rem; border-radius: 10px; font-weight: 700; font-size: 1.05rem;
  background: var(--green-600); color: white; border: none; cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.detail-actions .btn-lead-cta:hover {
  background: var(--green-700); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}
.detail-actions .btn-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 1rem; border-radius: 10px; font-weight: 700; font-size: 1rem;
  background: #25d366; color: white; text-decoration: none; border: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.detail-actions .btn-whatsapp:hover {
  background: #20bd5a; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35); color: white;
}

/* FIX MOBILE VISIBILITY */
@media (max-width: 1023px) { .detail-col-right { display: block !important; } }

/* FINAL REFINEMENTS */
.infra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.contact-secondary { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
.contact-secondary .btn-secondary { width: 100% !important; margin: 0 !important; }

/* PREVENT CONTENT OVERLAP WITH STICKY BAR */
@media (max-width: 1023px) { body { padding-bottom: 90px !important; } }

/* V7 MAP STYLES */
.detail-full-section { margin-top: 2rem; background: white; padding: 1.5rem; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.map-frame-wrap { position: relative; }
.map-frame { height: 400px; background: #f8fafc; border-radius: 12px; overflow: hidden; margin-top: 1rem; }
.map-iframe { width: 100%; height: 100%; border: 0; pointer-events: none; }
/* En móvil: overlay evita que el iframe capture el primer toque y provoque “despliegue y desvanecimiento” */
.map-tap-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.92);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}
.map-tap-overlay span {
  padding: 0.75rem 1.25rem;
  background: #16a34a;
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}
@media (max-width: 1023px) {
  .map-tap-overlay { display: flex; }
  .map-frame-wrap.map-activated .map-tap-overlay { display: none; }
  .map-frame-wrap.map-activated .map-iframe { pointer-events: auto; }
}
@media (min-width: 1024px) {
  .map-iframe { pointer-events: auto; }
}
.map-address { font-size: 0.95rem; color: var(--slate-600); }
.map-external-link { font-size: 0.9rem; }

/* Contact card: datos clave legibles */
.detail-sidebar-data.values-grid { margin-bottom: 1.5rem; }
.detail-sidebar-data.values-grid > div { border-bottom: 1px solid var(--slate-100); padding: 0.5rem 0; }
.detail-sidebar-data.values-grid > div:last-child { border-bottom: none; }

.detail-sidebar-section-title { margin-bottom: 0.75rem; margin-top: 0; }

/* Filas de datos: label + valor (compatibles con renderValueRow y renderValueRowOptional) */
.detail-value-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--slate-100); font-size: 0.9rem; }
.detail-value-row:last-child { border-bottom: none; }
.detail-value-label { color: var(--slate-500); font-weight: 600; flex-shrink: 0; }
.detail-value-value { color: var(--text); font-weight: 500; text-align: right; word-break: break-word; }
.detail-value-value.detail-value-empty { color: var(--slate-400); font-style: italic; font-weight: 400; }

.detail-caracteristicas-grid { margin-top: 0.5rem; }

/* Descripción y secciones: más aire y jerarquía */
.card-section .description-content { font-size: 1rem; line-height: 1.75; color: var(--slate-700); }
.card-section .section-title { font-size: 1.1rem; font-weight: 700; color: var(--slate-800); margin-bottom: 1rem; }
.values-grid { display: grid; gap: 0.5rem 1.5rem; }
.values-grid > div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; }
.values-grid > div > span:first-child { color: var(--slate-500); font-weight: 600; }
.values-grid > div > span:last-child { color: var(--text); font-weight: 500; }
