/* 
 * Estilos CSS para la página Home
 * Archivo: homeStilos.css
 * Creado: octubre 2025
 * ACTUALIZADO: 15-12-2025 - AJUSTE BANNER ZEPKY MANUAL
 * ACTUALIZADO: 15-10-2025 - FIX NAVEGACIÓN FIREFOX (compatibilidad cross-browser)
 * Version: 2.7.0
 */

/* FORZAR ACTUALIZACIÓN DE CACHE */
html {
  /* Timestamp para forzar refresh: 1734287400 */
  --cache-buster: 20251215-zepky-banner-manual-v1;
}

/* ========================================
   FORCE BROWSER REFRESH - CACHE BUSTER
   ======================================== */

/* Forzar refresh completo de estilos */
body.home-page,
body {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Timestamp específico para carruseles */
.simple-carousel-container,
.owl-carousel {
  /* Cache buster: 2025-10-14 v3 - Drag completo funcional */
  will-change: transform;
}

/* ========================================
   ESTILOS BUSCADOR MÓVIL
   ======================================== */

/* Bajar posición buscador móvil */
@media (max-width: 768px) {
  .mobile-search-section {
    margin-top: 15px !important;
    margin-bottom: 10px !important;
  }
}

/* Estilos para Search Bar (móvil y desktop) */
.mobile-search-section {
  background: #f8f9fa;
  padding: 25px 0;
  margin: 20px 0;
  position: relative;
  z-index: 0;
  width: 100%;
}

/* Estilos específicos para desktop */
@media (min-width: 769px) {
  .mobile-search-section {
    padding: 30px 0;
    margin: 30px 0;
    display: flex;
    justify-content: center;
  }
  
  .mobile-search-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
  }
  
  .mobile-search-wrapper {
    padding: 25px 30px;
    margin: 0 auto;
  }
  
  .mobile-search-bottom {
    gap: 20px;
  }
}

.mobile-search-container {
  width: 100%;
  margin: 0;
  padding: 0;
}

.mobile-search-wrapper {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: #fff;
  border-radius: 15px;
  padding: 20px;
  margin: 0 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
}

.mobile-search-wrapper:focus-within {
  border-color: #28a745;
  box-shadow: 0 6px 20px rgba(40,167,69,0.2);
  transform: translateY(-2px);
}

/* Primera fila: Campo de búsqueda */
.mobile-search-field {
  width: 100%;
}

.mobile-search-field input {
  width: 100%;
  border: 2px solid #e0e0e0;
  background: #f8f9fa;
  font-size: 16px;
  padding: 15px 20px;
  border-radius: 12px;
  line-height: 1.4;
  box-shadow: none !important;
  transition: all 0.3s ease;
}

.mobile-search-field input:focus {
  border-color: #28a745;
  background: #fff;
  outline: none;
  transform: translateY(-1px);
}

.mobile-search-field input::placeholder {
  color: #666;
  font-size: 15px;
}

/* Segunda fila: Ubicación y botón */
.mobile-search-bottom {
  display: flex;
  gap: 15px;
  align-items: center;
}

.mobile-location-field {
  flex: 1;
  position: relative;
}

.mobile-location-input-container {
  position: relative;
  width: 100%;
  z-index: 1000;
}

#mobile-location-suggestions {
  z-index: 10000 !important;
  position: absolute !important;
  top: 100% !important;
  left: -20px !important;
  right: -20px !important;
  width: calc(100% + 40px) !important;
  margin-top: 5px !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

.mobile-location-field input {
  width: 100%;
  border: 2px solid #e0e0e0;
  background: #f8f9fa;
  font-size: 15px;
  padding: 15px 50px 15px 20px;
  border-radius: 12px;
  line-height: 1.4;
  box-shadow: none !important;
  transition: all 0.3s ease;
}

.mobile-location-field input:focus {
  border-color: #28a745;
  background: #fff;
  outline: none;
  transform: translateY(-1px);
}

.mobile-location-field input::placeholder {
  color: #666;
  font-size: 14px;
}

.mobile-location-clear-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #dc3545;
  font-size: 18px;
  padding: 8px;
  width: 35px;
  height: 35px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  opacity: 0.7;
  z-index: 2;
}

.mobile-location-clear-btn:hover {
  color: #fff;
  background: #dc3545;
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
}
  .card-x:hover,
  .ads-thumb-view:hover {
    cursor: pointer !important;
    pointer-events: auto !important;
  }
  
  /* Fix para will-change en Firefox */
  .card-ospl,
  .card-x,
  .ads-thumb-view {
    will-change: auto !important;
  }


/* ========================================
   ESTILOS ESPECÍFICOS PARA "TE PUEDE INTERESAR"
   ======================================== */

/* Animaciones de texto de federación */
.federation-scroll-text-tepi {
  display: inline-block;
  white-space: nowrap;
}

.federation-scroll-text-tepi.long-text-tepi {
  animation: scroll-text-tepi 5s linear infinite;
}

.federation-scroll-text-tepi.short-text-tepi {
  animation: none;
}

/* Específico para móvil - Te puede interesar */
@media (max-width: 768px) {
  .federation-scroll-text-tepi.long-text-tepi {
    animation: scroll-text-mobile-tepi 5s linear infinite !important;
  }
}

/* Animación principal para desktop - Te puede interesar */
@keyframes scroll-text-tepi {
  0% {
    transform: translate3d(0%, 0, 0);
  }
  25% {
    transform: translate3d(0%, 0, 0);
  }
  98% {
    transform: translate3d(-100%, 0, 0);
  }
  100% {
    transform: translate3d(0%, 0, 0);
  }
}

/* Animación específica para móvil - Te puede interesar */
@keyframes scroll-text-mobile-tepi {
  0% {
    transform: translate3d(0%, 0, 0);
  }
  98% {
    transform: translate3d(-100%, 0, 0);
  }
  100% {
    transform: translate3d(0%, 0, 0);
  }
}

/* Pausar la animación al hacer hover - Te puede interesar */
.federation-info-container-tepi:hover .federation-scroll-text-tepi {
  animation-play-state: paused;
}

/* Efecto de fade-out en el borde derecho - Te puede interesar */
.federation-info-container-tepi:has(.long-text-tepi)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent 0%, white 100%);
  pointer-events: none;
}

/* ========================================
   ESTILOS BANNER TRIBOTRANS EN "TE PUEDE INTERESAR"
   ======================================== */

.tribotrans-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

