/* --- RESET Y GLOBALES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-textos, 'Poppins', sans-serif);
    background-color: #f8f9fa;
    color: #343a40;
}

/* Aplicar la fuente de títulos a todos los encabezados y elementos importantes */
h1, h2, h3, h4, h5, h6, .logo, .plan-card h2, .widget h3, .section-title {
    font-family: var(--font-titulos, 'Poppins', sans-serif);
}


a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}


/* --- CABECERA --- */
.main-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo b {
    color: var(--color-principal, #0d6efd);
}

.desktop-nav {
    display: none;
    align-items: center;
}
@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }
}


.main-nav a {
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}
.main-nav a:hover {
    color: var(--color-principal, #0d6efd);
}

.user-actions {
     display: flex;
    align-items: center;
}

.user-actions span {
    margin-right: 1rem;
    font-weight: 500;
}


.user-actions a {
    margin-left: 0.8rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-secondary {
    background-color: #e9ecef;
    color: #343a40;
}
.btn-secondary:hover {
    background-color: #dee2e6;
}

.btn-primary {
    background-color: var(--color-principal, #0d6efd);
    color: #fff;
}
.btn-primary:hover {
    filter: brightness(90%);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
    transform: translateY(-2px);
}


/* --- SLIDER SUPERIOR (MARQUEE) --- */
.top-slider-section {
    width: 100%;
    height: 350px;
    position: relative;
    overflow: hidden;
    background-color: #212529;
}
.top-swiper {
    width: 100%;
    height: 100%;
}
.top-swiper .swiper-wrapper {
    transition-timing-function: linear !important;
}
.top-swiper .swiper-slide {
    width: auto;
    height: 100%;
}
.top-card {
    width: auto;
    height: 100%;
    position: relative;
    cursor: pointer;
}
.top-card-img {
    width: auto;
    height: 100%;
    display: block;
}
.top-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
}
.top-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    color: #fff;
    text-align: left;
    transition: all 0.4s ease;
}
.top-card-content h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
}
.top-card-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.top-swiper .swiper-pagination {
    display: none;
}


/* --- SECCIÓN BUSCADOR --- */
.search-section {
    position: relative;
    color: #fff;
    padding: 4rem 0;
    text-align: center;
    background-size: cover;
    background-position: center center;
    background-color: #343a40;
    transition: padding 0.4s ease;
    transform: translateZ(0); /* Aceleración GPU */
}
.search-section .container {
    position: relative;
    z-index: 2;
}
.search-section h1,
.search-section p {
    margin: 1rem auto;
}
.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    transition: all 0.4s ease;
}
.search-form-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}
@media (min-width: 992px) {
    .search-form {
        flex-direction: row;
        padding: 1rem;
    }
    .search-form-inputs {
        flex-direction: row;
        flex-grow: 1;
    }
}
.search-input-group {
    flex-grow: 1;
    position: relative;
    min-width: 150px;
}
.search-input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}
.search-input-group select,
.search-input-group input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    color: #343a40;
    transition: all 0.4s ease;
}
.btn-search {
    background-color: #20c997;
    color: #fff;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.4s ease;
}
.btn-search:hover {
    background-color: #1baa80;
}

/* --- ESTILOS PARA EL BUSCADOR DE ESCRITORIO FIJO --- */
.sticky-wrapper {
    position: sticky;
    top: 0;
    z-index: 1001;
}

.desktop-search.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
}
.desktop-search.scrolled h1,
.desktop-search.scrolled p {
    display: none;
}
.desktop-search.scrolled .search-form {
    padding: 0.5rem;
    max-width: 1200px;
    background: none;
    backdrop-filter: none;
}
.desktop-search.scrolled .search-input-group select,
.desktop-search.scrolled .search-input-group input {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    font-size: 0.9rem;
}
.desktop-search.scrolled .btn-search {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}


/* --- GRID DE ANUNCIOS --- */
.listings-section {
    padding: 3rem 0;
}
.section-title {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}
.section-title i {
    color: var(--color-principal, #0d6efd);
}
.no-results-message {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #fff;
    border-radius: 12px;
}
.no-results-message i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}
.listings-grid {
  display: grid;
  /* 1. Definir 4 columnas de igual tamaño */
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem; /* Mantener tu espaciado */
}

/* 2. (Opcional pero recomendado) Ajustes para pantallas más pequeñas */
@media (max-width: 1200px) { /* Para pantallas un poco más pequeñas */
  .listings-grid {
    grid-template-columns: repeat(3, 1fr); /* Mostrar 3 columnas */
  }
}
@media (max-width: 992px) { /* Para tablets */
  .listings-grid {
    grid-template-columns: repeat(2, 1fr); /* Mostrar 2 columnas */
  }
}
.listing-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-align: left;
}
.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.card-image-container {
    position: relative;
    padding-top: 100%;
    background-color: #f0f0f0;
}
.card-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.card-badges {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    display: flex;
    gap: 0.5rem;
}
.badge {
    color: #fff;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    backdrop-filter: blur(5px);
}
.badge-online { background-color: rgba(40, 167, 69, 0.8); }
.badge-verified { background-color: var(--color-principal, #0d6efd); opacity: 0.8; }
.badge-featured { background-color: rgba(255, 193, 7, 0.9); color: #343a40; }
.card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    flex-grow: 1;
}
.card-location {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-principal, #0d6efd);
    text-align: right;
}

/* --- MODAL (VENTANA EMERGENTE) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-content {
    background-color: #fff;
    border-radius: 16px;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb:hover { background: #aaa; }
.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}
.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}
.modal-close {
    background: #e9ecef;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}
.modal-close:hover {
    background: #dee2e6;
    transform: rotate(90deg);
}
.modal-body { padding: 1.5rem; }
.modal-main-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}
.modal-badges {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.modal-description {
    line-height: 1.7;
    margin-bottom: 2rem;
}
.modal-contact-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
    text-align: center;
    font-size: 1.1rem;
}
.btn-whatsapp:hover {
    background-color: #1EBE57;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}
.modal-overlay.show {
    display: flex;
    opacity: 1;
}
.modal-overlay.show .modal-content {
    transform: scale(1);
}

.featured-modal-content {
    max-width: 900px !important;
    position: relative;
    padding: 0;
}
.featured-modal-body {
    display: flex;
    flex-direction: column;
}
@media (min-width: 768px) {
    .featured-modal-body {
        flex-direction: row;
    }
}
.featured-modal-gallery {
    flex-shrink: 0;
    width: 100%;
    background-color: #000;
    border-radius: 16px 0 0 16px;
}
@media (min-width: 768px) {
    .featured-modal-gallery {
        width: 45%;
    }
}
.main-image-container {
    width: 100%;
    padding-top: 100%; /* Aspect ratio 1:1 */
    position: relative;
}
.main-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Muestra la imagen completa */
}
.thumbnail-container {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    overflow-x: auto;
}
.thumbnail-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.thumbnail-img.active {
    border-color: var(--color-principal, #0d6efd);
}
.featured-modal-details {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}
.featured-modal-details p {
    flex-grow: 1;
    line-height: 1.7;
    margin: 1rem 0;
}
#featured-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20;
}

/* --- PIE DE PÁGINA MODERNO --- */
.main-footer {
    background-color: #111;
    color: #adb5bd;
    padding: 3rem 0 0 0;
    margin-top: 3rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}
.footer-column.about .logo { color: #fff; }
.footer-column.about p {
    margin: 1rem 0;
    line-height: 1.7;
}
.social-links {
    display: flex;
    gap: 1rem;
}
.social-links a {
    color: #adb5bd;
    font-size: 1.2rem;
    transition: all 0.2s;
}
.social-links a:hover {
    color: #fff;
    transform: translateY(-3px);
}
.footer-column h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 0.8rem; }
.footer-column ul a { transition: color 0.2s; }
.footer-column ul a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid #495057;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* --- ESTILOS CORREGIDOS PARA EL SLIDER DE DESTACADOS (CARRUSEL) --- */
.featured-slider-section {
    padding: 2rem 0;
    background-color: #f8f9fa; /* Color de fondo suave para la sección */
}

.featured-swiper {
    position: relative;
    width: 100%;
    /* Quitamos padding top/bottom aquí, lo maneja el slide */
}

.featured-swiper .swiper-slide {
    height: auto; /* IMPORTANTE: El slide se adapta al contenido */
    overflow: visible; /* Permitir que se vea la sombra si la hay */
    /* Quitamos background, aspect-ratio, etc. de aquí */
    width: 280px; /* Ancho fijo para cada tarjeta (ajusta si quieres) */
}
/* Media query opcional si quieres cambiar el ancho en escritorio */
@media (min-width: 768px) {
    .featured-swiper .swiper-slide {
        width: 300px; /* Un poco más ancho en escritorio */
    }
}


