


.properties {
    padding: 6rem 0;
    background: linear-gradient(135deg, #faf9f7 0%, #f8f6f3 100%);
}

.properties-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}


.advanced-search-section {
    margin-bottom: 3rem;
}

.advanced-search-toggle {
    text-align: center;
    margin-bottom: 2rem;
}

.toggle-btn {
    background: linear-gradient(135deg, #8b4513 0%, #d2691e 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

.toggle-btn.active {
    background: linear-gradient(135deg, #d2691e 0%, #ff8c00 100%);
}

.toggle-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.toggle-btn.active i {
    transform: rotate(180deg);
}


.advanced-filters {
    background: linear-gradient(135deg, #ffffff 0%, #f8f6f3 100%);
    padding: 3rem;
    border-radius: 25px;
    margin-bottom: 2rem;
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.08);
    border: 2px solid rgba(139, 69, 19, 0.05);
    position: relative;
    overflow: hidden;
    display: none;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.advanced-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #8b4513 0%, #d2691e 50%, #ff8c00 100%);
}

.advanced-filters.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideDown 0.4s ease;
}

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

.advanced-filters h4 {
    color: #3e2723;
    margin-bottom: 2.5rem;
    font-size: 1.8rem;
    text-align: center;
    font-weight: 800;
    position: relative;
}

.advanced-filters h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #8b4513 0%, #d2691e 100%);
    border-radius: 2px;
}


.advanced-search-form .filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.filter-group label {
    color: #3e2723;
    font-weight: 700;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 1.5rem;
}

.filter-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #8b4513 0%, #d2691e 100%);
    border-radius: 50%;
}


.filter-group input,
.filter-group select {
    padding: 1.2rem 1.5rem;
    border: 2px solid rgba(139, 69, 19, 0.15);
    border-radius: 15px;
    background: #fafafa;
    color: #3e2723;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.05);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #8b4513;
    background: white;
    box-shadow: 0 0 0 4px rgba(139, 69, 19, 0.1), 0 4px 12px rgba(139, 69, 19, 0.15);
    transform: translateY(-2px);
}

.filter-group input::placeholder {
    color: rgba(93, 78, 55, 0.6);
    font-style: italic;
}


.filter-group select {
    cursor: pointer;
    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 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 3rem;
}

.filter-group select:focus {
    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='%238b4513' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}


.filter-group input[type="number"] {
    text-align: right;
}

.filter-group input[type="number"]::-webkit-outer-spin-button,
.filter-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.filter-group input[type="number"] {
    -moz-appearance: textfield;
}


.filter-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(139, 69, 19, 0.1);
}

.filter-btn-secondary {
    background: transparent;
    color: #8b4513;
    border: 2px solid #8b4513;
    padding: 1rem 2rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
    justify-content: center;
}

.filter-btn-secondary:hover {
    background: #8b4513;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.2);
}

.filter-btn-primary {
    background: linear-gradient(135deg, #8b4513 0%, #d2691e 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
    min-width: 140px;
    justify-content: center;
}

.filter-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

.filter-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
}


.filter-btn-primary.loading {
    position: relative;
    color: transparent;
}

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


.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid #8b4513;
    background: transparent;
    color: #8b4513;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.filter-btn.active, .filter-btn:hover {
    background: #8b4513;
    color: white;
    transform: translateY(-2px);
}


.properties-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-controls label {
    color: #5d4e37;
    font-weight: 600;
    font-size: 0.9rem;
}

.sort-controls select {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(139, 69, 19, 0.15);
    border-radius: 10px;
    background: white;
    color: #3e2723;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-controls select:focus {
    outline: none;
    border-color: #8b4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #8b4513;
    background: transparent;
    color: #8b4513;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active,
.view-btn:hover {
    background: #8b4513;
    color: white;
    transform: translateY(-2px);
}


.properties-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.properties-grid.list-view .property-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: center;
}

.properties-grid.list-view .property-image {
    height: 200px;
}