/* Estilos específicos para la sección "Te puede interesar" */
.nearby-ads-second .rotating-border {
  position: absolute;
  top: -3px;
  left: -6px;
  right: -6px;
  bottom: 3px;
  width: calc(100% + 12px);
  height: 306px; /* Altura móvil + 6px del borde */
  border-radius: 18px;
  border: 3px solid transparent;
  background: linear-gradient(white, white) padding-box, 
              conic-gradient(from 0deg, transparent 70%, #28a745 80%, #20c997 90%, transparent 100%) border-box;
  animation: snakeBorder 3s linear infinite;
  z-index: 1;
  pointer-events: none;
}

/* Altura específica para desktop en "Te puede interesar" */
@media (min-width: 769px) {
  .nearby-ads-second .rotating-border {
    height: 420px; /* Altura desktop específica */
  }
}

/* Asegurar que el contenedor tenga posición relativa - Te puede interesar */
.nearby-ads-second .tribotrans-container {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: visible;
  margin: 6px;
}

/* Asegurar que el artículo padre no corte el borde - Te puede interesar */
.nearby-ads-second article {
  overflow: visible !important;
  position: relative;
  z-index: 1;
}

/* Asegurar que el contenedor de la grilla no corte el borde - Te puede interesar */
.nearby-ads-second .row {
  overflow: visible !important;
}

/* Asegurar que el contenido esté por encima del borde - Te puede interesar */
.nearby-ads-second .tribotrans-container > .card {
  position: relative;
  z-index: 3;
  background: white;
}

/* Clase específica para móvil en "Te puede interesar" */
.nearby-ads-second .rotating-border.mobile-slow {
  animation: snakeBorder 10s linear infinite !important;
}

@keyframes snakeBorder {
  0% {
    background: linear-gradient(white, white) padding-box, 
                conic-gradient(from 0deg, transparent 70%, #28a745 80%, #20c997 90%, transparent 100%) border-box;
  }
  25% {
    background: linear-gradient(white, white) padding-box, 
                conic-gradient(from 90deg, transparent 70%, #28a745 80%, #20c997 90%, transparent 100%) border-box;
  }
  50% {
    background: linear-gradient(white, white) padding-box, 
                conic-gradient(from 180deg, transparent 70%, #28a745 80%, #20c997 90%, transparent 100%) border-box;
  }
  75% {
    background: linear-gradient(white, white) padding-box, 
                conic-gradient(from 270deg, transparent 70%, #28a745 80%, #20c997 90%, transparent 100%) border-box;
  }
  100% {
    background: linear-gradient(white, white) padding-box, 
                conic-gradient(from 360deg, transparent 70%, #28a745 80%, #20c997 90%, transparent 100%) border-box;
  }
}

/* ========================================
   ESTILOS ESPECÍFICOS PARA SEGUNDA SECCIÓN DE ANUNCIOS CERCANOS
   ======================================== */

/* Estilos específicos para la segunda sección de anuncios cercanos */
.nearby-ads-second-container {
  min-height: 450px !important; /* Altura mínima fija con !important */
  position: relative;
  transition: none !important; /* Sin transiciones para evitar movimientos */
  animation: none !important; /* Sin animaciones */
  overflow: hidden; /* Prevenir desbordamientos que causen saltos */
  contain: layout style; /* CSS containment para mejor rendimiento */
  opacity: 1 !important; /* Opacidad fija para prevenir parpadeo */
}

#nearby-ads-second-content {
  min-height: 400px; /* Altura mínima para el contenido */
  position: relative;
  width: 100%;
  opacity: 1 !important; /* Opacidad fija para evitar parpadeo */
}

/* ========================================
   ESTILOS ESPECÍFICOS PARA "MAS CERCA DE TI"
   ======================================== */

/* Animaciones de texto de federación para "Mas cerca de ti" */
.federation-scroll-text-nearby {
  display: inline-block;
  white-space: nowrap;
}

.federation-scroll-text-nearby.long-text-nearby {
  animation: scroll-text-nearby 5s linear infinite;
}

.federation-scroll-text-nearby.short-text-nearby {
  animation: none;
}

/* Específico para móvil - Más cerca de ti */
@media (max-width: 768px) {
  .federation-scroll-text-nearby.long-text-nearby {
    animation: scroll-text-mobile-nearby 5s linear infinite !important;
  }
}

/* Animación principal para desktop - Más cerca de ti */
@keyframes scroll-text-nearby {
  0% {
    transform: translate3d(0%, 0, 0);
  }
  25% {
    transform: translate3d(0%, 0, 0);
  }
  98% {
    transform: translate3d(-100%, 0, 0);
  }
  100% {
    transform: translate3d(0%, 0, 0);
  }
}

/* Animación específica para móvil - Más cerca de ti */
@keyframes scroll-text-mobile-nearby {
  0% {
    transform: translate3d(0%, 0, 0);
  }
  98% {
    transform: translate3d(-100%, 0, 0);
  }
  100% {
    transform: translate3d(0%, 0, 0);
  }
}

/* Pausar la animación al hacer hover - Más cerca de ti */
.federation-info-container-nearby:hover .federation-scroll-text-nearby {
  animation-play-state: paused;
}

/* Efecto de fade-out en el borde derecho - Más cerca de ti */
.federation-info-container-nearby:has(.long-text-nearby)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent 0%, white 100%);
  pointer-events: none;
}

/* ========================================
   ESTILOS BANNER TRIBOTRANS EN "MAS CERCA DE TI"
   ======================================== */

/* Estilos específicos para la sección "Mas cerca de ti" */
.nearby-ads:not(.nearby-ads-second) .rotating-border {
  position: absolute;
  top: -3px;
  left: -6px;
  right: -6px;
  bottom: 3px;
  width: calc(100% + 12px);
  height: 315px; /* Altura aumentada para móvil: efecto LED más prominente */
  border-radius: 19px;
  border: 3px solid transparent;
  background: linear-gradient(white, white) padding-box, 
              conic-gradient(from 0deg, transparent 70%, #28a745 80%, #20c997 90%, transparent 100%) border-box;
  animation: snakeBorder 3s linear infinite;
  z-index: 1;
  pointer-events: none;
}

/* Altura específica para desktop en "Mas cerca de ti" - ajustada al banner */
@media (min-width: 769px) {
  .nearby-ads:not(.nearby-ads-second) .rotating-border {
    height: 425px; /* Altura más reducida para mejor alineación */
  }
}

/* Asegurar que el contenido esté por encima del borde */
.nearby-ads:not(.nearby-ads-second) .tribotrans-container > .card {
  position: relative;
  z-index: 3;
  background: white;
}

/* Clase específica para móvil en "Mas cerca de ti" */
.nearby-ads:not(.nearby-ads-second) .rotating-border.mobile-slow {
  animation: snakeBorder 10s linear infinite !important;
}

/* Asegurar que el contenedor tenga posición relativa */
.nearby-ads:not(.nearby-ads-second) .tribotrans-container {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: visible;
  margin: 6px;
}

/* Asegurar que el artículo padre no corte el borde */
.nearby-ads:not(.nearby-ads-second) article {
  overflow: visible !important;
  position: relative;
  z-index: 1;
}

/* Asegurar que el contenedor de la grilla no corte el borde */
.nearby-ads:not(.nearby-ads-second) .row {
  overflow: visible !important;
}

/* ========================================
   ESTILOS CONTENEDOR PARA "MAS CERCA DE TI"
   ======================================== */

/* Contenedor con dimensiones fijas para evitar saltos visuales */
.nearby-ads-container {
  min-height: 450px !important;
  position: relative;
  transition: none !important;
  animation: none !important;
  overflow: hidden;
  contain: layout style;
  opacity: 1 !important;
}

/* Asegurar que el contenido mantenga dimensiones consistentes */
#nearby-ads-content {
  min-height: 400px; /* Altura mínima para el contenido */
  position: relative;
  width: 100%;
  opacity: 1 !important; /* Opacidad fija para evitar parpadeo */
}

/* ========================================
   ESTILOS USUARIOS VERIFICADOS - TE PUEDE INTERESAR
   ======================================== */

/* Marco verde para usuarios verificados/pro en "Te puede interesar" - SELECTORES MÚLTIPLES */
.nearby-ads-second .verified .card.card-ospl,
.nearby-ads-second .card.card-ospl.verified,
.nearby-ads-second article.verified .card.card-ospl,
.nearby-ads-second .verified.card.card-ospl,
div.nearby-ads-second .verified .card.card-ospl.ads-thumb-view,
div.nearby-ads-second article.verified div.card.card-ospl.ads-thumb-view {
  border: 3px solid #005F00 !important;
  box-shadow: 0 4px 8px rgba(0, 95, 0, 0.3) !important;
  position: relative !important;
  animation: verifiedGlowTeInteresa 2s ease-in-out infinite alternate !important;
}

/* Selector adicional ultra específico para asegurar aplicación */
.section.nearby-ads-second .verified .card,
.section.nearby-ads-second article.verified .card,
.section.nearby-ads-second .card.verified {
  border: 3px solid #005F00 !important;
  box-shadow: 0 4px 8px rgba(0, 95, 0, 0.3) !important;
  animation: verifiedGlowTeInteresa 2s ease-in-out infinite alternate !important;
}

/* Animación de brillo verde para usuarios verificados en "Te puede interesar" */
@keyframes verifiedGlowTeInteresa {
  from {
    box-shadow: 0 4px 8px rgba(0, 95, 0, 0.3);
  }
  to {
    box-shadow: 0 6px 12px rgba(0, 95, 0, 0.5);
  }
}

/* Títulos para usuarios verificados/pro en "Te puede interesar" */
.nearby-ads-second .verified .card-ospl .card-body h4.home-title a {
  color: #000 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

/* Hover verde para nombres de usuarios verificados en "Te puede interesar" */
.nearby-ads-second .verified .user-name-home a:hover {
  color: #005F00 !important;
  text-decoration: underline !important;
}

/* Etiqueta VERIFICADO específica para "Te puede interesar" */
.nearby-ads-second .verified-label {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #005F00 0%, #004000 100%);
  color: #fff;
  padding: 8px 12px;
  border-radius: 50px;
  font-size: 0.6rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 95, 0, 0.4);
  border: 2px solid #005F00;
  white-space: nowrap;
  min-width: 80px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: auto;
  transform: none;
}

/* Icono de verificado en etiqueta para "Te puede interesar" */
.nearby-ads-second .verified-label img {
  height: 0.8em !important;
  margin-right: 3px !important;
  vertical-align: middle !important;
  filter: brightness(0) invert(1);
}

/* Responsive: PC/Desktop - títulos en negro para "Te puede interesar" */
@media (min-width: 768px) {
  .nearby-ads-second .verified .card-ospl .card-body h4.home-title a {
    color: #000 !important;
    text-decoration: none !important;
  }
}

/* Responsive: Móvil - títulos en negro para "Te puede interesar" */
@media (max-width: 767px) {
  .nearby-ads-second .verified .card-ospl .card-body h4.home-title a {
    color: #000 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
  }
}

/* ========================================
   ESTILOS USUARIOS VERIFICADOS - MAS CERCA DE TI
   ======================================== */

/* Marco verde para usuarios verificados/pro en "Mas cerca de ti" - SELECTORES MÚLTIPLES */
.nearby-ads:not(.nearby-ads-second) .verified .card.card-ospl,
.nearby-ads:not(.nearby-ads-second) .card.card-ospl.verified,
.nearby-ads:not(.nearby-ads-second) article.verified .card.card-ospl,
.nearby-ads:not(.nearby-ads-second) .verified.card.card-ospl,
div.nearby-ads:not(.nearby-ads-second) .verified .card.card-ospl.ads-thumb-view,
div.nearby-ads:not(.nearby-ads-second) article.verified div.card.card-ospl.ads-thumb-view {
  border: 3px solid #005F00 !important;
  box-shadow: 0 4px 8px rgba(0, 95, 0, 0.3) !important;
  position: relative !important;
  animation: verifiedGlowMasCerca 2s ease-in-out infinite alternate !important;
}

/* Selector adicional ultra específico para "Mas cerca de ti" */
.section.nearby-ads:not(.nearby-ads-second) .verified .card,
.section.nearby-ads:not(.nearby-ads-second) article.verified .card,
.section.nearby-ads:not(.nearby-ads-second) .card.verified {
  border: 3px solid #005F00 !important;
  box-shadow: 0 4px 8px rgba(0, 95, 0, 0.3) !important;
  animation: verifiedGlowMasCerca 2s ease-in-out infinite alternate !important;
}

/* Animación de brillo verde para usuarios verificados en "Mas cerca de ti" */
@keyframes verifiedGlowMasCerca {
  from {
    box-shadow: 0 4px 8px rgba(0, 95, 0, 0.3);
  }
  to {
    box-shadow: 0 6px 12px rgba(0, 95, 0, 0.5);
  }
}

/* Títulos para usuarios verificados/pro en "Mas cerca de ti" */
.nearby-ads:not(.nearby-ads-second) .verified .card-ospl .card-body h4.home-title a {
  color: #000 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

/* Hover verde para nombres de usuarios verificados en "Mas cerca de ti" */
.nearby-ads:not(.nearby-ads-second) .verified .user-name-home a:hover {
  color: #005F00 !important;
  text-decoration: underline !important;
}

/* Etiqueta VERIFICADO específica para "Mas cerca de ti" */
.nearby-ads:not(.nearby-ads-second) .verified-label {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #005F00 0%, #004000 100%);
  color: #fff;
  padding: 8px 12px;
  border-radius: 50px;
  font-size: 0.6rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 95, 0, 0.4);
  border: 2px solid #005F00;
  white-space: nowrap;
  min-width: 80px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: auto;
  transform: none;
}

/* Icono de verificado en etiqueta para "Mas cerca de ti" */
.nearby-ads:not(.nearby-ads-second) .verified-label img {
  height: 0.8em !important;
  margin-right: 3px !important;
  vertical-align: middle !important;
  filter: brightness(0) invert(1);
}

/* Responsive: PC/Desktop - títulos en negro para "Mas cerca de ti" */
@media (min-width: 768px) {
  .nearby-ads:not(.nearby-ads-second) .verified .card-ospl .card-body h4.home-title a {
    color: #000 !important;
    text-decoration: none !important;
  }
}

/* Responsive: Móvil - títulos en negro para "Mas cerca de ti" */
@media (max-width: 767px) {
  .nearby-ads:not(.nearby-ads-second) .verified .card-ospl .card-body h4.home-title a {
    color: #000 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
  }
}

/* ========================================
   ESTILOS ORDENAMIENTO POR DISTANCIA - MAS CERCA DE TI
   ======================================== */

/* Badge de distancia para anuncios en "Mas cerca de ti" - ESTILO NEUTRO */
.nearby-ads .distance-badge-nearby {
  background: #f8f9fa;
  color: #6c757d;
  border: 1px solid #e9ecef;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
}

.nearby-ads .distance-badge-nearby:hover {
  background: #e9ecef;
  color: #495057;
}

@keyframes fadeInDistance {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ocultar badges de distancia en móvil para "Mas cerca de ti" */
@media (max-width: 768px) {
  .nearby-ads .distance-badge-nearby {
    display: none !important;
  }
}

/* Efecto especial para anuncios muy cercanos en "Mas cerca de ti" */
.nearby-ads .card:has(.distance-badge-nearby) {
  position: relative;
}

.nearby-ads .card:has(.distance-badge-nearby)::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
  border-radius: 8px;
  z-index: -1;
  opacity: 0.7;
}

/* Estilo para anuncios sin distancia en "Mas cerca de ti" */
.nearby-ads .card:not(:has(.distance-badge-nearby)) {
  opacity: 0.95;
}

/* Loading skeleton para "Mas cerca de ti" */
.nearby-ads .nearby-ads-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  z-index: 5;
}

.nearby-ads .skeleton-card {
  background: #f0f0f0;
  border-radius: 8px;
  height: 350px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.nearby-ads .skeleton-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: skeletonLoading 1.5s infinite;
}

/* Evitar cambios de layout durante actualizaciones en "Mas cerca de ti" */
.nearby-ads .row {
  min-height: 400px;
}

/* Indicador de ubicación activa */
#location-status {
  cursor: help;
  position: relative;
}

#location-status:hover::after {
  content: 'Los anuncios se muestran ordenados de más cercano a más lejano según tu ubicación';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8em;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 5px;
}