.featured-card {
    display: flex;          /* Usamos Flexbox */
    flex-direction: column; /* Apilar imagen y texto */
    height: 100%;           /* Ocupar toda la altura del slide */
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;       /* Para redondear imagen y controlar aspect-ratio */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Sombra suave opcional */
    cursor: pointer;
    position: relative; /* Para posicionar iconos internos */
}

.featured-card .card-image-wrapper { /* NUEVO: Contenedor para la imagen */
    width: 100%;
    aspect-ratio: 3 / 4; /* Proporción de la imagen */
    overflow: hidden; /* Asegura que object-fit funcione bien */
    position: relative;
}

/* ================================== */
/* == POSICIÓN PARA ICONO DEL SLIDER == */ 
/* ================================== */
.featured-card .price-range-icon { 
    position: absolute;
    bottom: 10px; 
    right: 10px;
    z-index: 5;
}

.featured-card img {
    display: block;
    width: 100%;
    height: 100%;        /* Imagen llena el wrapper */
    object-fit: cover;   /* Mantiene proporción, recorta si es necesario */
}

.featured-card-content { 
    position: absolute; /* <-- AÑADIDO: Para superponer */
    bottom: 0; /* <-- AÑADIDO: Posición abajo */
    left: 0; /* <-- AÑADIDO: Posición a la izquierda */
    width: 100%; /* <-- AÑADIDO: Ocupa todo el ancho */
    padding: 0.75rem 1rem; /* Mantenemos padding */
    color: #ffffff; /* <-- CAMBIADO: Texto blanco */
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
}

.featured-card-content h3 {
    font-size: 1rem;    /* Ajusta si es necesario */
    margin-bottom: 0.2rem;
    color: #ffffff; /* Color de título más oscuro */
}

.featured-card-content p {
    font-size: 0.85rem; /* Ajusta si es necesario */
    color: #ffffff;    /* Color de texto secundario */
    opacity: 1;        /* Ya no necesita opacidad */
}

/* --- Estilos para iconos internos y paginación (Sin cambios, pero asegúrate de que siguen funcionando) --- */
.featured-card .btn-favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  /* Ajusta colores si es necesario para que se vean sobre la imagen */
}

.price-range-icon {
  /* width, height, background-image ... */
  width: 64px;
  height: 64px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 50%;
}

.swiper-pagination-bullet-active {
    background-color: var(--color-principal, #0d6efd) !important;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--color-principal, #0d6efd) !important;
    top: 45%; /* Ajustar posición vertical si es necesario */
}

/* ============================================================== */
/* ========= ESTILOS FINALES PARA BUSCADOR DUAL (PC/MÓVIL) ====== */
/* ============================================================== */

/* --- 1. Botones de acción en la cabecera móvil --- */
.mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.mobile-action-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #343a40;
    cursor: pointer;
    padding: 0.5rem;
}

/* --- 2. Contenedor del buscador pop-up --- */
#search-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1002;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
#search-overlay-container.is-open {
    transform: translateY(0);
}
.overlay-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.3);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 30px;
    cursor: pointer;
    z-index: 10;
}
#search-overlay-container .search-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    border-radius: 0 0 20px 20px;
}
#search-overlay-container .search-section h1 { font-size: 1.8rem; }


/* --- 3. Lógica de visibilidad por tamaño de pantalla --- */

/* Por defecto (ESCRITORIO) */
.mobile-actions { display: none; }
#search-overlay-container { display: none; }
.desktop-search { display: block; }


/* En MÓVIL (hasta 767px) */
@media (max-width: 767px) {
    nav.desktop-nav {
    display: none !important;
    }
    .mobile-actions { display: flex; }
    
    #search-overlay-container { display: block; } 
    
    .desktop-search { display: none; } 

    .search-form { flex-direction: column; }
    .search-form-inputs { flex-direction: column; }
}

/* ============================================================== */
/* =========   ESTILOS PARA EL MENÚ INFERIOR MÓVIL   ========== */
/* ============================================================== */

.mobile-bottom-nav {
    display: none; /* Por defecto, está oculto en la versión de ordenador */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    z-index: 1000; /* Lo ponemos por encima del contenido pero debajo de pop-ups */
    
    /* Usamos flexbox para alinear los elementos */
    
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8e8e93; /* Un gris estándar para los iconos inactivos */
    text-decoration: none;
    flex-grow: 1; /* Para que cada item ocupe el mismo espacio */
}

.mobile-bottom-nav .nav-item i {
    font-size: 22px; /* Tamaño de los iconos */
    margin-bottom: 4px;
}

.mobile-bottom-nav .nav-item span {
    font-size: 11px; /* Tamaño del texto */
    font-weight: 500;
}

/* Estilo para el botón activo (el que corresponde a la página actual) */
.mobile-bottom-nav .nav-item.active {
    color: var(--color-principal, #0d6efd); /* Usamos el color principal de tu web */
}


/* --- Lógica de visibilidad --- */
/* Solo mostramos el menú en pantallas móviles */
@media (max-width: 767px) {
    .mobile-bottom-nav {
        display: flex;
    }
    /* Añadimos un padding al final del body para que el menú no tape el contenido */
    body {
        padding-bottom: 70px; /* Ajusta este valor a la altura de tu menú si es necesario */
    }
}
/* ============================================================== */
/* =========   ESTILOS PARA FORMULARIOS DE ACCESO (AUTH)   ====== */
/* ============================================================== */

/* Contenedor principal que centra la tarjeta */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 1rem;
    min-height: 60vh;
}

/* La tarjeta del formulario */
.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

/* Títulos y subtítulos */
.auth-card h1,
.auth-card h2 {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.75rem;
    color: #343a40;
}
.auth-card .form-subtitle {
    text-align: center;
    color: #6c757d;
    margin-bottom: 2.5rem;
}
.logo-admin {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
}
.admin-tag {
    font-size: 0.8rem;
    font-weight: 500;
    background-color: #e9ecef;
    color: #495057;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    vertical-align: middle;
}

/* Grupos de formulario, etiquetas e inputs */
.auth-form .form-group {
    margin-bottom: 1.5rem;
}
.auth-form .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.auth-form .form-group input[type="text"],
.auth-form .form-group input[type="email"],
.auth-form .form-group input[type="password"],
.auth-form .form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit; /* Asegura que use la misma fuente */
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: var(--color-principal, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* Botones */
.form-actions {
    margin-top: 2rem;
}
.btn-auth {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 600;
    background-color: var(--color-principal, #0d6efd);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.2s;
}
.btn-auth:hover {
    filter: brightness(90%);
}

/* Enlaces inferiores (ej. "¿No tienes cuenta?") */
.form-footer-link {
    text-align: center;
    margin-top: 2rem;
}
.form-footer-link a {
    color: var(--color-principal, #0d6efd);
    font-weight: 500;
    text-decoration: none;
}
.form-footer-link a:hover {
    text-decoration: underline;
}

/* Mensajes de error/éxito */
.form-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
}
.form-message.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
/* ============================================================== */
/* =========  ANUNCIOS RECIENTES EN 2 COLUMNAS (MÓVIL)  ========= */
/* ============================================================== */

@media (max-width: 767px) {
    .listings-grid {
        /* Forzamos la cuadrícula a tener 2 columnas de igual tamaño */
        grid-template-columns: 1fr 1fr;
        /* Opcional: Reducimos un poco el espacio entre las tarjetas */
        gap: 1rem;
    }
}

/* Hace las etiquetas 'Destacado' y 'Verificado' más pequeñas en dispositivos móviles */
@media (max-width: 767px) {
    .listing-card .badge-featured,
    .listing-card .badge-verified {
        font-size: 0.6rem; /* Texto más pequeño */
        padding: 0.2rem 0.4rem; /* Reduce el relleno */
        line-height: 1; /* Asegura que el texto no ocupe demasiado alto */
        top: 8px; /* Ajusta la posición si se descolocan */
        left: 8px; /* Ajusta la posición si se descolocan */
    }

    /* Si tienes una segunda etiqueta (ej. Verificado) y se superpone, ajusta su posición */
    .listing-card .badge-verified {
        left: unset; /* Quita la posición de 'left' */
        right: 8px;  /* Y la coloca a la derecha */
    }
}
/* =================================================================== */
/* ===== AJUSTES FINALES DEFINITIVOS PARA SLIDER SUPERIOR ======== */
/* =================================================================== */

/* 1. Reducimos el buscador y le ponemos fondo negro (como ya tenías) */
.desktop-search.search-section {
    padding: 2.5rem 0;
    background-image: none !important;
    background-color: #111;
}

/* 2. Ponemos el fondo negro a la sección del slider */
.top-slider-section {
    height: 380px;
    display: flex;
    align-items: center;
    background-color: #1a1a1a; /* FONDO NEGRO/GRIS OSCURO */
    position: relative; /* Contenedor de referencia para las flechas */
}

/* 3. Aseguramos el tamaño uniforme de las imágenes */
.top-swiper .swiper-slide {
    width: 250px;
}
.top-card {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
}
.top-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* 4. Posicionamos las flechas correctamente para que funcionen */
.top-swiper .swiper-button-prev,
.top-swiper .swiper-button-next {
    width: 45px;
    height: 45px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    color: #fff;
    transition: background-color 0.2s;
    
    /* Clave para que se pueda hacer clic en ellos */
    z-index: 10;
    
    /* Quitamos el posicionamiento por defecto de Swiper para controlarlo nosotros */
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0; 
}
.top-swiper .swiper-button-prev {
    left: 20px; /* Posición desde la izquierda */
}
.top-swiper .swiper-button-next {
    right: 20px; /* Posición desde la derecha */
}

.top-swiper .swiper-button-prev:hover,
.top-swiper .swiper-button-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.top-swiper .swiper-button-prev::after,
.top-swiper .swiper-button-next::after {
    font-size: 18px;
    font-weight: 700;
}
/* ============================================================== */
/* =========   ESTILOS PARA EL PANEL DE USUARIO (MI CUENTA)   === */
/* ============================================================== */

/* Contenedor principal de la sección */
.account-section .container {
    max-width: 900px;
    margin: 4rem auto;
}

.account-section h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.account-section .subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 3rem;
}

/* Tarjeta que envuelve la tabla */
.gestion-table-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
    border: 1px solid #e9ecef;
    padding: 2rem;
    overflow: hidden; /* Para que la tabla respete los bordes redondeados */
}

