﻿﻿ /* =======================
   Layout base
   ======================= */
body {
    font-family: var(--font-family, 'Montserrat', sans-serif) !important;
}

h3 {
    font-size: 1.5rem !important;
    font-weight: 400 !important;
    margin: 1.25rem 0 1.25rem .75rem !important;
    border-left: 8px solid var(--tertiary-color);
    padding-left: 12px;
    color: #111;
}

h4 {
    font-size: 1.2rem !important;
    font-weight: 400 !important;
    margin: 1.25rem 0 1.25rem .75rem !important;
    border-left: 8px solid var(--tertiary-color);
    padding-left: 12px;
    color: #111;
}

body.split-layout {
    display: flex;
    height: 100vh; /* fissa altezza viewport */
    overflow: hidden; /* blocca scroll body */
}


/*
#logoWeb {
    margin: 3px;
    max-height: 57px;
    max-width: 400px;
    height: auto;
    width: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1.4s ease;
    filter: none;
    z-index: 3002 !important;
}
.az-navbar {
    position: fixed;
    top: 25px;
    width: 100% !important;
    height: 80px;
    z-index: 20 !important;
    background-color: rgba(255,255,255,255);  bianco semitrasparente 
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    font-family: var(--font-family, 'Montserrat'), sans-serif;
}
*/

.espandi-colonna-btn {
    display: none;
}

/* Toggle flottante mobile */
.svc-toggle {
    position: fixed;
    top: 120px;
    right: 18px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3001;
    transition: all 0.2s ease;
}

    .svc-toggle:hover {
        background: rgba(0, 0, 0, 0.6);
        box-shadow: 0 0 12px var(--tertiary-color, #ff7100);
    }



/* Modal fullscreen scuro */
.svc-modal {
    position: fixed;
    inset: 0;
    z-index: 3002;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(2px);
    overflow-y: auto;
}

    .svc-modal[hidden] {
        display: none;
    }

/* Pannello centrale */
.svc-modal-panel {
    width: 92vw;
    max-width: 520px;
    max-height: 80vh;
    background: rgba(0,0,0,.1);
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 1rem 1rem 1.25rem;
    position: relative;
    color: #fff;
}

/* Lista servizi dentro il modal */
.servizi-modal-list {
    margin-top: .5rem;
    max-height: 35vh;
    overflow-y: auto;
    padding: .25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .servizi-modal-list::-webkit-scrollbar {
        display: none;
    }

/* Titolo e chiudi */
.svc-title {
    margin: 0 2rem .5rem 0;
    font-weight: 700;
}

.svc-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
}

/* Riusa card vetro orizzontali anche nel modal */
.servizi-modal-list .servizio-card {
    width: 100%;
    margin-bottom: 1rem;
}

    .servizi-modal-list .servizio-card img {
        width: 30%;
    }


/* Colonna sinistra SEMPRE fissa */
.colonna-sinistra {
    position: fixed;
    top: 5px;
    padding-top: 100px;
    left: 0;
    width: 380px;
    bottom: 0;
    background: linear-gradient( to bottom, color-mix(in srgb, var(--tertiary-color) 95%, white 5%), color-mix(in srgb, var(--tertiary-color) 85%, black 15%) );
    color: var(--primary-color, #fff);
    box-shadow: inset -15px 0 205px rgba(0,0,0,0.5);
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}


    .colonna-sinistra::-webkit-scrollbar {
        display: none;
    }


.overlay-box {
    margin: 2rem;
    max-width: 90%;
}

.colonna-sinistra .hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* croppato in larghezza */
    z-index: 0;
    pointer-events: none;
}

.colonna-sinistra .overlay-box {
    position: relative;
    z-index: 1;
}

.video-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient( to top left, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.4) 30%, rgba(0, 0, 0, 0.1) 70%, transparent 100% );
}

/* Wrapper verticale centrato e scrollabile */
.servizi-card-wrapper.overlay-bottom {
    position: absolute;
    bottom: 0; /* ⬅️ distanza dal fondo */
    left: 0;
    width: 100%;
    max-height: 50vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: .75rem;
    padding-inline: 1.5rem;
    z-index: 3;
    /* Scroll invisibile */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .servizi-card-wrapper.overlay-bottom::-webkit-scrollbar {
        display: none;
    }

    /* Spazi fittizi per maschera */
    .servizi-card-wrapper.overlay-bottom::before {
        content: "";
        display: block;
        height: 3rem;
        flex-shrink: 0;
    }

    .servizi-card-wrapper.overlay-bottom::after {
        content: "";
        display: block;
        height: 7rem;
        flex-shrink: 0;
    }

/* Maschera verticale */
.servizi-card-wrapper.overlay-bottom {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

@media (max-width: 1250px) {
    .servizi-card-wrapper.overlay-bottom {
        display: none !important;
    }
}

/* Card vetro + layout orizzontale */
.servizio-card {
    display: flex;
    flex-direction: row;
    align-items: start;
    gap: 1rem;
    width: 100%;
    padding: .75rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
    color: white;
    transition: all 0.2s ease;
}

    .servizio-card:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .servizio-card.active {
        border-left: 14px solid var(--tertiary-color, #ff7100);
        background-color: rgba(255, 255, 255, 0.05);
    }

    .servizio-card a {
        display: flex;
        align-items: center;
        gap: 1rem;
        width: 100%;
        text-decoration: none;
        color: inherit;
    }

    .servizio-card img {
        width: 30%;
        height: auto;
        object-fit: cover;
        border-radius: 0.5rem;
        margin-bottom: 0;
    }

    .servizio-card h5 {
        font-size: 1rem;
        font-weight: 600;
        margin: 0 0 0.3rem;
        color: var(--primary-color, #fff);
    }

    .servizio-card p {
        font-size: 0.85rem;
        margin: 0;
        color: #ddd;
    }

    .servizio-card .card-text-content {
        flex-grow: 1;
    }

    .servizi-divider {
    margin: 18px 0;
    border: none;
    height: 10px;
    background: var(--primary-color) !important;
}

.brand-entry {
    padding: 8px 0;
}

    .brand-entry a {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

.brand-logo-small {
    width: 48px !important;
    height: 48px !important;
    margin: 0 1rem 0 1rem;
    background: white;
    padding: 0;
    border-radius: 4px;
    object-fit: contain;
}


.brand-entry-text {
    display: flex;
    width: 100%;
    align-items: center;
}

.brand-name {
    flex: 1;
    color: var(--primary-color);
    font-size: 1rem !important;
}

.brand-count {
    background: var(--tertiary-color);
    color: var(--primary-color);
    padding: 2px 8px;
    margin-right: 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: .75rem;
}
.brand-entry.active {
    border-left: 4px solid var(--tertiary-color);
    background: rgba(255,255,255,0.15);
}

/* Colonna destra che scorre */
.colonna-destra {
    margin-top: 5px;
    margin-bottom: 50px;
    flex: 1;
    position: relative;
    min-height: 100%; /* l’altezza cresce con il contenuto */
    height: auto; /* 🔹 togli 100vh */
    overflow-y: auto;
    margin-left: 380px; /*lascia spazio alla colonna sinistra */
    overflow-y: auto; /* scroll solo a destra */
    padding: 2rem;
    background-color: var(--secondary-color);
    align-items: flex-start;
}

.colonna-destra {
    position: relative; /* necessario per gli overlay */
}

    /* layer stelle 1 */
    .colonna-destra::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        opacity: .9;
        background-image: url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'> <rect fill='none' width='400' height='400'/> <g fill='white' opacity='0.9'> <circle cx='40' cy='80' r='0.8'/> <circle cx='120' cy='200' r='1.4'/> <circle cx='300' cy='140' r='1.0'/> <circle cx='200' cy='60' r='1.8'/> <circle cx='350' cy='260' r='1.2'/> <circle cx='220' cy='320' r='0.9'/> <circle cx='60' cy='360' r='1.6'/> <circle cx='180' cy='100' r='1.1'/> <circle cx='280' cy='280' r='1.9'/> <circle cx='360' cy='200' r='1.3'/> </g> </svg>"); background-repeat: repeat;
        animation: starsX1 10s linear infinite;
    }


    /* layer stelle 2 */
    .colonna-destra::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        opacity: .25;
        background-image: url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='500' height='500'> <defs> <filter id='glow2' x='-50%' y='-50%' width='200%' height='200%'> <feGaussianBlur in='SourceGraphic' stdDeviation='0.7' result='blur'/> <feMerge><feMergeNode in='blur'/><feMergeNode in='SourceGraphic'/></feMerge> </filter> </defs> <rect fill='none' width='500' height='500'/> <g fill='white' opacity='1.0' filter='url(%23glow2)'> <circle cx='90' cy='120' r='1.0'/> <circle cx='240' cy='60' r='1.8'/> <circle cx='410' cy='210' r='1.2'/> <circle cx='100' cy='300' r='0.7'/> <circle cx='350' cy='400' r='2.0'/> <circle cx='200' cy='450' r='1.1'/> <circle cx='460' cy='120' r='1.6'/> <circle cx='150' cy='180' r='0.9'/> <circle cx='300' cy='350' r='1.5'/> <circle cx='420' cy='280' r='2.1'/> </g> </svg>"); background-repeat: repeat;
        animation: starsX2 20s linear infinite;
    }


    .colonna-destra::before,
    .colonna-destra::after {
        position: fixed; /* 🔹 invece che absolute → resta sullo sfondo */
        top: 0;
        left: 380px; /* stesso offset della colonna */
        width: calc(100% - 380px);
        height: 100%; /* copre l’intera finestra, anche scrollando */
        z-index: 0 !important;
    }

@keyframes stars-pan-1 {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 0%;
    }
}

@keyframes stars-pan-2 {
    0% {
        background-position: 100% 100%;
    }

    50% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 100%;
    }
}
@keyframes starsX1 {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 1200px 0;
    }
    /* 🔹 movimento orizzontale */
}

