/* Estilos para el widget Grilla de Propiedades */
:root {
    --propiedades360-primary: var(--wp--preset--color--primary, #2271b1);
    --propiedades360-secondary: var(--wp--preset--color--secondary, #135e96);
    --propiedades360-background: var(--wp--preset--color--background, white);
    --propiedades360-text: var(--wp--preset--color--text, #2c3338);
    --propiedades360-border: var(--wp--preset--color--border, #dcdcde);
    --propiedades360-radius: var(--wp--custom--border-radius, 4px);
    --propiedades360-spacing: var(--wp--custom--spacing, 1rem);
}

/* Grilla de Propiedades */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
}

/* Ajustar columnas según el atributo */
.properties-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.properties-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.properties-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.properties-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* Tarjeta de propiedad */
.property-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

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

.property-image {
    position: relative;
    padding-top: 65%;
    overflow: hidden;
}

.property-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badges */
.property-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.property-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
}

.property-badge-modalidad {
    background: #D9D5D4;
    color: #000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.property-badge-featured {
    background: #C2140E;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Contenido de la tarjeta */
.property-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.property-header {
    margin-bottom: 10px;
}

.property-title {
    margin: 0 0 15px;
    font-size: 18px;
    line-height: 1.3;
}

.property-title a {
    color: #212529;
    text-decoration: none;
}

.property-title a:hover {
    color: #3498db;
}

/* Metadatos de la propiedad */
.property-meta {
    margin-bottom: 15px;
}

.property-price {
    font-size: 20px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 10px;
}

.property-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.property-detail {
    display: flex;
    align-items: center;
}

.property-icon {
    margin-right: 5px;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
}

.area-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M14,6l-4.22,5.63,1.25,1.67L14,9.33,19,16h-8.46l-4.01-5.37L1,18h22L14,6zM5,16l1.52-2.03L8.04,16H5z'/%3E%3C/svg%3E");
}

.type-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M17,10.43V2H7v8.43c0,0.35,0.18,0.68,0.49,0.86l4.18,2.51l-0.99,2.34l-3.41,0.29l2.59,2.24L9.07,22L12,20.23L14.93,22l-0.78-3.33l2.59-2.24l-3.41-0.29l-0.99-2.34l4.18-2.51C16.82,11.11,17,10.79,17,10.43z M13,12.23l-1,0.6l-1-0.6V3h2V12.23z'/%3E%3C/svg%3E");
}

.location-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M12,2C8.13,2,5,5.13,5,9c0,5.25,7,13,7,13s7-7.75,7-13C19,5.13,15.87,2,12,2z M12,11.5c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5S13.38,11.5,12,11.5z'/%3E%3C/svg%3E");
}

/* Características adicionales */
.property-custom-container {
    margin-top: auto;
    padding: 10px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.property-additional-features ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.property-additional-features li {
    font-size: 0.8em;
    color: #666;
    display: inline-flex;
    align-items: center;
}

.property-additional-features li::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 4px;
    opacity: 0.6;
}

/* Extracto */
.property-excerpt {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    flex-grow: 1;
}

/* Footer de la tarjeta */
.property-footer {
    margin-top: auto;
    text-align: center;
}

.property-more-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.property-more-link:hover {
    background-color: #2980b9;
    color: white;
}

/* Paginación */
.properties-pagination {
    margin: 40px 0;
    text-align: center;
}

.properties-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.properties-pagination li {
    display: inline-block;
}

.properties-pagination a,
.properties-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s;
}

.properties-pagination span.current {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.properties-pagination a:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Sin resultados */
.no-results {
    text-align: center;
    background: #f8f9fa;
    padding: 40px;
    border-radius: 8px;
    margin: 40px 0;
}

.no-results p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #495057;
}

.no-results .button {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}

.no-results .button:hover {
    background: #2980b9;
}

/* Cabecera de búsqueda */
.search-header {
    margin-bottom: 30px;
}

.search-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #212529;
}

.active-filters {
    color: #6c757d;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .properties-grid {
        grid-template-columns: 1fr !important;
    }

    .property-custom-container {
        padding: 5px 0;
    }

    .property-additional-features ul {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 576px) {
    .property-details {
        flex-direction: column;
        gap: 8px;
    }
}

/* Estilos específicos para iconos de características */
.property-additional-features li:contains("Habitaciones")::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3E%3Cpath d='M20 9.557V3h-2v2H6V3H4v6.557C2.81 10.25 2 11.525 2 13v4a1 1 0 0 0 1 1h1v4h2v-4h12v4h2v-4h1a1 1 0 0 0 1-1v-4c0-1.475-.811-2.75-2-3.443zM18 7v2H6V7h12zM6 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm12 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z'/%3E%3C/svg%3E");
}

.property-additional-features li:contains("Pileta")::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3E%3Cpath d='M22 21c-1.11 0-1.73-.37-2.18-.64-.37-.22-.6-.36-1.15-.36-.56 0-.78.13-1.15.36-.46.27-1.07.64-2.18.64s-1.73-.37-2.18-.64c-.37-.22-.6-.36-1.15-.36-.56 0-.78.13-1.15.36-.46.27-1.08.64-2.19.64-1.11 0-1.73-.37-2.18-.64-.37-.23-.6-.36-1.15-.36s-.78.13-1.15.36c-.46.27-1.08.64-2.19.64v-2c.56 0 .78-.13 1.15-.36.46-.27 1.08-.64 2.19-.64s1.73.37 2.18.64c.37.23.59.36 1.15.36.56 0 .78-.13 1.15-.36.46-.27 1.08-.64 2.19-.64 1.11 0 1.73.37 2.18.64.37.22.6.36 1.15.36s.78-.13 1.15-.36c.45-.27 1.07-.64 2.18-.64s1.73.37 2.18.64c.37.23.59.36 1.15.36v2z'/%3E%3C/svg%3E");
}

.property-additional-features li:contains("Patio")::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3E%3Cpath d='M12 22a9 9 0 0 1-9-9 9 9 0 0 1 9-9 9 9 0 0 1 9 9 9 9 0 0 1-9 9m0-20a11 11 0 0 0-11 11 11 11 0 0 0 11 11 11 11 0 0 0 11-11A11 11 0 0 0 12 2m-.5 5v5.25l4.5 2.67-.75 1.23L10 13V7h1.5z'/%3E%3C/svg%3E");
}

/* Características básicas en resultados */
.property-basic-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    font-size: 13px;
}

.property-basic-feature {
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    color: #495057;
    display: inline-flex;
    align-items: center;
}

.property-basic-feature i {
    margin-right: 4px;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 992px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .properties-grid {
        grid-template-columns: 1fr !important;
    }
    
    .property-details {
        flex-direction: column;
        gap: 8px;
    }
}