.gestion-table-card h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

/* Estilos de la tabla */
.gestion-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.gestion-table th,
.gestion-table td {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.gestion-table thead th {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.gestion-table tbody tr:last-child td {
    border-bottom: none;
}

.gestion-table td {
    color: #495057;
}

/* Estilos para las insignias de estado (ej. "Publicado") */
.status-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}
.status-publicado { background-color: #28a745; } /* Verde para publicado */
.status-pendiente { background-color: #ffc107; color: #343a40; } /* Amarillo para pendiente */
.status-rechazado { background-color: #dc3545; } /* Rojo para rechazado */

/* Estilos para los botones de acción (Editar/Eliminar) */
.actions-cell {
    text-align: right;
}
.btn-action {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 50%;
    color: #fff;
    margin-left: 0.5rem;
    transition: filter 0.2s;
}
.btn-action.edit {
    background-color: var(--color-principal, #0d6efd);
}
.btn-action.delete {
    background-color: #dc3545;
}
.btn-action:hover {
    filter: brightness(85%);
}

/* Mensaje cuando no hay anuncios */
.gestion-table td[colspan="4"] {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}
.gestion-table td[colspan="4"] a {
    color: var(--color-principal, #0d6efd);
    font-weight: 600;
}
/* ============================================================== */
/* =========   ESTILOS PARA PÁGINA DE PUBLICAR ANUNCIO   ======== */
/* ============================================================== */

/* Contenedor principal tipo tarjeta */
.publish-container {
    max-width: 700px; /* Un poco más ancho para formularios largos */
    margin: 4rem auto;
    padding: 2.5rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
    border: 1px solid #e9ecef;
}

.publish-container h1 {
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
}

.publish-container .subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Estilos generales para los campos del formulario */
.publish-form .form-group {
    margin-bottom: 1.5rem;
}

.publish-form .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.publish-form input[type="text"],
.publish-form input[type="email"],
.publish-form input[type="password"],
.publish-form input[type="number"],
.publish-form select,
.publish-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #ced4da;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f8f9fa;
}

.publish-form input:focus,
.publish-form select:focus,
.publish-form textarea:focus {
    outline: none;
    border-color: var(--color-principal, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    background-color: #fff;
}

.publish-form textarea {
    resize: vertical;
}

/* Estilos para las cajas de subir archivos */
.file-upload-container {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    position: relative;
}
.file-upload-container:hover {
    border-color: var(--color-principal, #0d6efd);
    background-color: #f8f9fa;
}
.file-upload-container i {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}
.file-upload-container p {
    color: #6c757d;
    font-weight: 500;
}
.file-upload-container input[type="file"] {
    display: none; /* El input real está oculto */
}

/* Grid para previsualización de imágenes */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
}
.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.delete-preview-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
}
#main-image-preview {
    margin-top: 1rem;
}
#main-image-preview img {
    max-width: 200px;
    border-radius: 8px;
}
/* ============================================================== */
/* =========   ESTILOS PARA EL PANEL DE ADMINISTRACIÓN   ======== */
/* ============================================================== */

/* Contenedor principal del contenido del admin */
.admin-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.admin-content h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #343a40;
}

.admin-content > p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 3rem;
}

/* Cuadrícula para los widgets del dashboard */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Estilo de cada widget individual */
.widget {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.widget h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #343a40;
}

.widget h3 i {
    color: var(--color-principal, #0d6efd);
}

.widget p {
    color: #6c757d;
    line-height: 1.6;
    flex-grow: 1; /* Empuja el botón hacia abajo */
    margin-bottom: 1.5rem;
}

.btn-widget {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-widget:hover {
    background-color: var(--color-principal, #0d6efd);
    color: #fff;
    border-color: var(--color-principal, #0d6efd);
}
/* ============================================================== */
/* =========   NUEVOS ESTILOS PARA LA CABECERA DE ADMIN   ======= */
/* ============================================================== */

/* La barra de cabecera principal */
.admin-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 0 2rem;
    height: 65px;
    position: sticky;
    top: 0;
    z-index: 1002;
}

.admin-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo-admin a {
    text-decoration: none;
    color: #343a40;
    font-size: 1.3rem;
    font-weight: 700;
}
.logo-admin b {
    color: var(--color-principal, #0d6efd);
}
.logo-admin .admin-tag {
    font-size: 0.7rem;
    vertical-align: middle;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Navegación principal (antes era la segunda barra) */
.admin-main-nav {
    display: flex;
    height: 100%;
}
.admin-main-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.2rem;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    border-bottom: 3px solid transparent; /* Borde inferior para el estado activo */
    transition: color 0.2s, border-color 0.2s;
}
.admin-main-nav a:hover {
    color: #000;
    background-color: #f8f9fa;
}
.admin-main-nav a.active {
    color: var(--color-principal, #0d6efd);
    border-bottom-color: var(--color-principal, #0d6efd);
}

/* Menú de usuario a la derecha */
.admin-user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #6c757d;
}
.btn-admin-logout {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}
.btn-admin-logout:hover {
    background-color: #f5c6cb;
}
/* ============================================================== */
/* =====   ESTILOS PARA PÁGINAS DE GESTIÓN (admin/gestionar)   == */
/* ============================================================== */

/* Contenedor principal de 2 columnas */
.gestion-container {
    display: grid;
    grid-template-columns: 300px 1fr; /* Columna izquierda fija, derecha flexible */
    gap: 2rem;
    align-items: flex-start;
}

/* Tarjeta para el formulario de añadir/editar */
.gestion-form-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky; /* Hacemos que el formulario se quede fijo al hacer scroll */
    top: 85px; /* (65px de la cabecera + 20px de margen) */
}

.gestion-form-card h3 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

/* Estilos para los campos del formulario (AHORA AMPLIADO) */
.gestion-form-card .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.gestion-form-card .form-group input[type="text"],
.gestion-form-card .form-group input[type="number"],
.gestion-form-card .form-group input[type="email"],
.gestion-form-card .form-group input[type="password"],
.gestion-form-card .form-group select,
.gestion-form-card .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit; /* Asegura que use la misma fuente */
    background-color: #f8f9fa; /* Un fondo suave */
}

.gestion-form-card .form-group input[type="text"]:focus,
.gestion-form-card .form-group input[type="number"]:focus,
.gestion-form-card .form-group textarea:focus {
    outline: none;
    border-color: var(--color-principal, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.gestion-form-card .form-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* NUEVOS ESTILOS PARA CHECKBOX PERSONALIZADO */
.form-group.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}
.form-group.checkbox-group:hover {
    background-color: #f8f9fa;
}
.checkbox-group input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}
.checkbox-group label {
    margin-bottom: 0;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
}
.checkbox-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.2s;
}
.checkbox-group input[type="checkbox"]:checked + label::before {
    background-color: var(--color-principal, #0d6efd);
    border-color: var(--color-principal, #0d6efd);
}
.checkbox-group label::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    font-size: 14px;
    color: #fff;
    transition: transform 0.2s;
}
.checkbox-group input[type="checkbox"]:checked + label::after {
    transform: translateY(-50%) scale(1);
}
/* FIN DE ESTILOS DE CHECKBOX */

/* Estilos para los botones del formulario */
.gestion-form-card .form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
}
.gestion-form-card .form-actions .btn {
    flex-grow: 1;
}
.btn.btn-primary { background-color: var(--color-principal, #0d6efd); color: #fff; }
.btn.btn-secondary { background-color: #e9ecef; color: #495057; }


/* Ajustes para la tarjeta de la tabla */
.gestion-table-card h3 {
    margin-top: 0;
}
/* ============================================================== */
/* =============      ESTILOS PARA EL ACORDEÓN      ============= */
/* ============================================================== */
.accordion-container {
    margin: 2rem 0;
}
.accordion-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.accordion-header {
    width: 100%;
    background-color: #f8f9fa;
    border: none;
    padding: 1.5rem 2rem;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #343a40;
}
.accordion-header .icon-toggle {
    margin-left: auto;
    transition: transform 0.3s ease;
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}
.accordion-content-inner {
    padding: 2rem;
    border-top: 1px solid #e9ecef;
}
.accordion-item.active .accordion-header {
    color: var(--color-principal, #0d6efd);
}
.accordion-item.active .accordion-header .icon-toggle {
    transform: rotate(180deg);
}
.accordion-item.active .accordion-content {
    max-height: 5000px; /* Un valor alto para permitir que se expanda */
    transition: max-height 0.5s ease-in;
}
/* ============================================================== */
/* =====   ESTILOS PARA FORMULARIOS DENTRO DEL ACORDEÓN   ======= */
/* ============================================================== */

/* Estilos generales para los campos del formulario en el acordeón */
.accordion-content-inner .form-group {
    margin-bottom: 1.5rem;
}

.accordion-content-inner .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.accordion-content-inner .form-group input[type="text"],
.accordion-content-inner .form-group input[type="email"],
.accordion-content-inner .form-group input[type="password"],
.accordion-content-inner .form-group input[type="number"],
.accordion-content-inner .form-group select,
.accordion-content-inner .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #ced4da;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f8f9fa;
}

.accordion-content-inner .form-group input:focus,
.accordion-content-inner .form-group select:focus,
.accordion-content-inner .form-group textarea:focus {
    outline: none;
    border-color: var(--color-principal, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    background-color: #fff;
}

.accordion-content-inner .form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.accordion-content-inner .form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
}

.form-fields-config { display: flex; flex-direction: column; gap: 1rem; }
.field-config-item { display: flex; justify-content: space-between; align-items: center; background-color: #f8f9fa; padding: 1rem; border-radius: 8px; }
.field-config-item .field-label { font-size: 1.1rem; }
.field-config-item .field-options { display: flex; gap: 1.5rem; 
}
/* ============================================================== */
/* =========   NUEVO DISEÑO PARA FORMULARIO DE PUBLICAR   ======= */
/* ============================================================== */

.publish-form .form-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.publish-form .form-section h3 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.publish-form .form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.publish-form .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
/* ============================================================== */
/* =========   NUEVOS ESTILOS PARA FORMULARIO PUBLICAR   ======== */
/* ============================================================== */

/* --- 1. Caja de advertencia --- */
.form-warning-box {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
}
.warning-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.warning-header strong {
    border: 2px solid #343a40;
    background-color: #343a40;
    color: #fff;
    padding: 2px 5px;
}

/* --- 2. Nuevos campos de contacto --- */
.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.toggle-switch {
    display: flex;
    border: 1px solid #ced4da;
    border-radius: 8px;
    overflow: hidden;
}
.toggle-switch input[type="radio"] {
    display: none;
}
.toggle-switch label {
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    background-color: #fff;
    color: #495057;
    transition: all 0.2s;
    margin: 0;
}
.toggle-switch input[type="radio"]:checked + label {
    background-color: #dc3545; /* Rojo para 'No' */
    color: #fff;
}
.toggle-switch input#whatsapp_si:checked + label,
.toggle-switch input#telegram_si:checked + label {
    background-color: #28a745; /* Verde para 'Sí' */
}

/* --- 3. Modal de Vista Previa --- */
.final-actions {
    display: flex;
    gap: 1rem;
}
#ad-preview-modal {
    display: none; /* Se muestra con JS */
    z-index: 3000; /* Por encima de todo */
}
#ad-preview-modal .modal-content {
    max-width: 500px;
}
/* Estilos para el contenido de la vista previa (simulando un listing-card) */
#preview-content-placeholder .card-image-container {
    padding-top: 125%; /* Ratio 4:5 para las imágenes de perfil */
}
/* ============================================================== */
/* =========   NUEVOS ESTILOS PARA EL MODAL DE ANUNCIO   ======== */
/* ============================================================== */

/* Dividimos el cuerpo del modal en dos columnas */
.featured-modal-body {
    display: grid;
    grid-template-columns: 40% 60%; /* Columna de fotos al 40%, info al 60% */
}

/* Ajustes para móvil: una columna encima de la otra */
@media (max-width: 768px) {
    .featured-modal-body {
        grid-template-columns: 1fr; /* 100% de ancho para cada columna */
    }
}

.modal-price-location {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}
.modal-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-principal, #0d6efd);
}
.modal-location {
    font-size: 1rem;
    color: #6c757d;
}

.ad-detail-section {
    margin-top: 1.5rem;
}
.detail-section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tabla de detalles (atributos) */
.details-table {
    width: 100%;
    border-collapse: collapse;
}
.details-table th, .details-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f5;
}
.details-table th {
    text-align: left;
    color: #6c757d;
    font-weight: 500;
}
.details-table td {
    text-align: right;
    font-weight: 600;
}

/* Lista de servicios */
.services-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}
.services-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.services-list li i {
    color: #28a745; /* Verde para el check */
}

