/* ================================================================== */
/* XZONAS VALENCIA - CSS DESKTOP CONSOLIDADO 2025                    */
/* Combinación de todos los archivos de fixes y correcciones         */
/* ================================================================== */

/* ============================================================ */
/* RESET GLOBAL PARA DESKTOP */
/* ============================================================ */
@media (min-width: 993px) {

  /* ELIMINAR ESPACIADOR INNECESARIO EN DESKTOP */
  #desplazarmenu {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Full-bleed: sin padding superior artificial en el contenedor principal */
  .contenedor100.F_gris03 {padding-top:0!important;}

  body {
    padding-top: 0 !important;
  }

  /* OCULTAR BLOQUES INNECESARIOS EN DESKTOP */
  #busqueda-avanzada,
  #bloque-mapa-anunciantes,
  #resultados-busqueda-avanzada {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

/* ============================================================ */
/* CARRUSEL DESTACADAS DEL DÍA - DESKTOP OPTIMIZADO */
/* ============================================================ */
@media (min-width: 993px) {

  /* CONTAINER PRINCIPAL DESTACADAS */
  #cnt_destacadas_diaB {
    /* Posicionamiento optimizado */
    position: relative !important;
    top: 0 !important;
  margin: 0 auto !important; /* Eliminado offset superior que creaba gap */
    /* Espacio desde navbar fixed */

    /* Dimensiones optimizadas */
    width: 100% !important;
    max-width: none !important;
    min-height: 240px !important;
    height: auto !important;

    /* Visibilidad y estilo */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
  padding: 0 0 20px 0 !important; /* Quitar padding lateral que generaba gutter */
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    overflow: visible !important;
    z-index: 100 !important;
  }

  /* TÍTULO DESTACADAS */
  .titdestacada {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1000 !important;
    color: #e91e63 !important;
    font-weight: bold !important;
    font-size: 1.8em !important;
    text-align: center !important;
    margin-bottom: 20px !important;
  }

  /* CARRUSEL BOOTSTRAP */
  #portaCarrusel {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 15px 0 !important;
    overflow: hidden !important;
  }

  #myCarouselTop {
    width: 100% !important;
    height: 180px !important;
    overflow: hidden !important;
  }

  #myCarouselTop .carousel-inner {
    width: 100% !important;
    height: 180px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  #myCarouselTop .item {
    display: inline-block !important;
    width: auto !important;
    height: 180px !important;
    vertical-align: top !important;
    white-space: normal !important;
  }

  #myCarouselTop .slide-flex-row {
    display: inline-flex !important;
    gap: 15px !important;
    height: 180px !important;
  }

  /* MINIATURAS CARRUSEL */
  #portaCarrusel .miniatura-carrusel {
    flex: 0 0 auto !important;
    width: 200px !important;
    height: 160px !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    background: #fff !important;
    border: 3px solid #e91e63 !important;
  }

  #portaCarrusel .miniatura-carrusel img.img-responsive {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 15px !important;
    display: block !important;
  }

  #portaCarrusel .miniatura-carrusel:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
  }
}

/* ============================================================ */
/* GRID PRINCIPAL - DESKTOP PINTEREST OPTIMIZADO */
/* ============================================================ */
@media (min-width: 993px) {

  .og-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    list-style: none !important;
    width: 100% !important;
    max-width: none !important;
  }

  .og-grid li {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    break-inside: avoid !important;
    display: block !important;
  }

  .og-grid .miniatura {
    width: 100% !important;
    height: auto !important;
    min-height: 300px !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    background: white !important;
    display: block !important;
  }

  .og-grid .miniatura:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
  }

  .og-grid .miniatura img {
    width: 100% !important;
    height: auto !important;
    min-height: 250px !important;
    max-height: 350px !important;
    object-fit: cover !important;
    display: block !important;
  }
}

/* ============================================================ */
/* NAVBAR Y CONTENEDOR PRINCIPAL */
/* ============================================================ */
@media (min-width: 993px) {

  /* NAVBAR ALIGNMENT FIXES */
  .navbar-fixed-top {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 1030 !important;
  }

  /* CONTENEDOR PRINCIPAL FULL WIDTH */
  .container-fluid {
    width: 100% !important;
    max-width: none !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .contenedor100 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px 15px !important;
  }

  .contenedor100.F_blanco,
  .contenedor100.F_gris03 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
  }
}

/* ============================================================ */
/* THEME SWITCH Y TEMA OSCURO */
/* ============================================================ */
@media (min-width: 993px) {

  /* TEMA CLARO (por defecto) */
  body.theme-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
  }

  body.theme-light .contenedor100.F_gris03 {
    background-color: #e9ecef !important;
  }

  /* TEMA OSCURO */
  body.theme-dark {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
  }

  body.theme-dark .contenedor100.F_gris03 {
    background-color: #2d2d2d !important;
  }

  body.theme-dark .og-grid .miniatura {
    background: #333333 !important;
    color: #e0e0e0 !important;
  }

  body.theme-dark #cnt_destacadas_diaB {
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a) !important;
    color: #e0e0e0 !important;
  }

  /* SWITCH COMPACTO */
  .theme-switch-container {
    position: fixed !important;
    top: 100px !important;
    right: 20px !important;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 25px !important;
    padding: 8px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
  }
}

