/**
 * CSS Personalizzato per Easy Property Listings
 *
 * Stili ottimizzati per sito di intermediazione immobiliare
 * con tema GeneratePress
 *
 * @package GeneratePress_Child_Immobiliare
 * @version 1.0.0
 */

/* ==========================================================================
   0. HERO SECTION
   ========================================================================== */

/* Slogan hero home page */
.slogan {
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
    margin: 0;
    padding: 60px 20px 20px 40px;
}

/* Sottotitolo slogan (opzionale) */
.slogan-sub {
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    margin-top: 1rem;
}

/* Titoli sezione pagine (blocchi Gutenberg) */
h2.wp-block-heading {
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 600;
}

/* ==========================================================================
   1. RESET E BASE EPL
   ========================================================================== */

body {
    background-color: #fff;
    overflow-x: hidden;
}

/* Forza scroll verticale sulla pagina singola immobile */
html,
body,
body.single-property {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.gpc-epl-page {
    background-color: var(--epl-bg-light);
}

.epl-single-property #primary,
.epl-archive-property #primary {
    max-width: 100%;
}

/* ==========================================================================
   2. HEADER ARCHIVIO
   ========================================================================== */

.epl-archive-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--epl-spacing-md);
    padding: var(--epl-spacing-lg) 0;
    margin-bottom: var(--epl-spacing-lg);
    border-bottom: 1px solid var(--epl-border);
}

.epl-archive-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--epl-text);
    margin: 0;
}

.epl-archive-count {
    font-size: 0.95rem;
    color: var(--epl-text-light);
    margin: var(--epl-spacing-xs) 0 0;
}

.epl-archive-controls {
    display: flex;
    align-items: center;
    gap: var(--epl-spacing-md);
}

/* Toggle Vista */
.epl-view-toggle {
    display: flex;
    background: var(--epl-white);
    border: 1px solid var(--epl-border);
    border-radius: var(--epl-radius);
    overflow: hidden;
}

.epl-view-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--epl-text-light);
    transition: all 0.2s ease;
}

.epl-view-btn:hover {
    color: var(--epl-primary);
    background: var(--epl-bg-light);
}

.epl-view-btn.active {
    color: var(--epl-white);
    background: var(--epl-primary);
}

.epl-view-btn svg {
    display: block;
}

/* ==========================================================================
   3. GRIGLIA IMMOBILI
   ========================================================================== */

.epl-archive-grid,
.epl-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--epl-spacing-lg);
}

/* Vista Lista */
.epl-archive-grid.epl-list-view {
    grid-template-columns: 1fr;
}

.epl-list-view .epl-listing-post {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--epl-spacing-md);
}

.epl-list-view .epl-listing-post .epl-property-image {
    height: 220px;
}

/* ==========================================================================
   4. CARD IMMOBILE
   ========================================================================== */

.epl-listing-post,
.epl-property-blog {
    background: var(--epl-white);
    border-radius: var(--epl-radius-lg);
    overflow: hidden;
    box-shadow: var(--epl-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* Immobiliare.it: tutta la card cliccabile */
}

.epl-listing-post:hover,
.epl-property-blog:hover {
    box-shadow: var(--epl-shadow-hover);
}

/* Contenitore prezzo con località */
.epl-property-blog .price,
.epl-listing-post .price {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Località prima del prezzo */
.epl-locality {
    order: -1; /* Mette la località prima del prezzo */
    font-size: 16px;
    font-weight: 600;
    color: #5a4a3a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #fdf6e9;
    padding: 10px 14px;
    margin-bottom: 10px;
    border: 2px solid #d4a853;
    border-radius: 8px;
    box-sizing: border-box;
}

.epl-locality::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a853' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Immagine proprietà */
.epl-property-image,
.epl-listing-post .epl-blog-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.epl-property-image img,
.epl-listing-post .epl-blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Rimosso effetto zoom hover sulle immagini */

/* Badge stato */
.epl-status-badge,
.epl-property-status {
    position: absolute;
    top: var(--epl-spacing-sm);
    left: var(--epl-spacing-sm);
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--epl-radius);
    z-index: 2;
}

.epl-status-badge.epl-status-available,
.epl-property-status.property_status_current {
    background: var(--epl-success);
    color: var(--epl-white);
}

.epl-status-badge.epl-status-sold,
.epl-property-status.property_status_sold {
    background: var(--epl-danger);
    color: var(--epl-white);
}

.epl-status-badge.epl-status-leased,
.epl-property-status.property_status_leased {
    background: var(--epl-primary);
    color: var(--epl-white);
}

.epl-status-badge.epl-status-withdrawn,
.epl-status-badge.epl-status-offmarket {
    background: var(--epl-text-light);
    color: var(--epl-white);
}

/* Badge in evidenza */
.epl-badge-featured,
.property_featured {
    position: absolute;
    top: var(--epl-spacing-sm);
    right: var(--epl-spacing-sm);
    background: var(--epl-accent);
    color: var(--epl-white);
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--epl-radius);
    z-index: 2;
}

/* Badge nuovo */
.epl-badge-new {
    background: var(--epl-primary-light);
    color: var(--epl-white);
}

/* Contenuto card */
.epl-property-content,
.epl-listing-post .epl-blog-entry {
    padding: var(--epl-spacing-md);
}

/* Titolo proprietà */
.epl-property-title,
.epl-listing-post .entry-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--epl-text);
    margin: 0 0 var(--epl-spacing-xs);
    line-height: 1.4;
}

.epl-property-title a,
.epl-listing-post .entry-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.epl-property-title a:hover,
.epl-listing-post .entry-title a:hover {
    color: var(--epl-primary);
}

/* Indirizzo */
.epl-property-address,
.epl-listing-address {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--epl-text-light);
    margin-bottom: var(--epl-spacing-sm);
}

.epl-property-address .epl-icon {
    flex-shrink: 0;
    color: var(--epl-primary);
}

/* Prezzo */
.epl-property-price,
.epl-listing-price,
.epl-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--epl-primary);
    margin: var(--epl-spacing-sm) 0;
}

/* Caratteristiche (icone) */
.epl-property-icons,
.epl-listing-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--epl-spacing-md);
    padding-top: var(--epl-spacing-sm);
    border-top: 1px solid var(--epl-border);
    margin-top: var(--epl-spacing-sm);
}

.epl-icon-item,
.epl-property-icons > span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--epl-text-light);
}

.epl-icon-item svg,
.epl-property-icons .dashicons {
    color: var(--epl-primary);
}

/* ==========================================================================
   5. PAGINA SINGOLA IMMOBILE
   ========================================================================== */

.epl-single-listing {
    background: var(--epl-white);
    border-radius: var(--epl-radius-lg);
    overflow: hidden;
    box-shadow: var(--epl-shadow);
}

/* Header */
.epl-listing-header {
    background: linear-gradient(135deg, var(--epl-primary-dark) 0%, var(--epl-primary) 100%);
    color: var(--epl-white);
    padding: var(--epl-spacing-xl) var(--epl-spacing-lg);
}

.epl-listing-header-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--epl-spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.epl-listing-title-wrap {
    flex: 1;
    min-width: 280px;
}

.epl-listing-header .epl-status-badge {
    position: static;
    display: inline-block;
    margin-bottom: var(--epl-spacing-sm);
}

.epl-listing-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 var(--epl-spacing-xs);
    color: var(--epl-white);
}

.epl-listing-header .epl-listing-address {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

.epl-listing-header .epl-icon {
    color: var(--epl-accent);
}

.epl-listing-price-wrap {
    text-align: right;
}

.epl-listing-price-wrap .epl-listing-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--epl-white);
    margin: 0;
}

/* Galleria */
.epl-listing-gallery {
    max-width: 1200px;
    margin: calc(var(--epl-spacing-xl) * -1) auto var(--epl-spacing-lg);
    padding: 0 var(--epl-spacing-lg);
    position: relative;
    z-index: 1;
}

.epl-listing-gallery img,
.epl-featured-image {
    width: 100%;
    height: auto;
    border-radius: var(--epl-radius-lg);
    box-shadow: var(--epl-shadow-lg);
}