#location-status:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  margin-bottom: -5px;
}

/* ========== ESTILOS MOVIDOS DESDE home.php ========== */

/* Críticos básicos */
html, body { 
  background: #f8f9fa !important; 
}

/* Móvil first - elementos críticos */
@media (max-width: 768px) {
  * { 
    box-sizing: border-box; 
  }
  img { 
    max-width: 100%; 
    height: auto; 
  }
  .container { 
    padding: 0 15px; 
  }
}

/* Estilos críticos optimizados */
body, h1, h2, h3 { 
  font-display: swap; 
}

/* Icono campana de notificaciones en verde */
.header-notification-bell {
  color: #005F00 !important;
  background: none !important;
  font-size: 1.5em !important;
  transition: color 0.2s;
}
.header-notification-bell:hover {
  color: #27ae60 !important;
}

/* Fix z-index modales header */
.header-notifications-dropdown,
.header-widget .header-notifications-dropdown,
.user-menu .header-notifications-dropdown,
.countries-menu,
.countries-menu-pc,
#countries-menu,
#countries-menu-pc {
  z-index: 10000 !important;
  position: absolute !important;
}

/* Contenedor de notificaciones del header */
.header-notifications,
.header-widget .header-notifications,
.user-menu {
  z-index: 10000 !important;
}

/* Sugerencias de búsqueda del header */
.header-location-field .location-suggestions,
#header-location-suggestions,
#header-location-suggestions-logged,
.location-suggestions {
  z-index: 10000 !important;
}

/* Barra de categorías sticky con z-index menor */
.sticky-category-menu,
.sticky-category-menu.is-sticky,
.category-navigation,
.categories-bar {
  z-index: 100 !important;
}

/* Header z-index medio */
#header-container,
#header {
  z-index: 1000 !important;
}

/* Dropdowns países visibles */
.countries-trigger,
.countries-trigger-pc {
  z-index: 10000 !important;
}

.countries-menu,
.countries-menu-pc {
  background: white !important;
  border: 1px solid #ddd !important;
  border-radius: 5px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25) !important;
  z-index: 10001 !important;
}

/* Ajustar botón países móvil */
@media (max-width: 991px) {
  #countries-dropdown {
    margin-top: 5px !important;
    position: relative !important;
    top: 5px !important;
  }
  
  .countries-trigger {
    margin-top: 3px !important;
  }
}

/* Enlaces que cubren toda la tarjeta de anuncio - SOLO EN PC */
@media (min-width: 769px) {
  .card-link-overlay {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
    position: relative;
    z-index: 1;
    cursor: pointer !important;
    pointer-events: auto !important;
  }
  .card-link-overlay:hover {
    text-decoration: none !important;
    color: inherit !important;
  }
  .card-link-overlay:focus {
    text-decoration: none !important;
    color: inherit !important;
    outline: 2px solid #005F00;
    outline-offset: 2px;
  }
  .card-link-overlay .card {
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    pointer-events: none !important; /* La card no debe capturar eventos, el overlay lo hace */
  }
  .card-link-overlay:hover .card {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
  }
  
  /* Asegurar que todos los elementos internos mantengan el color */
  .card-link-overlay h4,
  .card-link-overlay h4 a,
  .card-link-overlay p,
  .card-link-overlay span,
  .card-link-overlay .home-title,
  .card-link-overlay .user-name-home {
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: none !important;
  }
  
  /* Evitar que otros enlaces internos interfieran */
  .card-link-overlay .home-title a {
    pointer-events: none !important;
  }
  .card-link-overlay .user-name-home a {
    pointer-events: none !important;
  }
  
  /* Asegurar que elementos decorativos no bloqueen clicks */
  .card-link-overlay .card::before,
  .card-link-overlay .card::after,
  .card-link-overlay .card-image::before,
  .card-link-overlay .card-image::after,
  .card-link-overlay .card-body::before,
  .card-link-overlay .card-body::after {
    pointer-events: none !important;
  }
}

