.avs-immobili-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
    margin: 25px 0;
}
.avs-immobile-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,.07);
}
.avs-card-image {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f1f1f1;
}
.avs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avs-no-image {
    display:flex;
    align-items:center;
    justify-content:center;
    height:100%;
    color:#777;
}
.avs-card-body { padding: 20px; }
.avs-card-body h3 { margin: 8px 0 10px; font-size: 1.25rem; }
.avs-card-body h3 a { text-decoration: none; }
.avs-badge {
    display:inline-block;
    padding:5px 10px;
    border-radius:999px;
    background:#f0f0f0;
    font-size:.8rem;
    font-weight:700;
}
.avs-price { font-size:1.35rem; font-weight:800; margin:8px 0; }
.avs-features { display:flex; gap:12px; flex-wrap:wrap; color:#555; font-size:.92rem; }
.avs-button {
    display:inline-block;
    margin-top:10px;
    padding:10px 16px;
    border-radius:6px;
    background:#222;
    color:#fff !important;
    text-decoration:none;
}
.avs-data-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:12px;
    margin:22px 0;
}
.avs-data-grid > div {
    border:1px solid #e4e4e4;
    border-radius:8px;
    padding:12px;
    background:#fff;
}
.avs-data-grid strong,
.avs-data-grid span { display:block; }
.avs-data-grid span { margin-top:4px; }
.avs-feature-list {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin:20px 0;
}
.avs-feature-list span {
    border:1px solid #ddd;
    border-radius:999px;
    padding:7px 12px;
}
.avs-map {
    margin:28px 0;
    border-radius:12px;
    overflow:hidden;
}
.avs-map iframe {
    width:100%;
    min-height:420px;
    border:0;
    display:block;
}
.avs-pagination ul {
    display:flex;
    gap:8px;
    list-style:none;
    padding:0;
}
.avs-pagination a,
.avs-pagination span {
    display:block;
    padding:8px 12px;
    border:1px solid #ddd;
    text-decoration:none;
}
@media (max-width:600px) {
    .avs-immobili-grid { grid-template-columns:1fr; }
    .avs-map iframe { min-height:320px; }
}

.avs-property-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}
.avs-property-gallery a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: #f2f2f2;
}
.avs-property-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}
.avs-property-gallery a:hover img {
    transform: scale(1.025);
}
@media (max-width: 700px) {
    .avs-property-gallery {
        grid-template-columns: 1fr;
    }
}

.avs-gallery-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avs-main-photo {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
}
.avs-main-photo img {
    width: 100%;
    height: auto;
    display: block;
}

/* AVS 0.4.2 - Ridimensionamento uniforme fotografie */
.avs-main-photo {
    max-width: 1100px;
    margin: 22px auto;
    background: #f3f3f3;
}

.avs-main-photo img {
    width: 100%;
    height: clamp(300px, 52vw, 560px);
    object-fit: cover;
    object-position: center;
}

.avs-property-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.avs-property-gallery a {
    aspect-ratio: 4 / 3;
    max-height: 270px;
}

.avs-property-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.avs-card-image {
    height: 245px;
    aspect-ratio: auto;
}

.avs-card-image img,
.avs-card-image .avs-gallery-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    .avs-property-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .avs-main-photo img {
        height: clamp(280px, 58vw, 480px);
    }
}

@media (max-width: 600px) {
    .avs-property-gallery {
        grid-template-columns: 1fr;
    }

    .avs-property-gallery a {
        max-height: none;
    }

    .avs-main-photo img {
        height: 320px;
    }

    .avs-card-image {
        height: 220px;
    }
}

/* AVS 0.5.0 - Widget ricerca immobili */
.avs-search-widget-box {
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 18px rgba(0,0,0,.07);
    margin-bottom: 24px;
}

.avs-search-title {
    margin: 0 0 18px;
    font-size: 1.3rem;
}

.avs-property-search-form {
    display: block;
}

.avs-search-field {
    margin-bottom: 14px;
}

.avs-search-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: .92rem;
}

.avs-search-field input,
.avs-search-field select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
    box-sizing: border-box;
}

.avs-search-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.avs-search-submit {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 6px;
    padding: 10px 15px;
    background: #222;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.avs-search-submit:hover {
    opacity: .9;
}

.avs-search-reset {
    display: block;
    text-align: center;
    margin-top: 11px;
    font-size: .9rem;
}

.avs-search-results-heading {
    padding: 14px 16px;
    margin: 0 0 20px;
    border-left: 4px solid #222;
    background: #f5f5f5;
}

