/* --- CONTAINER GENERALE SCHEDA --- */
.scheda-full-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
}

/* --- BREADCRUMBS --- */
.breadcrumb-scheda {
    font-size: 13px;
    color: #888;
    margin-bottom: 25px;
}

.breadcrumb-scheda a {
    color: #0056b3;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-scheda a:hover {
    text-decoration: underline;
}

/* --- TITOLI --- */
.titolo-prodotto-h1 {
    font-size: 2.2rem;
    color: #222;
    margin-bottom: 5px;
    font-weight: 700;
}

.sottotitolo-prodotto {
    color: #666;
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 30px;
}

/* --- LAYOUT A 3 BLOCCHI --- */
.grid-3-blocchi {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.block-tecnico {
    flex: 1;
    min-width: 300px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.block-tecnico:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.block-tecnico h3 {
    font-size: 14px;
    color: #0056b3;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 20px;
}

/* --- IMMAGINI E ZOOM --- */
.img-scheda-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.img-scheda-wrapper img {
    max-width: 100%;
    height: auto;
    cursor: zoom-in;
    border-radius: 4px;
}

/* Toglie la lente e ripristina la freccia standard */
.img-scheda-wrapper img {
    cursor: default !important;
    pointer-events: none; /* Impedisce qualsiasi interazione o cambio di cursore */
}


/* --- TABELLA DATI TECNICI --- */
.tabella-dati-tecnici {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 15px;
}

.tabella-dati-tecnici td {
    padding: 12px 8px;
    border-bottom: 1px solid #f0f0f0;
}

.tabella-dati-tecnici tr:last-child td {
    border-bottom: none;
}

.tabella-dati-tecnici td:first-child {
    color: #777;
    font-weight: 500;
}

.tabella-dati-tecnici td:last-child {
    text-align: right;
    font-weight: 700;
    color: #111;
}

.tabella-dati-tecnici td a {
    color: #d32f2f; /* Un rosso elegante, o usa #333 per un nero morbido */
    text-decoration: none; /* Toglie la sottolineatura blu */
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(211, 47, 47, 0.2); /* Sottolineatura leggerissima e discreta */
}

.tabella-dati-tecnici td a:hover {
    color: #a30000; /* Si scurisce al passaggio */
    border-bottom: 1px solid #a30000; /* La linea diventa marcata al passaggio */
}

/* --- PULSANTE PREVENTIVO --- */
.btn-preventivo-scheda {
    display: block;
    background: #d32f2f;
    color: #ffffff !important;
    text-align: center;
    padding: 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s ease;
    border: none;
}

.btn-preventivo-scheda:hover {
    background: #b71c1c;
    box-shadow: 0 4px 10px rgba(183, 28, 28, 0.3);
}

/* --- SEZIONE INFERIORE (TECNOLOGIA E ACCESSORI) --- */
.sezione-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.box-tecnologia {
    flex: 2;
    min-width: 320px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.box-accessori {
    flex: 1;
    min-width: 300px;
    background: #e3f2fd;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #bbdefb;
}

.box-accessori h4 {
    color: #01579b;
    margin-top: 0;
}

.lista-accessori {
    padding-left: 20px;
    margin: 15px 0;
}

.lista-accessori li {
    margin-bottom: 10px;
}

.lista-accessori a {
    color: #01579b;
    text-decoration: none;
    font-weight: 600;
}

.lista-accessori a:hover {
    text-decoration: underline;
}

.box-evidenza-full { 
    grid-column: span 3; 
    background: #ffffff; 
    border: 1px solid #e0e0e0; 
    border-radius: 6px; 
    padding: 10px 20px; 
    margin-bottom: 15px; /* Aggiunto spazio extra verso il basso */
}

/* Impedisce al codice del comparatore di spezzarsi */
h1 span {
    display: inline-block; /* Permette al testo di andare a capo correttamente */
}

.codice-prodotto {
    white-space: nowrap; /* Impedisce che il codice (es. 30 T) si divida tra 30 e T */
}

@media (max-width: 480px) {
    h1 {
        font-size: 20px; /* Riduce leggermente il font su schermi molto piccoli */
        line-height: 1.3;
    }
    .header-scheda {
        flex-wrap: wrap; /* Permette alle frecce e al titolo di disporsi su più righe se necessario */
        justify-content: center;
    }
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 992px) {
.valore-evidenza { 
    display: flex !important; 
    flex-direction: row !important; 
    flex-wrap: wrap !important; 
    align-items: center !important; 
    justify-content: flex-start !important;
    gap: 10px !important; 
    flex: 1;
    line-height: 0; /* Rimuove spazi bianchi verticali tipici dei font */
}

.valore-evidenza img { 
    width: 55px !important;  /* Dimensione fissa */
    height: 55px !important; /* Dimensione fissa */
    object-fit: contain !important; 
    border: 1px solid #eee !important; 
    border-radius: 4px !important; 
    background: #fff !important; 
    margin: 0 !important; /* Reset margini */
    padding: 2px !important;
    display: inline-block !important;
}

/* Correzione per Desktop: assicura che la label non occupi troppo spazio */
.label-evidenza {
    white-space: nowrap;
    margin-right: 15px;
}
/* =========================
   BASE
========================= */
.scheda-full-container,
.scheda-full-container * {
    box-sizing: border-box;
}

.scheda-full-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #333;
    background: #fff;
}

/* =========================
   SOLO STAMPA
========================= */
.scheda-full-container .solo-stampa {
    display: none;
}

/* =========================
   HEADER
========================= */
.scheda-full-container .header-top-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.scheda-full-container .header-scheda {
    display: flex;
    align-items: center;
    gap: 15px;
}

.scheda-full-container h1 {
    font-size: 24px;
    margin: 0;
    font-weight: bold;
    color: #222;
}

.scheda-full-container .codice-prodotto {
    white-space: nowrap;
    display: inline-block;
}

.scheda-full-container .logo-stampa {
    max-width: 180px;
    height: auto;
}

/* NAV */
.scheda-full-container .nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f9f9f9;
    border: 1px solid #ddd;
    text-decoration: none;
    flex-shrink: 0;
}

.scheda-full-container .nav-btn:hover {
    background: #d32f2f;
    border-color: #d32f2f;
}

.scheda-full-container .nav-btn:hover svg {
    stroke: #fff;
}

/* =========================
   DESCRIZIONE
========================= */
.scheda-full-container .descrizione-breve {
    margin: -10px 0 20px 0;
    color: #666;
    font-size: 15px;
}

/* =========================
   GRID
========================= */
.scheda-full-container .grid-3-blocchi,
.scheda-full-container .sezione-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* =========================
   BLOCK TECNICO
========================= */
.scheda-full-container .block-tecnico {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.scheda-full-container .block-tecnico h3 {
    font-size: 14px;
    color: #0056b3;
    text-transform: uppercase;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
    margin: 0 0 12px 0;
}

/* =========================
   IMMAGINI
========================= */
.scheda-full-container .img-scheda-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
    flex-grow: 1;
}

.scheda-full-container .img-scheda-wrapper img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* =========================
   TABELLA
========================= */
.scheda-full-container .tabella-dati-tecnici {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.scheda-full-container .tabella-dati-tecnici td {
    padding: 6px 4px;
    border-bottom: 1px solid #f5f5f5;
}

.scheda-full-container .tabella-dati-tecnici td:last-child {
    font-weight: 600;
    text-align: right;
}

/* =========================
   BOX EVIDENZA
========================= */
.scheda-full-container .box-evidenza-full {
    grid-column: span 3;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 30px;
}

.scheda-full-container .riga-evidenza {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 0;
}

.scheda-full-container .label-evidenza {
    font-weight: bold;
    color: #a30000;
    text-transform: uppercase;
    font-size: 12px;
    flex: 0 0 200px;
}

.scheda-full-container .valore-evidenza {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.scheda-full-container .valore-evidenza img {
    width: 45px;
    height: 45px;
    border: 1px solid #eee;
    border-radius: 4px;
    object-fit: contain;
    background: #fff;
}

/* =========================
   FOOTER
========================= */
.scheda-full-container .footer-aziendale {
    margin-top: 30px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
    text-align: center;
    font-size: 11px;
    color: #777;
}

/* =========================
   BUTTON
========================= */
.scheda-full-container .btn-preventivo-scheda {
    display: block;
    background: #d32f2f;
    color: #fff !important;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: bold;
    margin-top: auto;
}

.scheda-full-container .print-wrapper {
    text-align: center;
    margin-top: 15px;
}

/* =========================
   ACCESSORI
========================= */
.block-accessori ul {
    list-style-type: disc;
}

.block-accessori ul li a {
    text-decoration: none !important;
    color: inherit !important;
    transition: color 0.2s ease;
}

.block-accessori ul li a:hover {
    color: #a30000 !important;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 992px) {

    .scheda-full-container .grid-3-blocchi,
    .scheda-full-container .sezione-bottom {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .scheda-full-container .box-evidenza-full {
        grid-column: span 1;
        padding: 10px 15px;
    }

    .scheda-full-container .riga-evidenza {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .scheda-full-container .label-evidenza {
        width: 100%;
        flex: none;
        border-bottom: 1px solid #f5f5f5;
        padding-bottom: 5px;
    }

    .scheda-full-container .valore-evidenza {
        width: 100%;
        justify-content: flex-start;
    }

    .scheda-full-container .header-top-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* =========================
   PRINT
========================= */
@media print {
    /* 1. RESET GENERALE */
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* 2. VISIBILITÀ SELETTIVA */
    /* Nasconde tutto ciò che è fuori dal container */
    body > *:not(.scheda-full-container) {
        display: none !important;
    }

    .scheda-full-container {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 3. RIPRISTINO TESTATA (TITOLO E LOGO) */
    .header-nav-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        border-bottom: 1px solid #eee !important;
        margin-bottom: 15px !important;
    }

    /* Nasconde SOLO i bottoni tondi di navigazione */
    .nav-btn {
        display: none !important;
    }

    /* Assicura che il titolo sia visibile e ben spaziato */
    .header-nav-container h1 {
        display: block !important;
        font-size: 20px !important;
        margin: 0 !important;
        flex: 1 !important;
        text-align: left !important;
    }

    /* 4. PULIZIA ALTRI ELEMENTI */
    .btn-preventivo-scheda, 
    .print-wrapper, 
    script {
        display: none !important;
    }

    /* 5. OTTIMIZZAZIONE SPAZI */
    .block-tecnico {
        page-break-inside: avoid !important;
        margin-bottom: 10px !important;
        border: 1px solid #eee !important;
    }

    .footer-aziendale {
        display: block !important;
        margin-top: 10px !important;
        page-break-after: avoid !important;
    }
}

@media (max-width: 992px) {
    .scheda-full-container .sezione-bottom .block-dettagli-giallo,
    .scheda-full-container .sezione-bottom .block-accessori {
        grid-column: 1 / -1 !important;
    }
}