#card-annuncio>a {
    display: block;
    width: 100%;
    height: 100%;
}

#card-annuncio .annuncio {
    background: #f2f2f2;
    border-radius: 10px;
    height: 450px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#card-annuncio .thumbnail {
    margin-bottom: 10px;
    height: 300px;
    position: relative;
}

#card-annuncio .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#card-annuncio .annuncio p {
    font-size: 0.75rem;
    margin-bottom: 0;
}

#card-annuncio .subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    margin-bottom: 5px;
}

#card-annuncio .specifiche {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 5px;
    margin-top: 8px;
    min-height: 45px;
}

#card-annuncio .price {
    margin-top: 8px;
    font-weight: bold;
}

#card-annuncio .immo_status {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    background-color: #262D3F;
    padding: 10px;
    text-transform: uppercase;
    color: #fff;
    font-weight: 700;
}

/* ============================================================
   Card compatta per il popup Leaflet della mappa
   (template-parts/card-annuncio-map.php)
   ============================================================ */
.map-card-popup .leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 10px;
    overflow: hidden;
}

.map-card-popup .leaflet-popup-content {
    margin: 0 !important;
    width: 290px !important;
}

.map-card-popup .leaflet-popup-content-wrapper,
.map-card-popup .leaflet-popup-tip {
    background: #f2f2f2;
}

.map-card-annuncio {
    display: block;
    width: 290px;
    text-decoration: none;
    color: #000;
    box-sizing: border-box;
}

.map-card-annuncio .annuncio {
    background: #f2f2f2;
    border-radius: 10px;
    padding: 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.map-card-annuncio .thumbnail {
    position: relative;
    height: 150px;
    margin-bottom: 4px !important;
    border-radius: 8px;
    overflow: hidden;
}

.map-card-annuncio .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-card-annuncio .annuncio p {
    font-size: 0.7rem;
    margin-bottom: 0 !important;
    color: #000;
    line-height: 1.25;
    margin-top: 10px;
}

.map-card-annuncio .subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    margin-bottom: 2px !important;
}

.map-card-annuncio .truncateText {
    max-height: 18px !important;
    line-height: 18px;
}

.map-card-annuncio .title-subtitle {
    margin-top: 10px !important;
}

.map-card-annuncio .specifiche {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 2px !important;
    margin-top: 1px !important;
    min-height: 0 !important;
}

.map-card-annuncio .price {
    margin-top: 2px !important;
    font-weight: bold;
    font-size: 0.85rem;
}

.map-card-annuncio .annuncio .immo_status {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    background-color: #262D3F;
    padding: 4px 0;
    text-transform: uppercase;
    color: #fff;
    font-weight: 700;
    font-size: 0.6rem;
}

/* X di chiusura: ridotta e appena fuori dalla card per occupare meno spazio */
.map-card-popup .leaflet-popup-close-button {
    top: -8px !important;
    right: -8px !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    text-decoration: none !important;
}