@media (max-width: 420px) {
    .avs-search-two-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* AVS 0.5.1 - Ricerca orizzontale compatta */
.avs-search-compact-box {
    width: 100%;
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    box-sizing: border-box;
}

.avs-search-compact-title {
    margin: 0 0 12px;
    font-size: 1.2rem;
}

.avs-property-search-compact {
    display: grid;
    grid-template-columns: 1.15fr 1.25fr 1.25fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.avs-compact-field {
    min-width: 0;
}

.avs-compact-field label {
    display: block;
    margin: 0 0 4px;
    font-size: .82rem;
    font-weight: 600;
}

.avs-compact-field input,
.avs-compact-field select {
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 7px 9px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    box-sizing: border-box;
    font-size: .92rem;
}

.avs-compact-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.avs-property-search-compact .avs-search-submit {
    width: auto;
    min-width: 92px;
    min-height: 42px;
    height: 42px;
    padding: 7px 16px;
}

.avs-search-reset-compact {
    margin: 0;
    white-space: nowrap;
    font-size: .82rem;
}

@media (max-width: 900px) {
    .avs-property-search-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .avs-compact-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .avs-property-search-compact {
        grid-template-columns: 1fr;
    }

    .avs-compact-actions {
        grid-column: auto;
    }

    .avs-property-search-compact .avs-search-submit {
        flex: 1;
    }
}





/* AVS 0.5.6 - Campi numerici larghi come Comune e Tipologia */
.widget_avs_gi_search .avs-search-field-wide {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.widget_avs_gi_search .avs-search-field-wide input[type="number"] {
    display: block;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 44px;
    padding: 8px 10px;
    margin: 0;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: .92rem;
    appearance: textfield;
    -moz-appearance: textfield;
}

.widget_avs_gi_search .avs-search-field-wide input[type="number"]::-webkit-inner-spin-button,
.widget_avs_gi_search .avs-search-field-wide input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.widget_avs_gi_search .avs-search-field-wide label {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}


/* AVS 0.5.7 - Campi ricerca sidebar uguali a Comune e Tipologia */
.widget_avs_gi_search .avs-property-search-form .avs-search-field-wide,
.widget_avs_gi_search .avs-property-search-form .avs-search-field-wide input {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

.widget_avs_gi_search .avs-property-search-form .avs-search-field-wide input {
    min-height: 44px !important;
    padding: 8px 10px !important;
    margin: 0 !important;
    border: 1px solid #cfcfcf !important;
    border-radius: 6px !important;
    font-size: .92rem !important;
    background: #fff !important;
}


/* AVS 0.5.8 - Prezzo massimo più largo nella ricerca orizzontale */
.avs-property-search-compact {
    grid-template-columns: 1fr 1.1fr 1.1fr 1.45fr auto;
}

.avs-property-search-compact .avs-compact-price-field {
    min-width: 170px;
}

.avs-property-search-compact .avs-compact-price-field input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 1050px) {
    .avs-property-search-compact {
        grid-template-columns: .95fr 1fr 1fr 1.3fr auto;
    }

    .avs-property-search-compact .avs-compact-price-field {
        min-width: 150px;
    }
}

@media (max-width: 900px) {
    .avs-property-search-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .avs-property-search-compact .avs-compact-price-field {
        min-width: 0;
    }
}


/* AVS 0.5.9 - Ricerca orizzontale compatta su due righe */
.avs-property-search-compact {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: end !important;
}

.avs-property-search-compact > .avs-compact-field:nth-of-type(1),
.avs-property-search-compact > .avs-compact-field:nth-of-type(2),
.avs-property-search-compact > .avs-compact-field:nth-of-type(3) {
    grid-column: span 4 !important;
    min-width: 0 !important;
}

.avs-property-search-compact > .avs-compact-price-field {
    grid-column: span 8 !important;
    min-width: 0 !important;
}

.avs-property-search-compact > .avs-compact-actions {
    grid-column: span 4 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
}

.avs-property-search-compact .avs-compact-price-field input {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    padding: 8px 12px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
}

.avs-property-search-compact .avs-compact-actions .avs-search-submit {
    flex: 1 1 auto !important;
    min-width: 100px !important;
}

@media (max-width: 700px) {
    .avs-property-search-compact > .avs-compact-field:nth-of-type(1),
    .avs-property-search-compact > .avs-compact-field:nth-of-type(2),
    .avs-property-search-compact > .avs-compact-field:nth-of-type(3),
    .avs-property-search-compact > .avs-compact-price-field,
    .avs-property-search-compact > .avs-compact-actions {
        grid-column: 1 / -1 !important;
    }
}


/* AVS 0.6.0 - Ricerca orizzontale su una sola riga */
.avs-property-search-compact {
    display: grid !important;
    grid-template-columns:
        minmax(115px, 0.85fr)
        minmax(135px, 1fr)
        minmax(135px, 1fr)
        minmax(190px, 1.45fr)
        minmax(105px, auto) !important;
    gap: 8px !important;
    align-items: end !important;
}

.avs-property-search-compact > .avs-compact-field:nth-of-type(1),
.avs-property-search-compact > .avs-compact-field:nth-of-type(2),
.avs-property-search-compact > .avs-compact-field:nth-of-type(3),
.avs-property-search-compact > .avs-compact-price-field,
.avs-property-search-compact > .avs-compact-actions {
    grid-column: auto !important;
    min-width: 0 !important;
}

.avs-property-search-compact .avs-compact-price-field {
    min-width: 190px !important;
}

.avs-property-search-compact .avs-compact-price-field input {
    width: 100% !important;
    min-width: 190px !important;
    max-width: none !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
}

.avs-property-search-compact .avs-compact-actions {
    display: flex !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.avs-property-search-compact .avs-compact-actions .avs-search-submit {
    min-width: 78px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.avs-property-search-compact .avs-search-reset-compact {
    font-size: 12px !important;
}

@media (max-width: 980px) {
    .avs-property-search-compact {
        grid-template-columns:
            minmax(105px, 0.8fr)
            minmax(120px, .95fr)
            minmax(120px, .95fr)
            minmax(175px, 1.35fr)
            minmax(95px, auto) !important;
    }

    .avs-property-search-compact .avs-compact-price-field,
    .avs-property-search-compact .avs-compact-price-field input {
        min-width: 175px !important;
    }
}

@media (max-width: 760px) {
    .avs-property-search-compact {
        grid-template-columns: 1fr 1fr !important;
    }

    .avs-property-search-compact > .avs-compact-price-field,
    .avs-property-search-compact > .avs-compact-actions {
        grid-column: 1 / -1 !important;
    }

    .avs-property-search-compact .avs-compact-price-field,
    .avs-property-search-compact .avs-compact-price-field input {
        min-width: 0 !important;
    }
}


/* AVS 0.6.1 - Contatore visite e badge */
.avs-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.avs-highly-viewed-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: #d63638;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.2;
}

.avs-single-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
}

.avs-single-views {
    color: #666;
    font-size: .92rem;
}


/* AVS 0.6.2 - Badge sempre visibile */
.avs-highly-viewed-badge {
    display: inline-flex !important;
    align-items: center;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 2;
}


/* AVS 0.6.3 - Pulsante Visualizza immobile azzurro */
.avs-view-property-button,
.avs-property-card a.avs-view-property-button,
a.avs-view-property-button {
    background: #222 !important;
    background-color: #222 !important;
    color: #ffffff !important;
    border-color: #222 !important;
}

.avs-view-property-button:hover,
.avs-property-card a.avs-view-property-button:hover,
a.avs-view-property-button:hover {
    filter: brightness(0.92);
    color: #ffffff !important;
}


/* AVS 0.6.4 - Correzione definitiva pulsante Visualizza immobile */
.avs-immobili-grid .avs-immobile-card .avs-card-body a.avs-button,
.avs-immobili-grid .avs-immobile-card .avs-card-body a.avs-view-property-button,
.avs-card-body a.avs-button {
    display: inline-block !important;
    background: #2ea3f2 !important;
    background-color: #2ea3f2 !important;
    border: 1px solid #2ea3f2 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.avs-immobili-grid .avs-immobile-card .avs-card-body a.avs-button:hover,
.avs-immobili-grid .avs-immobile-card .avs-card-body a.avs-view-property-button:hover,
.avs-card-body a.avs-button:hover {
    background: #168bd1 !important;
    background-color: #168bd1 !important;
    border-color: #168bd1 !important;
    color: #ffffff !important;
}


/* AVS 0.6.5 - Scelta visualizzazione Box / Elenco */
.avs-view-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    margin: 0 0 14px;
}

.avs-view-toolbar-label {
    margin-right: 3px;
    color: #555;
    font-size: .92rem;
}

.avs-view-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid #cfd6dc;
    border-radius: 6px;
    background: #ffffff;
    color: #333333;
    font: inherit;
    font-size: .9rem;
    line-height: 1;
    cursor: pointer;
}

.avs-view-toggle:hover {
    border-color: #2ea3f2;
    color: #168bd1;
}

.avs-view-toggle.is-active {
    border-color: #2ea3f2;
    background: #2ea3f2;
    color: #ffffff;
}

.avs-view-icon {
    display: inline-grid;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.avs-view-icon-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
}

.avs-view-icon-grid i {
    display: block;
    border: 1.5px solid currentColor;
    border-radius: 1px;
}

.avs-view-icon-list {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 3px;
    padding: 1px 0;
}

.avs-view-icon-list i {
    display: block;
    border-top: 2px solid currentColor;
}

/* Visualizzazione a box */
.avs-immobili-grid.avs-view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

/* Visualizzazione a elenco */
.avs-immobili-grid.avs-view-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.avs-immobili-grid.avs-view-list .avs-immobile-card {
    display: grid;
    grid-template-columns: minmax(260px, 34%) minmax(0, 1fr);
    width: 100%;
}

.avs-immobili-grid.avs-view-list .avs-card-image {
    width: 100%;
    height: 100%;
    min-height: 250px;
    aspect-ratio: auto;
    border-radius: 0;
}

.avs-immobili-grid.avs-view-list .avs-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
}

.avs-immobili-grid.avs-view-list .avs-card-body h3 {
    margin-top: 10px;
    font-size: 1.4rem;
}

.avs-immobili-grid.avs-view-list .avs-price {
    font-size: 1.45rem;
}

.avs-immobili-grid.avs-view-list .avs-card-body > p {
    margin-bottom: 4px;
}

.avs-immobili-grid.avs-view-list .avs-view-property-button {
    margin-top: auto;
}

@media (max-width: 760px) {
    .avs-view-toolbar {
        justify-content: flex-start;
    }

    .avs-immobili-grid.avs-view-list .avs-immobile-card {
        display: block;
    }

    .avs-immobili-grid.avs-view-list .avs-card-image {
        height: 230px;
        min-height: 0;
    }

    .avs-immobili-grid.avs-view-list .avs-card-body {
        padding: 20px;
    }
}

@media (max-width: 420px) {
    .avs-view-toolbar-label {
        display: none;
    }

    .avs-view-toggle {
        flex: 1 1 50%;
    }
}


/* AVS 0.6.6 - Vista Mappa */
.avs-view-icon-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.avs-properties-map {
    display: none;
    width: 100%;
    height: 560px;
    margin: 0 0 20px;
    border: 1px solid #d8dee3;
    border-radius: 8px;
    overflow: hidden;
    background: #eef2f4;
}

.avs-properties-map.is-visible {
    display: block;
}

.avs-map-empty {
    margin: 0 0 20px;
    padding: 16px;
    border: 1px solid #d8dee3;
    border-radius: 8px;
    background: #f7f9fa;
}

.avs-map-popup {
    min-width: 190px;
}

.avs-map-popup img {
    display: block;
    width: 100%;
    height: 115px;
    margin: 0 0 9px;
    border-radius: 5px;
    object-fit: cover;
}

.avs-map-popup strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
    line-height: 1.25;
}

