/* Frontend Styles */

/* Container */
.smp-properties-container {
    width: 100%;
    margin: 20px 0;
}

/* Section Title */
.smp-section-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

/* Properties Grid */
.smp-properties-grid {
    display: grid;
    gap: 20px;
}

.smp-layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.smp-layout-list {
    grid-template-columns: 1fr;
}

/* Property Card */
.smp-property-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.smp-property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Property Image */
.smp-property-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

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

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

/* Property Content */
.smp-property-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.smp-property-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333333;
    line-height: 1.4;
}

.smp-property-taxonomies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.smp-taxonomy-term {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    color: #555;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: capitalize;
}

.smp-property-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.smp-property-excerpt p {
    margin: 0;
}

/* Property Button */
.smp-property-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #0073aa;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
}

.smp-property-button:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    text-decoration: none;
}

.smp-property-button:active {
    transform: translateY(0);
}

/* Loading State */
.smp-loading {
    text-align: center;
    padding: 60px 20px;
}

.smp-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 115, 170, 0.2);
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: smp-spin 1s linear infinite;
}

@keyframes smp-spin {
    to { transform: rotate(360deg); }
}

.smp-loading p {
    margin-top: 15px;
    color: #666666;
    font-size: 16px;
}

/* Error State */
.smp-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    color: #721c24;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.smp-error p {
    margin: 0;
}

/* No Results */
.smp-no-results {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666666;
}

.smp-no-results p {
    margin: 0;
    font-size: 16px;
}

/* List Layout Specific Styles */
.smp-layout-list .smp-property-card {
    flex-direction: row;
}

.smp-layout-list .smp-property-image {
    width: 300px;
    height: auto;
    min-height: 200px;
    flex-shrink: 0;
}

.smp-layout-list .smp-property-content {
    padding: 30px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .smp-properties-grid.smp-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .smp-layout-list .smp-property-card {
        flex-direction: column;
    }
    
    .smp-layout-list .smp-property-image {
        width: 100%;
        height: 200px;
    }
    
    .smp-section-title {
        font-size: 24px;
    }
}

@media screen and (max-width: 480px) {
    .smp-property-content {
        padding: 15px;
    }
    
    .smp-property-title {
        font-size: 18px;
    }
    
    .smp-property-button {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
    }
}