/* Botones de contacto */
.modal-contact-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-top: 1rem;
}
.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: #fff;
    border: none;
}
.btn-contact.whatsapp { background-color: #25D366; }
.btn-contact.telegram { background-color: #0088cc; }
.btn-contact.website { background-color: #6c757d; }

/* ============================================= */
/* == REGLA PARA FORZAR VISIBILIDAD DE MODALES == */
/* ============================================= */
.modal-overlay.is-visible {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}
/* ========================================================= */
/* == REDISEÑO DE LA VENTANA MODAL DE ANUNCIO (v2.0) == */
/* ========================================================= */

/* --- Ventana más ancha (línea verde) --- */
.featured-modal-content {
    max-width: 1100px !important; /* Aumentamos el ancho máximo */
}

/* --- Galería de fotos más grande y detalles con más espacio (líneas azul y rosa) --- */
.featured-modal-body {
    display: grid;
    /* Damos el 55% del espacio a la galería y el 45% a los detalles */
    grid-template-columns: 55% 45%; 
}

/* --- Más espacio para los detalles (línea rosa) --- */
.featured-modal-details {
    padding: 2.5rem; /* Aumentamos el padding */
    overflow-y: auto; /* Permitimos scroll solo en la columna de detalles */
    max-height: 85vh;
}

/* --- Ajustes para que la galería no se encoja --- */
.featured-modal-gallery {
    width: 100%; /* La galería ocupa todo el espacio de su columna */
}

/* --- Ajuste responsive para móviles --- */
@media (max-width: 992px) {
    .featured-modal-body {
        grid-template-columns: 1fr; /* Volvemos a una sola columna en pantallas más pequeñas */
        display: flex;
        flex-direction: column;
    }
    .featured-modal-gallery {
        width: 100%;
        border-radius: 16px 16px 0 0;
    }
    .featured-modal-details {
        max-height: none;
    }
}
/* ============================================= */
/* == ESTILOS MEJORADOS PARA EL MENÚ DESPLEGABLE == */
/* ============================================= */
.nav-dropdown {
    position: relative; /* Contenedor de referencia para el menú */
}

.nav-dropdown .dropdown-content {
    display: none; /* Oculto por defecto */
    position: absolute; /* Posicionado relativo al contenedor .nav-dropdown */
    top: 100%; /* Justo debajo del botón */
    left: 0;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    z-index: 100;
    padding: 0.5rem 0;
    margin-top: 0.5rem; /* Pequeño espacio entre el botón y el menú */
}

/* Estilos para los enlaces dentro del menú */
.nav-dropdown .dropdown-content a {
    color: #343a40;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    display: block; /* Hace que ocupen todo el ancho y se apilen verticalmente */
    text-align: left;
    margin: 0 !important; /* Anula el margin-left de la navegación principal */
}

.nav-dropdown .dropdown-content a:hover {
    background-color: #f8f9fa;
    color: var(--color-principal, #0d6efd);
}

/* Muestra el menú cuando el ratón pasa por encima del contenedor */
.nav-dropdown:hover .dropdown-content {
    display: block;
}
/* ============================================= */
/* == AJUSTE PARA EL MENÚ DE NAVEGACIÓN PRINCIPAL == */
/* ============================================= */
nav.desktop-nav {
    flex-grow: 1; /* Permite que la navegación ocupe el espacio sobrante */
    display: flex;
    justify-content: space-between; /* Separa los enlaces de la izquierda y los de la derecha */
    align-items: center;
    margin-left: 4rem;
}
/* ============================================= */
/* == AJUSTE PARA CABECERA DE ANCHO COMPLETO == */
/* ============================================= */
.main-header .container {
    max-width: none; /* Anula el límite de ancho de 1200px */
    padding: 0 2rem; /* Añade un poco de espacio en los bordes */
}
/* ============================================= */
/* == ESTILOS PARA EL NUEVO MENÚ MÓVIL "MÁS" == */
/* ============================================= */
.mobile-bottom-nav .nav-item {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 11px;
}

.mobile-more-menu-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-more-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-more-menu-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-radius: 16px 16px 0 0;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mobile-more-menu-overlay.is-open .mobile-more-menu-content {
    transform: translateY(0);
}

.mobile-more-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.mobile-more-menu-header h4 {
    font-size: 1.2rem;
    margin: 0;
}
.mobile-more-menu-header #mobile-more-close {
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
}

.mobile-more-menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-more-menu-content li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    text-decoration: none;
    color: #343a40;
    font-weight: 500;
    font-size: 1.1rem;
}
.mobile-more-menu-content li i {
    color: var(--color-principal, #0d6efd);
    width: 25px;
    text-align: center;
}
.mobile-more-menu-content hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 0.5rem 0;
}
/* ============================================= */
/* == COLOR AZUL PARA ICONOS DEL MENÚ INFERIOR == */
/* ============================================= */

/* 1. Por defecto, ponemos solo los ICONOS en azul */
.mobile-bottom-nav .nav-item i {
    color: var(--color-principal, #0d6efd);
}

/* 2. Nos aseguramos de que el TEXTO siga siendo gris si no está activo */
.mobile-bottom-nav .nav-item span {
    color: #8e8e93;
}

/* 3. Cuando un ítem está ACTIVO, hacemos que tanto el icono como el texto se pongan azules */
.mobile-bottom-nav .nav-item.active i,
.mobile-bottom-nav .nav-item.active span {
    color: var(--color-principal, #0d6efd);
}
/* ========================================================= */
/* == ESTILOS MEJORADOS PARA FAVORITOS Y BADGES (v3) == */
/* ========================================================= */

/* Contenedor principal de acciones en la tarjeta */
.card-actions {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    right: 0.8rem;
    width: calc(100% - 1.6rem);
    display: flex;
    justify-content: space-between; /* Clave: empuja los hijos a los extremos */
    align-items: flex-start;
    pointer-events: none;
}

.card-actions > * {
    pointer-events: auto;
}

/* Contenedor de las insignias (ya NO debe tener position: absolute) */
.card-badges {
    display: flex;
    gap: 0.5rem;
}

/* Botón de Favorito en las tarjetas */
.btn-favorite {
    background-color: rgba(255, 255, 255, 0.8);
    color: #a0a0a0;
    border: 1px solid #eee;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(3px);
    flex-shrink: 0;
    z-index: 5;
}
.btn-favorite:hover {
    transform: scale(1.1);
    color: #e74c3c;
}
.btn-favorite.is-favorite {
    background-color: #e74c3c;
    color: #ffffff;
    border-color: #e74c3c;
}

/* Posición del corazón en los sliders (aseguramos que esté a la derecha) */
.top-card .card-actions-overlay,
.featured-card .btn-favorite {
    position: absolute; 
    top: 0.8rem; 
    right: 0.8rem; 
    z-index: 5;
}

/* Botón de Favorito DENTRO del modal */
.btn-favorite-modal {
    position: absolute;
    top: 1rem;
    right: 50px; /* Al lado del botón de cerrar */
    background: #f1f3f5;
    color: #868e96;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 15;
}
.btn-favorite-modal:hover {
    background-color: #e9ecef;
    color: #e74c3c;
}
.btn-favorite-modal.is-favorite {
    background-color: #e74c3c;
    color: #ffffff;
}
/* ========================================================= */
/* == ESTILOS PARA LAS ETIQUETAS EN LA VISTA PREVIA DE IMÁGENES == */
/* ========================================================= */
.preview-item .image-label {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: bold;
}

.preview-item .delete-image-label {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(220, 53, 69, 0.8);
    color: white;
    padding: 5px;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}
.preview-item .delete-image-label input {
    margin: 0;
}

/* ============================================================= */
/* == ESTILOS DEFINITIVOS PARA TARJETA DE ANUNCIO (v4 - FINAL) == */
/* ============================================================= */

.card-content { /* Reemplaza la regla de .card-content */
    padding: 1rem 1.25rem;
    display: flex !important; /* FORZAR FLEX */
    flex-direction: row !important; /* <-- FORZAR DIRECCIÓN DE FILA */
    justify-content: space-between !important; /* FORZAR SEPARACIÓN */
    align-items: center !important; /* FORZAR CENTRADO VERTICAL */
    flex-grow: 1;
}

.card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-principal, #0d6efd);
    margin: 0;
    margin-left: auto; 
    white-space: nowrap;
}



.btn-card-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.btn-card-contact:hover {
    transform: scale(1.1);
}

/* Colores de botones */
.btn-card-contact.whatsapp { background-color: #25D366; }
.btn-card-contact.telegram { background-color: #0088cc; }
.btn-card-contact.website { background-color: #6c757d; }
.btn-card-contact.tiktok { background-color: #000; }
.btn-card-contact.facebook { background-color: #1877F2; }
.btn-card-contact.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); }

.auth-footer-links {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
}
.auth-footer-links a {
    color: var(--color-principal, #0d6efd);
    font-weight: 500;
    text-decoration: none;
}
.auth-footer-links a:hover {
    text-decoration: underline;
}
.auth-footer-links span {
    margin: 0 0.5rem;
    color: #adb5bd;
}
/* Colores para los nuevos botones de redes sociales */
.btn-contact.tiktok { background-color: #000000; }
.btn-contact.facebook { background-color: #1877F2; }
.btn-contact.instagram { background: #d6249f; background: radial-gradient(circle
at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); }

/* ====================================================================== */
/* == AJUSTES RESPONSIVE DEFINITIVOS PARA TARJETAS DE ANUNCIO EN MÓVIL == */
/* ====================================================================== */

@media (max-width: 767px) {

    /* --- Solución 1: Reorganizar el texto con Grid --- */
    
    .card-line-1 {
        display: grid; /* Usamos grid para un control total */
        grid-template-columns: 1fr auto; /* Columna izq flexible, dcha automática */
        grid-template-rows: auto auto; /* Dos filas de altura automática */
        grid-template-areas: 
            "title title"
            "location price";
        gap: 0.5rem 0; /* Espacio solo entre las filas */
    }

    .card-title {
        grid-area: title; /* El título ocupa toda la primera fila */
        text-align: center; /* Se centra en su fila */
        white-space: normal; /* Permite que el texto ocupe varias líneas si es largo */
        overflow: visible;
        text-overflow: clip;
    }

    .card-location {
        grid-area: location; /* La ciudad va a la izquierda en la segunda fila */
        justify-self: start; /* Se alinea a la izquierda de su celda */
    }

    .card-price {
        grid-area: price; /* El precio va a la derecha en la segunda fila */
        justify-self: end; /* Se alinea a la derecha de su celda */
    }


    /* --- Solución 2: Botones que no se deforman --- */

    .card-contact-buttons {
        flex-wrap: wrap; /* Permite que los botones pasen a la siguiente línea si no caben */
    }

}

/* ============================================= */
/* == ESTILOS PARA LA SECCIÓN INFORMATIVA == */
/* ============================================= */
.info-section {
    padding: 4rem 0;
    background-color: #ffffff;
}
.info-section-content {
    display: grid;
    grid-template-columns: 1fr 40%; /* 60% para texto, 40% para imagen */
    gap: 3rem;
    align-items: center;
}
.info-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}
.info-text p {
    line-height: 1.8;
    color: #6c757d;
}
.info-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- Ajuste para móviles --- */
@media (max-width: 767px) {
    .info-section-content {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 2rem;
    }
    .info-text {
        text-align: center; /* Centramos el texto en móvil */
    }
}

/* ============================================================= */
/* == AJUSTE RESPONSIVE PARA TÍTULOS DE SECCIÓN EN MÓVIL == */
/* ============================================================= */

@media (max-width: 767px) {
    .section-title {
        font-size: 1.4rem; /* Reducimos el tamaño de 1.8rem a 1.4rem en móviles */
    }
}

.mobile-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    background-color: #20c997; /* Fondo verde */
    color: #fff; /* Texto e icono en blanco */
    border: none; /* Sin borde */

    border-radius: 8px;
    padding: 0.6rem 1rem; /* Un poco más de padding para que se vea mejor */
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.mobile-action-btn:hover {
    background-color: #1baa80; /* Un verde más oscuro al pasar el ratón */
}

/* acceso desde pagina de registro */
.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
}
.auth-switch a {
    color: var(--color-principal, #0d6efd);
    font-weight: 500;
    text-decoration: none;
}
.auth-switch a:hover {
    text-decoration: underline;
}

/* ============================================================= */
/* == ESTILOS CORREGIDOS PARA LA PÁGINA DE REGISTRO == */
/* ============================================================= */

/* 1. Estilo para el subtítulo "Regístrate para empezar..." */
.auth-subtitle {
  font-size: 0.95rem;  /* Reducimos un poco el tamaño para que quepa en una línea */
  color: #6c757d;
  text-align: center;
  margin-bottom: 1rem;
  white-space: nowrap; /* Esto fuerza a que el texto se mantenga en una sola línea */
}

/* 2. Ajusta el enlace de "¿Ya estás registrado?" y le da más espacio */
.auth-switch {
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 2rem; /* Aumenta el espacio entre este texto y el formulario de abajo */
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.auth-switch a {
  color: var(--color-principal, #0d6efd);
  font-weight: 500;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

#resultados-busqueda {
  scroll-margin-top: 280px; /* ¡IMPORTANTE! Ajusta este valor */
}

/* ================================================================= */
/* == Estilos para unificar el tamaño de las imágenes de anuncios == */
/* ================================================================= */

.card-image-container {
  /* 1. Forzamos la proporción 3:4 (ancho por alto) */
  aspect-ratio: 3 / 4;
  overflow: hidden; /* Nos aseguramos de que nada se salga del recuadro */
}

.card-image-container img {
  /* 2. Hacemos que la imagen ocupe el 100% del contenedor */
  width: 100%;
  height: 100%;
  
  /* 3. La magia: la imagen cubre el espacio sin deformarse */
  object-fit: cover; 
}

/* ============================= */
/* == Estilos Sección 3 Columnas == */
/* ============================= */

.info-columns-section {
  padding: 3rem 0;
  background-color: #ffffff; /* O el color de fondo que prefieras */
}

.info-columns-container {
  display: flex;
  justify-content: space-between; /* Espacio entre columnas */
  gap: 2rem; /* Espacio si se envuelven */
  flex-wrap: wrap; /* Permitir que se pongan una debajo de otra en móvil */
}

.info-column {
  flex: 1; /* Hace que las columnas intenten ocupar el mismo espacio */
  min-width: 280px; /* Ancho mínimo antes de envolverse */
  text-align: center; /* Centrar contenido de la columna */
  padding: 1rem;
}

.info-column-icon {
  font-size: 2.5rem; /* Tamaño del icono */
  color: var(--color-principal, #0d6efd); /* Usa tu color principal */
  margin-bottom: 1rem;
}

.info-column h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #333; /* Color del título */
}

.info-column p {
  font-size: 0.95rem;
  color: #6c757d; /* Color del texto */
  line-height: 1.6;
}

/* Ajustes para pantallas más pequeñas */
@media (max-width: 768px) {
  .info-columns-container {
    flex-direction: column; /* Columnas una debajo de otra */
    align-items: center; /* Centrar las columnas */
  }
  .info-column {
    min-width: 90%; /* Ocupar casi todo el ancho */
    max-width: 400px; /* Limitar ancho máximo */
    text-align: left; /* Alinear texto a la izquierda en móvil */
    display: flex; /* Para alinear icono y texto */
    align-items: flex-start; /* Alinear al inicio */
    gap: 1rem; /* Espacio entre icono y texto */
    padding: 1rem 0; /* Ajustar padding */
  }
  .info-column-icon {
     font-size: 2rem;
     margin-bottom: 0;
     margin-top: 0.2rem; /* Alinear verticalmente con el título */
  }
  .info-column > div:not(.info-column-icon) { /* Contenedor para título y texto */
     flex: 1;
  }
}

/* ============================= */
/* == Estilos Barra Características == */
/* ============================= */

.features-bar-section {
  background-color: #000000; /* Fondo negro */
  color: #ffffff; /* Texto blanco */
  padding: 1.5rem 0;
}

.features-bar-container {
  display: flex;
  justify-content: space-around; /* Distribuir items */
  align-items: center;
  flex-wrap: wrap; /* Para móvil */
  gap: 1.5rem; /* Espacio entre items si se envuelven */
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.8rem; /* Espacio entre icono y texto */
  font-size: 0.95rem;
  font-weight: 500;
}

.feature-icon {
  display: inline-block;
  width: 20px; /* Tamaño del cuadrado blanco */
  height: 20px;
  background-color: #ffffff; /* Color del cuadrado */
  border-radius: 4px; /* Bordes redondeados */
}

/* Ajustes para pantallas más pequeñas */
@media (max-width: 768px) {
  .features-bar-container {
    justify-content: flex-start; /* Alinear a la izquierda */
    padding-left: 1rem; /* Pequeño padding */
  }
   .feature-item {
    width: 100%; /* Ocupar todo el ancho disponible */
  }
}

/* ============================= */
/* == Estilos Barra Características == */
/* ============================= */

.features-bar-section {
  background-color: #000000;
  color: #ffffff;
  padding: 2.5rem 0; /* Aumentamos padding superior e inferior */
  text-align: center; /* Centramos todo por defecto */
}

.features-bar-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2rem; /* <-- AUMENTADO (antes 1.5rem) para más espacio */
  text-align: center; /* <-- ASEGURAR que esté centrado */
}

.features-bar-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  /* Quitamos text-align: center de aquí si lo tenía */
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left; /* Mantenemos items alineados a la izquierda */
}

.feature-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #ffffff;
  border-radius: 4px;
}

/* Ajustes para pantallas más pequeñas */
@media (max-width: 768px) {
  .features-bar-section {
    padding: 1.5rem 1rem; /* Ajustar padding lateral */
    text-align: left;
  }
  .features-bar-title {
     font-size: 1.5rem;
     margin-bottom: 1.5rem; /* Reducir espacio en móvil */
     padding: 0; /* Quitar padding si lo tenía */
  }
  .features-bar-container {
    justify-content: flex-start;
    padding-left: 0; /* Quitar padding extra */
  }
   .feature-item {
    width: 100%;
  }
}
/* ============================= */
/* == Estilos Icono Rango Precio == */
/* ============================= */

/* Contenedor padre necesita position: relative */
.top-card, .featured-card, .listing-card .card-image-container {
  position: relative;
}

.price-range-icon {
  width: 64px;  /* Ancho del icono */
  height: 64px; /* Alto del icono */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 50%; /* Opcional: hacerlo redondo */
  /* background-color: rgba(255, 255, 255, 0.7); /* Opcional: fondo semitransparente */
  /* box-shadow: 0 1px 3px rgba(0,0,0,0.2); /* Opcional: sombra suave */
}

/* --- Define aquí tus iconos --- */
/* Debes crear estas imágenes (SVG o PNG transparente son ideales) */
/* y subirlas a una carpeta (ej: assets/icons/) */

.price-economic {
  background-image: url('../icons/price-economic.png'); /* icono de gráfico descendente */
}
.price-medium1 {
  background-image: url('../icons/price-medium1.png'); /* icono de fuego */
}
.price-medium2 {
  background-image: url('../icons/price-medium2.png'); /* icono de sol sonriente */
}
.price-premium {
  background-image: url('../icons/price-premium.png'); /* icono de diamante */
}

/* Ocultar los puntos de paginación del slider de destacados */
.featured-swiper .swiper-pagination {
    display: none;
}

/* Ocultar la sección del buscador principal en pantallas grandes si no es un overlay */
.search-section-hero { /* O la clase de tu buscador grande en index.php */
    display: none;
}

/* Mostrar el botón de buscar en el header solo en escritorio */
.btn-search-desktop {
    background-color: #20c997; /* Fondo verde (igual que .btn-search) */
    color: #fff;             /* Texto blanco */
    border: none;             /* Sin borde */
    padding: 0.6rem 1.2rem;   /* Ajusta el padding si es necesario */
    border-radius: 8px;      /* Mantenemos bordes redondeados */
    cursor: pointer;
    margin-right: 1rem;      /* Aumentamos un poco el margen derecho para separarlo */
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-search-desktop:hover {
    background-color: #1baa80; /* Verde más oscuro al pasar el ratón */
    filter: none; /* Quitamos el filter: brightness si lo tenías */
}
@media (max-width: 768px) {
    .btn-search-desktop {
        display: none; /* Ocultarlo en móvil, ya tienes un botón de buscar */
    }
}

/* estilos avanzados */

.advanced-filters-area {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.5rem; /* Aumentar padding un poco */
    border-radius: 8px;
    margin-top: 1rem;
    overflow: hidden; /* Ocultar por defecto */
    max-height: 0; /* Para animación si usas la clase 'show' con transición */
    opacity: 0; /* Para animación si usas la clase 'show' con transición */
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, padding 0.4s ease-out; /* Añadir padding a transición */
    /* display: none; */ /* Comenta o quita display:none si vas a usar max-height/opacity para mostrar/ocultar */
}

/* Estilo cuando está visible (si usas JS que cambia display: block/none) */
.advanced-filters-area[style*="display: block"] {
    max-height: 40vh; /* Altura máxima (ej: 40% de la altura de la ventana) */
    overflow-y: auto; /* AÑADIR SCROLL VERTICAL */
    padding: 1.5rem; /* Asegurar padding cuando está visible */
    opacity: 1; /* Asegurar opacidad cuando está visible */
}

/* Estilo alternativo si usas la clase .show con transiciones */
.advanced-filters-area.show {
    max-height: 40vh; /* Altura máxima (ej: 40% de la altura de la ventana) */
    overflow-y: auto; /* AÑADIR SCROLL VERTICAL */
    padding: 1.5rem; /* Asegurar padding cuando está visible */
    opacity: 1; /* Asegurar opacidad cuando está visible */
}

/* Estilos para la barra de scroll (opcional, para mejorar apariencia) */
.advanced-filters-area::-webkit-scrollbar {
    width: 8px;
}
.advanced-filters-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.advanced-filters-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
}
.advanced-filters-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

.advanced-filters-area .form-group {
    margin-bottom: 1rem;
}
.advanced-filters-area label {
    color: #fff; /* O el color que uses para etiquetas en el overlay */
    margin-bottom: 0.5rem;
    display: block;
    font-weight: bold;
}
.advanced-filters-area input,
.advanced-filters-area select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
}
.btn-secondary-outline {
    background-color: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}
.btn-secondary-outline:hover {
    background-color: rgba(255,255,255,0.1);
}

/* ============================================================== */
/* == CSS FALTANTE PARA BUSCADOR OVERLAY Y HEADER STICKY == */
/* ============================================================== */

/* --- 1. Ocultar el buscador grande original en escritorio --- */
/* (Asegúrate que esta clase coincide con tu buscador en index.php) */
.search-section.desktop-search {
    display: none !important; /* Usamos !important para asegurar que se oculte */
}

/* --- 2. Estilos para el Overlay de Búsqueda --- */
#search-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Ocupa toda la pantalla */
    background-color: rgba(0, 0, 0, 0.8); /* Fondo oscuro semitransparente */
    z-index: 1050; /* Muy alto para estar por encima de todo */
    display: flex; /* Centrar contenido */
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px); /* Efecto blur opcional */
    overflow-y: auto; /* Permitir scroll si el contenido es muy largo */
    padding: 2rem; /* Espacio alrededor */
}

#search-overlay-container.is-open {
    opacity: 1;
    visibility: visible;
}

/* Contenido dentro del overlay */
#search-overlay-container .search-section {
    background: none;
    padding: 3rem 2rem; /* Añadir padding interno */
    min-height: auto;
    max-width: 90%; /* Usar porcentaje para que se adapte mejor */
    width: 100%;
    color: #fff;
    text-align: center;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3); /* Sombra opcional */
    /* Fondo más sólido por si la imagen de fondo distrae */
    background-color: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(8px);
}

