﻿@import url('vistaprevia.css');
:root {
    --azul-oscuro: #003163;
    --azul-principal: #004280;
    --naranja: #ee7103;
    --naranja-hover: #d66502;
    --blanco: #ffffff;
    --gris-fondo: #f8f9fa;
    --borde: #e8eef3;
    --poppins: 'Poppins', sans-serif;
}

.hero-sales {
    position: relative;
    height: 80vh; 
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

/* Capa parallax */
.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../Img/casa-1.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.2);
    will-change: transform;
    z-index: 1;
}

/* Overlay */
.hero-sales::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( 180deg, rgba(0, 66, 128, 0.15) 0%, rgba(0, 66, 128, 0.45) 60%, rgba(0, 40, 90, 0.7) 100% );
    z-index: 2;
}
/* Contenido */
.hero-sales-content {
    position: relative;
    z-index: 3;
    padding: 0 16px;
}

/* Texto */
.hero-sales-content h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 800;
    margin: 14px 0 10px;
}

.hero-sales-content p {
    max-width: 680px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Mobile ajuste */
@media (max-width: 768px) {
    .hero-sales {
        height: 55vh;
    }
}

/* Layout */
.sales-container {
    position: relative; 
    margin-top: -120px; 
    padding: 140px 0 80px;
    background-color: var(--gris-fondo);
    font-family: var(--poppins);
    z-index: 5;
}

.content-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 0 20px;
}

/* Sidebar computadora */
.filters-sidebar {
    background: white;
    padding: 22px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.sidebar-main-title {
    font-size: 1.15rem;
    color: var(--azul-oscuro);
    margin-bottom: 14px;
    font-weight: 800;
}

/* Botón que solo aparece en móvil */
.filters-toggle {
    display: none;
    width: 100%;
    border: 1px solid var(--borde);
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    font-family: var(--poppins);
    font-weight: 800;
    color: var(--azul-oscuro);
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.filters-toggle-icon {
    font-size: 1.1rem;
    opacity: 0.85;
}

.filters-body {
    display: block;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h3 {
    font-size: 0.82rem;
    text-transform: uppercase;
    color: var(--azul-oscuro);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Grupos de botones */
.num-selector, .price-chips, .category-grid, .operation-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.num-selector span, .chip, .opt-btn {
    padding: 8px 14px;
    border: 1px solid var(--borde);
    border-radius: 10px;
    font-size: 0.8rem;
    cursor: pointer;
    background: white;
    transition: 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    user-select: none;
}

.num-selector span:hover, .chip:hover, .opt-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
}

.num-selector span.active, .chip.active, .opt-btn.active {
    background: var(--azul-principal);
    color: white;
    border-color: var(--azul-principal);
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(0, 66, 128, 0.18);
}

/* Selects */
.luxury-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--borde);
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: var(--poppins);
    color: var(--azul-oscuro);
    outline: none;
    background: #fff;
}

/* Botón aplicar */
.btn-apply-filters {
    width: 100%;
    background: var(--naranja);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 800;
    font-family: var(--poppins);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-top: 8px;
    transition: 0.25s ease;
}

.btn-apply-filters:hover {
    background: var(--naranja-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(238,113,3,0.25);
}

/* Cards grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.property-card-link {
    text-decoration: none;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    display: block;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.property-card-link:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.09);
}

.card-image-box {
    position: relative;
    height: 210px;
    overflow: hidden;
}

.img-base, .img-reveal {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-reveal {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.property-card-link:hover .img-reveal {
    opacity: 1;
}

.property-card-link:hover .img-base {
    transform: scale(1.07);
}

.tag-category {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,0.35);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.20);
    backdrop-filter: blur(8px);
    font-weight: 800;
    font-size: 0.78rem;
    z-index: 2;
}

.card-content-luxe {
    padding: 18px 18px 20px;
}

.price-tag {
    color: var(--naranja);
    font-weight: 900;
    font-size: 1.25rem;
    display: inline-block;
}

.property-name {
    font-size: 1.05rem;
    color: var(--azul-oscuro);
    font-weight: 800;
    margin: 8px 0 6px;
}

.location-text {
    font-size: 0.88rem;
    color: #6f879d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.amenities-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f0f4f8;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.ami-item {
    font-size: 0.82rem;
    color: var(--azul-oscuro);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.ami-item i {
    color: var(--azul-principal);
}

/* RESPONSIVE */

/* Tablet */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .filters-sidebar {
        position: relative;
        top: auto;
    }
}

/* Móvil */
@media (max-width: 600px) {
    .properties-grid {
        grid-template-columns: 1fr;
    }

    .filters-toggle {
        display: flex;
    }
   
    .filters-body {
        display: none;
    }

    .filters-sidebar.is-open .filters-body {
        display: block;
        animation: filtersDrop 0.25s ease;
    }

    @keyframes filtersDrop {
        from { opacity: 0; transform: translateY(-6px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Botón */
    .btn-apply-filters {
        position: sticky;
        bottom: 10px;
        z-index: 5;
    }
}

/*CARRUSEL*/
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

    .carousel-img.active {
        opacity: 1;
    }

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none;
    color: white;
    font-size: 20px;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 2;
}

    .carousel-btn.prev {
        left: 5px;
    }

    .carousel-btn.next {
        right: 5px;
    }