/* Estilos específicos para la página de resultados de búsqueda */

/* Breadcrumbs */
.breadcrumbs {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    margin-top: 70px; /* Espacio para el header fijo */
}

.breadcrumbs .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumbs a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #45a049;
}

.breadcrumbs span {
    color: #6c757d;
}


/* Layout principal */
.main-content {
    background: #ffffff;
    min-height: calc(100vh - 200px);
    padding: 40px 0;
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.content-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    max-width: none;
    margin: 0 auto;
    padding: 0 20px 0 0;
    width: 100%;
    box-sizing: border-box;
}

/* Sidebar de filtros */
.filters-sidebar {
    background: white;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    height: fit-content;
    position: sticky;
    top: 20px;
    border: 1px solid #e9ecef;
    border-left: none;
    margin-left: 0;
    margin-right: 0;
    min-width: 350px;
    width: 350px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.filters-header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 0 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.filters-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-filters {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: none;
}

.close-filters:hover {
    background: rgba(255, 255, 255, 0.1);
}

.close-filters.mobile-close {
    display: none;
}

/* Botón para mostrar filtros en móvil */
.mobile-filters-toggle {
    display: none;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    gap: 8px;
    align-items: center;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.mobile-filters-toggle:hover {
    background: #45a049;
}

.mobile-filters-toggle i {
    font-size: 16px;
}

.results-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 15px;
}

/* Formulario de filtros */
.search-filters-form {
    padding: 0;
}

/* Secciones de filtros */
.filter-section {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #343a40;
}

.filter-section h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

/* Filas de filtros */
.filters-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

/* Grupos de filtros */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    width: 100%;
}

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    text-align: left;
}

.filter-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Filtros avanzados */
.advanced-toggle {
    margin-bottom: 15px;
}

.advanced-toggle-btn {
    width: 100%;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.advanced-toggle-btn:hover {
    border-color: #4CAF50;
    color: #4CAF50;
}

.advanced-toggle-btn i:first-child {
    margin-right: 8px;
}

.advanced-toggle-btn i:last-child {
    transition: transform 0.3s ease;
}

.advanced-toggle-btn.expanded i:last-child {
    transform: rotate(180deg);
}

.advanced-filters-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.advanced-filters-content.expanded {
    max-height: 2000px;
    opacity: 1;
}

/* Subsecciones de filtros */
.filter-subsection {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f3f4;
}

.filter-subsection:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Filtros de precio */
.price-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    width: 100%;
}

.price-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
}

.price-input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    text-align: left;
}

.price-input-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Filtros de área */
.area-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.area-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    width: 100%;
}

.area-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
}

.area-input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    text-align: left;
}

.area-input-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Filtros de habitaciones */
.rooms-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.rooms-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    width: 100%;
}

.rooms-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
}

.rooms-input-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    text-align: left;
}

.rooms-input-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Grid de amenidades */
.amenities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.amenity-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Checkboxes personalizados */
.checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    color: #495057;
    transition: color 0.3s ease;
    width: 100%;
    justify-content: flex-start;
}

.checkbox:hover {
    color: #4CAF50;
}

.checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox input[type="checkbox"]:checked + .checkmark {
    background: #4CAF50;
    border-color: #4CAF50;
}

.checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

/* Acciones de filtros */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.clear-filters-btn {
    width: 100%;
    background: #6c757d;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.clear-filters-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Botones de transacción */
.transaction-buttons {
    display: flex;
    gap: 5px;
}

.transaction-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex: 1;
}

.transaction-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.transaction-btn:hover:not(.active) {
    border-color: #4CAF50;
    color: #4CAF50;
}

/* Inputs de precio */
.price-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Inputs de tamaño */
.size-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Inputs de ubicación */
.location-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.location-inputs select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.location-inputs select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.location-inputs select:hover {
    border-color: #4CAF50;
}

.location-inputs select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.apply-price-btn {
    background: #4CAF50;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.apply-price-btn:hover {
    background: #45a049;
}

/* Select de categoría */
.category-select {
    position: relative;
}

.category-select select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.category-select select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.category-select select:hover {
    border-color: #4CAF50;
}

/* Botón Aplicar Filtros */
.apply-filters-btn {
    width: 100%;
    background: #4CAF50;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.apply-filters-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.apply-filters-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.apply-filters-btn i {
    font-size: 14px;
}

/* Contenido principal de resultados */
.results-main {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
}

.results-header {
    padding: 25px 30px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    background: #f8f9fa;
}

.results-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #212529;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.results-header .highlight {
    color: #4CAF50;
}

.results-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.action-btn.primary {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.action-btn:hover:not(.primary) {
    border-color: #4CAF50;
    color: #4CAF50;
}

.action-btn.primary:hover {
    background: #45a049;
}

/* Botón Quitar Filtros */
.clear-filters-btn {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.clear-filters-btn:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
    color: white !important;
}

/* Dropdown de ordenamiento */
.sort-dropdown {
    position: relative;
}

.sort-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 200px;
    display: none;
    overflow: hidden;
    margin-top: 5px;
}

.sort-options.show {
    display: block;
}

.sort-option {
    width: 100%;
    background: none;
    border: none;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #495057;
}

.sort-option:hover {
    background: #f8f9fa;
}

.sort-option i {
    width: 16px;
    color: #6c757d;
}