.avs-map-popup-price {
    display: block;
    margin-bottom: 8px;
    color: #168bd1;
    font-weight: 700;
}

.avs-map-popup-link {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 4px;
    background: #2ea3f2;
    color: #ffffff !important;
    text-decoration: none !important;
}

.avs-map-popup-link:hover {
    background: #168bd1;
}

@media (max-width: 760px) {
    .avs-properties-map {
        height: 430px;
    }

    .avs-view-toolbar {
        flex-wrap: wrap;
    }
}


/* AVS 0.6.7 - Stato localizzazione automatica */
.avs-map-empty {
    color: #4b5563;
}


/* AVS 0.6.8 - Riepilogo localizzazione mappa */
.avs-map-empty {
    font-size: .92rem;
}


/* AVS 0.6.9 - Vista iniziale e ordinamento immobili */
.avs-view-toolbar {
    justify-content: space-between !important;
    flex-wrap: wrap;
}

.avs-view-buttons {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.avs-sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avs-sort-control label {
    margin: 0;
    color: #555;
    font-size: .92rem;
    font-weight: 600;
}

.avs-sort-control select {
    min-width: 180px;
    height: 38px;
    padding: 5px 32px 5px 10px;
    border: 1px solid #cfd6dc;
    border-radius: 6px;
    background-color: #ffffff;
    color: #333333;
    font-size: .9rem;
}

.avs-sort-control select:focus {
    border-color: #2ea3f2;
    outline: 2px solid rgba(46, 163, 242, .18);
}

@media (max-width: 760px) {
    .avs-view-toolbar,
    .avs-view-buttons,
    .avs-sort-control {
        width: 100%;
    }

    .avs-sort-control select {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@media (max-width: 430px) {
    .avs-view-buttons .avs-view-toggle {
        flex: 1 1 calc(33.333% - 6px);
        padding-left: 7px;
        padding-right: 7px;
    }
}


/* AVS 0.7.0 - Categoria nella ricerca orizzontale */
.avs-property-search-compact {
    grid-template-columns:
        minmax(105px, .78fr)
        minmax(125px, .95fr)
        minmax(125px, .95fr)
        minmax(125px, .95fr)
        minmax(180px, 1.35fr)
        minmax(96px, auto) !important;
    gap: 7px !important;
}

.avs-property-search-compact > .avs-compact-category-field,
.avs-property-search-compact > .avs-compact-field,
.avs-property-search-compact > .avs-compact-price-field,
.avs-property-search-compact > .avs-compact-actions {
    grid-column: auto !important;
    min-width: 0 !important;
}

.avs-property-search-compact .avs-compact-price-field,
.avs-property-search-compact .avs-compact-price-field input {
    min-width: 180px !important;
}

@media (max-width: 1050px) {
    .avs-property-search-compact {
        grid-template-columns:
            minmax(100px, .75fr)
            minmax(112px, .9fr)
            minmax(112px, .9fr)
            minmax(112px, .9fr)
            minmax(170px, 1.25fr)
            minmax(90px, auto) !important;
        gap: 6px !important;
    }

    .avs-property-search-compact .avs-compact-price-field,
    .avs-property-search-compact .avs-compact-price-field input {
        min-width: 170px !important;
    }
}

@media (max-width: 820px) {
    .avs-property-search-compact {
        grid-template-columns: 1fr 1fr !important;
    }

    .avs-property-search-compact > .avs-compact-price-field,
    .avs-property-search-compact > .avs-compact-actions {
        grid-column: 1 / -1 !important;
    }

    .avs-property-search-compact .avs-compact-price-field,
    .avs-property-search-compact .avs-compact-price-field input {
        min-width: 0 !important;
    }
}


/* AVS 0.7.1 - Slider immobili */
.avs-property-slider {
    position: relative;
    width: 100%;
    margin: 0 0 30px;
}

.avs-slider-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.avs-slider-heading h2 {
    margin: 0;
}

.avs-slider-controls {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.avs-slider-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #2ea3f2;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.avs-slider-arrow:hover {
    background: #168bd1;
}

.avs-slider-arrow:disabled {
    cursor: default;
    opacity: .45;
}

.avs-slider-viewport {
    width: 100%;
    overflow: hidden;
}

.avs-slider-track {
    display: flex;
    column-gap: 18px;
    transition: transform .5s ease;
    will-change: transform;
}

.avs-slider-slide {
    flex: 0 0 280px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dfe4e8;
    border-radius: 9px;
    background: #ffffff;
}

.avs-slider-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eef2f4;
}

.avs-slider-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.avs-slider-slide:hover .avs-slider-image img {
    transform: scale(1.035);
}

.avs-slider-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #6b7280;
    text-align: center;
}

.avs-slider-overlays {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 7px;
}

.avs-slider-contract {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(30, 41, 59, .88);
    color: #ffffff;
    font-size: .78rem;
    font-weight: 700;
}

.avs-slider-content {
    display: flex;
    flex-direction: column;
    min-height: 255px;
    padding: 16px;
}

.avs-slider-category {
    margin-bottom: 5px;
    color: #168bd1;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.avs-slider-content h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    line-height: 1.3;
}

.avs-slider-content h3 a {
    color: inherit;
    text-decoration: none;
}

.avs-slider-location {
    margin-bottom: 8px;
    color: #6b7280;
    font-size: .9rem;
}

.avs-slider-price {
    margin-bottom: 10px;
    color: #168bd1;
    font-size: 1.25rem;
    font-weight: 700;
}

.avs-slider-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 15px;
    color: #555;
    font-size: .86rem;
}