/* Ancho específico para pantallas más grandes */
@media (min-width: 768px) {
    #search-overlay-container .search-section {
        max-width: 900px; /* <-- AUMENTADO (o el valor que prefieras) */
    }
}

#search-overlay-container .container {
     padding: 0; /* Ajustar padding si es necesario */
}


/* ============================================================== */
/* == CSS ESENCIAL PARA OVERLAY Y HEADER STICKY == */
/* ============================================================== */

/* --- Ocultar buscador original (con !important por si acaso) --- */
.search-section.desktop-search {
    display: none !important;
}

/* --- Estilos Base del Overlay (Oculto por defecto) --- */
#search-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 2rem;
}

/* --- Estilo del Overlay cuando está ABIERTO --- */
#search-overlay-container.is-open {
    opacity: 1;
    visibility: visible;
}

/* Contenido dentro del overlay */
#search-overlay-container .search-section {
    background: none; padding: 0; min-height: auto;
    max-width: 600px; width: 100%; color: #fff;
    text-align: center; border-radius: 12px; position: relative;
}
 #search-overlay-container .container { padding: 0; }

/* Botón de cerrar */
#search-overlay-close {
    position: absolute; top: -10px; right: -10px; background: #fff;
    color: #333; border: none; width: 35px; height: 35px;
    border-radius: 50%; font-size: 1.5rem; line-height: 35px;
    text-align: center; cursor: pointer; z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Formularios dentro del overlay */
 #search-overlay-container .search-form-overlay {
     background: none; padding: 0; backdrop-filter: none; max-width: none;
 }
 #search-overlay-container .search-input-group input,
 #search-overlay-container .search-input-group select {
     background-color: rgba(255, 255, 255, 0.9); color: #333;
 }
 #search-overlay-container .search-input-group i { color: #555; }

