/* Frontend Grid Styles */

/* Grid Wrapper */
.property-grid-wrapper {
    width: 100%;
    margin: 0 auto 40px;
}

/* Property Grid */
.property-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

/* Columnas */
.property-grid-columns-1 {
    grid-template-columns: 1fr;
}

.property-grid-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.property-grid-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.property-grid-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive */
@media (max-width: 1024px) {
    .property-grid-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .property-grid-columns-3,
    .property-grid-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .property-grid {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .property-grid-columns-2,
    .property-grid-columns-3,
    .property-grid-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .property-grid {
        gap: 15px;
    }
}

/* Property Grid Item */
.property-grid-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.property-grid-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.property-grid-item-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Property Image */
.property-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.property-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.property-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.property-grid-item:hover .property-image img {
    opacity: 0.9;
}

/* Property Badge */
.property-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Property Content */
.property-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Property Info Line */
.property-info-line {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 400;
}

/* Property Title */
.property-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
}

.property-title a {
    color: #1d2327;
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-title a:hover {
    color: #2271b1;
}

/* Property Price */
.property-price {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
}

.property-price .woocommerce-Price-amount {
    font-size: 20px;
}

/* Property Features */
.property-features {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
    flex-wrap: wrap;
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Iconos de características - Soporte para SVG, Emoji, Dashicons e Imágenes */
.property-feature .feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
}

/* SVG inline */
.property-feature .feature-svg-icon {
    width: 20px;
    height: 20px;
    color: #666;
    flex-shrink: 0;
}

/* Imágenes SVG subidas */
.property-feature .feature-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Dashicons de WordPress */
.property-feature .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 1;
    color: #666;
}

/* Emoji */
.property-feature .feature-icon {
    color: inherit;
}

.property-feature .feature-value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    line-height: 1;
}

/* Hover effects */
.property-feature:hover .feature-svg-icon,
.property-feature:hover .dashicons {
    color: #2c3e50;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.property-feature:hover .feature-icon-img {
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.property-feature:hover .feature-value {
    color: #000;
    transition: color 0.2s ease;
}

/* Responsive para features */
@media (max-width: 768px) {
    .property-features {
        gap: 12px;
        padding-top: 10px;
    }
    
    .property-feature {
        gap: 5px;
        font-size: 13px;
    }
    
    .property-feature .feature-svg-icon {
        width: 18px;
        height: 18px;
    }
    
    .property-feature .feature-value {
        font-size: 14px;
    }
}

/* Pagination */
.property-grid-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.property-grid-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #1d2327;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.property-grid-pagination .page-numbers:hover {
    background: #f0f0f1;
    border-color: #2271b1;
    color: #2271b1;
}

.property-grid-pagination .page-numbers.current {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.property-grid-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* No Results */
.property-grid-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.property-grid-no-results p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Single Column Adjustments */
.property-grid-columns-1 .property-grid-item {
    max-width: 800px;
    margin: 0 auto;
}

.property-grid-columns-1 .property-grid-item-inner {
    flex-direction: row;
}

.property-grid-columns-1 .property-image {
    width: 40%;
    padding-top: 0;
    min-height: 300px;
}

.property-grid-columns-1 .property-content {
    width: 60%;
    padding: 30px;
}

.property-grid-columns-1 .property-title {
    font-size: 22px;
}

.property-grid-columns-1 .property-price {
    font-size: 28px;
}

@media (max-width: 768px) {
    .property-grid-columns-1 .property-grid-item-inner {
        flex-direction: column;
    }
    
    .property-grid-columns-1 .property-image {
        width: 100%;
        padding-top: 66.67%;
        min-height: 0;
    }
    
    .property-grid-columns-1 .property-content {
        width: 100%;
        padding: 20px;
    }
}