.avs-slider-button {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    padding: 9px 13px;
    border-radius: 5px;
    background: #2ea3f2;
    color: #ffffff !important;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none !important;
}

.avs-slider-button:hover {
    background: #168bd1;
}

.avs-slider-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
}

.avs-slider-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #cfd6dc;
    cursor: pointer;
}

.avs-slider-dot.is-active {
    background: #2ea3f2;
}

@media (max-width: 520px) {
    .avs-slider-arrow {
        width: 36px;
        height: 36px;
    }

    .avs-slider-content {
        min-height: 230px;
    }
}


/* AVS 0.7.2 - Slider compatto */
.avs-slider-content {
    min-height: 0 !important;
    padding: 9px 12px !important;
}

.avs-slider-info-row {
    display: flex;
    align-items: center;
    gap: 8px 12px;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow-x: auto;
    padding-bottom: 1px;
}

.avs-slider-info-row h3 {
    flex: 0 1 auto;
    min-width: 150px;
    max-width: 300px;
    margin: 0 !important;
    overflow: hidden;
    font-size: 1rem !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis;
}

.avs-slider-info-row h3 a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avs-slider-info-row .avs-slider-category,
.avs-slider-info-row .avs-slider-location,
.avs-slider-info-row .avs-slider-price,
.avs-slider-info-row .avs-slider-meta-item {
    flex: 0 0 auto;
    margin: 0 !important;
}