@keyframes starsX2 {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 1600px 0;
    }
    /* 🔹 movimento orizzontale */
}



/* Espansione colonna sinistra */
body.expanded .colonna-sinistra {
    display: none;
}

body.expanded .colonna-destra {
    flex: 1 0 100%;
}

/* =======================
   Hero Banner
   ======================= */
#heroBanner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}



#contenitoreUsato {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start !important; /* 👈 forza allineamento sinistro */
    align-items: flex-start !important;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* =======================
   Griglia Card
   ======================= */
.masonry-grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: 1fr; /* una colonna sola */
    gap: 1.5rem;
    align-items: center; /* centra le card */

}



/* Card orizzontale usato */
.card-offerta {
    margin: 0 auto .5rem auto; /* centra orizzontalmente */
    width: 100%;
    max-width: 1000px;
    border-radius: 18px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-left: 0 !important;
    margin-right: 0 !important;
    cursor: pointer;
}


    .card-offerta .card-horizontal {
        background: rgba(255, 255, 255, 0.3); /* più trasparente */
        border-radius: 22px !important;
        padding: 0;
        display: flex;
        flex-direction: column;
        backdrop-filter: blur(12px) saturate(1.4);
        -webkit-backdrop-filter: blur(12px) saturate(1.4);
        border: 1px solid rgba(255, 255, 255, 0.25); /* bordo chiaro */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); /* ombra più soft */
    }

    .card-offerta .click-block {
        pointer-events: none;
    }



.card-offerta .card-body {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    padding: 1rem;
}

    /* immagine */
    .card-offerta .card-img-block {
        flex: 0 0 480px !important;
        width: 480px !important; /* forza anche la width */
        position: relative;

        
    }

        .card-offerta .card-img-block img {
            width: 100% !important;
            height: auto !important;
            aspect-ratio: 16/10;
            object-fit: cover;
            border-radius: 6px;
            opacity: 1;

        }


    /* responsive: su mobile stacka immagine sopra e info sotto */
    @media (max-width: 1250px) {



        .card-offerta .card-body {
            display: flex !important;
            flex-direction: column !important;

        }

        .card-offerta .card-img-block {
            flex: 0 0 100% !important; /* la colonna prende tutta la larghezza */
            width: 100% !important;

            
        }



            .card-offerta .card-img-block img {
                width: 100% !important; /* l'immagine segue la larghezza */
                height: auto !important; /* mantiene proporzioni */
                aspect-ratio: 16/10; /* opzionale, se vuoi forzare proporzioni */
                object-fit: cover;
            }
    }
    /* prezzo */
    .card-offerta .prezzo {
    color: var(--primary-color) !important;
    border-left: 8px solid var(--tertiary-color);
    font-size: 1.8rem !important;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .5rem; /* 🔹 spazio sotto al prezzo */
    padding-left: 1rem; /* 🔹 spazio tra bordo e testo */
}

.card-offerta h5 {
    font-size: 1.25rem; /* grandezza titolo */
    font-weight: 700; /* semi-bold */
    gap: .5rem;
    color: var(--primary-color);
    margin-bottom: .5rem; /* 🔹 spazio sotto al prezzo */
    padding-left: .5rem; /* 🔹 spazio tra bordo e testo */
    border-left: 8px solid var(--tertiary-color);
    border-top-left-radius: 6px;
}
.card-offerta h5 span{
    font-size: 1.1rem !important; /* grandezza titolo */
    
    color: var(--primary-color) !important;
    margin-bottom: .5rem; /* 🔹 spazio sotto al prezzo */
    
}



    /* dati */
.card-offerta .dati-base {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* due colonne */
    gap: 6px 1px; /* spazio tra righe e colonne */
    margin: 0;
    padding: 0;
    color: var(--primary-color) !important;
}
    .card-offerta .dati-base li {
        display: flex;
        align-items: center; /* icona e testo allineati verticalmente */
        gap: 6px; /* spazio tra icona e testo */
        color: var(--primary-color) !important;
    }
    .card-offerta .dati-base i {
        display: flex;
        align-items: start;
        gap: 2px; /* spazio tra icona e testo */
        margin-right: 6px;
        color: var(--primary-color) !important;
        flex-wrap: nowrap;
        overflow-x: auto; /* scroll orizzontale se non ci sta */
        flex-shrink: 0; /* l’icona non si riduce */
    }


.card-offerta .anno-km {
    font-weight: 600; /* necessario per FA6 solid */
    margin-right: 6px;
    color: var(--primary-color) !important;

}

.card-offerta .anno-km i {
    font-weight: 900; /* necessario per FA6 solid */
    font-family: "Font Awesome 6 Free";
    margin-right: 6px;
    color: var(--primary-color) !important;
}

    .card-offerta .separator-info {
        width: 100%;
        height: 1px;
        background-color: var(--tertiary-color, #333);
        opacity: 1; /* forza colore pieno */
        border: none;
        margin: 0.5rem 0 !important; /* più spazio sopra e sotto */
    }


/* IVA esposta */
.card-offerta .iva-esposta {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-color, #555);
    background: var(--tertiary-color);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


    /* Badge NEW */

    .card-offerta .badge-new {
        background-color: #FF7100;
        color: #fff;
        font-weight: 600;
        font-size: 0.75rem;
        padding: 4px 6px;
        border-radius: 4px;
        text-transform: uppercase;
        
    }

.card-offerta .badge-opzionata {
    background-color: #ffc107; /* giallo Bootstrap */
    color: #000;
    font-size: 0.75rem !important;
    padding: 4px 6px !important;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    
}



.photo-count-overlay {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    backdrop-filter: blur(2px);
}

    .photo-count-overlay i {
        font-size: 14px;
    }

.photo-count-text {
    font-weight: 600;
}

/* Badge IVA */
.card-offerta .badge {
    font-size: 0.75rem;
}



.card-offerta .btn {
    background: var(--tertiary-color) !important; /* forza colore base */
    border: none;
    position: relative;
    overflow: hidden;
    color: var(--primary-color);
    transition: all 0.3s ease;
    width: 50%; /* occupa tutta la larghezza */
    height: 35px;
    border-radius: 8px;
    font-size: .9rem; /* grandezza testo */
    font-weight: 600; /* grassetto medio */
    letter-spacing: 0.5px; /* spaziatura lettere */
    display: flex;
    align-items: center; /* centra verticalmente */
    justify-content: center; /* centra orizzontalmente */
}

    .card-offerta .btn:hover {
        background: var(--tertiary-color) !important; /* 🔺 mantieni lo stesso colore */
        color: var(--primary-color);
    }

    .card-offerta .btn::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0; /* parte dall’alto */
        height: 50%;
        background: rgba(255,255,255,0.15);
        transition: all 0.3s ease; /* 🔺 animazione */
    }

    /* hover → sposta overlay in basso */
    .card-offerta .btn:hover::before {
        top: auto;
        bottom: 0; /* si muove in basso */
    }

/* Bottone condividi dentro le card */
.card-offerta .copy-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    background-color: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    display:none;
}

    .card-offerta .copy-link-btn img {
        transition: filter 0.3s ease;
        margin: 0;
    }

    /* Hover: sfondo col secondary + icona invertita */
    .card-offerta .copy-link-btn:hover {
        background-color: var(--tertiary-color);
        border-color: var(--secondary-color);
        color: #fff; /* se aggiungi testo dentro il bottone */
    }

        .card-offerta .copy-link-btn:hover img {
            filter: invert(1);
        }

.card-footer-dealer {
    padding: 1rem;
    border-top: 1px solid #eee;
    background: var(--primary-color);
    border-end-end-radius: 18px;
    border-end-start-radius: 18px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

.dealer-logo-footer {
    width: auto;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
    transform:none !important;
}
.dealer-address {
    min-width: 0; /* fondamentale su mobile */
}

#logoWebFooter {

}

.btn-info-footer {
    white-space: nowrap;
}

#galleryOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

    #galleryOverlay.d-none {
        display: none;
    }

.gallery-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

    .gallery-content img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.gallery-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}

.gallery-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: #fff;
    font-size: 0.9rem;
}


.copy-tooltip {
    position: absolute;
    bottom: 120%; /* sopra il bottone */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

@media (max-width: 1250px) {
    .card-footer-dealer {
        flex-wrap: wrap;
        align-items: center;
    }

    .btn-info-footer {
        flex-basis: 100%;
        width: 100%;
        margin-top: 0.5rem;
    }

    .card-offerta .btn {
        margin-top: 1.5rem;
        width: 100%; /* occupa tutta la larghezza */
        height: 40px;
        
    }
}



.copy-tooltip.show {
    opacity: 1;
}


/* =======================
   Loader + Skeleton
   ======================= */

.scroll-loader {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.card-skeleton {
    width: 280px;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.skeleton-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ddd;
    border-radius: 6px;
    z-index: 2;
    animation: pulse 1.5s infinite;
}


@keyframes pulse {
    0% {
        background-color: #e1e1e1;
    }

    50% {
        background-color: #f2f2f2;
    }

    100% {
        background-color: #e1e1e1;
    }
}

.skeleton-line {
    height: 12px;
    background: #e1e1e1;
    border-radius: 4px;
    margin-bottom: .5rem;
}

    .skeleton-line.short {
        width: 40%;
    }

    .skeleton-line.medium {
        width: 70%;
    }

    .skeleton-line.long {
        width: 100%;
    }

#skeletonScrollLoader {
    display: none;
}

/* Spinner circolare personalizzato */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--secondary-color) 99%, transparent);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    overflow: hidden; /* evita scrollbar durante l'animazione */
}

