/* --- Form e Filtri (Stili precedenti mantenuti e ottimizzati) --- */
#fcz-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

#fcz-filter-form select, .fcz-vantaggi-toggle {
    width: 100%;
    padding: 10px 12px;
    min-height: 52px; /* Altezza fissa per allineamento */
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: #fff;
    box-sizing: border-box;
}

/* Pannello Vantaggi */
.fcz-vantaggi-wrapper { position: relative; }
.fcz-vantaggi-toggle { cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.fcz-vantaggi-panel {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0; right: 0;
    background: #fff; border: 1px solid #ddd;
    border-radius: 8px; padding: 12px;
    max-height: 250px; overflow-y: auto;
    z-index: 20; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.fcz-vantaggi-panel.open { display: grid; gap: 8px; }
.fcz-vantaggi-panel label { display: flex; gap: 8px; font-size: 14px; cursor: pointer; align-items: center; }

/* Tag attivi */
#fcz-active-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.fcz-tag {
    background: #eef6fb; color: #0073aa; border: 1px solid #bce0f5;
    border-radius: 20px; padding: 4px 12px; font-size: 13px;
    display: inline-flex; align-items: center; gap: 8px;
}
.fcz-remove-tag { cursor: pointer; color: #cc0000; font-weight: bold; font-size: 16px; }

/* --- NUOVA GRIGLIA RISULTATI --- */

.fcz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.fcz-item {
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fcz-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

/* Immagine */
.fcz-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%; /* Aspect Ratio 16:9 approx */
    background: #f4f4f4;
    overflow: hidden;
}

.fcz-img-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.fcz-item:hover .fcz-img-wrapper img {
    transform: scale(1.05);
}

/* Badge Zona/Quartiere */
.fcz-location-badge {
    position: absolute;
    bottom: 10px; left: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex; gap: 4px;
}

.fcz-loc-sep { color: #ccc; }
.fcz-loc-quartiere { color: #0073aa; }

/* Contenuto */
.fcz-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.fcz-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    line-height: 1.3;
}

.fcz-content h3 a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.2s;
}

.fcz-content h3 a:hover { color: #0073aa; }

/* Caratteristiche Pillole */
.fcz-features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.fcz-feat-pill {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f0f0f0;
    color: #666;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Excerpt */
.fcz-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1; /* Spinge il bottone in basso */
}

/* Bottone */
.fcz-btn-details {
    display: inline-block;
    text-align: center;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: auto; /* Si ancora al fondo */
}

.fcz-btn-details:hover {
    background: #005177;
    color: #fff;
}

/* Loading Overlay */
.fcz-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.8);
    z-index: 10;
}