.avs-slider-info-row .avs-slider-category {
    font-size: .76rem !important;
}

.avs-slider-info-row .avs-slider-location,
.avs-slider-info-row .avs-slider-meta-item {
    color: #555;
    font-size: .84rem;
}

.avs-slider-info-row .avs-slider-price {
    color: #168bd1;
    font-size: 1rem !important;
    font-weight: 700;
}

.avs-slider-info-row .avs-slider-button {
    flex: 0 0 auto;
    margin: 0 0 0 auto !important;
    padding: 8px 11px !important;
}

.avs-property-slider[data-visible="1"] .avs-slider-image {
    aspect-ratio: 16 / 7;
}

@media (max-width: 760px) {
    .avs-slider-info-row {
        gap: 7px 10px;
    }

    .avs-slider-info-row h3 {
        min-width: 120px;
        max-width: 220px;
    }

    .avs-property-slider[data-visible="1"] .avs-slider-image {
        aspect-ratio: 16 / 9;
    }
}


/* AVS 0.7.3 - Modulo contatto dettaglio immobile */
.avs-property-contact {
    margin-top: 30px;
    padding: 24px;
    border: 1px solid #dfe5e9;
    border-radius: 10px;
    background: #f8fafb;
}

.avs-contact-heading h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.avs-contact-heading p {
    margin: 0 0 18px;
    color: #5f6870;
}

.avs-contact-property {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 10px;
    border-radius: 7px;
    background: #ffffff;
}

.avs-contact-property-image {
    width: 74px;
    height: 58px;
    flex: 0 0 74px;
    overflow: hidden;
    border-radius: 5px;
}

.avs-contact-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avs-contact-property strong,
.avs-contact-property span {
    display: block;
}

.avs-contact-property span {
    margin-top: 3px;
    color: #66717a;
    font-size: .86rem;
}

.avs-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.avs-contact-grid p {
    margin: 0;
}

.avs-contact-grid .avs-contact-full {
    grid-column: 1 / -1;
}

.avs-contact-form label {
    display: block;
    margin-bottom: 5px;
    color: #27313a;
    font-size: .9rem;
    font-weight: 600;
}

.avs-contact-form input[type="text"],
.avs-contact-form input[type="email"],
.avs-contact-form input[type="tel"],
.avs-contact-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid #cbd3d9;
    border-radius: 5px;
    background: #ffffff;
    color: #222;
    box-sizing: border-box;
    font: inherit;
}

.avs-contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.avs-contact-form input:focus,
.avs-contact-form textarea:focus {
    border-color: #2ea3f2;
    outline: 2px solid rgba(46, 163, 242, .16);
}

.avs-contact-check {
    margin: 14px 0 0;
}

.avs-contact-check label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400;
}

.avs-contact-check input {
    margin-top: 3px;
}

.avs-contact-submit {
    margin-top: 16px;
    padding: 11px 20px;
    border: 0;
    border-radius: 5px;
    background: #2ea3f2;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.avs-contact-submit:hover {
    background: #168bd1;
}

.avs-contact-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.avs-contact-message {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 6px;
}

.avs-contact-success {
    border: 1px solid #79b987;
    background: #edf8ef;
    color: #245d30;
}

.avs-contact-error {
    border: 1px solid #d78b8b;
    background: #fff0f0;
    color: #8a2525;
}

@media (max-width: 780px) {
    .avs-contact-grid {
        grid-template-columns: 1fr;
    }

    .avs-contact-grid .avs-contact-full {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .avs-property-contact {
        padding: 18px;
    }
}


/* AVS 0.7.4 - Vendesi/Affittasi più evidente */
.avs-badge,
.avs-slider-contract {
    padding: 8px 14px !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: .01em;
}

/* Testi informativi slider della stessa dimensione del titolo */
.avs-slider-info-row h3,
.avs-slider-info-row .avs-slider-category,
.avs-slider-info-row .avs-slider-location,
.avs-slider-info-row .avs-slider-price,
.avs-slider-info-row .avs-slider-meta-item {
    font-size: 1rem !important;
    line-height: 1.25 !important;
}

.avs-slider-info-row .avs-slider-category {
    font-weight: 700 !important;
}

.avs-slider-info-row .avs-slider-location,
.avs-slider-info-row .avs-slider-meta-item {
    color: #444 !important;
}

@media (max-width: 600px) {
    .avs-badge,
    .avs-slider-contract {
        padding: 7px 11px !important;
        font-size: .95rem !important;
    }
}


/* AVS 0.7.5 - Zona nello slider e caratteri più grandi */
.avs-slider-info-row h3,
.avs-slider-info-row .avs-slider-category,
.avs-slider-info-row .avs-slider-location,
.avs-slider-info-row .avs-slider-zone,
.avs-slider-info-row .avs-slider-price,
.avs-slider-info-row .avs-slider-meta-item {
    font-size: 17px !important;
    line-height: 1.3 !important;
}

.avs-slider-info-row .avs-slider-zone {
    flex: 0 0 auto;
    margin: 0 !important;
    color: #444 !important;
}

@media (max-width: 600px) {
    .avs-slider-info-row h3,
    .avs-slider-info-row .avs-slider-category,
    .avs-slider-info-row .avs-slider-location,
    .avs-slider-info-row .avs-slider-zone,
    .avs-slider-info-row .avs-slider-price,
    .avs-slider-info-row .avs-slider-meta-item {
        font-size: 16px !important;
    }
}


/* AVS 0.7.6 - Slider: solo tipologia, senza categoria e titolo */
.avs-slider-info-row .avs-slider-type {
    flex: 0 0 auto;
    margin: 0 !important;
    color: #168bd1 !important;
    font-size: 17px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .avs-slider-info-row .avs-slider-type {
        font-size: 16px !important;
    }
}


/* AVS 0.7.7 - Titolo immobile dentro la foto dello slider */
.avs-slider-photo-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    padding: 13px 16px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .82),
        rgba(0, 0, 0, .52),
        rgba(0, 0, 0, 0)
    );
    color: #ffffff;
    font-size: 1.22rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .65);
    box-sizing: border-box;
}