/* Caratteristiche principali */
.epl-single-listing > .epl-listing-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--epl-spacing-lg);
    padding: var(--epl-spacing-lg);
    background: var(--epl-bg-light);
    border-bottom: 1px solid var(--epl-border);
}

.epl-single-listing .epl-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--epl-spacing-sm) var(--epl-spacing-md);
}

.epl-single-listing .epl-icon-item .epl-icon-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--epl-primary);
}

.epl-single-listing .epl-icon-item .epl-icon-label {
    font-size: 0.85rem;
    color: var(--epl-text-light);
    margin-top: 0.25rem;
}

/* Contenuto */
.epl-listing-content {
    padding: var(--epl-spacing-xl) var(--epl-spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.epl-listing-content h2,
.epl-listing-content h3 {
    color: var(--epl-text);
    margin-top: var(--epl-spacing-lg);
    margin-bottom: var(--epl-spacing-sm);
}

.epl-listing-content h2:first-child,
.epl-listing-content h3:first-child {
    margin-top: 0;
}

/* Tabella dettagli */
.epl-property-details-table,
.epl-tab-section table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--epl-spacing-md) 0;
}

.epl-property-details-table tr:nth-child(even),
.epl-tab-section table tr:nth-child(even) {
    background: var(--epl-bg-light);
}

.epl-property-details-table th,
.epl-property-details-table td,
.epl-tab-section table th,
.epl-tab-section table td {
    padding: var(--epl-spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--epl-border);
}

.epl-property-details-table th,
.epl-tab-section table th {
    font-weight: 600;
    color: var(--epl-text);
    width: 40%;
}

/* Box Agente */
.epl-listing-agent-box {
    background: var(--epl-bg-light);
    padding: var(--epl-spacing-xl) var(--epl-spacing-lg);
    border-top: 1px solid var(--epl-border);
}

.epl-agent-box-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--epl-text);
    text-align: center;
    margin: 0 0 var(--epl-spacing-lg);
}

.epl-author-box,
.epl-property-author-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--epl-spacing-lg);
    max-width: 600px;
    margin: 0 auto var(--epl-spacing-lg);
}

.epl-author-box .epl-author-image img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--epl-primary);
}

.epl-author-box .epl-author-details {
    text-align: left;
}

.epl-author-box .epl-author-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--epl-text);
    margin: 0 0 0.25rem;
}

.epl-author-box .epl-author-position {
    font-size: 0.9rem;
    color: var(--epl-text-light);
    margin: 0 0 var(--epl-spacing-xs);
}

.epl-author-box .epl-author-contact a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--epl-primary);
    text-decoration: none;
    margin-right: var(--epl-spacing-sm);
}

.epl-author-box .epl-author-contact a:hover {
    text-decoration: underline;
}

.epl-contact-cta {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.epl-contact-cta p {
    color: var(--epl-text-light);
    margin-bottom: var(--epl-spacing-md);
}

/* ==========================================================================
   6. NAVIGAZIONE TRA PROPRIETÀ
   ========================================================================== */

.epl-listing-navigation {
    display: flex;
    justify-content: space-between;
    gap: var(--epl-spacing-md);
    padding: var(--epl-spacing-lg);
    background: var(--epl-white);
    border-radius: var(--epl-radius-lg);
    margin-top: var(--epl-spacing-lg);
    box-shadow: var(--epl-shadow);
}

.epl-nav-previous,
.epl-nav-next {
    flex: 1;
    max-width: 45%;
}

.epl-nav-next {
    text-align: right;
}

.epl-listing-navigation a {
    display: block;
    text-decoration: none;
    color: var(--epl-text);
    transition: color 0.2s ease;
}

.epl-listing-navigation a:hover {
    color: var(--epl-primary);
}

.epl-nav-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--epl-text-light);
    margin-bottom: 0.25rem;
}

.epl-nav-title {
    font-weight: 600;
    font-size: 1rem;
}

/* ==========================================================================
   7. PAGINAZIONE
   ========================================================================== */

.epl-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--epl-spacing-xl);
    padding: var(--epl-spacing-lg) 0;
}

.epl-pagination .page-numbers,
.epl-pagination a,
.epl-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: var(--epl-radius);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    background: var(--epl-white);
    color: var(--epl-text);
    border: 1px solid var(--epl-border);
}

.epl-pagination .page-numbers:hover,
.epl-pagination a:hover {
    background: var(--epl-primary);
    color: var(--epl-white);
    border-color: var(--epl-primary);
}

.epl-pagination .page-numbers.current,
.epl-pagination span.current {
    background: var(--epl-primary);
    color: var(--epl-white);
    border-color: var(--epl-primary);
}

/* ==========================================================================
   8. STATO "NESSUN RISULTATO"
   ========================================================================== */

.epl-no-results,
.epl-no-listing {
    text-align: center;
    padding: var(--epl-spacing-xl) var(--epl-spacing-lg);
    background: var(--epl-white);
    border-radius: var(--epl-radius-lg);
    box-shadow: var(--epl-shadow);
}

.epl-no-results-icon {
    color: var(--epl-text-light);
    margin-bottom: var(--epl-spacing-md);
}

.epl-no-results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--epl-text);
    margin: 0 0 var(--epl-spacing-sm);
}

.epl-no-results-text {
    color: var(--epl-text-light);
    max-width: 500px;
    margin: 0 auto var(--epl-spacing-lg);
}

.epl-no-results-actions {
    display: flex;
    justify-content: center;
    gap: var(--epl-spacing-sm);
    flex-wrap: wrap;
}

/* ==========================================================================
   9. BOTTONI
   ========================================================================== */

.epl-button,
button.epl-button,
input[type="submit"].epl-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--epl-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--epl-primary);
    color: var(--epl-white);
}

.epl-button:hover {
    background: var(--epl-primary-dark);
    color: var(--epl-white);
}

.epl-button-outline {
    background: transparent;
    color: var(--epl-primary);
    border-color: var(--epl-primary);
}

.epl-button-outline:hover {
    background: var(--epl-primary);
    color: var(--epl-white);
}

.epl-button-accent {
    background: var(--epl-accent);
}

.epl-button-accent:hover {
    background: var(--epl-accent-dark);
}

/* ==========================================================================
   10. WIDGET SIDEBAR
   ========================================================================== */

.epl-widget,
.epl-search-widget {
    background: var(--epl-white);
    border-radius: var(--epl-radius-lg);
    padding: var(--epl-spacing-lg);
    margin-bottom: var(--epl-spacing-lg);
    box-shadow: var(--epl-shadow);
}

.epl-widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--epl-text);
    margin: 0 0 var(--epl-spacing-md);
    padding-bottom: var(--epl-spacing-sm);
    border-bottom: 2px solid var(--epl-primary);
}

/* Form di ricerca */
.epl-search-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--epl-text);
    margin-bottom: 0.35rem;
}