/* --- Estilos para el Header Fijo (Sticky) --- */
.main-header.sticky {
    position: fixed; /* O sticky */
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease; /* Transición suave */
    /* Asegúrate de ajustar el transform si el header cambia de altura */
    /* transform: translateY(0); */
}
/* Opcional: Ajustar padding/altura del header sticky */
.main-header.sticky .header-content {
    /* padding-top: 0.5rem; padding-bottom: 0.5rem; */
}

/* ============================================================== */
/* == CSS ESENCIAL PARA BUSCADOR OVERLAY Y HEADER STICKY == */
/* ============================================================== */

/* --- 1. Ocultar el buscador grande original en escritorio --- */
.search-section.desktop-search {
    display: none !important; /* Aseguramos que se oculte */
}

/* --- 2. Estilos para el Overlay de Búsqueda --- */
#search-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Ocupa toda la pantalla */
    background-color: rgba(0, 0, 0, 0.85); /* Un poco más oscuro */
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
    overflow-y: auto; /* Scroll si es necesario */
    padding: 2rem;
}

/* Estilo del Overlay ABIERTO */
#search-overlay-container.is-open {
    opacity: 1;
    visibility: visible;
}

/* Contenido dentro del overlay (la sección .search-section) */
#search-overlay-container .search-section {
    background: none; /* Sin fondo de imagen interno */
    padding: 0;
    min-height: auto;
    max-width: 600px;
    width: 100%;
    color: #fff;
    text-align: center;
    border-radius: 12px; /* Opcional: redondear el contenedor */
    position: relative; /* Para posicionar el botón de cerrar */
}
 #search-overlay-container .container { padding: 0; } /* Resetear padding interno */