.avs-slider-image:hover .avs-slider-photo-title {
    color: #ffffff;
}

@media (max-width: 600px) {
    .avs-slider-photo-title {
        padding: 11px 13px;
        font-size: 1.05rem;
    }
}


/* AVS 0.7.8 - Frecce dentro la foto e tipologia rimossa */
.avs-slider-image-wrap {
    position: relative;
}

.avs-slider-image-wrap .avs-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(46, 163, 242, .92);
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
}

.avs-slider-image-wrap .avs-slider-prev {
    left: 14px;
}

.avs-slider-image-wrap .avs-slider-next {
    right: 14px;
}

.avs-slider-image-wrap .avs-slider-arrow:hover {
    background: #168bd1;
}

.avs-slider-image-wrap .avs-slider-arrow:disabled {
    display: none;
}

.avs-slider-dots,
.avs-slider-info-row .avs-slider-type {
    display: none !important;
}

@media (max-width: 600px) {
    .avs-slider-image-wrap .avs-slider-arrow {
        width: 38px;
        height: 38px;
        font-size: 26px;
    }

    .avs-slider-image-wrap .avs-slider-prev {
        left: 9px;
    }

    .avs-slider-image-wrap .avs-slider-next {
        right: 9px;
    }
}


/* AVS 0.7.9 - Shortcode categorie immobili */
.avs-category-box {
    margin: 0 0 22px;
    padding: 18px;
    border: 1px solid #dfe5e9;
    border-radius: 8px;
    background: #ffffff;
}

.avs-category-box-title {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2ea3f2;
    font-size: 1.2rem;
}

.avs-category-total {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-bottom: 13px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #f1f8fd;
    color: #26333d;
}

.avs-category-total strong {
    color: #168bd1;
    font-size: 1.35rem;
}

.avs-category-total span {
    font-size: .9rem;
}

.avs-category-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.avs-category-list li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #edf0f2;
}

.avs-category-list li:last-child {
    border-bottom: 0;
}

.avs-category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 2px;
    color: #27313a;
    text-decoration: none;
}

.avs-category-list a:hover {
    color: #168bd1;
}

.avs-category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 29px;
    height: 25px;
    padding: 0 7px;
    border-radius: 999px;
    background: #2ea3f2;
    color: #ffffff;
    font-size: .8rem;
    font-weight: 700;
}

.avs-category-empty {
    margin: 0;
    color: #66717a;
    font-size: .9rem;
}


/* AVS 0.8.1 - Categorie sempre visibili, anche con conteggio zero */
.avs-category-count {
    min-width: 31px;
}

.avs-category-list li a[href*="avs_categoria"] {
    cursor: pointer;
}