/* Botón verde para login/register en el header */
.header-login-btn, .header-register-btn {
  background: linear-gradient(135deg, #005F00 0%, #004000 100%) !important;
  color: #fff !important;
  border-radius: 25px !important;
  font-weight: 600 !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0,95,0,0.08);
  padding: 10px 22px !important;
  transition: all 0.2s;
}
.header-login-btn:hover, .header-register-btn:hover {
  background: linear-gradient(135deg, #004000 0%, #005F00 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(0,95,0,0.15);
}

/* Elementos ocultos en móvil */
@media (max-width: 768px) {
  .fish-category-mobile-hidden,
  .popular-dog-breeds-section,
  .need-help-banner-section {
    display: none !important;
  }
  .mobile-otras-category {
    display: block !important;
  }
}

/* BOTÓN DE WHATSAPP */
.whatsapp-button-container {
  text-align: center;
  margin: 40px 0;
  padding: 20px;
  position: relative;
  z-index: 999;
  background-color: #f3f7f2;
  backdrop-filter: blur(10px);
}

.whatsapp-btn {
  background-color: #f3f7f2 !important;
  color: #005f00 !important;
  padding: 15px 30px;
  text-decoration: none !important;
  border-radius: 30px;
  font-weight: bold;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  font-size: 18px;
  border: 3px solid #005f00 !important;
  position: relative;
  z-index: 1000;
}

.whatsapp-btn:hover {
  background-color: #25D366 !important;
  color: white !important;
  text-decoration: none !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:focus {
  background-color: #128C7E !important;
  color: white !important;
  text-decoration: none !important;
  outline: 2px solid #005F00;
  outline-offset: 2px;
}

.whatsapp-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}

/* BOTÓN DE WHATSAPP MÓVIL */
.whatsapp-mobile-container {
  text-align: center;
  margin: 20px 0;
  padding: 15px;
  background-color: #062f05;
}

.whatsapp-btn-mobile {
  background-color: #f3f7f2 !important;
  color: #005f00 !important;
  padding: 10px 15px;
  text-decoration: none !important;
  border-radius: 20px;
  font-weight: bold;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  border: 2px solid #005f00 !important;
  white-space: nowrap !important;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.whatsapp-btn-mobile:hover {
  background-color: #005f00 !important;
  color: #f3f7f2 !important;
  text-decoration: none !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 95, 0, 0.4);
}

.whatsapp-btn-mobile:focus {
  background-color: #005f00 !important;
  color: #f3f7f2 !important;
  text-decoration: none !important;
  outline: 2px solid #005f00;
  outline-offset: 2px;
}

/* Optimizaciones Safari */
.js-lazy-image {
  transition: opacity 0.3s ease, filter 0.3s ease;
  will-change: opacity, filter;
  opacity: 1;
  filter: blur(0px);
}

.js-lazy-image.loaded,
.js-lazy-image.safari-loaded {
  opacity: 1 !important;
  filter: blur(0px) !important;
}

/* Uniformidad visual entre videos e imágenes */
.card-image img, 
.item__img,
.home-video-thumbnail video {
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

/* Placeholder mientras cargan las imágenes */
.js-lazy-image[src*="loading"] {
  background-color: #f5f5f5;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHJva2U9IiNjY2MiPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAxKSIgc3Ryb2tlLXdpZHRoPSIyIj48Y2lyY2xlIHN0cm9rZS1vcGFjaXR5PSIuNSIgY3g9IjE4IiBjeT0iMTgiIHI9IjE4Ii8+PHBhdGggZD0ibTM5IDM5YzAgOS45NC04LjA2IDE4LTE4IDE4cy0xOC04LjA2LTE4LTE4IDguMDYtMTggMTgtMTggMTggOC4wNiAxOCAxOHoiPjxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0icm90YXRlIiBmcm9tPSIwIDM5IDM5IiB0bz0iMzYwIDM5IDM5IiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPjwvcGF0aD48L2c+PC9nPjwvc3ZnPg==');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
}

/* Estilo uniforme para todas las tarjetas de anuncios */
.card-ospl,
.card-x,
.ads-thumb-view,
.nearby-ads .card-ospl,
.nearby-ads .card-x,
.nearby-ads .ads-thumb-view {
    transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1);
    cursor: pointer;
    will-change: transform, box-shadow;
}

/* Efecto hover unificado SIMPLIFICADO */
.card-ospl:hover,
.card-x:hover,
.ads-thumb-view:hover {
  transform: scale(0.97);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Efecto active/touch unificado SIMPLIFICADO */
.card-ospl:active,
.card-ospl.touch-active,
.card-x:active,
.card-x.touch-active,
.ads-thumb-view:active,
.ads-thumb-view.touch-active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
  .card-ospl {
    cursor: pointer;
  }
}

/* ESTILOS PARA BÚSQUEDA POR GEOLOCALIZACIÓN */
.location-search-field {
  flex: 1;
  align-items: center;
  display: flex;
  position: relative;
  margin: 0;
}

.location-input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

#location-search-input {
  height: calc(2.5rem + 4px) !important;
  padding-right: 45px !important;
  width: 100%;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
}

#location-search-input::placeholder {
  color: #6c757d;
  opacity: 1;
}

.use-location-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #007bff;
  cursor: pointer;
  font-size: 16px;
  z-index: 2;
  padding: 8px;
  line-height: 1;
}

.use-location-btn:hover {
  color: #0056b3;
  background-color: rgba(0, 123, 255, 0.1);
  border-radius: 3px;
}

/* Campos búsqueda fijos */
#intro-keywords {
  min-width: 200px !important;
  width: 100% !important;
  height: calc(2.5rem + 4px) !important;
  transition: none !important;
  animation: none !important;
  flex-shrink: 0 !important;
}

#location-search-input {
  min-width: 200px !important;
  width: 100% !important;
  height: calc(2.5rem + 4px) !important;
  transition: none !important;
  animation: none !important;
  flex-shrink: 0 !important;
}

/* ========== NOMBRE + ICONOS EN UNA LÍNEA - AMBAS SECCIONES - SOLO MÓVIL ========== */
@media (max-width: 768px) {
  /* Te puede interesar */
  .nearby-ads-second .user-name-home,
  /* Mas cerca de ti */
  .nearby-ads:not(.nearby-ads-second) .user-name-home {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    max-width: 100% !important;
  }
  
  /* Todos los elementos internos en línea - ambas secciones */
  .nearby-ads-second .user-name-home span,
  .nearby-ads-second .user-name-home .verified-img,
  .nearby-ads-second .user-name-home .store-badge,
  .nearby-ads-second .user-name-home i,
  .nearby-ads:not(.nearby-ads-second) .user-name-home span,
  .nearby-ads:not(.nearby-ads-second) .user-name-home .verified-img,
  .nearby-ads:not(.nearby-ads-second) .user-name-home .store-badge,
  .nearby-ads:not(.nearby-ads-second) .user-name-home i {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline !important;
  }
  
  /* El texto del nombre puede encogerse - ambas secciones */
  .nearby-ads-second .user-name-home > span,
  .nearby-ads:not(.nearby-ads-second) .user-name-home > span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
  
  /* Asegurar que el contenedor respete el ancho - ambas secciones */
  .nearby-ads-second .card-body,
  .nearby-ads:not(.nearby-ads-second) .card-body {
    overflow: hidden !important;
  }
}

/* ========================================
   ESTILOS ESPECÍFICOS PARA ANUNCIOS ADSENSE
   ======================================== */

/* Contenedores de AdSense - Te puede interesar */
.nearby-ads-second .adsense-card-container,
.nearby-ads .adsense-card-container {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
}