/* Botón de cerrar */
#search-overlay-close {
    position: absolute;
    top: 0px; /* Ajusta según tu diseño */
    right: 0px; /* Ajusta según tu diseño */
    background: rgba(255, 255, 255, 0.8); /* Fondo semitransparente */
    color: #333;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 35px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.2s, transform 0.2s;
}
#search-overlay-close:hover {
    background: #fff;
    transform: rotate(90deg);
}

/* Formularios dentro del overlay */
 #search-overlay-container .search-form-overlay {
     background: none; padding: 0; backdrop-filter: none; max-width: none;
 }
 /* Ajustar inputs/selects para mejor visibilidad */
 #search-overlay-container .search-input-group input,
 #search-overlay-container .search-input-group select {
     background-color: rgba(255, 255, 255, 0.95); /* Más opaco */
     color: #333;
     border: 1px solid rgba(0,0,0,0.1); /* Borde sutil */
 }
 #search-overlay-container .search-input-group i { color: #555; }

/* Estilos para el área de filtros avanzados (ya los tenías, asegúrate que estén) */
.advanced-filters-area {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1rem; border-radius: 8px; margin-top: 1rem;
    /* Quitamos max-height, opacity, overflow aquí si usamos display */
    /* transition: ... si quieres animar */
    display: none; /* Oculto por defecto con display */
}
/* Para mostrar filtros (si JS usa display: block/none) */
.advanced-filters-area.show {
     display: block; /* Mostrar */
}
/* ... (resto de tus estilos para .advanced-filters-area label, input, select) ... */