/* AVS 0.8.2 - Video sotto la descrizione dell'immobile */
.avs-property-videos {
    margin: 24px 0 28px;
}
.avs-property-videos h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}
.avs-property-videos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
.avs-property-video {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}
.avs-property-video iframe,
.avs-property-video video,
.avs-property-video .wp-video {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
}
.avs-property-video iframe {
    aspect-ratio: 16 / 9;
    height: auto !important;
    min-height: 280px;
    border: 0;
}
.avs-property-video-link a {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    background: #2ea3f2;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}
@media (max-width: 600px) {
    .avs-property-video iframe { min-height: 200px; }
}


/* AVS 0.8.3 - Correzione video incorporati e link cliccabili */
.avs-property-video-card {
    width: 100%;
}

.avs-property-video iframe {
    display: block;
    width: 100% !important;
    min-height: 300px;
    aspect-ratio: 16 / 9;
}

.avs-property-video-link {
    margin: 10px 0 0;
}

.avs-property-video-link a {
    position: relative;
    z-index: 2;
    display: inline-block;
    pointer-events: auto;
}

@media (max-width: 600px) {
    .avs-property-video iframe {
        min-height: 210px;
    }
}


/* AVS 0.8.5 - Ricerca adattiva nelle colonne strette del tema */
.avs-search-compact-box {
    container-type: inline-size;
    container-name: avs-search-box;
}

/*
 * La pagina può essere divisa dal tema in contenuto + sidebar.
 * Queste regole reagiscono alla larghezza effettiva del modulo,
 * non soltanto alla larghezza dello schermo.
 */
@container avs-search-box (max-width: 900px) {
    .avs-property-search-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .avs-property-search-compact > .avs-compact-field,
    .avs-property-search-compact > .avs-compact-price-field {
        grid-column: auto !important;
        min-width: 0 !important;
    }

    .avs-property-search-compact > .avs-compact-actions {
        grid-column: 1 / -1 !important;
        justify-content: flex-start !important;
    }

    .avs-property-search-compact .avs-compact-price-field,
    .avs-property-search-compact .avs-compact-price-field input {
        min-width: 0 !important;
        width: 100% !important;
    }

    .avs-property-search-compact .avs-compact-actions .avs-search-submit {
        flex: 0 1 180px !important;
    }
}

@container avs-search-box (max-width: 560px) {
    .avs-property-search-compact {
        grid-template-columns: 1fr !important;
    }

    .avs-property-search-compact > .avs-compact-field,
    .avs-property-search-compact > .avs-compact-price-field,
    .avs-property-search-compact > .avs-compact-actions {
        grid-column: 1 / -1 !important;
    }

    .avs-property-search-compact .avs-compact-actions {
        align-items: center !important;
    }

    .avs-property-search-compact .avs-compact-actions .avs-search-submit {
        flex: 1 1 auto !important;
    }
}

/* Compatibilità per browser che non applicano ancora le container query */
@supports not (container-type: inline-size) {
    @media (max-width: 1180px) {
        .avs-property-search-compact {
            grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        }

        .avs-property-search-compact > .avs-compact-actions {
            grid-column: 1 / -1 !important;
        }

        .avs-property-search-compact .avs-compact-price-field,
        .avs-property-search-compact .avs-compact-price-field input {
            min-width: 0 !important;
        }
    }
}

/* Evita che i contenitori interni del tema comprimano lo shortcode */
.avs-search-compact-box,
.avs-property-search-compact,
.avs-immobili-grid,
.avs-results-toolbar {
    max-width: none !important;
    box-sizing: border-box !important;
}


/* AVS 0.8.6 - Ricerca più compatta e senza cornice nera */
.avs-search-compact-box,
.avs-property-search,
.avs-property-search-compact {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* Mantiene il contenitore pulito senza occupare troppo spazio */
.avs-search-compact-box {
    padding: 14px !important;
    background: #f7f9fa !important;
    border-radius: 7px !important;
}

/* Prezzo massimo più stretto rispetto agli altri campi */
.avs-property-search-compact {
    grid-template-columns:
        minmax(105px, .85fr)
        minmax(115px, 1fr)
        minmax(115px, 1fr)
        minmax(115px, 1fr)
        minmax(90px, .65fr)
        auto !important;
    gap: 9px !important;
    align-items: end !important;
}

.avs-property-search-compact .avs-compact-price-field {
    width: 110px !important;
    min-width: 90px !important;
    max-width: 120px !important;
}

.avs-property-search-compact .avs-compact-price-field input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 120px !important;
}

/* Riduce leggermente altezza e spazi interni */
.avs-property-search-compact select,
.avs-property-search-compact input {
    min-height: 39px !important;
    padding: 7px 9px !important;
}

.avs-property-search-compact .avs-compact-actions {
    gap: 7px !important;
}

.avs-property-search-compact .avs-search-submit {
    min-height: 39px !important;
    padding: 8px 15px !important;
}

/* Nella colonna più stretta mantiene due righe compatte */
@container avs-search-box (max-width: 900px) {
    .avs-property-search-compact {
        grid-template-columns:
            repeat(3, minmax(115px, 1fr))
            minmax(90px, 110px) !important;
    }

    .avs-property-search-compact .avs-compact-price-field {
        width: 100% !important;
        max-width: 110px !important;
    }

    .avs-property-search-compact > .avs-compact-actions {
        grid-column: auto !important;
        align-self: end !important;
    }
}

@container avs-search-box (max-width: 680px) {
    .avs-property-search-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .avs-property-search-compact .avs-compact-price-field {
        width: 100% !important;
        max-width: none !important;
    }

    .avs-property-search-compact > .avs-compact-actions {
        grid-column: 1 / -1 !important;
    }
}

@container avs-search-box (max-width: 480px) {
    .avs-property-search-compact {
        grid-template-columns: 1fr !important;
    }
}


/* AVS 0.8.7 - Ricerca sempre su una riga, campi più stretti */
.avs-search-compact-box,
.avs-search-compact-box form,
.avs-search-compact-box fieldset,
.avs-property-search,
.avs-property-search-compact,
.avs-property-search-compact fieldset {
    border: 0 !important;
    border-color: transparent !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.avs-search-compact-box {
    padding: 10px !important;
    background: transparent !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

.avs-property-search-compact {
    display: grid !important;
    grid-template-columns:
        minmax(88px, .75fr)
        minmax(100px, .9fr)
        minmax(100px, .9fr)
        minmax(105px, .95fr)
        minmax(82px, .62fr)
        auto !important;
    gap: 6px !important;
    align-items: end !important;
    width: 100% !important;
}

.avs-property-search-compact > * {
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    grid-column: auto !important;
}

.avs-property-search-compact label {
    font-size: 11px !important;
    line-height: 1.1 !important;
    margin-bottom: 3px !important;
    white-space: nowrap !important;
}

.avs-property-search-compact select,
.avs-property-search-compact input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 5px 7px !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
}

.avs-property-search-compact .avs-compact-price-field,
.avs-property-search-compact .avs-compact-price-field input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}

.avs-property-search-compact .avs-compact-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    align-items: end !important;
    justify-content: flex-start !important;
    white-space: nowrap !important;
}