.epl-search-form input,
.epl-search-form select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--epl-border);
    border-radius: var(--epl-radius);
    font-size: 0.95rem;
    margin-bottom: var(--epl-spacing-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.epl-search-form input:focus,
.epl-search-form select:focus {
    outline: none;
    border-color: var(--epl-primary);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.epl-search-form .epl-search-submit {
    width: 100%;
    margin-top: var(--epl-spacing-sm);
}

/* ==========================================================================
   11. RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .epl-archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .epl-listing-header-content {
        flex-direction: column;
    }

    .epl-listing-price-wrap {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .epl-archive-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .epl-archive-title {
        font-size: 1.5rem;
    }

    .epl-listing-title {
        font-size: 1.5rem;
    }

    .epl-listing-price-wrap .epl-listing-price {
        font-size: 2rem;
    }

    .epl-list-view .epl-listing-post {
        grid-template-columns: 1fr;
    }

    .epl-list-view .epl-listing-post .epl-property-image {
        height: 200px;
    }

    .epl-listing-navigation {
        flex-direction: column;
    }

    .epl-nav-previous,
    .epl-nav-next {
        max-width: 100%;
        text-align: left;
    }

    .epl-author-box {
        flex-direction: column;
        text-align: center;
    }

    .epl-author-box .epl-author-details {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .epl-archive-grid {
        grid-template-columns: 1fr;
    }

    .epl-listing-header {
        padding: var(--epl-spacing-lg) var(--epl-spacing-md);
    }

    .epl-listing-content {
        padding: var(--epl-spacing-lg) var(--epl-spacing-md);
    }

    .epl-property-icons,
    .epl-listing-features {
        gap: var(--epl-spacing-sm);
    }
}

/* ==========================================================================
   12. STAMPA
   ========================================================================== */

@media print {
    .epl-view-toggle,
    .epl-archive-controls,
    .epl-pagination,
    .epl-listing-navigation,
    .epl-contact-cta {
        display: none;
    }

    .epl-listing-post,
    .epl-single-listing {
        box-shadow: none;
        break-inside: avoid;
    }

    .epl-listing-header {
        background: var(--epl-primary) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ==========================================================================
   13. UTILITY CLASSES
   ========================================================================== */

.epl-text-center {
    text-align: center;
}

.epl-text-right {
    text-align: right;
}

.epl-hidden {
    display: none !important;
}

.epl-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.epl-clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================================================================
   14. CARATTERISTICHE STILE IMMOBILIARE.IT
   ========================================================================== */

/* --- Card Features (per archivio/lista) - Stile immobiliare.it --- */
.gpc-features-card {
    display: flex;
    flex-wrap: wrap;
    gap: 16px; /* Immobiliare.it: 16px */
    padding: 0; /* Immobiliare.it: nessun padding */
    margin: 0; /* Estendi fino ai margini */
    border: none; /* Immobiliare.it: nessun bordo */
}

.gpc-feature-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0; /* Immobiliare.it: nessun padding sui singoli item */
    background: transparent; /* Immobiliare.it: sfondo trasparente */
    border-radius: 0;
    font-size: 14px; /* Immobiliare.it: 14px */
    color: rgb(55, 60, 71); /* Immobiliare.it exact */
}

/* NO hover effect sulle icone - come immobiliare.it */

.gpc-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; /* Immobiliare.it: 28px */
    height: 28px; /* Immobiliare.it: 28px */
    color: rgb(55, 60, 71); /* Immobiliare.it: stesso colore del testo */
    flex-shrink: 0;
}

.gpc-feature-icon svg {
    width: 100%;
    height: 100%;
}

.gpc-feature-text {
    font-weight: 500;
    white-space: nowrap;
}

.gpc-feature-label {
    font-weight: 400;
    opacity: 0.8;
}

/* --- Caratteristiche Principali (pagina singola) --- */
.gpc-features-main {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--epl-bg-light, #f8fafc) 0%, #fff 100%);
    border-radius: var(--epl-radius-lg, 12px);
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gpc-feature-main-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 25px;
    min-width: 100px;
}

.gpc-feature-main-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    color: var(--epl-primary, #2c5282);
    background: var(--epl-white, #fff);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(44, 82, 130, 0.15);
}

.gpc-feature-main-icon svg {
    width: 24px;
    height: 24px;
}

.gpc-feature-main-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--epl-text, #1f2937);
    line-height: 1.2;
}

.gpc-feature-main-label {
    font-size: 0.85rem;
    color: var(--epl-text-light, #6b7280);
    margin-top: 4px;
}

/* --- Tabella Dettagli (pagina singola) --- */
.gpc-single-features-section,
.gpc-single-details-section {
    margin: 30px 0;
    padding: 25px;
    background: var(--epl-white, #fff);
    border-radius: var(--epl-radius-lg, 12px);
    box-shadow: var(--epl-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
}

.gpc-single-features-section h3,
.gpc-single-details-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--epl-text, #1f2937);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--epl-primary, #2c5282);
}

.gpc-details-table {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* --- Sezioni della tabella dettagli --- */
.gpc-details-section {
    background: var(--epl-white, #fff);
    border-radius: var(--epl-radius-lg, 12px);
    overflow: hidden;
    box-shadow: var(--epl-shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
    border: 1px solid var(--epl-border, #e5e7eb);
}

.gpc-details-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--epl-white, #fff);
    background: var(--epl-primary, #2c5282);
    margin: 0;
    padding: 12px 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gpc-details-section .gpc-details-row:last-child {
    border-bottom: none;
}

.gpc-details-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--epl-border, #e5e7eb);
    transition: background-color 0.2s ease;
}

.gpc-details-row:hover {
    background: var(--epl-bg-light, #f8fafc);
}

.gpc-details-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--epl-primary, #2c5282);
    background: rgba(44, 82, 130, 0.08);
    border-radius: 8px;
    flex-shrink: 0;
}

.gpc-details-icon svg {
    width: 18px;
    height: 18px;
}

.gpc-details-label {
    flex: 1;
    font-size: 0.9rem;
    color: var(--epl-text-light, #6b7280);
}

.gpc-details-value {
    font-weight: 600;
    color: var(--epl-text, #1f2937);
    text-align: right;
}

/* --- Badge Lusso --- */
.gpc-feature-item:has(.gpc-feature-text:contains("Lusso")),
.gpc-feature-item[data-feature="lusso"] {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
}

.gpc-feature-item:has(.gpc-feature-text:contains("Lusso")) .gpc-feature-icon,
.gpc-feature-item[data-feature="lusso"] .gpc-feature-icon {
    color: #1f2937;
}

/* Lusso styling alternativo con classe diretta */
.gpc-feature-item.gpc-lusso {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
}

.gpc-feature-item.gpc-lusso .gpc-feature-icon {
    color: #1f2937;
}

/* --- Vista Lista (adattamento) --- */
.epl-list-view .gpc-features-card {
    border-top: none;
    padding-top: 0;
    margin-top: auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .gpc-features-main {
        gap: 15px;
        padding: 20px 15px;
    }

    .gpc-feature-main-item {
        padding: 10px 15px;
        min-width: 80px;
    }

    .gpc-feature-main-icon {
        width: 40px;
        height: 40px;
    }

    .gpc-feature-main-icon svg {
        width: 20px;
        height: 20px;
    }

    .gpc-feature-main-value {
        font-size: 1.25rem;
    }

    .gpc-details-table {
        grid-template-columns: 1fr;
    }

    .gpc-single-features-section,
    .gpc-single-details-section {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .gpc-features-card {
        gap: 8px;
    }

    .gpc-feature-item {
        padding: 3px 8px;
        font-size: 0.8rem;
    }

    .gpc-feature-icon {
        width: 16px;
        height: 16px;
    }

    .gpc-features-main {
        gap: 10px;
    }

    .gpc-feature-main-item {
        flex: 1 1 45%;
    }
}

/* ==========================================================================
   15. CLASSE ENERGETICA
   ========================================================================== */

.gpc-classe-energetica {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 4px;
    color: #fff;
}

.gpc-classe-energetica.classe-a4,
.gpc-classe-energetica.classe-a3,
.gpc-classe-energetica.classe-a2,
.gpc-classe-energetica.classe-a1 {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.gpc-classe-energetica.classe-b {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
}

.gpc-classe-energetica.classe-c {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
}

.gpc-classe-energetica.classe-d {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.gpc-classe-energetica.classe-e {
    background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
}

.gpc-classe-energetica.classe-f {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.gpc-classe-energetica.classe-g {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* ==========================================================================
   16. MIGLIORAMENTI CARD IMMOBILI
   ========================================================================== */

/* Override per EPL default icons - nascondili */
.epl-property-icons .epl-icon-svg-bedrooms,
.epl-property-icons .epl-icon-svg-bathrooms,
.epl-property-icons .epl-icon-svg-parking,
.epl-property-icons .li_property_bedrooms,
.epl-property-icons .li_property_bathrooms,
.epl-property-icons .li_property_parking {
    display: none !important;
}

/* Quando usiamo le nostre features, nascondi quelle default */
.epl-property-icons:has(.gpc-features-card) > *:not(.gpc-features-card) {
    display: none !important;
}

/* Fallback per browser senza :has() */
.epl-property-blog .gpc-features-card {
    margin-top: 0;
}

/* Assicurati che le nostre features siano visibili */
.epl-listing-post .gpc-features-card,
.epl-property-blog .gpc-features-card {
    display: flex !important;
}

/* ==========================================================================
   17. STILE IMMOBILIARE.IT - LISTA PROPRIETÀ
   ========================================================================== */

/* --- Container lista --- */
.epl-loop-wrapper,
.epl-shortcode-listing {
    display: flex;
    flex-direction: column;
    gap: 32px; /* Immobiliare.it spacing */
}

/* --- Card Proprietà Stile Immobiliare.it --- */
.epl-listing-post.immo-style,
.epl-property-blog.immo-style {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 0;
    background: #fff;
    border-radius: 16px; /* Immobiliare.it: 16px */
    overflow: hidden;
    box-shadow: rgba(0, 49, 81, 0.16) 0px 0px 2px 0px, rgba(0, 49, 81, 0.12) 0px 1px 4px 0px; /* Immobiliare.it exact */
    transition: box-shadow 0.2s ease;
}

.epl-listing-post.immo-style:hover,
.epl-property-blog.immo-style:hover {
    box-shadow: rgba(0, 49, 81, 0.2) 0px 2px 8px 0px, rgba(0, 49, 81, 0.16) 0px 4px 16px 0px; /* Hover più marcato */
}

/* --- Sezione Immagine --- */
.immo-style .immo-image-wrap {
    position: relative;
    height: 100%;
    min-height: 220px;
    min-width: 328px; /* Immobiliare.it */
    max-width: 348px; /* Immobiliare.it */
    overflow: hidden;
}

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

/* Rimosso effetto zoom hover */

/* Badge TOP/PREMIUM */
.immo-style .immo-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    color: #fff;
    z-index: 2;
}

.immo-style .immo-badge.badge-top {
    background: #0066cc;
}

.immo-style .immo-badge.badge-premium {
    background: #4a5568;
}

.immo-style .immo-badge.badge-venduto {
    background: #dc2626;
}

/* Contatore foto */
.immo-style .immo-photo-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 4px;
    z-index: 2;
}

/* --- Sezione Contenuto --- */
.immo-style .immo-content {
    padding: 12px 16px 16px; /* Immobiliare.it exact */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Prezzo */
.immo-style .immo-price {
    font-size: 26px; /* Immobiliare.it: 26px */
    font-weight: 600; /* Immobiliare.it: 600 */
    color: rgb(55, 60, 71); /* Immobiliare.it exact */
    margin: 0;
    line-height: 1.33;
}

.immo-style .immo-price.price-on-request {
    font-size: 22px;
    color: rgb(55, 60, 71);
}

/* Località */
.immo-style .immo-localita {
    font-size: 15px;
    font-weight: 600;
    color: #0066cc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.immo-style .immo-localita::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230066cc' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Titolo/Indirizzo */
.immo-style .immo-title {
    font-size: 16px; /* Immobiliare.it: 16px */
    font-weight: 600; /* Immobiliare.it: 600 */
    color: rgb(55, 60, 71); /* Immobiliare.it exact */
    margin: 0;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.immo-style .immo-title:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Features Grid */
.immo-style .immo-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px; /* Immobiliare.it: 16px */
    padding: 8px 0;
}

.immo-style .immo-feature {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px; /* Immobiliare.it: 14px */
    color: rgb(55, 60, 71); /* Immobiliare.it exact */
}

.immo-style .immo-feature-icon {
    width: 28px; /* Immobiliare.it: 28px */
    height: 28px; /* Immobiliare.it: 28px */
    color: rgb(55, 60, 71); /* Immobiliare.it: stesso colore del testo */
    flex-shrink: 0;
}

.immo-style .immo-feature-icon svg {
    width: 100%;
    height: 100%;
}

.immo-style .immo-feature-text {
    white-space: nowrap;
}

/* Badge Lusso */
.immo-style .immo-feature.feature-lusso {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.immo-style .immo-feature.feature-lusso .immo-feature-icon {
    color: #1f2937;
}

/* Bottoni Azioni */
.immo-style .immo-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.immo-style .immo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #0066cc;
    color: #0066cc;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.immo-style .immo-btn:hover {
    background: #0066cc;
    color: #fff;
}

.immo-style .immo-btn-icon {
    width: 16px;
    height: 16px;
}

.immo-style .immo-btn-primary {
    background: #0066cc;
    color: #fff;
}

.immo-style .immo-btn-primary:hover {
    background: #004499;
}

.immo-style .immo-favorite {
    margin-left: auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.immo-style .immo-favorite:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.immo-style .immo-favorite svg {
    width: 20px;
    height: 20px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .epl-listing-post.immo-style,
    .epl-property-blog.immo-style {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 768px) {
    .epl-listing-post.immo-style,
    .epl-property-blog.immo-style {
        grid-template-columns: 1fr;
    }

    .immo-style .immo-image-wrap {
        height: 220px;
        min-height: auto;
    }

    .immo-style .immo-content {
        padding: 16px;
    }

    .immo-style .immo-features {
        gap: 12px 16px;
    }
}

@media (max-width: 480px) {
    .immo-style .immo-price {
        font-size: 1.4rem;
    }

    .immo-style .immo-title {
        font-size: 1rem;
    }

    .immo-style .immo-feature {
        font-size: 0.85rem;
    }

    .immo-style .immo-actions {
        flex-wrap: wrap;
    }

    .immo-style .immo-btn {
        flex: 1;
        justify-content: center;
    }

    .immo-style .immo-favorite {
        margin-left: 0;
    }
}

/* ==========================================================================
   18. OVERRIDE EPL DEFAULT PER STILE IMMOBILIARE.IT
   ========================================================================== */

/* Container shortcode EPL */
.epl-shortcode .loop-content,
.epl-shortcode-listing,
.epl-archive-grid {
    display: flex !important;
    flex-direction: column;
    gap: 32px; /* Immobiliare.it spacing */
}

/* Card wrapper interno - questo è il vero elemento visivo */
.epl-shortcode .epl-property-blog-entry-wrapper,
.epl-archive-grid .epl-property-blog-entry-wrapper {
    display: grid !important;
    grid-template-columns: 340px 1fr;
    gap: 0;
    background: #fff;
    border-radius: 16px !important; /* Immobiliare.it: 16px */
    overflow: hidden;
    box-shadow: rgba(0, 49, 81, 0.16) 0px 0px 2px 0px, rgba(0, 49, 81, 0.12) 0px 1px 4px 0px !important; /* Immobiliare.it exact */
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer; /* Immobiliare.it: tutta la card cliccabile */
}

.epl-shortcode .epl-property-blog-entry-wrapper:hover,
.epl-archive-grid .epl-property-blog-entry-wrapper:hover {
    box-shadow: rgba(0, 49, 81, 0.2) 0px 2px 8px 0px, rgba(0, 49, 81, 0.16) 0px 4px 16px 0px !important;
}

/* Applica lo stile anche al listing-post per retrocompatibilità */
.epl-shortcode-listing .epl-listing-post,
.epl-archive-grid .epl-listing-post {
    margin-bottom: 0; /* Rimuovi margin, usiamo gap del container */
}

/* Immagine card EPL - box sinistro */
.epl-shortcode .property-box-left,
.epl-archive-grid .property-box-left {
    position: relative;
    min-width: 328px;
    max-width: 348px;
    overflow: hidden;
    /* L'altezza è determinata dal contenuto testuale */
}

.epl-shortcode .property-box-left img,
.epl-archive-grid .property-box-left img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Rimosso effetto zoom hover sulle immagini */

/* Contenuto card EPL - box destro */
.epl-shortcode .property-box-right,
.epl-archive-grid .property-box-right,
.epl-property-blog .property-box-right {
    width: 100% !important; /* Override EPL default 60% */
    max-width: none !important;
    padding: 12px 16px 16px !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 180px; /* Altezza minima per evitare card troppo basse */
}

/* Prezzo EPL */
.epl-shortcode .epl-listing-post .epl-price,
.epl-shortcode .price,
.epl-archive-grid .epl-listing-post .epl-price {
    font-size: 26px !important; /* Immobiliare.it: 26px */
    font-weight: 600 !important; /* Immobiliare.it: 600 */
    color: rgb(55, 60, 71) !important; /* Immobiliare.it exact */
    order: -1;
}

/* Titolo EPL */
.epl-shortcode .epl-listing-post .entry-title,
.epl-shortcode .epl-listing-post h3,
.epl-archive-grid .epl-listing-post .entry-title {
    font-size: 16px !important; /* Immobiliare.it: 16px */
    font-weight: 600 !important; /* Immobiliare.it: 600 */
    margin: 0 0 8px 0;
}

.epl-shortcode .epl-listing-post .entry-title a,
.epl-shortcode .epl-listing-post h3 a,
.epl-archive-grid .epl-listing-post .entry-title a {
    color: rgb(55, 60, 71) !important; /* Immobiliare.it exact */
    text-decoration: none;
}

.epl-shortcode .epl-listing-post .entry-title a:hover,
.epl-shortcode .epl-listing-post h3 a:hover,
.epl-archive-grid .epl-listing-post .entry-title a:hover {
    color: #0066cc !important;
    text-decoration: underline;
}

/* Features EPL */
.epl-shortcode .epl-listing-post .gpc-features-card,
.epl-shortcode .property-meta,
.epl-archive-grid .epl-listing-post .gpc-features-card {
    display: flex !important;
    flex-wrap: wrap;
    gap: 16px; /* Immobiliare.it: 16px */
    padding: 8px 0;
    margin: 0;
    border: none;
}

.epl-shortcode .gpc-feature-item,
.epl-shortcode .property-meta-item,
.epl-archive-grid .gpc-feature-item {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 14px !important; /* Immobiliare.it: 14px */
    color: rgb(55, 60, 71) !important; /* Immobiliare.it exact */
}

.epl-shortcode .gpc-feature-icon,
.epl-archive-grid .gpc-feature-icon {
    width: 28px !important; /* Immobiliare.it: 28px */
    height: 28px !important; /* Immobiliare.it: 28px */
    color: rgb(55, 60, 71) !important; /* Immobiliare.it: stesso colore del testo */
}

/* Nascondi excerpt troppo lungo nelle card */
.epl-shortcode .epl-listing-post .epl-excerpt,
.epl-shortcode .epl-listing-post p {
    display: none;
}

/* Mostra solo prezzo e features */
.epl-shortcode .epl-listing-post .price,
.epl-shortcode .epl-listing-post .property-meta,
.epl-shortcode .epl-listing-post .gpc-features-card {
    display: flex !important;
}

/* Responsive per shortcode EPL */
@media (max-width: 900px) {
    .epl-shortcode .epl-property-blog-entry-wrapper,
    .epl-archive-grid .epl-property-blog-entry-wrapper {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 768px) {
    .epl-shortcode .epl-property-blog-entry-wrapper,
    .epl-archive-grid .epl-property-blog-entry-wrapper {
        grid-template-columns: 1fr !important;
    }

    .epl-shortcode .property-box-left,
    .epl-archive-grid .property-box-left {
        height: 200px;
        min-height: auto;
        max-width: none;
    }
}

/* Badge status EPL */
.epl-shortcode .epl-listing-post .epl-status-badge,
.epl-shortcode .label-status,
.epl-archive-grid .epl-listing-post .epl-status-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    top: auto;
    padding: 4px 10px;
    font-size: 0.7rem;
    border-radius: 4px;
}

/* Responsive EPL override */
@media (max-width: 768px) {
    .epl-shortcode-listing .epl-listing-post,
    .epl-archive-grid .epl-listing-post {
        grid-template-columns: 1fr !important;
    }

    .epl-shortcode-listing .epl-listing-post .epl-blog-image,
    .epl-archive-grid .epl-listing-post .epl-blog-image {
        height: 200px;
        min-height: auto;
    }
}

/* ==========================================================================
   19. SHORTCODE [lista_immobili] STILE IMMOBILIARE.IT
   ========================================================================== */

.gpc-immobili-lista {
    display: flex;
    flex-direction: column;
    gap: 32px; /* Immobiliare.it spacing */
}

.gpc-immobili-lista .immo-style {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 0;
    background: #fff;
    border-radius: 16px; /* Immobiliare.it: 16px */
    overflow: hidden;
    box-shadow: rgba(0, 49, 81, 0.16) 0px 0px 2px 0px, rgba(0, 49, 81, 0.12) 0px 1px 4px 0px; /* Immobiliare.it exact */
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer; /* Immobiliare.it: tutta la card cliccabile */
}

.gpc-immobili-lista .immo-style:hover {
    box-shadow: rgba(0, 49, 81, 0.2) 0px 2px 8px 0px, rgba(0, 49, 81, 0.16) 0px 4px 16px 0px;
}

/* Immagine */
.gpc-immobili-lista .immo-image-wrap {
    position: relative;
    height: 100%;
    /* L'altezza è determinata dal contenuto testuale */
    min-width: 328px; /* Immobiliare.it */
    max-width: 348px; /* Immobiliare.it */
    overflow: hidden;
}

.gpc-immobili-lista .immo-image-wrap a {
    display: block;
    height: 100%;
}

.gpc-immobili-lista .immo-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gpc-immobili-lista /* Rimosso effetto zoom hover */

/* Badge */
.gpc-immobili-lista .immo-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    color: #fff;
    z-index: 2;
}

.gpc-immobili-lista .badge-top {
    background: #0066cc;
}

.gpc-immobili-lista .badge-premium {
    background: #4a5568;
}

.gpc-immobili-lista .badge-venduto {
    background: #dc2626;
}

/* Contatore foto */
.gpc-immobili-lista .immo-photo-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 4px;
    z-index: 2;
}

/* Contenuto */
.gpc-immobili-lista .immo-content {
    padding: 12px 16px 16px; /* Immobiliare.it exact */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Prezzo */
.gpc-immobili-lista .immo-price {
    font-size: 26px; /* Immobiliare.it: 26px */
    font-weight: 600; /* Immobiliare.it: 600 */
    color: rgb(55, 60, 71); /* Immobiliare.it exact */
    line-height: 1.33;
}

.gpc-immobili-lista .immo-price.price-on-request {
    font-size: 22px;
    color: rgb(55, 60, 71);
}

/* Località */
.gpc-immobili-lista .immo-localita {
    font-size: 15px;
    font-weight: 600;
    color: #0066cc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gpc-immobili-lista .immo-localita::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230066cc' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Titolo */
.gpc-immobili-lista .immo-title {
    font-size: 16px; /* Immobiliare.it: 16px */
    font-weight: 600; /* Immobiliare.it: 600 */
    color: rgb(55, 60, 71); /* Immobiliare.it exact */
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.gpc-immobili-lista .immo-title:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Features */
.gpc-immobili-lista .immo-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px; /* Immobiliare.it: 16px */
    padding: 8px 0;
}

.gpc-immobili-lista .immo-feature {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px; /* Immobiliare.it: 14px */
    color: rgb(55, 60, 71); /* Immobiliare.it exact */
}

.gpc-immobili-lista .immo-feature-icon {
    width: 28px; /* Immobiliare.it: 28px */
    height: 28px; /* Immobiliare.it: 28px */
    color: rgb(55, 60, 71); /* Immobiliare.it: stesso colore del testo */
    flex-shrink: 0;
}

.gpc-immobili-lista .immo-feature-icon svg {
    width: 100%;
    height: 100%;
}

/* Badge Lusso */
.gpc-immobili-lista .immo-feature.feature-lusso {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.gpc-immobili-lista .feature-lusso .immo-feature-icon {
    color: #1f2937;
}

/* Azioni */
.gpc-immobili-lista .immo-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.gpc-immobili-lista .immo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #0066cc;
    color: #0066cc;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gpc-immobili-lista .immo-btn:hover {
    background: #0066cc;
    color: #fff;
}

.gpc-immobili-lista .immo-btn-primary {
    background: #0066cc;
    color: #fff;
}

.gpc-immobili-lista .immo-btn-primary:hover {
    background: #004499;
}

.gpc-immobili-lista .immo-btn-icon {
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 900px) {
    .gpc-immobili-lista .immo-style {
        grid-template-columns: 260px 1fr;
    }
}

@media (max-width: 768px) {
    .gpc-immobili-lista .immo-style {
        grid-template-columns: 1fr;
    }

    .gpc-immobili-lista .immo-image-wrap {
        height: 200px;
        min-height: auto;
    }

    .gpc-immobili-lista .immo-content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .gpc-immobili-lista .immo-price {
        font-size: 1.3rem;
    }

    .gpc-immobili-lista .immo-features {
        gap: 10px 14px;
    }

    .gpc-immobili-lista .immo-feature {
        font-size: 0.82rem;
    }
}

/* No results */
.no-properties {
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 12px;
    color: #6b7280;
    font-size: 1rem;
}

/* ==========================================================================
   20. CAROUSEL IMMAGINI - STILE IMMOBILIARE.IT
   ========================================================================== */

/* Container carousel */
.gpc-property-carousel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gpc-property-carousel .swiper-wrapper {
    height: 100%;
}

.gpc-property-carousel .swiper-slide {
    height: 100%;
}

.gpc-property-carousel .swiper-slide img,
.gpc-property-image-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gpc-carousel-link {
    display: block;
    width: 100%;
    height: 100%;
}

/* Frecce navigazione - Stile immobiliare.it */
.gpc-property-carousel .swiper-button-prev,
.gpc-property-carousel .swiper-button-next {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: rgb(55, 60, 71);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gpc-property-carousel:hover .swiper-button-prev,
.gpc-property-carousel:hover .swiper-button-next {
    opacity: 1;
}

.gpc-property-carousel .swiper-button-prev:hover,
.gpc-property-carousel .swiper-button-next:hover {
    background: #fff;
    transform: scale(1.1);
}

.gpc-property-carousel .swiper-button-prev::after,
.gpc-property-carousel .swiper-button-next::after {
    font-size: 14px;
    font-weight: 700;
}

.gpc-property-carousel .swiper-button-prev {
    left: 10px;
}

.gpc-property-carousel .swiper-button-next {
    right: 10px;
}

/* Contatore immagini (1/5) - Stile immobiliare.it */
.gpc-property-carousel .swiper-pagination {
    position: absolute;
    bottom: 10px;
    right: 10px;
    left: auto;
    width: auto;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    line-height: 1.4;
}

.gpc-property-carousel .swiper-pagination-fraction {
    font-size: 12px;
}

/* Immagine singola */
.gpc-property-image-single {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gpc-property-image-single a {
    display: block;
    width: 100%;
    height: 100%;
}

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

/* Placeholder nessuna immagine */
.gpc-property-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpc-property-image-placeholder a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: #9ca3af;
    width: 100%;
    height: 100%;
}

.gpc-property-image-placeholder svg {
    opacity: 0.5;
}

.gpc-property-image-placeholder span {
    font-size: 14px;
}

/* Responsive carousel */
@media (max-width: 768px) {
    .gpc-property-carousel .swiper-button-prev,
    .gpc-property-carousel .swiper-button-next {
        width: 32px;
        height: 32px;
        opacity: 1; /* Sempre visibili su mobile */
    }

    .gpc-property-carousel .swiper-button-prev::after,
    .gpc-property-carousel .swiper-button-next::after {
        font-size: 12px;
    }

    .gpc-property-carousel .swiper-button-prev {
        left: 8px;
    }

    .gpc-property-carousel .swiper-button-next {
        right: 8px;
    }

    .gpc-property-carousel .swiper-pagination {
        bottom: 8px;
        right: 8px;
        padding: 3px 8px;
        font-size: 11px;
    }
}

/* ==========================================================================
   21. FIX VISTA GRID - EPL LISTING
   ========================================================================== */

/* Quando EPL è in modalità grid view */
.epl-listing-grid-view,
.epl-listing-grid-view.epl-property-blog {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important; /* Cambiato da block a flex */                                                                                                                                              
    flex-direction: column !important;   
    float: none !important;
    height: 100% !important; /* Riempie l'altezza della cella grid */                                                                                                                                     
    overflow: hidden !important; /* Previene overflow */  
}

/* Entry wrapper in grid view - layout verticale */
.epl-listing-grid-view .epl-property-blog-entry-wrapper {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    flex: 1 !important; /* Si espande per riempire il genitore */                       
}

/* Immagine in grid view - occupa tutta la larghezza */
.epl-listing-grid-view .property-box-left,
.epl-listing-grid-view .property-featured-image-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
    height: 220px !important;
    position: relative;
    float: none !important;
}

/* Fix per il carousel swiper in grid view */
.epl-listing-grid-view .gpc-property-carousel,
.epl-listing-grid-view .swiper {
    width: 100% !important;
    height: 100% !important;
}

.epl-listing-grid-view .gpc-property-carousel .swiper-slide,
.epl-listing-grid-view .swiper-slide {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.epl-listing-grid-view .gpc-property-carousel .swiper-slide img,
.epl-listing-grid-view .swiper-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Immagine diretta in grid view (senza carousel) */
.epl-listing-grid-view .property-box-left img,
.epl-listing-grid-view .property-featured-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* Contenuto in grid view - occupa tutta la larghezza */
.epl-listing-grid-view .property-box-right,
.epl-listing-grid-view .property-content {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 16px !important;                                                                                                                               
    overflow: hidden !important; /* Previene overflow */  
}

/* Nascondi elementi non necessari in grid view */
.epl-listing-grid-view .epl-excerpt-content {
    display: none;
}

/* Titolo più compatto in grid */
.epl-listing-grid-view .entry-title {
    font-size: 14px !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
}

/* Prezzo in grid */
.epl-listing-grid-view .price,
.epl-listing-grid-view .epl-price {
    font-size: 20px !important;
    margin-bottom: 8px !important;
}

/* Features più compatte in grid */
.epl-listing-grid-view .gpc-features-card {
    gap: 10px !important;
}

.epl-listing-grid-view .gpc-feature-item {
    font-size: 12px !important;
}

.epl-listing-grid-view .gpc-feature-icon {
    width: 20px !important;
    height: 20px !important;
}

/* Container loop in grid view */
.loop-content.epl-template-blog:has(.epl-listing-grid-view) {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 24px !important;
}

/* Fallback per browser senza :has() - usa JS per aggiungere classe */
.epl-grid-mode-active {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 24px !important;
}

/* Tools (switch view + sorting) - sempre sulla prima riga, larghezza piena */
.epl-loop-tools-wrap,
.epl-archive-utility-wrapper,
.epl-switching-sorting-wrap {
    grid-column: 1 / -1 !important; /* Occupa tutte le colonne */
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
    flex-wrap: wrap !important;
}

/* Assicura che i tool interni siano inline */
.epl-loop-tools,
.epl-loop-tools-switch-sort {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

.epl-tool-switch,
.epl-tool-sorting {
    display: inline-flex !important;
    align-items: center !important;
}

/* Responsive grid view */
@media (max-width: 768px) {
    .loop-content.epl-template-blog:has(.epl-listing-grid-view),
    .epl-grid-mode-active {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
        gap: 16px !important;
    }

    .epl-listing-grid-view .property-box-left,
    .epl-listing-grid-view .property-featured-image-wrapper {
        height: 180px !important;
    }
}

@media (max-width: 480px) {
    .loop-content.epl-template-blog:has(.epl-listing-grid-view),
    .epl-grid-mode-active {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   PAGINA SINGOLA PROPRIETÀ - STILE IMMOBILIARE.IT
   ========================================================================== */

/* Container principale */
.gpc-single-property-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.gpc-single-property-page .site-main {
    padding: 0;
}

/* Toolbar superiore */
.gpc-listing-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 20px;
}

.gpc-back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.gpc-back-link:hover {
    text-decoration: underline;
}

.gpc-toolbar-right {
    display: flex;
    gap: 10px;
}

.gpc-toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.gpc-toolbar-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #000;
}

/* Layout principale a 2 colonne */
.gpc-listing-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

.gpc-listing-main {
    min-width: 0;
}

/* ==========================================================================
   GALLERIA IMMAGINI - STILE IMMOBILIARE.IT
   ========================================================================== */

.gpc-gallery-section {
    margin-bottom: 16px;
}

.gpc-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 200px;
    grid-template-rows: 500px; /* Altezza fissa per la galleria */
    gap: 2px;
    border-radius: 12px;
    overflow: hidden;
}

.gpc-gallery-grid.single-image {
    grid-template-columns: 1fr;
}

/* L'immagine principale si allinea con le 4 thumbnails */
.gpc-gallery-main {
    position: relative;
    background: #f0f0f0;
    overflow: hidden;
    border-radius: 12px 0 0 12px;
}

/* Carousel principale nella galleria dettaglio */
.gpc-main-carousel {
    width: 100%;
    height: 100%;
}

.gpc-main-carousel .swiper-wrapper {
    height: 100%;
}

.gpc-main-carousel .swiper-slide {
    height: 100%;
}

.gpc-main-carousel .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.gpc-main-carousel .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Frecce navigazione carousel dettaglio */
.gpc-main-carousel .swiper-button-prev,
.gpc-main-carousel .swiper-button-next {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
}

.gpc-main-carousel .swiper-button-prev::after,
.gpc-main-carousel .swiper-button-next::after {
    font-size: 18px;
    font-weight: bold;
}

.gpc-gallery-main:hover .swiper-button-prev,
.gpc-gallery-main:hover .swiper-button-next {
    opacity: 1;
}

.gpc-main-carousel .swiper-button-prev:hover,
.gpc-main-carousel .swiper-button-next:hover {
    background: #fff;
}

.gpc-main-carousel .swiper-button-prev {
    left: 12px;
}

.gpc-main-carousel .swiper-button-next {
    right: 12px;
}

.gpc-gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10;
}

/* Thumbnails a destra - 4 foto impilate */
.gpc-gallery-thumbs {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: 2px;
}

.gpc-gallery-thumb {
    position: relative;
    background: #f0f0f0;
    overflow: hidden;
}

/* Prima thumbnail: angolo superiore destro arrotondato */
.gpc-gallery-thumb:first-child {
    border-radius: 0 12px 0 0;
}

/* Ultima thumbnail: angolo inferiore destro arrotondato */
.gpc-gallery-thumb:last-child {
    border-radius: 0 0 12px 0;
}

.gpc-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gpc-gallery-thumb:hover img {
    transform: scale(1.05);
}

/* Didascalie thumbnail - stile immobiliare.it */
.gpc-thumb-caption {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 16px);
}

/* Overlay "+X foto" */
.gpc-gallery-thumb.has-more::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.gpc-more-photos {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    z-index: 1;
}

.gpc-gallery-link {
    display: block;
    height: 100%;
}

/* ==========================================================================
   BOTTONI GALLERIA (Foto / Planimetrie) - STILE IMMOBILIARE.IT
   ========================================================================== */

.gpc-gallery-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.gpc-gallery-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #0066cc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gpc-gallery-btn:hover {
    border-color: #0066cc;
    background: #f0f7ff;
    color: #0066cc;
}

.gpc-gallery-btn svg {
    stroke: #0066cc;
    flex-shrink: 0;
}

.gpc-gallery-btn span {
    white-space: nowrap;
}

.gpc-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9;
    background: #f5f5f5;
    border-radius: 12px;
    color: #999;
    gap: 12px;
}

/* ==========================================================================
   HEADER PROPRIETÀ
   ========================================================================== */

.gpc-listing-header {
    margin-bottom: 20px;
}

.gpc-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
}

.gpc-header-title-wrap {
    flex: 1;
    margin-top: 8px;
}

.gpc-listing-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.gpc-listing-address {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0066cc;
    font-size: 15px;
    margin: 0;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.gpc-listing-address svg {
    flex-shrink: 0;
    color: var(--epl-primary);
}

.gpc-listing-address:hover {
    text-decoration: underline;
    color: var(--epl-primary-dark);
}

/* Smooth scroll per anchor links */
html {
    scroll-behavior: smooth;
}

.gpc-header-price-wrap {
    flex-shrink: 0;
}

.gpc-listing-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--epl-primary);
    white-space: nowrap;
}

/* Quick Features - Badge caratteristiche principali */
.gpc-quick-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0;
}

.gpc-quick-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 14px;
}

.gpc-quick-feature svg {
    color: #666;
    flex-shrink: 0;
}

.gpc-quick-feature.feature-lusso {
    color: #c4a000;
}

.gpc-quick-feature.feature-lusso svg {
    color: #c4a000;
    fill: #c4a000;
}

/* Meta info */
.gpc-listing-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 13px;
    padding: 16px 0;
}

.gpc-listing-meta svg {
    color: #999;
}

/* ==========================================================================
   SEZIONI CONTENUTO
   ========================================================================== */

.gpc-section {
    padding: 24px 0;
    border-bottom: 1px solid #e8e8e8;
}

.gpc-section:last-child {
    border-bottom: none;
}

.gpc-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
}

.gpc-subsection-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 24px 0 16px 0;
}

/* Descrizione */
.gpc-riferimento {
    color: #666;
    font-size: 13px;
    margin-bottom: 12px;
}

.gpc-heading {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    text-transform: uppercase;
}

.gpc-description-content {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.gpc-description-content p {
    margin-bottom: 16px;
}

/* ==========================================================================
   CARATTERISTICHE GRIGLIA
   ========================================================================== */

.gpc-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.gpc-feature-row {
    display: grid;
    grid-template-columns: 32px 1fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.gpc-feature-row:nth-child(odd) {
    padding-right: 24px;
}

.gpc-feature-row:nth-child(even) {
    padding-left: 24px;
    border-left: 1px solid #f0f0f0;
}

.gpc-feature-icon {
    color: #0066cc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpc-feature-icon svg {
    width: 20px;
    height: 20px;
}

.gpc-feature-label {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.gpc-feature-value {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    text-align: right;
}

/* Feature Tags */
.gpc-feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gpc-feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
}

.gpc-feature-tag svg {
    color: #28a745;
    flex-shrink: 0;
}

/* ==========================================================================
   EFFICIENZA ENERGETICA
   ========================================================================== */

.gpc-energy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.gpc-energy-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gpc-energy-label {
    font-size: 13px;
    color: #666;
}

.gpc-energy-value {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
}

.gpc-energy-class {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.gpc-energy-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    color: white;
}

/* Classi energetiche con colori */
.gpc-energy-badge.classe-a4,
.gpc-energy-badge.classe-a3,
.gpc-energy-badge.classe-a2,
.gpc-energy-badge.classe-a1 {
    background: linear-gradient(135deg, #00a651, #008c45);
}

.gpc-energy-badge.classe-b {
    background: linear-gradient(135deg, #8dc63f, #6eb52f);
}

.gpc-energy-badge.classe-c {
    background: linear-gradient(135deg, #c4d600, #a4b600);
}

.gpc-energy-badge.classe-d {
    background: linear-gradient(135deg, #ffcc00, #e6b800);
}

.gpc-energy-badge.classe-e {
    background: linear-gradient(135deg, #f7941d, #d77a0d);
}

.gpc-energy-badge.classe-f {
    background: linear-gradient(135deg, #ed1c24, #cc0a12);
}

.gpc-energy-badge.classe-g {
    background: linear-gradient(135deg, #a80000, #880000);
}

.gpc-ipe {
    font-size: 13px;
    color: #666;
}

/* ==========================================================================
   MAPPA
   ========================================================================== */

.gpc-map-container {
    border-radius: 12px;
    overflow: hidden;
    min-height: 300px;
    background: #f0f0f0;
}

.gpc-map-container iframe,
.gpc-map-container .epl-map {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: 0;
}

/* ==========================================================================
   SIDEBAR CONTATTI STICKY
   ========================================================================== */

.gpc-listing-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

/* Forza la pagina a scrollare normalmente */
.gpc-single-property-page,
.gpc-single-property-page .site-main,
.gpc-listing-layout {
    overflow: visible;
}

.gpc-contact-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
}

.gpc-contact-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
}

/* Form contatto */
.gpc-contact-form {
    margin-bottom: 20px;
}

.gpc-form-field {
    margin-bottom: 16px;
}

.gpc-form-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-bottom: 6px;
}

.gpc-form-field select,
.gpc-form-field textarea,
.gpc-form-field input[type="text"],
.gpc-form-field input[type="email"],
.gpc-form-field input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gpc-form-field select:focus,
.gpc-form-field textarea:focus,
.gpc-form-field input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.gpc-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Bottoni */
.gpc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.gpc-btn-full {
    width: 100%;
}

.gpc-btn-primary {
    background: #d32f2f;
    color: white;
}

.gpc-btn-primary:hover {
    background: #b71c1c;
}

.gpc-btn-outline {
    background: transparent;
    border: 2px solid #0066cc;
    color: #0066cc;
    margin-top: 10px;
}

.gpc-btn-outline:hover {
    background: #0066cc;
    color: white;
}

.gpc-btn-phone {
    width: 100%;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    margin-top: 16px;
    transition: all 0.2s ease;
}

.gpc-btn-phone:hover {
    background: #eee;
    color: #2c5282;
}

.gpc-btn-phone:hover svg {
    stroke: #2c5282;
}

.gpc-btn-phone.phone-visible {
    background: #e8f5e9;
    border-color: #4caf50;
}

.gpc-btn-phone.phone-visible a {
    color: #2c5282;
    text-decoration: none;
    font-weight: 600;
}

/* Chi sono / Info Agente */
.gpc-agent-box {
    border-top: 1px solid #e8e8e8;
    padding-top: 20px;
    margin-top: 20px;
}

.gpc-agent-box .gpc-contact-title {
    margin-bottom: 16px;
}

.gpc-agent-photo {
    width: 100%;
    margin-bottom: 16px;
}

.gpc-agent-photo img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.gpc-agent-address {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.gpc-agent-address svg {
    flex-shrink: 0;
    margin-top: 2px;
    stroke: #2c5282;
}

.gpc-agent-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.gpc-agent-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
}

.gpc-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gpc-agent-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    display: block;
}

/* EPL Author Box Override */
.gpc-agent-box .epl-author-box,
.gpc-agent-box .epl-author {
    padding: 0 !important;
    border: none !important;
    margin: 0 0 16px 0 !important;
    background: transparent !important;
}

/* ==========================================================================
   NO LISTING
   ========================================================================== */

.gpc-no-listing {
    text-align: center;
    padding: 60px 20px;
}

.gpc-no-listing h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.gpc-no-listing p {
    color: #666;
    margin-bottom: 24px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .gpc-listing-layout {
        grid-template-columns: 1fr;
    }

    .gpc-listing-sidebar {
        position: static;
        max-height: none;
        order: -1;
    }

    .gpc-contact-box {
        margin-bottom: 24px;
    }

    .gpc-gallery-grid {
        grid-template-columns: 1fr 170px;
        grid-template-rows: 450px;
    }
}

@media (max-width: 768px) {
    .gpc-single-property-page {
        padding: 0 15px;
    }

    .gpc-listing-toolbar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .gpc-toolbar-btn span {
        display: none;
    }

    .gpc-gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto; /* Rimuovi altezza fissa su mobile */
    }

    .gpc-gallery-main {
        border-radius: 12px 12px 0 0;
        aspect-ratio: 4/3; /* Aspect ratio per mobile */
    }

    .gpc-gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 1fr;
    }

    .gpc-gallery-thumb {
        aspect-ratio: 1/1;
    }

    .gpc-gallery-thumb:first-child {
        border-radius: 0 0 0 12px;
    }

    .gpc-gallery-thumb:last-child {
        border-radius: 0 0 12px 0;
    }

    /* Nascondi didascalie su mobile - spazio limitato */
    .gpc-thumb-caption {
        display: none;
    }

    .gpc-more-photos {
        font-size: 14px;
    }

    .gpc-gallery-buttons {
        flex-wrap: wrap;
    }

    .gpc-gallery-btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }

    .gpc-header-main {
        flex-direction: column;
    }

    .gpc-listing-title {
        font-size: 22px;
    }

    .gpc-listing-price {
        font-size: 24px;
    }

    .gpc-quick-features {
        gap: 12px;
    }

    .gpc-quick-feature {
        font-size: 13px;
    }

    .gpc-features-grid {
        grid-template-columns: 1fr;
    }

    .gpc-feature-row {
        padding-right: 0 !important;
        padding-left: 0 !important;
        border-left: none !important;
    }

    .gpc-section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .gpc-gallery-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }

    .gpc-gallery-thumb:last-child {
        display: none;
    }

    .gpc-quick-features {
        flex-direction: column;
        gap: 10px;
    }

    .gpc-energy-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .gpc-listing-toolbar,
    .gpc-listing-sidebar,
    .gpc-contact-box,
    .gpc-toolbar-btn {
        display: none !important;
    }

    .gpc-listing-layout {
        display: block;
    }

    .gpc-gallery-grid {
        page-break-inside: avoid;
    }

    .gpc-section {
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   FANCYBOX PERSONALIZZATO - Stile immobiliare.it
   ========================================================================== */

/* Sfondo nero con trasparenza */
.fancybox__backdrop {
    background: rgba(0, 0, 0, 0.80) !important;
}

/* Container principale */
.fancybox__container {
    --fancybox-bg: transparent;
}

/* Toolbar - icone più visibili */
.fancybox__toolbar {
    background: transparent !important;
    padding: 16px 20px !important;
}

.fancybox__button {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    color: #fff !important;
    transition: background 0.2s !important;
}

.fancybox__button:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

.fancybox__button svg {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 2 !important;
}

/* Contatore immagini (1/18) - stile immobiliare.it */
.fancybox__infobar {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: rgba(0, 0, 0, 0.6) !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    margin-left: 10px !important;
}

/* Frecce navigazione */
.fancybox__nav .fancybox__button {
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

.fancybox__nav .fancybox__button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Caption/titolo immagine - in basso a sinistra */
.fancybox__caption {
    text-align: left !important;
    padding: 30px 50px 35px !important;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #fff !important;
    max-width: none !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

/* Thumbnails in basso */
.fancybox__thumbs {
    background: rgba(0, 0, 0, 0.8) !important;
    padding: 10px 0 !important;
}

.fancybox__thumbs .f-carousel__slide {
    opacity: 0.5 !important;
    transition: opacity 0.2s !important;
}

.fancybox__thumbs .f-carousel__slide.is-nav-selected {
    opacity: 1 !important;
}

.fancybox__thumbs .f-carousel__slide img {
    border-radius: 4px !important;
    border: 2px solid transparent !important;
}

.fancybox__thumbs .f-carousel__slide.is-nav-selected img {
    border-color: #fff !important;
}

/* Immagine principale */
.fancybox__content {
    background: transparent !important;
}

.fancybox__image {
    object-fit: contain !important;
}

/* ==========================================================================
   RICERCA IMMOBILI
   ========================================================================== */

.gpc-search-results-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: var(--epl-spacing-md);
    margin-bottom: var(--epl-spacing-lg);
    background: var(--epl-bg-light);
    border-radius: var(--epl-radius-lg);
    border: 1px solid var(--epl-border);
}

.gpc-search-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gpc-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--epl-primary);
    border-radius: 50%;
    color: var(--epl-white);
    flex-shrink: 0;
}

.gpc-search-icon svg {
    width: 22px;
    height: 22px;
}

.gpc-search-results-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--epl-text);
    font-weight: 600;
}

.gpc-search-default {
    background: transparent;
    border: none;
    padding: var(--epl-spacing-sm) 0;
}

.gpc-clear-search {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--epl-white);
    border: 1px solid var(--epl-border);
    border-radius: var(--epl-radius);
    color: var(--epl-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.gpc-clear-search:hover {
    background: var(--epl-danger);
    border-color: var(--epl-danger);
    color: var(--epl-white);
}

.gpc-clear-search svg {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .gpc-search-results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gpc-search-results-header h2 {
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   PORTALI IMMOBILIARI
   ========================================================================== */

.gpc-portali-section {
    padding: var(--epl-spacing-lg) 0;
}

.gpc-portali-titolo {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--epl-text);
    margin-bottom: var(--epl-spacing-lg);
}

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

.gpc-portale-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--epl-spacing-lg);
    background: var(--epl-white);
    border: 1px solid var(--epl-border);
    border-radius: var(--epl-radius-lg);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--epl-shadow);
    min-height: 120px;
}

.gpc-portale-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--epl-shadow-hover);
    border-color: var(--epl-primary-light);
}

.gpc-portale-box img {
    max-width: 80%;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Responsive portali */
@media (max-width: 768px) {
    .gpc-portali-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .gpc-portali-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gpc-portale-box {
        padding: var(--epl-spacing-md);
        min-height: 100px;
    }

    .gpc-portale-box img {
        max-height: 50px;
    }
}