.properties-grid.list-view .property-content {
    padding: 1rem 2rem 1rem 0;
}

.properties-grid.list-view .property-details {
    grid-template-columns: repeat(4, 1fr);
}


.results-count {
    background: rgba(139, 69, 19, 0.1);
    color: #8b4513;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 2rem;
    text-align: center;
}


.properties-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(139, 69, 19, 0.1);
}

.properties-footer p {
    color: #5d4e37;
    opacity: 0.8;
    margin-top: 1rem;
    font-weight: 500;
}


.properties-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    color: #5d4e37;
    font-size: 1.1rem;
}

.properties-loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #8b4513;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 1rem;
}

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


.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #5d4e37;
}

.no-results i {
    font-size: 4rem;
    color: #8b4513;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #3e2723;
    margin-bottom: 1rem;
}

.no-results p {
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.6;
}

.no-results .cta-btn {
    display: inline-flex;
}


.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #8b4513;
    background: transparent;
    color: #8b4513;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.pagination-btn:hover:not(:disabled) {
    background: #8b4513;
    color: white;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-info {
    color: #5d4e37;
    margin: 0 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}


.property-badge.unified {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: white;
}


.search-suggestions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(139, 69, 19, 0.1);
}

.search-suggestions h5 {
    color: #3e2723;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-tag {
    background: rgba(139, 69, 19, 0.1);
    color: #8b4513;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 69, 19, 0.2);
    display: inline-block;
}

.suggestion-tag:hover {
    background: #8b4513;
    color: white;
    transform: translateY(-2px);
}


.property-image-container {
    position: relative;
    overflow: hidden;
}

.property-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: 25px 25px 0 0;
}

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


.image-carousel-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.property-card:hover .image-carousel-controls {
    opacity: 1;
    pointer-events: auto;
}

.carousel-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(139, 69, 19, 0.9);
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}


.image-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.image-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.image-dot.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.image-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}


.property-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 280px);
}

.property-content-top {
    flex: 1;
    display: flex;
    flex-direction: column;
}


.property-price-per-sqm {
    font-size: 0.9rem;
    font-weight: 600;
    color: #d2691e;
    margin-bottom: 0.8rem;
    padding: 0.3rem 0.8rem;
    background: rgba(210, 105, 30, 0.1);
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}


.property-parking {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #5d4e37;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.5rem 0.8rem;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.05) 0%, rgba(210, 105, 30, 0.05) 100%);
    border-radius: 10px;
    border-left: 3px solid #8b4513;
}

.property-parking i {
    color: #8b4513;
    font-size: 0.9rem;
}


.property-parking.garage,
.property-parking.parking-space,
.property-parking.no-parking {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.05) 0%, rgba(210, 105, 30, 0.05) 100%);
    border-left-color: #8b4513;
}

.property-parking.garage i,
.property-parking.parking-space i,
.property-parking.no-parking i {
    color: #8b4513;
}

.property-actions {
    margin-top: auto;
    flex-shrink: 0;
}





.modal.enhanced-modal {
    backdrop-filter: blur(5px);
}

.enhanced-modal .modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