.avs-property-search-compact .avs-search-submit,
.avs-property-search-compact .avs-search-reset {
    min-height: 36px !important;
    height: 36px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

/* Mantiene una riga anche nella colonna stretta del tema */
@container avs-search-box (max-width: 900px) {
    .avs-property-search-compact {
        grid-template-columns:
            minmax(78px, .72fr)
            minmax(90px, .85fr)
            minmax(90px, .85fr)
            minmax(96px, .9fr)
            minmax(76px, .6fr)
            auto !important;
        gap: 5px !important;
    }

    .avs-property-search-compact > *,
    .avs-property-search-compact > .avs-compact-actions {
        grid-column: auto !important;
    }

    .avs-property-search-compact label {
        font-size: 10px !important;
    }

    .avs-property-search-compact select,
    .avs-property-search-compact input,
    .avs-property-search-compact .avs-search-submit,
    .avs-property-search-compact .avs-search-reset {
        font-size: 11px !important;
    }
}

/* Solo su smartphone vero passa su due colonne */
@container avs-search-box (max-width: 560px) {
    .avs-property-search-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .avs-property-search-compact > .avs-compact-actions {
        grid-column: 1 / -1 !important;
    }
}

/* Rimuove anche eventuali bordi neri imposti dal tema alla pagina listings */
body.post-type-archive-avs_immobile .avs-search-compact-box,
body.post-type-archive-avs_immobile .avs-property-search-compact,
body.page .avs-search-compact-box,
body.page .avs-property-search-compact {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}


/* AVS 0.8.8 - Cornice leggerissima del modulo ricerca */
.avs-search-compact-box {
    border: 1px solid #e7ecef !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    outline: none !important;
}

.avs-search-compact-box form,
.avs-search-compact-box fieldset,
.avs-property-search,
.avs-property-search-compact {
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}


/* AVS 0.9.1 - Filigrana visiva */
.avs-watermark-enabled .avs-watermark-ready{position:relative!important;overflow:hidden!important;isolation:isolate}
.avs-watermark-enabled .avs-watermark-ready::after{content:"";position:absolute;z-index:4;width:var(--avs-watermark-size,16%);aspect-ratio:1/1.35;background-image:var(--avs-watermark-image);background-repeat:no-repeat;background-position:center;background-size:contain;opacity:var(--avs-watermark-opacity,.28);pointer-events:none;filter:drop-shadow(0 1px 2px rgba(255,255,255,.25))}
.avs-watermark-bottom-right .avs-watermark-ready::after{right:3%;bottom:4%}.avs-watermark-bottom-left .avs-watermark-ready::after{left:3%;bottom:4%}.avs-watermark-top-right .avs-watermark-ready::after{right:3%;top:4%}.avs-watermark-top-left .avs-watermark-ready::after{left:3%;top:4%}.avs-watermark-center .avs-watermark-ready::after{left:50%;top:50%;transform:translate(-50%,-50%)}
.avs-watermark-enabled .avs-watermark-ready>img,.avs-watermark-enabled .avs-watermark-ready picture{position:relative;z-index:1}
@media(max-width:600px){.avs-watermark-enabled .avs-watermark-ready::after{width:max(14%,52px)}}


/* AVS 0.10.0 - Immobili in evidenza e ultimi inserimenti */
.avs-compact-properties {
    width: 100%;
    margin: 0 0 24px;
}

.avs-compact-title {
    margin: 0 0 14px;
    padding-bottom: 9px;
    border-bottom: 2px solid currentColor;
    font-size: 20px;
    line-height: 1.25;
}

.avs-compact-list {
    display: grid;
    gap: 14px;
}

.avs-compact-layout-verticale .avs-compact-list {
    grid-template-columns: minmax(0, 1fr);
}

.avs-compact-layout-griglia .avs-compact-list {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.avs-compact-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e3e6e8;
    border-radius: 7px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.avs-compact-layout-verticale .avs-compact-image {
    flex: 0 0 112px;
    width: 112px;
    min-height: 105px;
}

.avs-compact-layout-griglia .avs-compact-card {
    display: block;
}

.avs-compact-layout-griglia .avs-compact-image {
    display: block;
    width: 100%;
    height: 150px;
}

.avs-compact-image {
    display: block;
    overflow: hidden;
    background: #eef1f3;
}

.avs-compact-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.avs-compact-no-image {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    font-size: 12px;
}

.avs-compact-body {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
}

.avs-compact-body h4 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.3;
}

.avs-compact-body h4 a {
    color: inherit;
    text-decoration: none;
}

.avs-compact-location {
    margin-bottom: 6px;
    color: #666;
    font-size: 12px;
}

.avs-compact-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 12px;
    margin-bottom: 6px;
    font-size: 13px;
}

.avs-compact-price {
    font-size: 14px;
}

.avs-compact-body p {
    margin: 7px 0;
    font-size: 13px;
    line-height: 1.45;
}

.avs-compact-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.avs-compact-empty {
    margin: 0;
    padding: 12px;
    background: #f7f7f7;
    border-radius: 6px;
}

@media (max-width: 480px) {
    .avs-compact-layout-verticale .avs-compact-card {
        display: block;
    }

    .avs-compact-layout-verticale .avs-compact-image {
        width: 100%;
        height: 170px;
    }
}


/* AVS 0.10.1 - Notizie mutui */
.avs-mortgage-news {
    width: 100%;
    margin: 0 0 24px;
    padding: 20px;
    background: #eef7fb;
    border: 1px solid #cfe3ed;
    border-radius: 12px;
}

.avs-mortgage-news-title {
    margin: 0 0 15px;
    padding-bottom: 10px;
    color: #073f73;
    font-size: 21px;
    line-height: 1.25;
    border-bottom: 2px solid #f4b723;
}

.avs-mortgage-news-list {
    display: grid;
    gap: 14px;
}

.avs-mortgage-news-item {
    padding: 14px 0;
    border-bottom: 1px solid #d8e8ef;
}

.avs-mortgage-news-item:first-child {
    padding-top: 0;
}

.avs-mortgage-news-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.avs-mortgage-news-date {
    margin-bottom: 4px;
    color: #6b7c85;
    font-size: 12px;
}

.avs-mortgage-news-item h4 {
    margin: 0 0 7px;
    font-size: 16px;
    line-height: 1.35;
}

.avs-mortgage-news-item h4 a {
    color: #073f73;
    text-decoration: none;
}

.avs-mortgage-news-item p {
    margin: 0 0 8px;
    color: #536b77;
    font-size: 14px;
    line-height: 1.55;
}

.avs-mortgage-news-link,
.avs-mortgage-news-source a {
    color: #0b69a8;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.avs-mortgage-news-source {
    margin-top: 16px;
    padding-top: 12px;
    text-align: center;
    border-top: 1px solid #d8e8ef;
}

.avs-mortgage-news-error {
    padding: 13px;
    color: #5f6870;
    font-size: 14px;
    line-height: 1.5;
    background: #ffffff;
    border: 1px solid #dfe7eb;
    border-radius: 8px;
}