/* ============================================================ */
/* IMÁGENES Y MEDIA QUERIES */
/* ============================================================ */
@media (min-width: 993px) {

  /* OPTIMIZACIÓN DE IMÁGENES */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  .img-responsive {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
  }

  /* LOGO Y ELEMENTOS GRÁFICOS */
  .logo-container img {
    max-width: 250px !important;
    height: auto !important;
  }

  /* BOTONES Y CONTROLES */
  .btn {
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
  }

  .btn-primary {
    background: linear-gradient(135deg, #e91e63, #ad1457) !important;
    border: none !important;
  }

  .btn-primary:hover {
    background: linear-gradient(135deg, #ad1457, #e91e63) !important;
    transform: translateY(-2px) !important;
  }
}

/* ============================================================ */
/* FOOTER Y ELEMENTOS FINALES */
/* ============================================================ */
@media (min-width: 993px) {

  /* FOOTER OPTIMIZADO */
  footer {
    margin-top: 50px !important;
    padding: 40px 0 !important;
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
  }

  /* ELEMENTOS DE NAVEGACIÓN */
  .pagination {
    justify-content: center !important;
    margin: 30px 0 !important;
  }

  .pagination .page-link {
    border-radius: 8px !important;
    margin: 0 2px !important;
    padding: 8px 16px !important;
  }
}

/* ============================================================ */
/* CORRECCIONES FINALES Y OVERRIDES */
/* ============================================================ */
@media (min-width: 993px) {

  /* FORZAR VISIBILIDAD DE ELEMENTOS CRÍTICOS */
  .contenedor100.F_blanco,
  .contenedor100.F_gris03,
  #portaCarrusel,
  #myCarouselTop,
  .og-grid {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
  }

  .og-grid {
    display: grid !important;
    /* Override específico para grid */
  }

  /* ELIMINAR SCROLLBARS INNECESARIAS */
  .contenedor100 {
    overflow-x: hidden !important;
  }

  /* SMOOTH SCROLLING */
  html {
    scroll-behavior: smooth !important;
  }

  /* ACCESIBILIDAD Y UX */
  *:focus {
    outline: 2px solid #e91e63 !important;
    outline-offset: 2px !important;
  }

  /* PERFORMANCE HINTS */
  .miniatura img,
  #portaCarrusel img {
    will-change: transform !important;
  }
}

/* ================================================================== */
/* FIN CSS DESKTOP CONSOLIDADO                                       */
/* ================================================================== */

/* ================================================================== */
/* INTEGRACIÓN a) GRID-MEJORADO (fusionado)                           */
/* Fuente original: css/grid-mejorado.css (ahora incorporado)         */
/* ================================================================== */
@media (min-width:993px){
  .og-grid{display:flex;flex-wrap:wrap;gap:20px;margin:0 auto;width:100%;max-width:none;padding:20px;}
  .og-grid li{list-style:none;flex:1 1 calc(50% - 10px);min-width:300px;margin:0;position:relative;transition:all .3s ease;}
  .og-grid li:hover{transform:translateY(-2px);}
  .portaNena{background:#fff;border-radius:12px;box-shadow:0 4px 15px rgba(0,0,0,.1);overflow:hidden;transition:all .3s ease;position:relative;height:100%;display:flex;flex-direction:column;border:1px solid #e0e0e0;}
  .portaNena:hover{box-shadow:0 8px 25px rgba(255,105,180,.2);border-color:#ff69b4;}
  .imagen-container{position:relative;width:100%;height:200px;overflow:hidden;background:#f5f5f5;}
  .imagen-container img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease;}
  .portaNena:hover .imagen-container img{transform:scale(1.05);}
  .fotos-reales-badge{position:absolute;top:10px;left:10px;background:linear-gradient(135deg,#ff69b4,#ff1493);color:#fff;padding:4px 8px;border-radius:12px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;z-index:2;box-shadow:0 2px 8px rgba(255,105,180,.3);}
  .contact-icons-grid{position:absolute;bottom:10px;right:10px;display:flex;gap:8px;z-index:2;}
  .contact-icons-grid a{display:flex;align-items:center;justify-content:center;width:35px;height:35px;background:rgba(255,255,255,.9);border-radius:50%;color:#ff69b4;text-decoration:none;transition:all .3s ease;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 2px 8px rgba(0,0,0,.2);}
  .contact-icons-grid a:hover{background:#ff69b4;color:#fff;transform:scale(1.1);}
  .BScntnombre2{padding:15px;background:#fff;flex-grow:1;display:flex;flex-direction:column;gap:8px;}
  .BSnombre2{font-size:16px;font-weight:600;color:#333;margin:0;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .BSedad2{font-size:14px;color:#666;font-weight:500;margin:0;}
  .BSzona2{font-size:13px;color:#999;margin:0;display:flex;align-items:center;gap:4px;}
  .BSzona2::before{content:"📍";font-size:11px;}
  .acciones-grid{margin-top:auto;padding-top:10px;border-top:1px solid #f0f0f0;}
  .btn-mostrar-telefono{width:100%;background:linear-gradient(135deg,#ff69b4,#ff1493);color:#fff;border:none;padding:8px 12px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;justify-content:center;gap:6px;}
  .btn-mostrar-telefono:hover{background:linear-gradient(135deg,#ff1493,#ff69b4);transform:translateY(-1px);}
  .telefono-oculto{display:none;width:100%;background:#f8f9fa;color:#333;padding:8px 12px;border-radius:6px;font-size:13px;font-weight:600;text-align:center;border:1px solid #e0e0e0;margin-top:5px;}
}

/* ================================================================== */
/* INTEGRACIÓN b) FULL-WIDTH-CONTENT (partes clave, padding reducido) */
/* Fuente original: css/full-width-content.css                         */
/* ================================================================== */
@media (min-width:993px){
  .container-fluid,.main-content,.grid-container,#og-grid,.grid-wrapper,.carousel-container,.map-container,.main-wrapper,.content-wrapper,.filters-container,.tools-container,.portada-anuncios,.contenido-principal,.grid-listado{max-width:none!important;width:100%!important;margin:0!important;padding-left:16px!important;padding-right:16px!important;}
}
@media (min-width:1200px){
  .container-fluid,.main-content,.grid-container,#og-grid,.grid-wrapper,.carousel-container,.map-container,.main-wrapper,.content-wrapper,.filters-container,.tools-container,.portada-anuncios,.contenido-principal,.grid-listado{padding-left:32px!important;padding-right:32px!important;}
}
@media (min-width:1600px){
  .container-fluid,.main-content,.grid-container,#og-grid,.grid-wrapper,.carousel-container,.map-container,.main-wrapper,.content-wrapper,.filters-container,.tools-container,.portada-anuncios,.contenido-principal,.grid-listado{padding-left:48px!important;padding-right:48px!important;}
}

/* ================================================================== */
/* INTEGRACIÓN c) OVERRIDE-GLOBAL-XZONAS (fragmentos esenciales)       */
/* Fuente original: css/override-global-xzonas.css                     */
/* ================================================================== */
@media (min-width:993px){
  .miniatura-carrusel img,.blueimp-gallery .slide img,.gallery-image{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;background:#222!important;border-radius:8px!important;transition:all .3s ease;}
  .miniatura-carrusel,.blueimp-gallery .slide,.gallery-slide{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:450px!important;background:#222!important;overflow:hidden!important;border-radius:8px!important;}
  .imgMinFM img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:8px!important;transition:transform .3s ease;}
  .imgMinFM{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:280px!important;background:#333!important;overflow:hidden!important;border-radius:8px!important;box-shadow:0 2px 8px rgba(0,0,0,.1);}
}
@media (max-width:1199px){.miniatura-carrusel,.blueimp-gallery .slide,.gallery-slide{height:350px!important}.imgMinFM{height:220px!important}}
@media (max-width:768px){.miniatura-carrusel,.blueimp-gallery .slide,.gallery-slide{height:38vw!important;min-height:200px!important;max-height:300px!important}.imgMinFM{height:28vw!important;min-height:160px!important;max-height:220px!important}}

/* Nota: Archivos grid-mejorado.css, full-width-content.css y override-global-xzonas.css ahora pueden dejar de cargarse. */

/* ================================================================== */
/* INTEGRACIÓN d) HYBRID-LAYOUT-OVERRIDE (fusionado)                   */
/* Fuente original: css/hybrid-layout-override.css                     */
/* ================================================================== */
@media (min-width:993px){
  body.hybrid-active #desplazarmenu{display:none!important;height:0!important;margin:0!important;padding:0!important}
  body.hybrid-active .contenedor100,body.hybrid-active .contenedor100.F_gris03{padding:0!important;margin:0!important}
  body.hybrid-active .contenedor100>.row:first-child{margin:0!important}
  body.hybrid-active .hybrid-grid-layout{min-height:100dvh;min-height:100vh}
  body.hybrid-active .hybrid-grid-layout #hero-wrapper .hero-item .imagen-container{height:calc(100dvh - var(--nav-h,70px))!important;min-height:calc(100dvh - var(--nav-h,70px))!important;max-height:none!important}
  body.hybrid-active footer{margin-top:0!important}
  body.hybrid-active .spacer,body.hybrid-active .top-spacer,body.hybrid-active .before-grid-space{display:none!important}
}

/* FIN INTEGRACIÓN HYBRID */