/* --- 3. Estilos para el Header Fijo (Sticky) --- */
.main-header {
    /* Asegúrate de que el header tenga una transición si quieres suavidad */
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    /* position: relative; /* Opcional, dependiendo de tu layout */
    z-index: 1000; /* Z-index base */
}
.main-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1010; /* Un poco más alto que el contenido */
    /* Opcional: animación de entrada */
    /* transform: translateY(0); */
}
/* Opcional: Ajustar padding/altura del header sticky */
.main-header.sticky .header-content {
    /* padding-top: 0.5rem; */
    /* padding-bottom: 0.5rem; */
}

/* Opcional: Añadir padding al body cuando el header es sticky para evitar solapamiento */
/* body.header-is-sticky { padding-top: 65px; } /* Ajusta 65px a la altura de tu header sticky */
/* Necesitarías añadir/quitar esta clase al body en el JS handleStickyHeader */

/* --- FORZAR TAMAÑO DEL OVERLAY DE BÚSQUEDA --- */
#search-overlay-container .search-section {
    max-width: 950px !important; /* Prueba con un valor grande y !important */
    width: 90% !important;     /* Asegura que use casi todo el ancho disponible */
    padding: 3rem !important;    /* Más espacio interno */
    box-sizing: border-box !important; /* Asegura que el padding no lo haga más grande */
}

/* Ajuste adicional si el container padre lo limita */
#search-overlay-container .container {
    max-width: none !important; /* Quita el límite del contenedor interno */
}
/* --- FIN FORZAR TAMAÑO --- */

/* Fuerza al contenedor del icono a ser visible */
.listing-card .card-contact-buttons {
    opacity: 1;
    visibility: visible;
    transform: none; /* Quita cualquier efecto 'slide' o 'fade' */
}

/* Asegura que el icono en sí sea visible */
.listing-card .price-range-icon {
    opacity: 1;
    visibility: visible;
}

/* ======================================= */
/* == NUEVOS ESTILOS RECONSTRUIDOS == */
/* ======================================= */

/* Contenedor del texto (izquierda) */
.card-text-block {
    display: block; /* Asegura que h3 y p se apilen */
    text-align: left; /* Alinea el texto a la izquierda */
    flex-grow: 1; /* No crece */
    flex-shrink: 1; /* Puede encoger si es necesario */
    overflow: hidden; /* Evita que el texto largo se desborde */
}

/* Ajustes específicos para título y ubicación dentro del nuevo bloque */
.card-text-block .card-title {
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis; 
    margin-bottom: 0.2rem; /* Pequeño espacio bajo el título */
}
 .card-text-block .card-location {
    /* Hereda estilos globales, nos aseguramos de que sea flex para el icono */
    display: flex; 
    align-items: center;
    gap: 0.3rem;
    text-align: left; /* Doble confirmación */
}


/* Contenedor del icono (derecha) */
.card-icon-block {
    flex-shrink: 0; /* No se encoge */
    flex-grow: 0; /* No crece */
    /* Hereda tamaño (width/height) y fondo de .price-range-icon */
    /* Aseguramos que no tenga márgenes extra */
    margin: 0; 
}

/* Hereda de .price-range-icon (línea ~2807) el tamaño y fondo */
/* .price-range-icon { width: 64px; height: 64px; ... } */
/* Estilos para la previsualización de imágenes adicionales */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Para hacerlos cuadrados (aspect-ratio: 1/1) */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Para que la imagen llene el contenedor */
}

.delete-preview-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    transition: background-color 0.2s;
}

.delete-preview-btn:hover {
    background-color: rgba(255, 0, 0, 0.8);
}

/*
 * Estilos para mi_cuenta.php
 *------------------------------------------------*/

/* Nuevos botones de acción */
.actions-cell .btn-action.pause {
    background-color: #ffc107; /* Amarillo */
    color: #212529;
}
.actions-cell .btn-action.pause:hover {
    background-color: #e0a800;
}

.actions-cell .btn-action.activate {
    background-color: #28a745; /* Verde */
    color: #fff;
}
.actions-cell .btn-action.activate:hover {
    background-color: #218838;
}

.actions-cell .btn-action.renew {
    background-color: #0d6efd; /* Azul (el mismo que Editar) */
    color: #fff;
}
.actions-cell .btn-action.renew:hover {
    background-color: #0b5ed7;
}

/* Nueva etiqueta de estado */
.status-badge.status-pausado {
    background-color: #6c757d; /* Gris */
    color: #fff;
}

/* Estilo para la nueva celda de info del plan en mi_cuenta.php */
.plan-info-cell {
    font-size: 0.9rem;
    line-height: 1.4;
}
.plan-info-cell strong {
    display: block; /* El nombre del plan ocupa una línea */
    color: #333;
}
.plan-info-cell small {
    display: block; /* La duración ocupa la línea de abajo */
    color: #777;
}
/*
 * =========================================
 * ESTILOS PARA MI CUENTA (ANUNCIOS)
 * =========================================
 */

/* Arregla el salto de línea de los botones */
.actions-cell {
    white-space: nowrap;
    width: 1%; 
}

/* Estilo para el nuevo botón de INFO */
.actions-cell .btn-action.info {
    background-color: #0dcaf0; /* Cian "info" */
    color: #fff;
}
.actions-cell .btn-action.info:hover {
    background-color: #0baccc;
}

/* Estilos para Pausar, Activar, Renovar */
.actions-cell .btn-action.pause {
    background-color: #ffc107; /* Amarillo */
    color: #212529;
}
.actions-cell .btn-action.pause:hover {
    background-color: #e0a800;
}
.actions-cell .btn-action.activate {
    background-color: #28a745; /* Verde */
    color: #fff;
}
.actions-cell .btn-action.activate:hover {
    background-color: #218838;
}
.actions-cell .btn-action.renew {
    background-color: #0d6efd; /* Azul */
    color: #fff;
}
.actions-cell .btn-action.renew:hover {
    background-color: #0b5ed7;
}

/* Estilo para la celda del Plan */
.plan-info-cell {
    font-size: 0.9rem;
    line-height: 1.4;
}
.plan-info-cell strong {
    display: block;
    color: #333;
}
.plan-info-cell small {
    display: block;
    color: #777;
}

/* Estilo para la etiqueta de estado "Pausado" */
.status-badge.status-pausado {
    background-color: #6c757d; /* Gris */
    color: #fff;
}

/* * ESTILOS PARA EL MODAL DE INFO
 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Oculto por defecto */
    align-items: center;
    justify-content: center;
    z-index: 1050;
}
.modal-overlay.is-visible {
     display: flex; /* Se muestra con JS */
}
.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.modal-title {
    font-size: 1.5rem;
    margin: 0;
}
.modal-close {
    font-size: 2rem;
    font-weight: bold;
    color: #000;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.modal-body p {
    font-size: 1.1rem;
    line-height: 1.6;
}
.modal-body p strong {
    color: #333;
}
/*
 * =========================================
 * ESTILOS PARA EL OJO DE CONTRASEÑA
 * =========================================
 */

.password-toggle-container {
    position: relative; /* El contenedor debe ser relativo */
}

.toggle-password-icon {
    position: absolute; /* El icono se posiciona absoluto DENTRO del contenedor */
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888; /* Color del icono */
}

/* Hacemos que el input deje espacio para el icono */
.password-toggle-container input[type="password"],
.password-toggle-container input[type="text"] {
    padding-right: 40px !important; /* Importante para sobreescribir otros estilos */
    /* Aseguramos que el input ocupe todo el ancho */
    width: 100%;
    box-sizing: border-box; /* Importante para que el padding no rompa el diseño */
}
/* Estilo para el nuevo botón de Comprar Extras */
.btn-action.buy-extras {
    background-color: #17a2b8; /* Un color azul/cian para destacar */
    color: #fff; /* Texto blanco */
    border: 1px solid #17a2b8;
}

.btn-action.buy-extras:hover {
    background-color: #138496; /* Un tono más oscuro al pasar el ratón */
    border-color: #138496;
}
/* Estilo para el botón de Usar AutoSubida */
.btn-action.autosubida {
    background-color: #6f42c1; /* Un color púrpura distintivo */
    color: #fff;
    border: 1px solid #6f42c1;
}

.btn-action.autosubida:hover {
    background-color: #5a359a;
    border-color: #5a359a;
}