/* Tarjetas de AdSense - Desktop (PC) */
@media (min-width: 769px) {
  .nearby-ads .adsense-card-container,
  .nearby-ads-second .adsense-card-container {
    min-height: 380px !important;
    max-height: 380px !important;
  }
  
  .nearby-ads .adsense-card,
  .nearby-ads-second .adsense-card {
    display: flex !important;
    flex-direction: column !important;
    height: 380px !important;
    max-height: 380px !important;
    min-height: 380px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    transition: all 0.3s ease !important;
  }
  
  .nearby-ads .adsense-card:hover,
  .nearby-ads-second .adsense-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
    transform: translateY(-2px) !important;
  }
  
  /* Contenedor de imagen de AdSense - Desktop */
  .nearby-ads .adsense-image-container,
  .nearby-ads-second .adsense-image-container {
    position: relative !important;
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
  }
  
  /* El contenido de AdSense - Desktop */
  .nearby-ads .adsense-image-container .adsbygoogle,
  .nearby-ads-second .adsense-image-container .adsbygoogle {
    display: block !important;
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    overflow: visible !important;
  }
  
  /* Cuerpo de la tarjeta AdSense - Desktop */
  .nearby-ads .adsense-card .card-body,
  .nearby-ads-second .adsense-card .card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    padding: 15px !important;
    background: white !important;
  }
  
  /* Título de AdSense - Desktop */
  .nearby-ads .adsense-card .home-title,
  .nearby-ads-second .adsense-card .home-title {
    font-size: 1.2em !important;
    font-weight: 600 !important;
    color: #666 !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
  }
}

/* Tarjetas de AdSense - Móvil/PWA */
@media (max-width: 768px) {
  .nearby-ads .adsense-card-container,
  .nearby-ads-second .adsense-card-container {
    min-height: 300px !important;
    max-height: 300px !important;
    padding: 0 !important;
    margin-bottom: 15px !important;
  }
  
  .nearby-ads .adsense-card,
  .nearby-ads-second .adsense-card {
    display: flex !important;
    flex-direction: column !important;
    height: 300px !important;
    max-height: 300px !important;
    min-height: 300px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    background: white !important;
  }
  
  /* Contenedor de imagen de AdSense - Móvil */
  .nearby-ads .adsense-image-container,
  .nearby-ads-second .adsense-image-container {
    position: relative !important;
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
  }
  
  /* El contenido de AdSense - Móvil */
  .nearby-ads .adsense-image-container .adsbygoogle,
  .nearby-ads-second .adsense-image-container .adsbygoogle {
    display: block !important;
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    overflow: visible !important;
  }
  
  /* Cuerpo de la tarjeta AdSense - Móvil */
  .nearby-ads .adsense-card .card-body,
  .nearby-ads-second .adsense-card .card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    padding: 12px 15px !important;
    background: white !important;
  }
  
  /* Título de AdSense - Móvil */
  .nearby-ads .adsense-card .home-title,
  .nearby-ads-second .adsense-card .home-title {
    font-size: 1.1em !important;
    font-weight: 600 !important;
    color: #666 !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
  }
}

/* Forzar visibilidad del contenido AdSense */
.nearby-ads .adsense-image-container ins,
.nearby-ads-second .adsense-image-container ins,
.nearby-ads .adsense-image-container .adsbygoogle,
.nearby-ads-second .adsense-image-container .adsbygoogle {
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

/* Icono de información para AdSense */
.nearby-ads .adsense-card .home-title i,
.nearby-ads-second .adsense-card .home-title i {
  color: #28a745 !important;
  margin-right: 5px !important;
}

/* ========================================
   ESTILOS ESPECÍFICOS PARA "TAMBIÉN TE PUEDE INTERESAR" (TERCERA SECCIÓN)
   ======================================== */

/* Animaciones de texto de federación para tercera sección */
.federation-scroll-text-third {
  display: inline-block;
  white-space: nowrap;
}

.federation-scroll-text-third.long-text-third {
  animation: scroll-text-third 5s linear infinite;
}

.federation-scroll-text-third.short-text-third {
  animation: none;
}

/* Específico para móvil - Tercera sección */
@media (max-width: 768px) {
  .federation-scroll-text-third.long-text-third {
    animation: scroll-text-mobile-third 5s linear infinite !important;
  }
}

/* Animación principal para desktop - Tercera sección */
@keyframes scroll-text-third {
  0% {
    transform: translate3d(0%, 0, 0);
  }
  25% {
    transform: translate3d(0%, 0, 0);
  }
  98% {
    transform: translate3d(-100%, 0, 0);
  }
  100% {
    transform: translate3d(0%, 0, 0);
  }
}

/* Animación específica para móvil - Tercera sección */
@keyframes scroll-text-mobile-third {
  0% {
    transform: translate3d(0%, 0, 0);
  }
  98% {
    transform: translate3d(-100%, 0, 0);
  }
  100% {
    transform: translate3d(0%, 0, 0);
  }
}

/* Pausar la animación al hacer hover - Tercera sección */
.federation-info-container-third:hover .federation-scroll-text-third {
  animation-play-state: paused;
}

/* Efecto de fade-out en el borde derecho - Tercera sección */
.federation-info-container-third:has(.long-text-third)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent 0%, white 100%);
  pointer-events: none;
}

/* ========================================
   ESTILOS BANNER TRIBOTRANS EN "TERCERA SECCIÓN"
   ======================================== */

.tribotrans-container-third {
  position: relative;
  display: inline-block;
  width: 100%;
}