/* Grid de propiedades */
.properties-grid {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive para grid de propiedades */
@media (max-width: 1200px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .properties-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}

.property-card {
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
    border-color: #4CAF50;
}

.property-image-container {
    position: relative;
    width: 100%;
}

.property-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.1);
}

.property-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-card:hover .property-overlay {
    opacity: 1;
}

.transaction-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.transaction-badge.rent {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.transaction-badge.sale {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.property-header-info {
    margin-bottom: 12px;
}

.property-content {
    padding: 20px;
}

.property-title {
    font-size: 17px;
    font-weight: 600;
    color: #343a40;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
}

.property-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.property-tag {
    background: #f8f9fa;
    border: 1px solid #4CAF50;
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.property-price-section {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f2f5;
}

.property-price {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
    margin: 0;
}

.price-period {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.property-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f2f5;
}

.property-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.property-detail:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.property-detail i {
    color: #4CAF50;
    font-size: 14px;
    width: 16px;
}

.property-detail span {
    font-weight: 500;
    color: #495057;
}

.property-location {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.property-location i {
    color: #dc3545;
    font-size: 14px;
}

.property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.feature-tag {
    background: #e9ecef;
    color: #495057;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.feature-tag.more {
    background: #4CAF50;
    color: white;
}

.property-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f2f5;
}

.btn-view-property {
    width: 100%;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-view-property:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
}

.btn-view-property:active {
    transform: translateY(0);
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-results h3 {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 24px;
}

.no-results p {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 16px;
}

/* Paginación */
.pagination {
    padding: 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.page-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.page-btn:hover:not(:disabled) {
    border-color: #007bff;
    color: #007bff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-number {
    background: white;
    border: 2px solid #e9ecef;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    font-weight: 500;
}

.page-number.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.page-number:hover:not(.active) {
    border-color: #4CAF50;
    color: #4CAF50;
}

.page-dots {
    color: #6c757d;
    padding: 0 5px;
}


/* Responsive */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        order: 2;
        display: none;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
        border-left: none;
        max-height: 100vh;
        width: 100%;
        min-width: auto;
        background: white;
        overflow-y: auto;
    }
    
    .filters-sidebar.mobile-visible {
        display: block;
    }
    
    .close-filters.mobile-close {
        display: block;
    }
    
    .results-main {
        order: 1;
    }
    
    .main-content {
        padding: 20px 0;
    }
}

@media (max-width: 768px) {
    * {
        max-width: 100%;
    }
    
    body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    html {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .breadcrumbs {
        margin-top: 60px; /* Altura aproximada del header en móvil */
        padding: 10px 0;
    }
    
    .main-content {
        padding: 15px 0;
        margin-top: 0;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        margin-left: 0;
        margin-right: 0;
    }
    
    header {
        width: 100%;
        left: 0;
        right: 0;
        box-sizing: border-box;
    }
    
    .header-container {
        width: 100%;
        box-sizing: border-box;
        padding-left: 15px;
        padding-right: 15px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    
    .content-layout {
        padding: 0 15px;
        gap: 15px;
        width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }
    
    .results-main {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        max-width: 100%;
    }
    
    .breadcrumbs {
        padding: 10px 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .breadcrumbs .container {
        padding: 0 15px;
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }
    
    .mobile-filters-toggle {
        display: flex;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px 15px;
    }
    
    .results-header-top {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .results-header h2 {
        font-size: 22px;
        flex: 1;
        min-width: 200px;
    }
    
    .results-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .action-btn {
        font-size: 13px;
        padding: 8px 15px;
    }
    
    .sort-dropdown {
        width: 100%;
    }
    
    .sort-dropdown button {
        width: 100%;
        justify-content: space-between;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 20px;
    }
    
    .property-card {
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .property-title {
        font-size: 18px;
    }
    
    .property-price {
        font-size: 24px;
    }
    
    .filter-section {
        padding: 15px 20px;
    }
    
    .filter-section h4 {
        font-size: 15px;
    }
    
    .filter-group label {
        font-size: 12px;
    }
    
    .filter-group select,
    .price-input-group input,
    .area-input-group input {
        font-size: 14px;
        padding: 10px;
    }
    
    .amenities-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-header {
        padding: 15px 20px;
    }
    
    .filters-header h3 {
        font-size: 16px;
    }
    
    .pagination {
        padding: 15px;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .page-btn,
    .page-number {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .property-types {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .content-layout {
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .properties-grid {
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .main-content {
        padding: 10px 0;
    }
    
    .breadcrumbs {
        font-size: 12px;
        padding: 8px 0;
        margin-top: 55px; /* Altura reducida del header en móvil pequeño */
    }
    
    .breadcrumbs .container {
        padding: 0 10px;
    }
    
    .results-header {
        padding: 15px 10px;
    }
    
    .results-main {
        border-radius: 8px;
    }
    
    .results-header h2 {
        font-size: 20px;
    }
    
    .mobile-filters-toggle {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .properties-grid {
        padding: 10px;
        gap: 15px;
    }
    
    .property-card {
        margin-bottom: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .filter-section {
        padding: 12px 15px;
    }
    
    .filters-header {
        padding: 12px 15px;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .apply-filters-btn,
    .clear-filters-btn {
        width: 100%;
        justify-content: center;
    }
    
    .rooms-input-group {
        width: 100%;
    }
    
    .rooms-filters {
        flex-direction: column;
        gap: 15px;
    }
}