@media (max-width: 1024px) {
    .properties-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-controls {
        justify-content: space-between;
    }
    
    .properties-grid.list-view .property-card {
        grid-template-columns: 1fr;
    }
    
    .properties-grid.list-view .property-image {
        height: 250px;
    }
    
    .advanced-filters {
        padding: 2rem;
    }
    
    .advanced-search-form .filters-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .filter-tabs {
        display: none;
    }
    
    .properties-controls {
        gap: 1.5rem;
    }
    
    .view-toggle {
        justify-content: center;
    }
    
    .advanced-search-form .filters-row {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination-info {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .advanced-filters {
        padding: 1.5rem;
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .advanced-search-toggle {
        margin-bottom: 1rem;
    }
    
    .toggle-btn {
        width: 100%;
        justify-content: center;
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
    }

    
    .image-carousel-controls {
        opacity: 1;
        pointer-events: auto;
    }
    
    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .image-indicators {
        bottom: 8px;
        gap: 4px;
    }
    
    .image-dot {
        width: 6px;
        height: 6px;
    }
    
    .image-dot.active {
        transform: scale(1.4);
    }

    
    .property-price-per-sqm {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
        margin-bottom: 0.6rem;
    }

    
    .property-parking {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        margin-bottom: 0.8rem;
    }

    .property-parking i {
        font-size: 0.8rem;
        min-width: 12px;
    }
    
    
    .modal.enhanced-modal {
        align-items: flex-end;
        padding: 0;
    }
    
    .enhanced-modal .modal-content {
        border-radius: 25px 25px 0 0;
        max-height: 95vh;
        margin-top: auto;
        animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    
    @keyframes modalSlideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
}

@media (max-width: 480px) {
    .properties {
        padding: 4rem 0;
    }
    
    .properties-container {
        padding: 0 1rem;
    }
    
    .advanced-filters {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .properties-footer {
        margin-top: 2rem;
    }
    
    .filter-tabs {
        gap: 0.5rem;
    }
    
    .filter-btn {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .toggle-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    
    .property-price-per-sqm {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    
    .advanced-filters {
        padding: 1rem;
        margin: 0 -0.5rem;
    }
    
    .advanced-search-form .filters-row {
        gap: 1rem;
    }
    
    .filter-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .filter-group select,
    .filter-group input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .filter-actions {
        gap: 1rem;
    }
    
    .filter-btn-primary,
    .filter-btn-secondary {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }

    
    .property-parking {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
        margin-bottom: 0.6rem;
    }
}


@media (hover: none) and (pointer: coarse) {
    .image-carousel-controls {
        opacity: 1;
        pointer-events: auto;
    }
    
    .carousel-btn:hover {
        background: rgba(0, 0, 0, 0.7);
        transform: none;
    }
    
    .carousel-btn:active {
        background: rgba(139, 69, 19, 0.9);
        transform: scale(0.9);
    }
    
    .image-dot:hover {
        background: rgba(255, 255, 255, 0.5);
        transform: none;
    }
    
    .property-card:hover .image-carousel-controls {
        opacity: 1;
        pointer-events: auto;
    }
    
    .property-card:hover .property-image img {
        transform: none;
    }
    
    .property-card:hover {
        transform: none;
        box-shadow: 0 15px 35px rgba(139, 69, 19, 0.08);
    }
}


.carousel-btn:focus,
.image-dot:focus {
    outline: 2px solid #8b4513;
    outline-offset: 2px;
}


@media (prefers-contrast: high) {
    .carousel-btn {
        background: rgba(0, 0, 0, 0.9);
        border: 2px solid white;
    }
    
    .image-dot {
        border: 2px solid white;
        background: rgba(0, 0, 0, 0.7);
    }
    
    .image-dot.active {
        background: white;
        border: 2px solid black;
    }
    
    .property-badge {
        border: 2px solid #8b4513;
    }

    .property-price-per-sqm {
        border: 1px solid #d2691e;
    }

    .property-parking {
        border: 2px solid #8b4513 !important;
    }
}


.property-card.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.property-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #8b4513;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}


.image-carousel-controls,
.image-indicators,
.carousel-btn,
.image-dot {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}


.property-image img.loading {
    opacity: 0.7;
    transform: scale(1.05);
}


@media (prefers-reduced-motion: reduce) {
    .property-card,
    .carousel-btn,
    .image-dot,
    .modal.enhanced-modal .modal-content {
        transition: none !important;
        animation: none !important;
    }
}


.property-card,
.modal.enhanced-modal {
    contain: layout style paint;
}


@media (max-width: 768px) {
    .property-card:focus,
    .property-btn:focus,
    .carousel-btn:focus,
    .image-dot:focus {
        outline: 3px solid #8b4513;
        outline-offset: 2px;
    }
}