/* Estilos específicos para la tercera sección */
.nearby-ads-third .rotating-border-third {
  position: absolute;
  top: -3px;
  left: -6px;
  right: -6px;
  bottom: 3px;
  width: calc(100% + 12px);
  height: 306px; /* Altura móvil + 6px del borde */
  border-radius: 18px;
  border: 3px solid transparent;
  background: linear-gradient(white, white) padding-box, 
              conic-gradient(from 0deg, transparent 70%, #28a745 80%, #20c997 90%, transparent 100%) border-box;
  animation: snakeBorder 3s linear infinite;
  z-index: 1;
  pointer-events: none;
}

/* Altura específica para desktop en tercera sección */
@media (min-width: 769px) {
  .nearby-ads-third .rotating-border-third {
    height: 420px; /* Altura desktop específica */
  }
}

/* Asegurar que el contenedor tenga posición relativa - Tercera sección */
.nearby-ads-third .tribotrans-container-third {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: visible;
  margin: 6px;
}

/* Asegurar que el artículo padre no corte el borde - Tercera sección */
.nearby-ads-third article {
  overflow: visible !important;
  position: relative;
  z-index: 1;
}

/* Asegurar que el contenedor de la grilla no corte el borde - Tercera sección */
.nearby-ads-third .row {
  overflow: visible !important;
}

/* Asegurar que el contenido esté por encima del borde - Tercera sección */
.nearby-ads-third .tribotrans-container-third > .card {
  position: relative;
  z-index: 3;
  background: white;
}

/* Clase específica para móvil en tercera sección */
.nearby-ads-third .rotating-border-third.mobile-slow {
  animation: snakeBorder 10s linear infinite !important;
}

/* ========================================
   ESTILOS ESPECÍFICOS PARA ADSENSE EN TERCERA SECCIÓN
   ======================================== */

/* Contenedor principal de AdSense - Tercera sección */
.nearby-ads-third .adsense-card-container {
  display: flex !important;
  flex-direction: column !important;
}

/* Card AdSense con dimensiones fijas - Tercera sección */
.nearby-ads-third .adsense-card {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  max-height: 500px !important; /* Mismo que anuncios normales */
  border: 1px solid #e9ecef !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

/* Contenedor de imagen AdSense con dimensiones controladas - Tercera sección */
.nearby-ads-third .adsense-image-container {
  height: 200px !important; /* Altura fija igual a anuncios normales */
  min-height: 200px !important;
  max-height: 200px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f8f9fa !important;
  position: relative !important;
}

/* AdSense responsive dentro del contenedor - Tercera sección */
.nearby-ads-third .adsense-image-container .adsbygoogle {
  width: 100% !important;
  max-width: 100% !important;
  height: 200px !important;
  min-height: 200px !important;
  max-height: 200px !important;
  display: block !important;
}

/* Para móviles - dimensiones más pequeñas - Tercera sección */
@media (max-width: 576px) {
  .nearby-ads-third .adsense-image-container {
    height: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;
  }
  
  .nearby-ads-third .adsense-image-container .adsbygoogle {
    height: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;
  }
  
  /* Asegurar que las columnas col-6 no se desborden */
  .nearby-ads-third .col-6.adsense-card-container {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}

/* Para tabletas - Tercera sección */
@media (min-width: 577px) and (max-width: 768px) {
  .nearby-ads-third .adsense-image-container {
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
  }
  
  .nearby-ads-third .adsense-image-container .adsbygoogle {
    min-height: 200px !important;
    max-height: 200px !important;
    height: 200px !important;
  }
}

/* Forzar que el AdSense no cause overflow - Tercera sección */
.nearby-ads-third .adsense-image-container ins {
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Títulos más pequeños en AdSense - Tercera sección */
.nearby-ads-third .adsense-card .home-title {
  font-size: 1.1rem !important;
  line-height: 1.2 !important;
  margin-bottom: 1rem !important;
  font-weight: 600 !important;
  color: #333 !important;
  overflow: hidden !important;
}

/* Evitar que el AdSense empuje el contenido - Tercera sección */
.nearby-ads-third .adsense-card .price-block {
  min-height: 24px !important;
  flex-shrink: 0 !important;
}

/* Línea separadora con altura fija - Tercera sección */
.nearby-ads-third .adsense-card hr {
  border-top: 3px solid #e0e0e0 !important;
  margin: 8px 0 !important;
  flex-shrink: 0 !important;
}

/* Texto patrocinado - Tercera sección */
.nearby-ads-third .adsense-card .user-name-home {
  margin-bottom: 0 !important;
  flex-shrink: 0 !important;
}

.nearby-ads-third .adsense-card .user-name-home span {
  color: #bbb !important;
}

/* Card body con flex para distribuir espacio - Tercera sección */
.nearby-ads-third .adsense-card .card-body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  padding: 1rem !important;
  justify-content: space-between !important;
}

/* Asegurar visibilidad del contenido AdSense - Tercera sección */
.nearby-ads-third .adsense-card {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  transition: box-shadow 0.3s ease !important;
  background: #fff !important;
  position: relative !important;
  z-index: 1 !important;
}

.nearby-ads-third .adsense-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Forzar visibilidad del AdSense en todos los dispositivos - Tercera sección */
.nearby-ads-third .adsense-image-container * {
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

/* Contenido específico de texto en AdSense - Tercera sección */
.nearby-ads-third .adsense-card .home-title {
  color: #666 !important;
  font-style: italic !important;
}

.nearby-ads-third .adsense-card .text-muted small {
  font-size: 0.8rem !important;
  color: #999 !important;
}

/* Icono del usuario en AdSense - Tercera sección */
.nearby-ads-third .adsense-card .icon-feather-star {
  color: #ffc107 !important;
  font-size: 0.9rem !important;
  margin-right: 4px !important;
}

/* Asegurar que AdSense no se oculte por problemas de z-index */
.nearby-ads-third .adsense-card-container {
  position: relative !important;
  z-index: 10 !important;
}

/* ========================================
   CARRUSEL SIMPLE QUE FUNCIONA
   ======================================== */

/* Asegurar que la sección de destacados sea siempre visible */
.nearby-ads-third,
.section.nearby-ads-third {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.simple-carousel-container {
  position: relative;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y pinch-zoom !important; /* PERMITIR SCROLL VERTICAL SIEMPRE */
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.simple-carousel-track {
  display: flex !important;
  transition: transform 0.3s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  touch-action: pan-y pinch-zoom !important; /* PERMITIR SCROLL VERTICAL SIEMPRE */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  visibility: visible !important;
  opacity: 1 !important;
}

.simple-carousel-track:active {
  cursor: grabbing;
}

.simple-carousel-item {
  width: 25%;      /* 4 en desktop */
  flex-shrink: 0;
  padding: 0 7px;
  touch-action: pan-y pinch-zoom !important; /* PERMITIR SCROLL VERTICAL SIEMPRE */
  pointer-events: auto;
}

/* Asegurar que los enlaces dentro de carousel-items sean clickeables */
.simple-carousel-item a {
  display: block;
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative;
  z-index: 1;
}

/* Prevenir que elementos hijos bloqueen clicks */
.simple-carousel-item .card {
  pointer-events: auto !important;
}

.simple-carousel-item .card * {
  pointer-events: auto !important;
}

/* Prevenir selección de texto durante el drag */
.simple-carousel-track * {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Pero permitir clicks en enlaces y botones */
.simple-carousel-track a,
.simple-carousel-track button {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.simple-carousel-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 100;
  padding: 0 10px;
}

.simple-nav-btn {
  background: linear-gradient(135deg, #28a745 0%, #20883d 100%);
  color: white;
  border: 2px solid #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: all;
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
  transition: all 0.3s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.simple-nav-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

.simple-nav-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.simple-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: #6c757d;
}

#simple-prev-third {
  left: 0;
}

#simple-next-third {
  right: 0;
}

/* Ocultar botones en móvil si se prefiere solo swipe */
@media (max-width: 768px) {
  .simple-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

/* Móvil: 2 elementos */
@media (max-width: 768px) {
  .simple-carousel-item {
    width: 50%;    /* 2 en móvil */
  }
}

/* Los estilos complejos anteriores han sido reemplazados por el carrusel simplificado arriba */

/* ========================================
   FIX SCROLL VERTICAL EN OWL CAROUSEL
   ======================================== */

/* Permitir scroll vertical en carruseles Owl */
.owl-carousel .owl-stage {
  -ms-touch-action: pan-y pinch-zoom !important;
  touch-action: pan-y pinch-zoom !important;
}

.owl-carousel .owl-stage-outer {
  touch-action: pan-y pinch-zoom !important;
  overflow: hidden !important;
}

.owl-carousel {
  touch-action: pan-y pinch-zoom !important;
}

/* Asegurar que todos los elementos del carrusel permitan scroll vertical */
.owl-categories,
.owl-categories .owl-stage-outer,
.owl-categories .owl-stage,
.owl-categories .owl-item,
.owl-breads,
.owl-breads .owl-stage-outer,
.owl-breads .owl-stage,
.owl-breads .owl-item,
.owl-ads,
.owl-ads .owl-stage-outer,
.owl-ads .owl-stage,
.owl-ads .owl-item {
  touch-action: pan-y pinch-zoom !important;
}

/* Fix para carrusel personalizado "También te puede interesar" */
.simple-carousel-container,
.simple-carousel-track,
.simple-carousel-item {
  touch-action: pan-y pinch-zoom !important;
}

/* ========================================
   CAMBIAR TÍTULO A "DESTACADOS" CON CSS
   ======================================== */

/* Ocultar el texto original y mostrar "Destacados" */
.nearby-ads-third .green-section-title {
  font-size: 0 !important; /* Ocultar texto original */
  position: relative !important;
}

.nearby-ads-third .green-section-title::after {
  content: "Destacados" !important;
  font-size: 2rem !important;
  font-weight: bold !important;
  color: #ffc107 !important; /* Amarillo */
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  white-space: nowrap !important;
}

@media (max-width: 768px) {
  .nearby-ads-third .green-section-title::after {
    font-size: 1.5rem !important;
  }
}

/* ========================================
   AJUSTAR ALTURA BANNER TRIBOTRANS PC Y MÓVIL - v2.1.1
   CACHE BUSTER: 2025-10-13-15:00
   FORZAR APLICACIÓN INMEDIATA
   ======================================== */

/* Móvil - altura reducida */
@media screen and (max-width: 768px) {
  /* Selector ultra específico para forzar cambios - TRIBOTRANS MÓVIL */
  html body .simple-carousel-container .simple-carousel-track .simple-carousel-item img[src*="bannerTRIBOTRNS"],
  html body .simple-carousel-item img[src*="bannerTRIBOTRNS.png"],
  html body .simple-carousel-item img[src*="bannerTRIBOTRNS"],
  html body .nearby-ads-third .simple-carousel-item img[src*="bannerTRIBOTRNS.png"],
  html body .simple-carousel-track .simple-carousel-item img[src*="bannerTRIBOTRNS"],
  html body .tribotrans-banner-img,
  .tribotrans-banner-img[class] {
    height: 280px !important; /* FORZAR altura imagen móvil */
    object-fit: cover !important;
    min-height: 280px !important;
    max-height: 280px !important;
    width: 100% !important;
  }
  
  .simple-carousel-item a[href="/tribotrans"] .card,
  .nearby-ads-third .simple-carousel-item a[href="/tribotrans"] .card,
  .simple-carousel-track .simple-carousel-item a[href="/tribotrans"] .card {
    min-height: 320px !important;
    height: auto !important;
  }
  
  /* FORZAR estilos de texto - MÓVIL */
  html body .simple-carousel-item a[href="/tribotrans"] .card-body,
  html body .nearby-ads-third .simple-carousel-item a[href="/tribotrans"] .card-body,
  html body .simple-carousel-track .simple-carousel-item a[href="/tribotrans"] .card-body,
  .simple-carousel-item a[href="/tribotrans"] .card-body[class] {
    padding: 2px 6px !important; /* FORZAR padding mínimo móvil */
    margin: 0 !important;
    min-height: 30px !important;
    max-height: 30px !important;
    overflow: hidden !important;
    display: block !important;
  }
  
  .simple-carousel-item a[href="/tribotrans"] .home-title,
  .nearby-ads-third .simple-carousel-item a[href="/tribotrans"] .home-title,
  .simple-carousel-track .simple-carousel-item a[href="/tribotrans"] .home-title {
    font-size: 0.75rem !important; /* Texto muy pequeño para móvil */
    margin-bottom: 0px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  
  .simple-carousel-item a[href="/tribotrans"] .text-muted,
  .nearby-ads-third .simple-carousel-item a[href="/tribotrans"] .text-muted,
  .simple-carousel-track .simple-carousel-item a[href="/tribotrans"] .text-muted {
    font-size: 0.65rem !important; /* Texto secundario muy pequeño */
    margin: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
}

/* PC - altura reducida - FORZAR APLICACIÓN */
@media screen and (min-width: 769px) {
  /* Selector ultra específico para forzar cambios - TRIBOTRANS PC */
  html body .simple-carousel-container .simple-carousel-track .simple-carousel-item img[src*="bannerTRIBOTRNS"],
  html body .simple-carousel-item img[src*="bannerTRIBOTRNS.png"],
  html body .simple-carousel-item img[src*="bannerTRIBOTRNS"],
  html body .nearby-ads-third .simple-carousel-item img[src*="bannerTRIBOTRNS.png"],
  html body .simple-carousel-track .simple-carousel-item img[src*="bannerTRIBOTRNS"],
  html body .tribotrans-banner-img,
  .tribotrans-banner-img[class] {
    height: 390px !important; /* FORZAR altura imagen PC */
    object-fit: cover !important;
    min-height: 390px !important;
    max-height: 390px !important;
    width: 100% !important;
  }
  
  /* Ajustar también el contenedor de la card */
  .simple-carousel-item a[href="/tribotrans"] .card,
  .nearby-ads-third .simple-carousel-item a[href="/tribotrans"] .card,
  .simple-carousel-track .simple-carousel-item a[href="/tribotrans"] .card {
    min-height: 430px !important; /* Altura más reducida para PC */
    height: auto !important;
  }
  
  /* FORZAR estilos de texto - PC */
  html body .simple-carousel-item a[href="/tribotrans"] .card-body,
  html body .nearby-ads-third .simple-carousel-item a[href="/tribotrans"] .card-body,
  html body .simple-carousel-track .simple-carousel-item a[href="/tribotrans"] .card-body,
  .simple-carousel-item a[href="/tribotrans"] .card-body[class] {
    padding: 3px 8px !important; /* FORZAR padding mínimo PC */
    margin: 0 !important;
    min-height: 35px !important;
    max-height: 35px !important;
    overflow: hidden !important;
    display: block !important;
  }
  
  .simple-carousel-item a[href="/tribotrans"] .home-title,
  .nearby-ads-third .simple-carousel-item a[href="/tribotrans"] .home-title,
  .simple-carousel-track .simple-carousel-item a[href="/tribotrans"] .home-title {
    font-size: 0.8rem !important; /* Tamaño muy pequeño */
    margin-bottom: 0px !important; /* Sin margen inferior */
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  
  .simple-carousel-item a[href="/tribotrans"] .text-muted,
  .nearby-ads-third .simple-carousel-item a[href="/tribotrans"] .text-muted,
  .simple-carousel-track .simple-carousel-item a[href="/tribotrans"] .text-muted {
    font-size: 0.7rem !important; /* Texto muy pequeño */
    margin: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  
  /* Asegurar que el contenedor del carrusel acomode la nueva altura */
  .simple-carousel-container {
    min-height: 480px !important;
  }
}

/* ========================================
   BANNER TRIBOTRANS EN "TE PUEDE INTERESAR"
   ======================================== */

/* Estilos para el nuevo banner TRIBOTRANS en "Te puede interesar" */
@media screen and (max-width: 768px) {
  /* MÓVIL: Banner en "Te puede interesar" - REDUCIDO UN POCO */
  html body .nearby-ads-second .tribotrans-banner-teinteresa,
  .nearby-ads-second .tribotrans-banner-teinteresa[class] {
    height: 260px !important;
    object-fit: cover !important;
    min-height: 260px !important;
    max-height: 260px !important;
  }
  
  /* Card body compacto para móvil */
  html body .nearby-ads-second .tribotrans-banner-teinteresa + .card-body,
  .nearby-ads-second .tribotrans-banner-teinteresa + .card-body[class] {
    padding: 2px 6px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    overflow: hidden !important;
  }
}

@media screen and (min-width: 769px) {
  /* PC: Banner en "Te puede interesar" - MÁS ALTO */
  html body .nearby-ads-second .tribotrans-banner-teinteresa,
  .nearby-ads-second .tribotrans-banner-teinteresa[class] {
    height: 370px !important;
    object-fit: cover !important;
    min-height: 370px !important;
    max-height: 370px !important;
  }
  
  /* Card body compacto para PC */
  html body .nearby-ads-second .tribotrans-banner-teinteresa + .card-body,
  .nearby-ads-second .tribotrans-banner-teinteresa + .card-body[class] {
    padding: 3px 8px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    overflow: hidden !important;
  }
}

/* Estilos del texto en ambos dispositivos */
html body .nearby-ads-second .tribotrans-banner-teinteresa + .card-body .home-title,
.nearby-ads-second .tribotrans-banner-teinteresa + .card-body .home-title[class] {
  font-size: 0.8rem !important;
  margin-bottom: 0px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

html body .nearby-ads-second .tribotrans-banner-teinteresa + .card-body .text-muted,
.nearby-ads-second .tribotrans-banner-teinteresa + .card-body .text-muted[class] {
  font-size: 0.7rem !important;
  margin: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

/* ========================================
   BANNER ZEPKY EN "TE PUEDE INTERESAR" - USANDO SELECTOR ESPECÍFICO
   ======================================== */

/* Banner Zepky específico por URL de imagen */
@media screen and (max-width: 768px) {
  /* MÓVIL: Banner Zepky */
  .nearby-ads-second a[href*="zepky.com"] .card-image,
  .nearby-ads-second a[href*="zepky.com"] .card-image img {
    height: 310px !important;
    min-height: 310px !important;
    max-height: 310px !important;
  }
  
  .nearby-ads-second a[href*="zepky.com"] .card-image img {
    object-fit: fill !important;
    width: 100% !important;
    height: 100% !important;
  }
}

@media screen and (min-width: 769px) {
  /* PC: Banner Zepky */
  .nearby-ads-second a[href*="zepky.com"] .card-image,
  .nearby-ads-second a[href*="zepky.com"] .card-image img {
    height: 420px !important;
    min-height: 420px !important;
    max-height: 420px !important;
  }
  
  .nearby-ads-second a[href*="zepky.com"] .card-image img {
    object-fit: fill !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  /* PC: Banner Zepky en Más cerca de ti */
  .nearby-ads:not(.nearby-ads-second):not(.nearby-ads-third) a[href*="zepky.com"] .card-image,
  .nearby-ads:not(.nearby-ads-second):not(.nearby-ads-third) a[href*="zepky.com"] .card-image img {
    height: 420px !important;
    min-height: 420px !important;
    max-height: 420px !important;
  }
  
  .nearby-ads:not(.nearby-ads-second):not(.nearby-ads-third) a[href*="zepky.com"] .card-image img {
    object-fit: fill !important;
    width: 100% !important;
    height: 100% !important;
  }
}

/* Banner Zepky en "Más cerca de ti" MÓVIL */
@media screen and (max-width: 768px) {
  .nearby-ads:not(.nearby-ads-second):not(.nearby-ads-third) a[href*="zepky.com"] .card-image,
  .nearby-ads:not(.nearby-ads-second):not(.nearby-ads-third) a[href*="zepky.com"] .card-image img {
    height: 310px !important;
    min-height: 310px !important;
    max-height: 310px !important;
  }
  
  .nearby-ads:not(.nearby-ads-second):not(.nearby-ads-third) a[href*="zepky.com"] .card-image img {
    object-fit: fill !important;
    width: 100% !important;
    height: 100% !important;
  }
}

/* ========================================
   BANNER TRIBOTRANS EN "MAS CERCA DE TI" - COPIADO
   ======================================== */

/* Estilos para el banner TRIBOTRANS copiado en "Mas cerca de ti" */
@media screen and (max-width: 768px) {
  /* MÓVIL: Banner en "Mas cerca de ti" - IGUAL AL DE "TE PUEDE INTERESAR" */
  html body .nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca,
  .nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca[class] {
    height: 280px !important;
    object-fit: cover !important;
    min-height: 280px !important;
    max-height: 280px !important;
  }
  
  /* Card body compacto para móvil */
  html body .nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca + .card-body,
  .nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca + .card-body[class] {
    padding: 2px 6px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    overflow: hidden !important;
  }
}

@media screen and (min-width: 769px) {
  /* PC: Banner en "Mas cerca de ti" - IGUAL AL DE "TE PUEDE INTERESAR" */
  html body .nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca,
  .nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca[class] {
    height: 390px !important;
    object-fit: cover !important;
    min-height: 390px !important;
    max-height: 390px !important;
  }
  
  /* Card body compacto para PC */
  html body .nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca + .card-body,
  .nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca + .card-body[class] {
    padding: 3px 8px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    overflow: hidden !important;
  }
}

/* Estilos del texto en "Mas cerca de ti" */
html body .nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca + .card-body .home-title,
.nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca + .card-body .home-title[class] {
  font-size: 0.8rem !important;
  margin-bottom: 0px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

html body .nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca + .card-body .text-muted,
.nearby-ads:not(.nearby-ads-second) .tribotrans-banner-mascerca + .card-body .text-muted[class] {
  font-size: 0.7rem !important;
  margin: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

/* ========================================
   SUBIR BLOQUE DESTACADOS EN MÓVIL
   ======================================== */

/* SOLO MÓVIL: Subir sección de destacados */
@media screen and (max-width: 768px) {
  /* Subir el bloque completo de destacados */
  html body .nearby-ads-third,
  html body .section.nearby-ads-third,
  .nearby-ads-third[class] {
    margin-top: 10px !important; /* Reducir de 40px a 10px */
    padding-top: 0px !important;
  }
  
  /* Reducir espacio del título también */
  html body .nearby-ads-third .section-headline,
  .nearby-ads-third .section-headline[class] {
    margin-bottom: 15px !important; /* Reducir espacio inferior del título */
    padding-bottom: 0px !important;
  }
  
  /* Reducir espacio del título h2 */
  html body .nearby-ads-third .green-section-title,
  .nearby-ads-third .green-section-title[class] {
    margin-bottom: 10px !important;
    margin-top: 0px !important;
  }
}

/* Evitar que user-select interfiera con el scroll */
.owl-carousel.owl-drag .owl-item {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  touch-action: pan-y pinch-zoom !important;
}

/* Asegurar que el contenedor principal permita scroll */
@media (max-width: 768px) {
  body, html {
    touch-action: pan-y pinch-zoom !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  /* Ocultar flechas móvil en carruseles destacados */
  .featured-controls {
    display: none !important;
    pointer-events: none !important;
  }
  
  .featured-controls .featured-prev,
  .featured-controls .featured-next {
    display: none !important;
  }
}

/* FUERZA ABSOLUTA - Menú móvil pegajoso con especificidad máxima */
@media screen and (max-width: 768px) {
  /* Selector con máxima especificidad */
  html[lang] body[class] div.small-footer[class],
  html body.mobile div.small-footer,
  html body div.small-footer.small-footer,
  body div.small-footer,
  .small-footer.small-footer {
    display: block !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: auto !important;
    z-index: 999999 !important;
    background: #ffffff !important;
    border-top: 1px solid #e0e0e0 !important;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1) !important;
    transform: translateZ(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Mostrar menú flotante SOLO en móvil */
@media (max-width: 768px) {
  html[lang] body[class] div.small-footer[class] {
      display: block !important;
      position: fixed !important;
      bottom: 0 !important;
      left: 0 !important;
      right: 0 !important;
      width: 100% !important;
      z-index: 999999 !important;
      background: #ffffff !important;
  }
}

@media (max-width: 768px) {
  /* Forzar padding al body */
  html body {
    /* Dejar espacio solo según la altura real de la barra y safe area */
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: calc(70px + constant(safe-area-inset-bottom)) !important; /* iOS < 12 */
  }
}

/* ===============================================================
   SOLUCIÓN DEFINITIVA: PROBLEMA TRANSFORM EN BODY INTERFERIENDO
   =============================================================== */

/* ELIMINAR TRANSFORMS QUE CREAN CONTEXTOS DE APILAMIENTO PROBLEMÁTICOS */
html[lang] body.home-page,
html[lang] body[class*="home"],
html[lang="es"] body.home-page,
html[lang="es"] body[class],
body.home-page {
  transform: none !important;
  -webkit-transform: none !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
  will-change: auto !important;
}

/* NAVEGACIÓN MÓVIL STICKY - MÁXIMA ESPECIFICIDAD */
@media (max-width: 768px) {
  html[lang] body[class] div.small-footer[class] {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    /* Usar altura flexible y cubrir el safe area inferior */
    height: auto !important;
    min-height: 64px !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    padding-bottom: constant(safe-area-inset-bottom) !important; /* iOS < 12 */
    background: rgba(255, 255, 255, 0.95) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    z-index: 999999 !important;
    display: block !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    contain: layout style paint !important;
  }
  /* Evitar márgenes que generen huecos debajo */
  html[lang] body[class] div.small-footer[class] ul,
  html[lang] body[class] div.small-footer[class] li,
  html[lang] body[class] div.small-footer[class] a {
    margin: 0 !important;
  }
}

/* Ocultar menú flotante en escritorio (>=769px) con máxima especificidad */
@media (min-width: 769px) {
  html[lang] body[class] div.small-footer[class],
  html body.mobile div.small-footer,
  html body div.small-footer.small-footer,
  body div.small-footer,
  .small-footer.small-footer,
  .small-footer {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* SOLO EN MÓVIL */
@media (max-width: 768px) {
  html[lang] body[class] div.small-footer[class] {
    display: block !important;
    visibility: visible !important;
  }
}

/* RESTAURAR TRANSFORMS SOLO PARA ELEMENTOS DE CARRUSEL */
.simple-carousel-track,
.owl-carousel .owl-stage,
.federation-scroll-text {
  transform: translateX(0%) !important;
  -webkit-transform: translateX(0%) !important;
}

/* ========================================
   ESTILOS PARA CARGA PROGRESIVA DE ANUNCIOS
   ======================================== */

/* Contenedor del botón cargar más */
#load-more-container {
  margin: 30px 0;
  text-align: center;
}

/* Botón cargar más anuncios */
#load-more-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border: none;
  color: white;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 25px;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#load-more-btn:hover {
  background: linear-gradient(135deg, #218838 0%, #1abc9c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
  color: white;
}

#load-more-btn:active {
  transform: translateY(0);
}

#load-more-btn .btn-text {
  display: inline-block;
  transition: all 0.3s ease;
}

/* Indicador de carga */
#loading-indicator {
  color: #6c757d;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#loading-indicator i {
  font-size: 1.2rem;
  color: #28a745;
}

/* Contenedor "Ver todos" */
#view-all-container {
  margin-top: 20px;
}

#view-all-container .btn {
  background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
  border: none;
  color: white;
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  transition: all 0.3s ease;
}

#view-all-container .btn:hover {
  background: linear-gradient(135deg, #0056b3 0%, #520dc2 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
  color: white;
}

/* Animación de carga para el botón */
#load-more-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

#load-more-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mensaje de error temporal */
.alert.alert-warning {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid;
  font-size: 0.9rem;
  display: inline-block;
  margin-top: 10px;
}

.alert.alert-warning i {
  margin-right: 5px;
  color: #f39c12;
}

.alert.alert-warning a {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.alert.alert-warning a:hover {
  text-decoration: underline;
}

/* Responsivo para móvil */
@media (max-width: 768px) {
  #load-more-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }
  
  #load-more-container {
    margin: 20px 0;
  }
  
  #view-all-container .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
  
  /* Indicador de carga más visible en móvil */
  #loading-indicator {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 200px;
    position: sticky;
    bottom: 20px;
    z-index: 100;
  }
  
  #loading-indicator i {
    font-size: 1.4rem;
  }
}

/* TIMESTAMP CACHE BUSTER: 2025-01-26-14:30 */

/* ========================================
   BANNERS DE GRUPOS SOCIALES (WHATSAPP/TELEGRAM)
   Estilo banner horizontal - Solo visible en móvil
   ======================================== */

/* Ocultar en escritorio */
.mobile-social-banners {
  display: none;
}

/* Mostrar solo en móvil */
@media (max-width: 768px) {
  .mobile-social-banners {
    display: block;
    padding: 10px 0;
    margin-top: 5px;
  }
  
  .mobile-social-banners .container-lg {
    padding: 0 10px;
  }
  
  /* Contenedor de banners lado a lado */
  .social-banners-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
  }
  
  /* Banner individual - 50% cada uno */
  .social-banner {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 12px 10px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .social-banner:hover,
  .social-banner:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
  }
  
  .social-banner:active {
    transform: scale(0.98);
  }
  
  /* Banner WhatsApp */
  .whatsapp-banner {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  }
  
  /* Banner Telegram */
  .telegram-banner {
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
  }
  
  /* Icono del banner */
  .banner-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 10px;
  }
  
  .banner-icon i,
  .banner-icon svg {
    font-size: 22px;
    color: #fff;
    width: 22px;
    height: 22px;
  }
  
  /* Texto del banner */
  .banner-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  
  .banner-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
  }
  
  .banner-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2px;
    line-height: 1.2;
  }
}