.spinner {
    width: 148px;
    height: 148px;
    border: 14px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--tertiary-color, #333);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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



/* =======================
   Pulsante espandi colonna
   ======================= */
.espandi-colonna-btn {
    position: absolute;
    top: 50%;
    left: 380px;
    transform: translateY(-50%);
    background: #0d6efd;
    color: #fff;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 99;
    transition: all 0.2s ease;
}

body.expanded .espandi-colonna-btn {
    left: 10px;
    transform: translateY(-50%) rotate(180deg);
}

.espandi-colonna-btn i {
    font-size: 1rem;
}

.img-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
}

    .img-modal .modal-inner {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        position: relative;
    }

    /* Desktop: immagine proporzionata in base all'altezza */
    .img-modal .modal-content {
        height: 90vh; /* forza sempre l’altezza */
        width: auto; /* calcola proporzionata */
        max-width: 100vw; /* non uscire dalla viewport */
        border-radius: 6px;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }



    .img-modal .close-modal {
        position: absolute;
        top: 20px;
        right: 20px;
        color: #fff;
        font-size: 2rem;
        cursor: pointer;
        z-index: 2100;
    }

.modal-nav {
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 10px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2050;
}

    .modal-nav.prev {
        left: 10px;
    }

    .modal-nav.next {
        right: 10px;
    }

/* bottone chiudi mobile */
@media (max-width: 1250px) {
    .img-modal .close-modal {
        display: none; /* nascondi la X in alto */
    }

    .modal-close-mobile {
        position: fixed;
        bottom: 60px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0,0,0,0.7);
        color: #fff;
        padding: 10px 20px;
        border-radius: 25px;
        font-size: 1rem;
        cursor: pointer;
        z-index: 2200;
    }
}

/* Mobile → fullscreen scrollabile */
@media (max-width: 1250px) {
    .img-modal {
        overflow-y: auto;
        display: none;
    }

        .img-modal .modal-inner {
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            padding-top: 50px;
        }

        .img-modal .modal-content {
            max-height: 80vh !important; /* l’altezza è il vincolo */
            width: auto; /* calcola la larghezza proporzionata */
            height: auto;
            border-radius: 6px;
            object-fit: contain;
        }

    .modal-nav {
        display: none; /* niente frecce su mobile */
    }
}

/* =======================
   Responsive
   ======================= */
@media (max-width: 1250px) {
    body.split-layout {
        display: block; /* stack verticale */
        height: auto; /* altezza dinamica */
        overflow: auto; /* scroll normale */
    }

    .colonna-sinistra {
        position: relative;
        width: 100%;
        height: auto; /* non forzare 100vh */
        display: block;
    }

    .colonna-destra {
        width: 90% !important;
        height: auto;
        overflow-y: visible; /* scroll delegato al body */
       
    }

    .espandi-colonna-btn {
        display: none; /* non serve su mobile */
    }
}

#ordinamentoWrapper {
    position: sticky;
    top: 0;
    margin: 0 0;
    max-width: 960px;
    background: transparent;
    z-index: 30;
    border-radius: 16px;
    padding: 0.5rem 1rem;
}
.sort-btn {
    display: inline-flex; /* diventa contenitore flex */
    align-items: center; /* centra verticalmente icona + testo */
    background-color: transparent !important;

    color: var(--primary-color) !important;
    border: none !important;
    gap: 16px; /* distanza tra icona e testo */
    padding: 6px 10px !important; /* spazio interno bottone */
    border-radius: 12px !important; /* opzionale */
}

    .sort-btn:hover {
        background-color: var(--tertiary-color) !important;
        color: transparent;
        border-color: #0d6efd;
    }

    .sort-btn.active {
        background-color: var(--tertiary-color) !important;
        color: transparent;
        border-color: #0d6efd;
    }
        .sort-btn.active::before,
        .sort-btn:hover::before {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            height: 50%;
            background: rgba(255,255,255,0.15);
            transition: all 0.3s ease;
        }


#ordinamentoWrapper .input-group {
    background: transparent !important;
    width: 100% !important;
}

/* Campo ricerca trasparente */
#searchInput.form-control {
    background-color: transparent !important;
    border-color: #fff;
    border-left: none !important;
    border-start-end-radius: 16px !important; /* arrotondato */
    border-end-end-radius: 16px !important; /* arrotondato */
    color: #fff !important; /* testo bianco */
    font-weight: 400;
}

    #searchInput.form-control::placeholder {
        color: rgba(255,255,255); /* placeholder bianco semitrasparente */
    }

/* Contenitore icona a sinistra */
/* Contenitore icona */
.input-group-text {
    background-color: transparent !important;
    border: 1px solid #fff !important; /* bordo bianco */
    border-right: none !important;
    border-end-start-radius: 16px !important; /* arrotondato */
    border-start-start-radius: 16px !important; /* arrotondato */
    color: #fff !important;
    padding: 6px 10px; /* controlla lo spazio interno */
    margin-right: 0; /* gap rispetto al campo input */
}

    /* Lente */
    .input-group-text i {
        color: #fff !important;
        font-size: 14px; /* opzionale, per dimensione icona */
    }




/* Mobile: reduce font/icon size and padding */
@media (max-width: 1250px) {
    #ordinamentoWrapper {
        text-align: left !important;
    }
        /* era center */
        #ordinamentoWrapper .sort-group {
            display: none !important;
            justify-content: flex-start !important;
            height: 40px;
            width: 100% !important;
        }

        #ordinamentoWrapper .btn.sort-btn {
            min-width: auto; /* lascia adattare */
            font-size: .8rem; /* riduce il testo */
            padding: 4px 6px; /* meno spazio interno */
            gap: 1px !important; /* distanza icona-testo più stretta */
            min-width: 110px;
        }

        #ordinamentoWrapper > .flex-grow-1 {
            max-width: none !important;
            width: 100% !important;
        }
}

      

/* ==========================
   Colonna destra DETTAGLI USATO
   ========================== */

.colonna-destra-dettagli {
    margin-top: 25px !important;
    margin-left: 380px !important; /* 🔺 questa riga */
    background-color: #fff;
    color: #111;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
    width: 100%;
    margin: 2rem auto;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    z-index: 30;
}

.wrapper-dettagli {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 1.5rem;
    padding: 0 1rem;
    contain: layout paint;
}

/* colonne responsive */
.col-sx {
    margin-top: 0;
}

.col-sx, .col-dx {
    width: 100%;
    
}

/* desktop */
@media (min-width: 1250px) {
    .wrapper-dettagli {
        flex-direction: row;
        align-items: flex-start;
    }

    .col-sx {
        width: 50%;
    }

    .col-dx {
        width: 50%;
    }
}


/* wrapper fisso 380px di altezza */
.img-wrapper {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    margin-bottom: .1rem;
}

    /* immagine hero dentro il wrapper: riempi e centra */
    .img-wrapper .img-hero-auto {
        width: 100%;
        height: 100%;
        max-height: none; /* override del max-height globale */
        object-fit: cover; /* riempi e taglia in altezza se serve */
        object-position: center; /* centrata verticalmente e orizzontalmente */
        display: block;
    }

    /* video AI hero dentro il wrapper: stesso comportamento dell’immagine */
    .img-wrapper #heroVideoAI {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        /* opzionale: niente controlli */
        /* pointer-events: none; */
    }


/* Wrapper: logo + titolo affiancati */
.overlay-inline {
    position: absolute;
    bottom: .75rem;
    left: .75rem;
    display: flex;
    align-items: end;
    gap: 1rem;
    z-index: 2;
}

/* Logo */
#logoMarca {
    height: 62px;
    object-fit: contain;
    max-width: 120px;
    background-color: rgba(255, 255, 255);
    padding: 0.25rem 0.25rem;
    border-radius: 100px;
    display: none; /* mostrato da JS */
}

/* Titolo (identico al tuo) */
.img-wrapper .overlay-title {
    position: relative;
    margin: 0;
    z-index: 2;
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    font-size: clamp(1rem, 2.3vw, 5.8rem);
    padding: .5rem .75rem;
    background: rgba(0, 0, 0, .5);
    border-radius: 6px;
    pointer-events: none;
}


.gallery-slider {
    position: relative;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 5 / 4;
}

    .gallery-slider img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: opacity 0.5s ease-in-out;
        display: block;
    }



/* Navigazione */
.nav-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    margin: 0 -15px 0 -15px;
    width: 80px;
    background-color: rgba(0, 0, 0, 0.4);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slider:hover .nav-btn {
    opacity: 1;
}

.nav-btn.left {
    left: 0;
}

.nav-btn.right {
    right: 0;
}

.gallery-slider:hover .nav-btn {
    opacity: 1;
}

.nav-btn.left {
    left: 1rem;
}

.nav-btn.right {
    right: 1rem;
}
/* =========================
   GALLERY – BULLETS OVERLAY
   ========================= */

.gallery-overlay-bullets {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    pointer-events: none;
    z-index: 5;
}

    .gallery-overlay-bullets span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
    }

        .gallery-overlay-bullets span.active {
            background: rgba(255, 255, 255, 0.9);
        }


/* =========================
   DESCRIZIONE – BLOCCO EDITORIALE
   ========================= */

.descrizione-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    padding: 1rem;
}

    .descrizione-content p {
        margin: 0 0 0.6rem 0;
    }

    .descrizione-content h4,
    .descrizione-content h5 {
        margin: 1rem 0 0.4rem 0;
        font-weight: 600;
    }

    .descrizione-content ul {
        margin: 0.2rem 0 0.8rem 1.2rem;
        padding: 0;
    }

    .descrizione-content li {
        list-style: disc;
        margin-bottom: 0.3rem;
    }



/* =========================
   DESCRIZIONE – COLLAPSE / EXPAND
   ========================= */

/* stato compatto */
.descrizione-collapsed {
    max-height: 220px; /* ~6–7 righe */
    overflow: hidden;
    position: relative;
}

    /* fade in basso */
    .descrizione-collapsed::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 64px;
        pointer-events: none;
        background: linear-gradient( rgba(255,255,255,0), rgba(255,255,255,1) );
    }

/* bottone */
/* Bottone glass coerente con il resto del sito */
.descrizione-toggle {
    appearance: none;
    width: 100%;
    cursor: pointer;
    padding: 0.35rem 0.95rem;
    margin-top: 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    /*border-left: 8px solid var(--tertiary-color);
     VETRO GRIGIO */
    background: linear-gradient( 135deg, rgba(120, 120, 120, 0.28), rgba(60, 60, 60, 0.12) );
    backdrop-filter: blur(14px) saturate(115%);
    -webkit-backdrop-filter: blur(14px) saturate(115%);
    /* vetro INCASSATO, niente floating */
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    /* testo inciso nel vetro */
    transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}


/* =========================
   BLOCCO COMMERCIALE – SOFT BOX
   ========================= */

.descrizione-commerciale {
    margin-top: 0.8rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(2px);
}

    /* badge discreto */
    .descrizione-commerciale::before {
        content: "Info commerciali";
        display: inline-block;
        margin-bottom: 0.35rem;
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        color: #555;
        background: rgba(0, 0, 0, 0.06);
        padding: 2px 8px;
        border-radius: 999px;
    }

    /* testo interno */
    /* bullets soft per righe commerciali */
    .descrizione-commerciale p {
        position: relative;
        padding-left: 1.2rem;
        font-size: 0.8rem;
    }

        .descrizione-commerciale p::before {
            content: "•";
            position: absolute;
            left: 0;
            top: 0;
            color: #555;
            font-size: 1rem;
            line-height: 1.4;
        }



.scheda-tecnica-wrapper {
    padding: 1rem;
    background-color: #fff;
    border-radius: 6px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.dati-auto-wrapper {
    margin-top:0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.prezzoproposto {
    font-size: .9rem;
}


/* ===============================
   PREZZO – POSIZIONE STABILE (NO STICKY)
=============================== */

.prezzo-offerta {
    position: static;
    margin-top: -3.2rem; /* posizione visiva */
    margin-left:1rem !important;

    width: auto;
    white-space: normal;
    font-size: clamp(3.5rem, 4.8vw, 5.8rem);
    font-weight: 700;
    color: var(--secondary-color);
    z-index: 5;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.dati-auto-wrapper {
    padding-top: 0; /* spazio riservato al prezzo */
    margin-right: 2rem;
}

@media (max-width:1250px) {
    .prezzo-offerta {
        margin-top: -2rem;
    }
    
}

    .prezzo-offerta .prezzo-valore {
        display: inline-flex; /* altezza = contenuto */
        align-items: flex-start; /* aggancia in alto */
        border-left: 10px solid var(--tertiary-color);
        padding-left: 12px;
        line-height: 1;
    }

    .prezzo-offerta > * {
        margin: 0;
        line-height: 1;
    }



    .prezzo-offerta .riga-prezzo {
        margin: 0;
        line-height: 1;
        display: flex;
        align-items: flex-start;
        gap: .5rem;
    }

    .prezzo-offerta .prezzo-accessori {
        margin: .25rem 0 0;
        line-height: 1.2;
    }

    /* stack: etichetta sopra, prezzo sotto */
    .prezzo-offerta .prezzo-valore {
        display: inline-flex;
        flex-direction: column; /* <<< */
        align-items: flex-start;
        gap: .25rem;
        white-space: normal; /* non ereditare il nowrap del parent */
    }

    /* riga prezzo allineata in basso */
    .prezzo-offerta .riga-prezzo {
        display: flex;
        align-items: inherit;
        gap: .5rem;
        margin: 0;
        line-height: 1;
    }

    .prezzo {
        display: flex;
        align-items: center !important; /* centro verticale */
    }

    #prezzoAccessori {
        display: block;
        margin: 10px 0 0 10px; /* piccolo distacco dal prezzo */
        font-size: 1rem; /* più piccolo del prezzo */
        font-weight: 400 !important; /* testo normale */
        color: var(--secondary-color);
        margin-bottom: 0;
        opacity: .9;
        line-height: 1.3;
    }


    .badge-iva {
        background-color: var(--tertiary-color);
        color: #fff;
        font-size: 0.7rem;
        padding: .5rem 0.5rem;
        border-radius: 4px;
        text-transform: uppercase;
        display: inline-flex;
        align-items: center;
        line-height: 1;
    }

    .info-cloud {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem .25rem;
        justify-content: flex-start;
        align-items: flex-start;
        line-height: 1.2;
        background: rgba(0,0,8,0.1);
    }

    .info-item {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        font-weight: 500;
        color: #222;
        white-space: nowrap;
        opacity: 0.9;
    }

        .info-item i {
            opacity: 0.6;
        }

    .info-cloud {
        display: flex;
        flex-wrap: wrap;
        background: rgba(255, 255, 255, 0.12);
        border-radius: 12px;
        line-height: 1.2;
        justify-content: center;
        text-align: center;
    }

    .info-item {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        font-weight: 500;
        color: #222;
        white-space: nowrap;
        opacity: 0.9;
        transform: translateY(0);
        transition: transform 0.2s ease;
        justify-content: center;
        flex: 0 0 auto;
    }

        .info-item:nth-child(odd) {
            align-self: flex-start;
        }

        .info-item:nth-child(even) {
            align-self: flex-end;
        }

        .info-item i {
            opacity: 0.6;
            font-size: 1em;
        }

    .info-item {
        animation: floatY var(--float-time, 3s) ease-in-out infinite alternate;
    }

    @keyframes floatY {
        0% {
            transform: translateY(0);
        }

        100% {
            transform: translateY(var(--float-range, 3px));
        }
    }

    /* taglie variabili */
    .info-item.xs {
        font-size: .75rem;
        opacity: 0.6;
        font-weight: 600;
    }

    .info-item.sm {
        font-size: 1.2rem;
        opacity: 0.7;
        font-weight: 600;
    }

    .info-item.md {
        font-size: .95rem;
        opacity: 0.85;
    }

    .info-item.lg {
        font-size: 1.1rem;
        opacity: 1;
        font-weight: 600;
    }

    /* cloud effect (layout visivo sparso) */
    .info-item:nth-child(2n) {
        transform: translateY(2px);
    }

    .info-item:nth-child(3n) {
        transform: translateY(-2px);
    }

    .info-item:nth-child(4n) {
        transform: translateY(3px);
    }

    .info-item:nth-child(5n) {
        transform: rotateZ(-1deg);
    }


    .info-list {
        display: flex;
        flex-direction: column;
        gap: .4rem;
        font-size: .95rem;
        margin: 0 1rem 0 1rem;
        width: 100%;
    }

    .info-row {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        padding-bottom: .2rem;
    }

    .info-label {
        font-weight: 500;
        color: #555;
    }

    .info-value {
        font-weight: 600;
        color: #111;
        text-align: end;
    }





    .info-cards {
        gap: .2rem;
        margin-bottom: 1rem;
        flex-wrap: nowrap;
        display: flex;
        width: 100%;
    }

    .info-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: start;
        flex: 1 1 0;
        min-width: 0;
        line-height: 1.1;
        color: var(--secondary-color) !important;
        background-color: transparent !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        cursor: default !important;
    }



        .info-card i {
            font-size: 1rem;
            margin-bottom: .15rem;
        }

        .info-card .value {
            font-weight: 400;
            font-size: .9rem;
        }

        .info-card small {
            font-size: .75rem;
            opacity: .85;
        }

    @media (max-width:1250px) {
        .info-cards.tabs {
            flex-direction: column;
            gap: .35rem;
        }

        .info-card.tab {
            flex: 0 0 100%;
            width: 100%;
            min-width: 0;
        }


        .gallery-slider:hover .nav-btn {
            display: none;
            opacity: 1;
        }
    }

    .video-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        grid-auto-flow: dense;
        gap: 16px;
    }

    .video-card {
        position: relative;
        width: 100%;
        aspect-ratio: 16/9;
        overflow: hidden;
        border-radius: 0px;
        background: #000;
    }

        .video-card.vertical {
            aspect-ratio: 9 / 16; /* 🔑 override per i verticali */
        }

        .video-card:hover {
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
        }

        /* Video orizzontali (default) → taglia altezza */
        .video-card video {
            position: absolute;
            inset: 0; /* top/right/bottom/left:0 */
            width: 100%;
            height: 100%;
            object-fit: cover; /* riempie, taglia l’eccesso */
            display: block;
            border-radius: 6px;
            transform: none;
        }

        /* Quadrati con pillarbox interno → zoom extra */
        .video-card.square video {
            transform: scale(1.12); /* regola 1.05–1.3 se serve */
            transform-origin: center center;
        }

        /* Overlay con icona play */
        .video-card::after {
            content: "\f04b"; /* icona play (FontAwesome) */
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            font-size: 42px;
            color: rgba(255, 255, 255, 0.85);
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.25s ease;
        }

        .video-card:hover::after {
            opacity: 1;
        }


        /* Video verticali → lasciamo aspect-ratio 9:16 */
        .video-card.vertical {
            aspect-ratio: 9 / 16;
        }

        .video-card.square video {
            transform: scale(1.2); /* zoom per eliminare bande nere */
            transform-origin: center center;
        }


    /* Pulsanti di controllo custom (mute/unmute) */
    .video-controls {
        position: absolute;
        bottom: 8px;
        right: 8px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 20px;
        padding: 4px 10px;
        color: #fff;
        font-size: 14px;
        cursor: pointer;
        user-select: none;
        transition: background 0.2s ease;
    }

        .video-controls:hover {
            background: rgba(0, 0, 0, 0.8);
        }


    /* variante compatta, con wrap */
    .info-cards.compact {
        display: flex;
        flex-wrap: wrap;
        gap: .2rem;
    }

        /* card compatte: 3 per riga desktop, 2 tablet, 1 mobile */
        .info-cards.compact .info-card.tab {
            flex: 1 1 calc(33.333% - .2rem);
            min-width: 180px;
            max-width: 50%;
            padding: .45rem .6rem;
            font-size: .9rem;
            line-height: 1.1;
            cursor: default;
            border: none;
        }

            .info-cards.compact .info-card.tab i {
                margin-right: .35rem;
                font-size: .95rem;
            }

            .info-cards.compact .info-card.tab .value {
                font-weight: 400;
            }

    /* breakpoint */
    @media (max-width:1250px) {
        .info-cards.compact .info-card.tab {
            flex: 1 1 calc(50% - .2rem);
        }
    }

    @media (max-width:1250px) {
        .info-cards.compact .info-card.tab {
            flex: 1 1 100%;
            min-width: 0;
        }
    }



    .divider-line {
        width: 100%;
        height: 1px;
        background-color: #ddd;
        margin: 0.5rem 0;
    }

    .info-auto-extra {
        font-size: 0.9rem;
        color: #555;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
    }

    /* Titolo sezione */
    .scheda-title {
        font-size: 1.0rem;
        font-weight: 700;
        margin-bottom: 1.5rem;
        color: #222;
    }

    .tabs {
        display: flex;
        gap: 0.2rem;
        margin-bottom: 1rem;
    }

    .tab {
        background: var(--secondary-color, #000);
        border-top-left-radius: 6px;
        border-top-right-radius: 6px;
        color: var(--primary-color, #000);
        border: none;
        font-weight: 400;
        padding: 0.5rem 1rem;
        cursor: pointer;
        border-bottom: 6px solid transparent;
    }

        .tab.is-active {
            border-color: var(--tertiary-color, #000);
            font-weight: 600;
        }

    /* Applica anche alle tabelle base senza wrapper */
    .tech-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.9rem;
        color: #333;
    }

        .tech-table td {
            font-size: 0.9rem;
            padding: 0.25rem 0.75rem;
            border-top: 1px solid #ddd;
            vertical-align: top;
        }

            .tech-table td:first-child {
                font-weight: 400 !important;
                width: 50%;
                color: #000;
            }

        .tech-table tr:nth-child(even) {
            background-color: #f9f9f9;
        }


    .tech-table {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 1.5s ease, transform 1.5s ease;
    }

        .tech-table.is-visible {
            opacity: 1;
            transform: translateY(0);
        }

    .scheda-tecnica-wrapper .tech-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.9rem;
        color: #333;
        margin-top: 1rem;
    }

        .scheda-tecnica-wrapper .tech-table td {
            font-size: 0.9rem;
            padding: 0.25rem 0.75rem;
            border-top: 1px solid #ddd;
            vertical-align: top;
        }

            .scheda-tecnica-wrapper .tech-table td:first-child {
                font-weight: 600;
                width: 50%;
                color: #000;
            }

        .scheda-tecnica-wrapper .tech-table tr:nth-child(even) {
            background-color: #f9f9f9;
        }

    .tech-table td {
        font-size: 0.9rem;
        padding: 0.25rem 0.75rem;
        border-top: 1px solid #ddd;
        vertical-align: top;
    }

        .tech-table td:first-child {
            font-weight: 600;
            width: 50%;
            color: #000;
        }

    .tech-table tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    .tech-table-base {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.9rem;
        color: #333;
        margin: 0 1rem 0 1rem;
    }

        .tech-table-base td {
            padding: 0.4rem 0;
            border-top: 1px solid #ddd;
            vertical-align: middle;
        }

        .tech-table-base .label {
            font-weight: 500;
            text-align: left;
            color: #555;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 50%; /* oppure percentuale tipo 60% */
        }

        .tech-table-base .valore {
            text-align: right;
            font-weight: 600;
            color: #000;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 40%; /* oppure 40%, regolabile in base al layout */
        }

    /* Responsive */
    @media (max-width: 1250px) {
        .tech-table-base .label,
        .tech-table-base .valore {
            max-width: 130px;
            font-size: 0.85rem;
        }
    }

    .tech-table-base td:first-child {
        font-weight: 400;
        width: 50%;
        color: #000;
    }

    .tech-table-base tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    .serie-group {
        border: 1px solid rgba(255,255,255,.08);
        border-top-left-radius: 6px;
        border-top-right-radius: 6px;
        margin-bottom: .6rem;
        overflow: hidden;
        margin: 0 .5rem 0 .5rem;
    }

    .serie-group-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: .6rem .8rem;
        cursor: pointer;
        color: var(--primary-color);
        background: var(--secondary-color);
        transition: background-color 0.25s ease;
        border-bottom: 6px solid transparent;
    }

        .serie-group-header:hover {
            opacity: 1;
            border-color: var(--tertiary-color);
        }

    .serie-group:has(.serie-group-body.open) .serie-group-header {
        opacity: 1;
        border-color: var(--tertiary-color);
    }

    .serie-group-title {
        font-weight: 600;
    }

    .serie-count {
        opacity: .7;
        font-size: .9rem;
    }

    .serie-group-body {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 1.2s ease;
    }

        .serie-group-body.open {
            text-align: justify;
            max-height: 3000px; /* valore sufficiente */
            opacity: 1;
        }

    .serie-list {
        width: 100%;
        border-collapse: collapse;
        font-size: .9rem;
    }

        .serie-list td {
            padding: .35rem .5rem;
            line-height: 1.2;
            border-top: 1px solid #eaeaea;
            line-height: 1.5;
        }

        .serie-list tr:nth-child(even) {
            background: #f9f9f9;
        }


    .serie-actions {
        padding: .5rem .8rem;
        text-align: right;
    }

    .serie-show-more {
        border: 0;
        background: transparent;
        text-decoration: underline;
        cursor: pointer;
        font-size: .9rem;
    }


    /* Video gallery */
    #videoSection .vg-skel {
        background: #111;
    }

    #videoSection .vg-main {
        border-radius: 6px;
        overflow: hidden;
    }

        #videoSection .vg-main > iframe {
            border: 0;
            border-radius: inherit;
        }


    /* WRAPPER THUMBS */
    /* Wrapper: solo overlay, NON flex */
    #videoSection .vg-thumbs {
        position: relative;
        display: flex; /* wrapper in flex */
        align-items: center;
        padding: 0 0 6px; /* spazio per frecce */
        isolation: isolate;
        min-width: 0; /* fix se il parent è flex (Bootstrap) */
        overflow: hidden;
    }


    /* forza riga orizzontale del track */
    #videoSection .vg-track {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px;
        overflow-x: auto;
        flex: 1 1 auto; /* occupa tutta la riga */
    }



        /* ogni thumb resta su una sola riga */
        #videoSection .vg-track .vg-thumb {
            flex: 0 0 auto !important;
        }


        #videoSection .vg-track::-webkit-scrollbar {
            display: none;
        }

    /* Thumb */
    #videoSection .vg-thumb {
        flex: 0 0 auto;
        width: 160px;
        height: 90px;
        border: 1px solid rgba(255,255,255,.15);
        border-radius: 6px;
        overflow: hidden;
        cursor: pointer;
        scroll-snap-align: start;
    }

        #videoSection .vg-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        #videoSection .vg-thumb.is-active {
            outline: 2px solid var(--bs-primary,#0d6efd);
        }

    /* Frecce ai lati in overlay */
    #videoSection .vg-arrow {
        position: absolute;
        top: 2px;
        bottom: 0;
        width: 32px;
        height: 90%;
        margin: 0 -5px 0 -5px;
        display: grid;
        place-items: center;
        border: 0;
        border-radius: 6%;
        background: rgba(0,0,0,.6);
        color: #fff;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s;
        z-index: 2;
    }

    #videoSection .vg-prev {
        left: 4px;
    }

    #videoSection .vg-next {
        right: 4px;
    }

    #videoSection .vg-thumbs:hover .vg-arrow {
        opacity: 1;
        pointer-events: auto;
    }


    #videoSection .vg-track .vg-thumb {
        flex: 0 0 auto; /* ogni thumb resta in fila */
    }

    /* Mobile */
    @media (max-width:1250px) {
        #videoSection .vg-thumb {
            width: 44vw;
            height: calc(44vw * 9 / 16);
        }
    }


    /* Responsive */
    @media (max-width: 1250px) {
        .colonna-destra-dettagli {
            padding: 1.25rem;
            padding-top: 0 !important;
            margin: 0 1rem 0 0 !important;
        }

            .colonna-destra-dettagli #titoloAuto {
                font-size: 1.5rem;
            }

            .colonna-destra-dettagli #descrizione {
                font-size: 1rem;
            }

        .gallery-slider, .img-wrapper, .card-offerta, .masonry-grid {
            max-width: 100vw;
        }

        body.split-layout {
            overflow-y: auto; /* permetti lo scroll normale */
            overflow-x: hidden; /* blocca solo orizzontale */
        }
    }

    /* Mobile → annulla margini/padding laterali */
    @media (max-width: 1250px) {
        .colonna-destra,
        .colonna-destra-dettagli,
        .card-offerta,
        .wrapper-dettagli {
            margin-left: 0 !important;
            margin-right: 0 !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
            width: 100% !important;
            max-width: 100% !important;
        }

        .tabs {
            display: flex;
            flex-wrap: wrap;
        }

            .tabs .tab {
                flex: 0 0 49%; /* ciascuna metà */
                text-align: center;
                box-sizing: border-box;
            }
    }

    .wrapperCTA {
        position: fixed;
        right: 16px;
        bottom: 16px;
        z-index: 1000;
        margin: 2rem;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    /* sempre in riga */
    #ctaContacts {
        display: flex;
        flex-wrap: nowrap;
        gap: .5rem;
    }

        /* dimensioni fisse icone */
        #ctaContacts .cta-card {
            flex: 0 0 48px;
            width: 48px;
            height: 48px;
        }

        #ctaContacts .tab {
            padding: 0;
            border: 0;
        }


    @media (max-width:1250px) {
        .wrapperCTA {
            left: 0;
            right: 0;
            bottom: 12px;
            justify-content: center;
        }
    }

    .cta-cards-glass {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .4rem;
        background: rgba(255,255,255,.12);
        backdrop-filter: blur(10px) saturate(1.2);
        -webkit-backdrop-filter: blur(10px) saturate(1.2);
        border: 1px solid rgba(255,255,255,.2);
        border-radius: 12px;
        padding: .6rem .8rem;
        box-shadow: 0 8px 24px rgba(0,0,0,.12);
    }


    .cta-label {
        background: var(--tertiary-color);
        padding: .2rem .4rem;
        border-radius: 6px;
        font-size: .85rem;
        font-weight: 600;
        color: var(--primary-color);
        margin-right: .25rem;
        white-space: nowrap;
        border-bottom: solid 2px var(--tertiary-color);
    }

    /* contenitore vetro */
    #ctaContacts {
        background: rgba(255,255,255,.12);
        backdrop-filter: blur(10px) saturate(1.2);
        -webkit-backdrop-filter: blur(10px) saturate(1.2);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 12px;
        padding: 1.4rem .6rem;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
    }

        /* icone senza box pieno */
        #ctaContacts .cta-card {
            background: transparent;
            border-color: transparent;
            box-shadow: none;
        }


    .cta-icons {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: .5rem;
        flex-wrap: wrap;
        margin-top: 1rem;
    }

    .cta-card {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.45);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 12px;
        backdrop-filter: blur(8px);
        text-decoration: none;
        box-shadow: 0 1px 2px rgba(0,0,0,.05);
        transition: transform .15s ease, box-shadow .15s ease;
        cursor: pointer;
    }

        .cta-card i {
            font-size: 1.5rem;
        }

        .cta-card:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,.08);
        }

        .cta-card:active {
            transform: scale(.98);
        }
        /* colori icone */
        .cta-card i {
            color: currentColor;
        }

    .cta-wa {
        color: #25D366;
    }
    /* WhatsApp brand */
    .cta-email {
        color: var(--tertiary-color, #EA4335);
    }
    /* Email */
    .cta-tel {
        color: var(--secondary-color, #0B84FF);
    }
    /* Telefono */

    @media (max-width: 1250px) {
        .wrapperCTA {
            flex-direction: column;
            align-items: center;
            margin: 0;
            gap: .4rem;
            margin-bottom: 2rem;
            z-index: 10000;
        }

        #ctaContacts {
            flex-direction: row;
            padding: .2rem 1.6rem;
        }

        .cta-label {
            margin: 0 auto;
        }
    }

    .footer-dealer {
        background: var(--secondary-color, #0B84FF);
        margin: 3rem 1.5rem 0 0;
        padding: 2rem 0 2rem 0;
        font-size: .85rem;
        color: var(--primary-color, #0B84FF);
        border-top: 1px solid #e2e2e2;
    }

    @media (max-width:1250px) {
        .footer-dealer {
            margin: 3rem 0 0 0;
        }
    }

    .footer-inner {
        max-width: none;
        width: 100%;
        padding: 0 1.5rem;
    }

    /* === Contenitore blocco dealer === */
    .dealer-info {
        flex: 1 1 100%;
        line-height: 1.4;
    }

    /* === Logo dealer === */
    .dealer-logo {
        max-height: 48px;
        margin-bottom: .5rem;
        transition: opacity 0.4s ease;
        filter: brightness(0) invert(1);
    }

    /* === Link nel footer === */
    .footer-dealer a {
        color: var(--primary-color, #0B84FF);
        text-decoration: none;
    }

        .footer-dealer a:hover {
            text-decoration: underline;
        }

    /* === Indirizzo, sito, contatti: icone === */
    #dealerAddress i,
    #dealerSiteUrl i,
    #dealerPhone i,
    #dealerEmail i {
        color: var(--primary-color, #0B84FF);
        min-width: 1.2rem;
    }

    #dealerAddress {
        margin-bottom: 0.5rem;
    }

    .dealer-contact-row {
        margin-bottom: 0.25rem;
    }

    #dealerSiteUrl {
        margin-top: 0.6rem;
    }

    /* === Link sito dealer === */
    .dealer-url a {
        color: var(--primary-color, #0B84FF);
        font-size: .9rem;
        text-decoration: underline dotted;
        font-weight: 600;
    }

    /* === Telefono + Email sulla stessa riga === */
    .dealer-contact-row {
        display: flex;
        align-items: center;
        gap: .5rem;
        flex-wrap: wrap;
    }

        .dealer-contact-row p {
            margin: 0;
            display: flex;
            align-items: center;
            gap: .5rem;
        }

        .dealer-contact-row .sep {
            color: #999;
        }

    .social-icons {
        display: flex;
        gap: .5rem;
        margin-top: 1rem;
    }

        .social-icons a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 6px;
            background: #fff;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            color: #444;
            font-size: 1rem;
            transition: all 0.2s ease;
            text-decoration: none;
        }

            .social-icons a:hover {
                transform: scale(1.05);
            }

            .social-icons a.facebook {
                color: #1877f2;
            }

            .social-icons a.instagram {
                color: #e1306c;
            }

            .social-icons a.linkedin {
                color: #0077b5;
            }

            .social-icons a.youtube {
                color: #ff0000;
            }

            .social-icons a.whatsapp {
                color: #25d366;
            }

    .dealer-map {
        width: 100%;
        height: 240px;
        border-radius: 6px;
        margin-top: 1.5rem;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }


    /* toast discreto */
    .offer-viewers-toast {
        position: fixed;
        right: 2rem;
        top: 3rem;
        z-index: 9999;
        padding: .75rem 1rem;
        background: rgba(0,0,0,.75);
        color: #fff;
        border-radius: 8px;
        font-size: .9rem;
        line-height: 1.2;
        box-shadow: 0 8px 20px rgba(0,0,0,.2);
        pointer-events: none;
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 1.25s ease, transform 1.25s ease;
    }

        .offer-viewers-toast.is-visible {
            opacity: 1;
            transform: translateY(0);
        }

    @media (prefers-reduced-motion: reduce) {
        .offer-viewers-toast {
            transition: none;
        }
    }

    #galleryImage {
        transition: opacity 0.5s ease;
        opacity: 1;
    }

    /* ===============================
   BREADCRUMB – SINGLE SOURCE
=============================== */

    .breadcrumb-wrapper.glass-bc {
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        display: flex;
        align-items: center;
        padding: 6px 10px;
        box-sizing: border-box;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        overflow: hidden;
        z-index: 10;
    }

        .breadcrumb-wrapper.glass-bc nav,
        .breadcrumb-wrapper.glass-bc ol {
            height: 100%;
            display: flex;
            align-items: center;
            white-space: nowrap;
        }

        .breadcrumb-wrapper.glass-bc * {
            transition: none !important;
        }



    /* Lista breadcrumb */
    #breadcrumbList {
        list-style: none;
        padding: 0;
        margin: 0;
        display: inline-block;
        text-align: center;
        font-size: .85rem;
        font-weight: 500;
        color: var(--primary-color);
        white-space: nowrap;
    }

        #breadcrumbList li {
            display: inline;
            color: var(--primary-color);
        }

            /* Separatore */
            #breadcrumbList li + li::before {
                content: "›";
                margin: 0 8px;
                color: var(--primary-color);
                opacity: .75;
            }

        /* Link */
        #breadcrumbList a {
            color: var(--primary-color);
            text-decoration: none;
            transition: opacity .2s ease;
        }

            #breadcrumbList a:hover {
                opacity: .65;
            }

    /* Short text AI sotto la foto */
    .ai-short {
        font-size: 0.85rem;
        color: #f1e9e9;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-top: 0.35rem;
        margin-bottom: 0.5rem;
    }

        /* Fade-out a destra per rendere più elegante il taglio */
        .ai-short::after {
            content: "";
            position: absolute;
            right: 0;
            bottom: 0;
            width: 45%;
            height: 1.2em;
            background: linear-gradient(to right, transparent, rgba(132, 76, 76, 0.85));
        }

    /* Link “Altro” */
    .ai-more {
        font-weight: 700;
        color: #ffffff;
        cursor: pointer;
        margin-left: 4px;
        text-decoration: underline;
    }

        .ai-more:hover {
            color: #ffd700;
        }


    /* Container */
    .ai-highlights.compact {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 6px;
    }

        /* Pill compatte */
        .ai-highlights.compact .ai-pill {
            display: inline-block;
            background: rgba(255, 255, 255, 0.08);
            color: #ddd;
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 0.75rem;
            line-height: 1.2;
            white-space: nowrap; /* evita righe multiple → super compatto */
            max-width: 160px; /* evita pill troppo lunghe */
            overflow: hidden;
            text-overflow: ellipsis; /* … automatico */
        }

    /* ============================
   SEZIONE AI CONTENT / SEO AI
   ============================ */

    /* Titoli delle sezioni AI */
    .ai-section-title,
    .ai-block-title {
        font-size: 1.25rem;
        font-weight: 600;
        margin-top: 2rem;
        margin-bottom: 1rem;
        padding: 1.00rem;
        border-left: 3px solid rgba(255,255,255,0.35);
        color: var(--secondary-color, #ddd);
        line-height: 1.4;
    }

    .ai-seo-description,
    .ai-seo-title,
    .ai-extra-info,
    .ai-highlights,
    .ai-long-text p {
        padding: 1rem;
        text-align: justify;
    }


    /* FAQ individuali */
    .ai-faq-item {
        padding: 1rem 1rem;
        background: rgba(255,255,255,0.06);
        border-radius: 8px;
        margin-bottom: .075rem;
        line-height: 1.55;
        font-size: .92rem;
        color: var(--secondary-color);
    }

    /* Highlights */
    .ai-highlights div {
        margin-bottom: .4rem;
        line-height: 1.45;
        font-size: .9rem;
        padding: 0;
    }

    .ai-highlights i {
        color: #ffd700;
    }

    /* Testo esteso */
    .ai-long-text p {
        margin-bottom: 1rem;
        font-size: .95rem;
        line-height: 1.6;
    }

    /* Extra Info */
    .ai-extra-info p {
        margin-bottom: .6rem;
        font-size: .95rem;
    }



    .disclaimer-optional {
        font-size: .85rem;
        line-height: 1.45;
        color: #6c757d;
    }

        .disclaimer-optional .disclaimer-icon {
            flex: 0 0 auto;
            display: flex;
            align-items: center; /* centra verticalmente */
            justify-content: center;
        }

        .disclaimer-optional svg {
            display: block; /* elimina il baseline */
            opacity: .7;
        }


    /* ======= Galleria Aggiuntiva Netflix Style ======= */
    /* ======= EXTRA GRID con immagini grandi ogni tanto ======= */

    .extra-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 2px;
        grid-auto-rows: auto;
        align-items: start;
    }

    .extra-thumb {
        position: relative;
        width: 100%;
        padding-top: 80%; /* rapporto 5:4 */
        border-radius: 2px;
        overflow: hidden;
        cursor: pointer;
        transition: transform .2s ease, box-shadow .2s ease;
    }

        .extra-thumb img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        /* VERSIONE GRANDE (2 colonne x 2 righe) */
        .extra-thumb.big {
            grid-column: span 2;
            grid-row: span 2;
            padding-top: 80%; /* stesso ratio 5:4 della thumb normale */
        }

        /* Hover */
        .extra-thumb:hover {
            box-shadow: 0 4px 10px rgba(0,0,0,0.25);
        }

    /* Mobile: niente immagini grandi (gabbia troppo stretta) */
    @media (max-width: 600px) {
        .extra-thumb.big {
            grid-column: span 1;
            grid-row: span 1;
            padding-top: 80%;
        }
    }


    /* ===== OVERLAY FULLSCREEN ===== */

    .overlay-gallery {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.88);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 99999;
    }

        .overlay-gallery.d-none {
            display: none;
        }

    .overlay-backdrop {
        position: absolute;
        inset: 0;
    }

    .overlay-image {
        max-width: 95vw;
        max-height: 90vh;
        border-radius: 1px;
        object-fit: contain;
        z-index: 10;
        transition: opacity .3s ease;
    }

    /* NAVIGATION BUTTONS */
    .overlay-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        font-size: 48px;
        color: white;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 15;
        padding: 10px 15px;
        opacity: 0.8;
        transition: opacity .2s;
    }

        .overlay-nav:hover {
            opacity: 1;
        }

    .overlay-prev {
        left: 20px;
    }

    .overlay-next {
        right: 20px;
    }

    /* CLOSE BUTTON */
    .overlay-close {
        position: absolute;
        top: 20px;
        right: 25px;
        font-size: 42px;
        color: white;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 15;
        opacity: 0.8;
    }

        .overlay-close:hover {
            opacity: 1;
        }

    /* MOBILE SWIPE FRIENDLY */
    @media (max-width: 600px) {
        .overlay-nav {
            font-size: 40px;
        }
    }

    .az-share-icon-card {
        width: 26px !important;
        height: 26px !important;
        object-fit: contain;
        border: solid 2px grey;
        border-radius: 50%;
        padding: 1px;
        filter: grayscale(0%);
        transition: transform 0.2s ease, filter 0.2s ease;
    }

    .share-btn {
        margin-left: auto; /* spinge tutto a sinistra */
        flex-shrink: 0; /* ❌ non si restringe */
        background: none;
        border: none;
        padding: 4px;
        cursor: pointer;
    }

    /* ===============================
   Skeleton premium – height lock reale
   =============================== */

    .card-offerta.is-skeleton .card-horizontal {
        min-height: 520px;
    }

    /* Mobile */
    @media (max-width: 1250px) {
        .card-offerta.is-skeleton .card-horizontal {
            min-height: 760px;
        }
    }


    /* Skeleton state */
    .card-offerta.is-skeleton {
        pointer-events: none;
    }

        .card-offerta.is-skeleton * {
            color: transparent !important;
        }

        .card-offerta.is-skeleton img,
        .card-offerta.is-skeleton video {
            visibility: hidden;
        }

        .card-offerta.is-skeleton .skeleton-block {
            background: linear-gradient( 100deg, rgba(255,255,255,0.08) 40%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.08) 60% );
            background-size: 200% 100%;
            animation: shimmer 1.4s infinite;
            border-radius: 6px;
        }

    @keyframes shimmer {
        to {
            background-position: -200% 0;
        }
    }

    /* Fade-in reale */
    .card-offerta.fade-in {
        animation: fadeInCard 0.25s ease-out;
    }

    @keyframes fadeInCard {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* ===============================
   Empty state – countdown grande
   =============================== */

    /* Wrapper già presente */
    .listing-empty-state {
        max-width: 520px;
        margin: 6rem auto 0 auto;
        padding: 1.5rem 1.75rem;
        text-align: center;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(12px) saturate(1.3);
        -webkit-backdrop-filter: blur(12px) saturate(1.3);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 16px;
        color: var(--primary-color, #ffffff);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }

        /* Testo principale */
        .listing-empty-state p:first-child {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 0.35rem;
            color: var(--primary-color, #ffffff);
        }

        /* Sottotesto */
        .listing-empty-state p.small {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.75);
            margin-bottom: 0.75rem;
        }

        /* 🔹 NUMERO COUNTDOWN — RIGA A PARTE */
        .listing-empty-state #resetCounter {
            display: block; /* va a capo */
            margin: 0.25rem auto 0 auto; /* centrato */

            font-size: 3.2rem; /* 🔥 grande */
            font-weight: 800;
            line-height: 1;
            color: var(--tertiary-color, #ffd700);
            letter-spacing: 0.05em;
        }


    /* ===============================
   MOBILE: gallery prima dell’hero
   =============================== */
    @media (max-width: 768px) {

        body.is-mobile .wrapper-dettagli {
            display: flex;
            flex-direction: column;
        }

        body.is-mobile .col-dx {
            order: -1; /* porta la gallery sopra */
        }

            body.is-mobile .col-dx h3 {
                display: none; /* nasconde titolo "Immagini" */
            }

        body.is-mobile .img-wrapper {
            order: 1;
        }

        body.is-mobile .breadcrumb-wrapper {
            order: 2;
        }
    }

    body.usato-dettaglio main:not(.is-ready) .img-wrapper {
        visibility: hidden;
    }

    .gallery-top-slot {
        margin-top: 2rem;
        margin-bottom: 0 !important;
    }

    /* ===============================
   SKELETON – TESTO (PREZZO)
=============================== */

    body.is-loading .skeleton-text {
        color: transparent !important;
        background: linear-gradient( 90deg, rgba(40,40,40,0.85) 25%, rgba(70,70,70,0.85) 37%, rgba(40,40,40,0.85) 63% );
        background-size: 400% 100%;
        animation: skeleton-shimmer 1.2s infinite;
        border-radius: 6px;
    }

    body.is-ready .skeleton-text {
        background: none;
        animation: none;
        color: inherit;
    }
    /* ===============================
   SKELETON HERO – DESKTOP
=============================== */

    @media (min-width: 1251px) {

        body.is-loading .img-wrapper {
            position: relative;
            overflow: hidden;
        }

            /* overlay skeleton */
            body.is-loading .img-wrapper::after {
                content: "";
                position: absolute;
                inset: 0;
                z-index: 3;
                background: linear-gradient( 90deg, rgba(220,220,220,0.65) 25%, rgba(245,245,245,0.95) 37%, rgba(220,220,220,0.65) 63% );
                background-size: 400% 100%;
                animation: skeleton-shimmer 1.2s infinite;
                pointer-events: none;
            }

        /* fade out overlay */
        body.is-ready .img-wrapper::after {
            opacity: 0;
            transition: opacity .35s ease;
        }
    }

    body.usato-dettaglio.is-loading .img-wrapper {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    /* ===============================
   HERO – NASCONDI PLACEHOLDER
   durante loading
=============================== */

    @media (min-width: 1251px) {
        body.is-loading #imgPrincipale {
            opacity: 0 !important;
        }

        body.is-ready #imgPrincipale {
            opacity: 1;
            transition: opacity 1.35s ease;
        }
    }

    /* ===============================
   SKELETON GALLERY – DESKTOP + MOBILE
=============================== */

    /* loading: gallery visibile ma mascherata */
    body.usato-dettaglio.is-loading #galleryMount,
    body.usato-dettaglio.is-loading #galleryMountTop {
        filter: blur(8px);
        pointer-events: none;
    }

    /* ready: reveal morbido */
    body.usato-dettaglio.is-ready #galleryMount,
    body.usato-dettaglio.is-ready #galleryMountTop {
        opacity: 1;
        filter: none;
        transition: opacity .35s ease, filter .35s ease;
    }

    /* ===============================
   GRID – PER IMAGE SKELETON
=============================== */

    .extra-thumb {
        position: relative;
        overflow: hidden;
    }

        /* skeleton attivo SOLO se la singola card è loading */
        .extra-thumb.is-loading::after {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 2;
            background: linear-gradient( 90deg, rgba(210,210,210,0.55) 25%, rgba(235,235,235,0.85) 37%, rgba(210,210,210,0.55) 63% );
            background-size: 400% 100%;
            animation: skeleton-shimmer 1.2s infinite;
            pointer-events: none;
        }

        .extra-thumb.is-loading img {
            opacity: 0;
        }

        .extra-thumb.is-ready img {
            opacity: 1;
            transition: opacity .75s ease;
        }

        .extra-thumb.is-ready::after {
            opacity: 0;
            transition: opacity .75s ease;
        }

    /* ===============================
   SKELETON ANIMATION
=============================== */

    @keyframes skeleton-shimmer {
        0% {
            background-position: 100% 0;
        }

        100% {
            background-position: 0 0;
        }
    }


    /* ===============================
   OVERRIDE LOADING LEGACY
   (sblocca skeleton)
=============================== */

    body.usato-dettaglio.is-loading main {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
    }
    /* ===============================
   SKELETON PREZZO – FIX UX
=============================== */

    #prezzoAuto {
        display: inline-block;
        min-width: 9.5ch; /* larghezza stabile tipo € 12.345 */
        text-align: left;
    }

    /* stato loading */
    body.is-loading #prezzoAuto {
        color: transparent !important;
        background: linear-gradient( 90deg, rgba(200,200,200,0.55) 25%, rgba(230,230,230,0.85) 37%, rgba(200,200,200,0.55) 63% );
        background-size: 400% 100%;
        animation: skeleton-shimmer 0.7s infinite;
        border-radius: 6px;
    }


    /* stato ready */
    body.is-ready #prezzoAuto {
        background: none;
        animation: none;
        color: inherit;
        transition: color .75s ease;
    }

    /* ===============================
   LAYOUT STABILITY – PREZZO
=============================== */

    body.usato-dettaglio.is-loading .prezzo-offerta {
        min-height: 96px; /* sufficiente per titolo + prezzo */
    }
    /* ===============================
   LAYOUT STABILITY – GALLERY
=============================== */

    body.usato-dettaglio.is-loading #galleryMount {
        min-height: 320px;
    }

    body.usato-dettaglio.is-loading #galleryMountTop {
        min-height: 260px;
    }
    /* ===============================
   LAYOUT STABILITY – EXTRA GRID
=============================== */

    body.usato-dettaglio.is-loading #extraGallerySection {
        min-height: 280px;
    }
    /* ===============================
   LAYOUT STABILITY – ACCESSORI
=============================== */

    body.usato-dettaglio.is-loading .accessori-serie-wrapper {
        min-height: 220px;
    }
    /* ===============================
   LAYOUT STABILITY – DATI TECNICI
=============================== */

    body.usato-dettaglio.is-loading .scheda-tecnica-wrapper {
        min-height: 260px;
    }
    /* ===============================
   HERO OVERLAY – WIDTH STABILITY
   (FIX BOOM DEFINITIVO)
=============================== */

    @media (min-width: 1251px) {

        body.usato-dettaglio .overlay-inline {
            width: 100%;
            max-width: 1250px; /* limite editoriale */
            box-sizing: border-box;
        }

        body.usato-dettaglio #logoMarca {
            width: 56px; /* riserva spazio logo */
            height: auto;
            flex-shrink: 0;
        }

        body.usato-dettaglio #titoloAuto {
            width: 100%;
            max-width: 3000px;
            white-space: normal;
        }
    }
    /* ===============================
   MOBILE – NASCONDI HERO PLACEHOLDER
   (prima del JS)
=============================== */

    @media (max-width: 1250px) {
        body.usato-dettaglio .img-wrapper {
            display: none !important;
        }
    }
    /* ===============================
   MOBILE – RISERVA SPAZIO GALLERY TOP
   (ANTI CLS)
=============================== */

    @media (max-width: 1250px) {

        body.usato-dettaglio #galleryMountTop {
            display: block !important; /* override d-none */
            max-height: 260px; /* altezza media hero/gallery */
        }



        /* reveal pulito */
        body.usato-dettaglio.is-ready #galleryMountTop {
            opacity: 1;
            transition: opacity .35s ease;
        }
    }
    /* ===============================
   MOBILE – SHIMMER GALLERY TOP
   (ANTI BIANCO → BOOM)
=============================== */

    @media (max-width: 1250px) {

        /* shimmer placeholder */
        body.usato-dettaglio.is-loading #galleryMountTop::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 1;
            background: linear-gradient( 90deg, #d6d6d6 25%, #eeeeee 37%, #d6d6d6 63% );
            background-size: 400% 100%;
            animation: skeleton-shimmer 1.2s infinite;
        }

        /* serve per ::before */
        body.usato-dettaglio #galleryMountTop {
            position: relative;
            overflow: hidden;
        }

        /* gallery reale sopra lo shimmer */
        body.usato-dettaglio.is-ready #galleryMountTop::before {
            opacity: 0;
            transition: opacity .35s ease;
        }
    }
    /* durante loading: nascondi CONTENUTO, non wrapper */
    @media (max-width: 1250px) {
        body.usato-dettaglio.is-loading #galleryMountTop > * {
            opacity: 0;
        }

        body.usato-dettaglio.is-ready #galleryMountTop > * {
            opacity: 1;
            transition: opacity 2.35s ease !important;
        }
    }

    /* ===============================
   GALLERY – CONTINUOUS SCROLL
   (NO WHITE FRAMES)
=============================== */

    .gallery-root {
        overflow: hidden;
    }

    .gallery-track {
        display: flex;
        flex-direction: row;
        gap: 0;
        will-change: transform;
    }

        .gallery-track img {
            flex: 0 0 100%;
            width: 100%;
            height: auto;
            object-fit: cover;
        }

    /* ===============================
   CLS FIX – BREADCRUMB (DEFINITIVO)
=============================== */

    .breadcrumb-wrapper.glass-bc {
        height: 40px; /* BLOCCO ALTEZZA */
        min-height: 40px;
        max-height: 40px;
        display: flex;
        align-items: center;
        overflow: hidden; /* impedisce crescita */
        box-sizing: border-box;
    }

        /* contenuto interno allineato */
        .breadcrumb-wrapper.glass-bc nav,
        .breadcrumb-wrapper.glass-bc ol {
            height: 40px;
            display: flex;
            align-items: center;
        }

        /* NO wrap = NO CLS */
        .breadcrumb-wrapper.glass-bc ol {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* DISABILITA QUALSIASI ANIMAZIONE */
        .breadcrumb-wrapper.glass-bc,
        .breadcrumb-wrapper.glass-bc * {
            transition: none !important;
        }

    /* MOBILE */
    @media (max-width: 768px) {
        .breadcrumb-wrapper.glass-bc {
            height: 40px;
            min-height: 40px;
            max-height: 40px;
        }

            .breadcrumb-wrapper.glass-bc nav,
            .breadcrumb-wrapper.glass-bc ol {
                height: 40px;
            }
    }

    /* ===============================
   CLS FIX – PREZZO
=============================== */

    .prezzoproposto {
        display: block;
        min-height: 18px; /* altezza label */
    }

    .riga-prezzo {
        min-height: 40px; /* altezza prezzo + badge */
        display: flex;
        align-items: center;
        gap: 8px;
    }


    /* ===============================
   MOBILE – NASCONDI DOTS CLASSICI
=============================== */

    @media (max-width: 1250px) {
        #galleryMountTop .gallery-dots {
            display: none !important;
        }
    }

    /* ===============================
   BREADCRUMB – OUT OF FLOW (FINAL)
=============================== */

    /* breadcrumb come overlay */
    .breadcrumb-wrapper.glass-bc {
        position: sticky;
        top: 0;
        z-index: 50;
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        display: flex;
        align-items: center;
        padding: 6px 16px;
        box-sizing: border-box;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        overflow: hidden;
    }

    /* contenuto sotto parte GIÀ sotto */
    .wrapper-dettagli {
        margin-top: 0 !important;
    }
    /* ===============================
   CLS FIX – WRAPPER DETTAGLI (FINAL)
=============================== */

    .wrapper-dettagli {
        will-change: contents; /* hint al browser */
    }
