/* =========================================================
   CONFIGURATORE SVOLGIBOBINE
   ========================================================= */

.klemi-sv-wrap{
    max-width:1180px;
    margin:40px auto;
    font-family:inherit;
    color:#202020;
}


/* =========================================================
   FORM RICERCA
   ========================================================= */

.klemi-sv-search,
.klemi-sv-quote-panel{
    border:1px solid #e5e5e5;
    border-radius:14px;
    padding:32px;
    background:#fff;
    box-shadow:0 8px 30px rgba(0,0,0,.05);
}

.klemi-sv-title{
    display:flex;
    gap:18px;
    align-items:flex-start;
    margin-bottom:28px;
}

.klemi-sv-step{
    font-size:14px;
    font-weight:700;
    letter-spacing:.08em;
}

.klemi-sv-title h2,
.klemi-sv-results h2{
    margin:0 0 7px;
    font-size:30px;
}

.klemi-sv-title p,
.klemi-sv-results-head p{
    margin:0;
    color:#666;
}

.klemi-sv-fields{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
}

.klemi-sv-fields label,
.klemi-sv-customer-fields label{
    position:relative;
    font-weight:600;
}

.klemi-sv-fields input,
.klemi-sv-customer-fields input,
.klemi-sv-customer-fields textarea{
    display:block;
    width:100%;
    box-sizing:border-box;
    margin-top:7px;
    padding:13px 45px 13px 14px;
    border:1px solid #d7d7d7;
    border-radius:8px;
    background:#fff;
    font-size:16px;
}

.klemi-sv-fields small{
    position:absolute;
    right:14px;
    bottom:14px;
    color:#777;
}

.klemi-sv-primary{
    margin-top:24px;
    border:0;
    border-radius:8px;
    padding:14px 22px;
    background:#111;
    color:#fff;
    font-weight:700;
    cursor:pointer;
}

.klemi-sv-primary span{
    margin-left:10px;
}


/* =========================================================
   RISULTATI
   ========================================================= */

.klemi-sv-results{
    margin-top:45px;
}

.klemi-sv-kicker{
    font-size:12px;
    font-weight:800;
    letter-spacing:.12em;
    color:#777;
}


/* =========================================================
   GRID PRINCIPALE
   ========================================================= */

.klemi-sv-results-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 340px;
    gap:28px;
    margin-top:25px;
    align-items:start;
}

.klemi-sv-results-main{
    min-width:0;
}

.klemi-sv-results-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:22px;
    align-items:start;
}

.klemi-sv-results-grid > .klemi-sv-card{
    width:100%;
    min-width:0;
}

.klemi-sv-results-alternatives{
    margin-top:28px;
    width:100%;
    min-width:0;
}

/* Titolo alternative */
.klemi-sv-results-alternatives .klemi-sv-alternatives-head{
    margin:0 0 10px;
}

/* Le due alternative */
.klemi-sv-results-alternatives .klemi-sv-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:22px;
    width:100%;
    margin-top:12px;
}

/* =========================================================
   CARD PRODOTTO
   ========================================================= */

.klemi-sv-card{
    width:100%;
    min-width:0;
    box-sizing:border-box;
    border:1px solid #e5e5e5;
    border-radius:12px;
    overflow:hidden;
    background:#fff;
    display:flex;
    flex-direction:column;
}

.klemi-sv-results-grid > .klemi-sv-card{
    grid-column:span 1;
    width:100%;
    min-width:0;
}

.klemi-sv-card-image{
    aspect-ratio:1.4;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f7f7f7;
}

.klemi-sv-card-image img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.klemi-sv-card-body{
    padding:22px;
}

.klemi-sv-code{
    font-size:12px;
    font-weight:800;
    letter-spacing:.1em;
    color:#777;
}

.klemi-sv-card h3{
    font-size:21px;
    margin:6px 0 10px;
}

.klemi-sv-desc{
    color:#666;
    line-height:1.5;
}

.klemi-sv-specs{
    margin:18px 0;
}

.klemi-sv-specs div{
    display:flex;
    justify-content:space-between;
    gap:15px;
    padding:8px 0;
    border-top:1px solid #eee;
}

.klemi-sv-specs dt{
    font-weight:600;
    font-size:13px;
}

.klemi-sv-specs dd{
    margin:0;
    text-align:right;
    font-size:13px;
}

.klemi-sv-link{
    display:inline-block;
    margin-bottom:18px;
    font-weight:600;
}

.klemi-sv-select{
    display:flex;
    gap:8px;
    align-items:center;
    border:1px solid #ddd;
    border-radius:8px;
    padding:12px;
    cursor:pointer;
    font-weight:700;
}

.klemi-sv-select input{
    accent-color:#111;
}

.klemi-sv-select span{
    font-size:20px;
}


/* =========================================================
   SOLUZIONE PROPOSTA
   ========================================================= */

.klemi-sv-card-featured{
    border:1px solid #e5e5e5 !important;
    box-shadow:none !important;
    transform:none !important;
}

.klemi-sv-recommended{
    padding:7px 12px !important;
    font-size:10px !important;
}


/* =========================================================
   ALTERNATIVE
   ========================================================= */

.klemi-sv-results-alternatives{
    min-width:0;
    width:100%;
}

.klemi-sv-results-alternatives .klemi-sv-alternatives-head{
    margin:0 0 10px;
}

.klemi-sv-results-alternatives .klemi-sv-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:22px;
    width:100%;
    margin-top:12px;
}


/* =========================================================
   PANNELLO RICHIESTA PREVENTIVO
   ========================================================= */

.klemi-sv-quote-panel{
    position:sticky;
    top:24px;
    margin:0;
    padding:24px;
    border:1px solid #e5e5e5;
    border-radius:14px;
    background:#fff;
    box-shadow:0 8px 30px rgba(0,0,0,.05);
}

.klemi-sv-quote-panel[hidden]{
    display:none !important;
}

.klemi-sv-quote-panel.is-visible{
    display:block;
}

.klemi-sv-selected-summary{
    margin:12px 0 8px;
    padding:12px 14px;
    background:#f7f7f7;
    border-radius:8px;
    font-size:13px;
    line-height:1.5;
}

.klemi-sv-selected-summary ul{
    margin:8px 0 0;
    padding-left:18px;
}

.klemi-sv-selected-summary li{
    margin:4px 0;
}

.klemi-sv-customer-fields{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
    margin-top:20px;
}

.klemi-sv-customer-fields .full{
    grid-column:1/-1;
}


/* =========================================================
   NESSUN RISULTATO
   ========================================================= */

.klemi-sv-empty{
    margin-top:30px;
    padding:30px 35px;
    text-align:center;
    background:#fff;
    border:1px solid #e5e5e5;
    border-radius:14px;
    box-shadow:0 8px 30px rgba(0,0,0,.05);
}

.klemi-sv-empty h3{
    margin-top:0;
    margin-bottom:8px;
}

.klemi-sv-empty strong{
    display:block;
    margin-bottom:8px;
    font-size:20px;
    color:#202020;
}


/* =========================================================
   SCHERMATA CONFERMA RICHIESTA
   ========================================================= */

.klemi-sv-confirmation{
    position:relative;
    max-width:760px;
    margin:60px auto;
    padding:55px 50px 42px;
    text-align:center;
    background:#fff;
    border:1px solid #e5e5e5;
    border-radius:18px;
    box-shadow:0 12px 40px rgba(0,0,0,.07);
    overflow:hidden;
}


/* linea superiore */

.klemi-sv-confirmation:before{
    content:"";
    position:absolute;
    top:0;
    left:0;
    right:0;
    height:4px;
    background:#111;
}


/* icona */

.klemi-sv-confirmation-icon{
    width:64px;
    height:64px;
    margin:0 auto 24px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#111;
    color:#fff;
    font-size:30px;
    font-weight:700;
    line-height:1;
}


/* kicker */

.klemi-sv-confirmation .klemi-sv-kicker{
    display:block;
    margin-bottom:10px;
}


/* titolo */

.klemi-sv-confirmation h2{
    margin:0 0 16px;
    font-size:34px;
    line-height:1.2;
    color:#202020;
}


/* testo principale */

.klemi-sv-confirmation-main{
    max-width:600px;
    margin:0 auto;
    font-size:18px;
    line-height:1.6;
    color:#333;
}


/* testo secondario */

.klemi-sv-confirmation-note{
    max-width:560px;
    margin:16px auto 0;
    font-size:15px;
    line-height:1.6;
    color:#666;
}


/* footer */

.klemi-sv-confirmation-footer{
    margin:35px auto 0;
    padding-top:22px;
    border-top:1px solid #eee;
    font-size:13px;
    font-weight:600;
    color:#777;
}


/* =========================================================
   ERRORE INVIO
   ========================================================= */

.klemi-sv-confirmation-error .klemi-sv-confirmation-icon{
    background:#666;
}


/* =========================================================
   TABLET
   ========================================================= */

@media(max-width:900px){

    .klemi-sv-results-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .klemi-sv-results-grid > .klemi-sv-card{
        grid-column:span 1;
    }

    .klemi-sv-results-alternatives{
        grid-column:1/-1;
    }

    .klemi-sv-results-alternatives .klemi-sv-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:800px){

    .klemi-sv-fields{
        grid-template-columns:1fr;
    }

    .klemi-sv-customer-fields{
        grid-template-columns:1fr;
    }

    .klemi-sv-customer-fields .full{
        grid-column:auto;
    }

    .klemi-sv-search,
    .klemi-sv-quote-panel{
        padding:22px;
    }

    .klemi-sv-title h2,
    .klemi-sv-results h2{
        font-size:24px;
    }
}


@media(max-width:600px){

    .klemi-sv-wrap{
        margin:30px auto;
    }

    .klemi-sv-results-grid{
        grid-template-columns:1fr;
    }

    .klemi-sv-results-grid > .klemi-sv-card{
        grid-column:1;
    }

    .klemi-sv-results-alternatives{
        grid-column:1;
    }

    .klemi-sv-results-alternatives .klemi-sv-grid{
        grid-template-columns:1fr;
    }


    /* ---------------------------------------------
       Conferma
       --------------------------------------------- */

    .klemi-sv-confirmation{
        margin:35px auto;
        padding:40px 24px;
        border-radius:14px;
    }

    .klemi-sv-confirmation-icon{
        width:56px;
        height:56px;
        margin-bottom:20px;
        font-size:24px;
    }

    .klemi-sv-confirmation h2{
        font-size:28px;
    }

    .klemi-sv-confirmation-main{
        font-size:16px;
    }

    .klemi-sv-confirmation-note{
        font-size:14px;
    }

}

/* =========================================================
   BOTTONE CONFIGURATORE (categoria + scheda prodotto)
   ========================================================= */

.klemi-sv-configurator-btn-wrap{
    margin:0 0 18px;
}

.klemi-sv-configurator-btn-wrap--product{
    margin:0 0 14px;
    clear:both;
    width:100%;
}

.klemi-sv-configurator-btn-wrap--product .klemi-sv-configurator-btn{
    width:100%;
}

.klemi-sv-configurator-btn-wrap--sidebar{
    margin:0 0 24px;
}

.klemi-sv-configurator-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    padding:16px 22px;
    border:0;
    border-radius:8px;
    background:#014076;
    color:#fff !important;
    font-size:14px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
    line-height:1.3;
    text-align:center;
    text-decoration:none !important;
    cursor:pointer;
    transition:background .2s ease, transform .15s ease, box-shadow .2s ease;
    box-shadow:0 4px 14px rgba(1,64,118,.35);
}

.klemi-sv-configurator-btn-icon{
    flex-shrink:0;
    width:20px;
    height:20px;
    display:block;
}

.klemi-sv-configurator-btn:hover,
.klemi-sv-configurator-btn:focus{
    background:#012f57;
    color:#fff !important;
    text-decoration:none !important;
}

.klemi-sv-configurator-btn--product{
    width:auto;
    max-width:100%;
}

.klemi-sv-configurator-btn-label{
    display:inline-block;
}


/* Layout risultati + preventivo responsive */
@media (max-width: 980px){
    .klemi-sv-results-layout{
        grid-template-columns:1fr;
    }
    .klemi-sv-quote-panel{
        position:static;
    }
}

@media (max-width: 720px){
    .klemi-sv-results-grid{
        grid-template-columns:1fr;
    }
    .klemi-sv-results-alternatives .klemi-sv-grid{
        grid-template-columns:1fr;
    }
}


/* Nasconde il bottone nativo "Richiesta preventivo" (/preve?sku=)
   solo sui prodotti con configuratore attivo */
body.klemi-sv-product-enabled a.button[href*="preve?sku="],
body.klemi-sv-product-enabled a.button[href*="/preve"]{
    display:none !important;
}

/* Bottone sostitutivo in scheda prodotto (dopo add to cart) */
.klemi-sv-replace-quote-btn{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    gap:10px;
    width:100%;
    margin-top:10px !important;
    padding:14px 18px !important;
    background:#014076 !important;
    color:#fff !important;
    border:0 !important;
    border-radius:8px !important;
    font-size:13px !important;
    font-weight:800 !important;
    letter-spacing:.05em !important;
    text-transform:uppercase !important;
    text-decoration:none !important;
    box-shadow:0 4px 14px rgba(1,64,118,.3);
}

.klemi-sv-replace-quote-btn:hover,
.klemi-sv-replace-quote-btn:focus{
    background:#012f57 !important;
    color:#fff !important;
}

.klemi-sv-replace-quote-btn .klemi-sv-configurator-btn-icon{
    width:18px;
    height:18px;
}


/* =========================================================
   PREVENTIVO DIRETTO (da scheda prodotto)
   ========================================================= */

.klemi-sv-direct-quote{
    margin-top:10px;
}

.klemi-sv-direct-head{
    margin-bottom:24px;
}

.klemi-sv-direct-head h2{
    margin:6px 0 8px;
    font-size:28px;
}

.klemi-sv-direct-head p{
    margin:0;
    color:#666;
}

.klemi-sv-direct-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 360px;
    gap:28px;
    align-items:start;
}

.klemi-sv-direct-summary .klemi-sv-card{
    max-width:480px;
}

.klemi-sv-quote-form--direct .klemi-sv-quote-panel{
    display:block !important;
    position:sticky;
    top:24px;
}

/* Bottone scheda prodotto: titolo misto, non tutto maiuscolo forzato */
.klemi-sv-replace-quote-btn{
    text-transform:none !important;
    letter-spacing:.03em !important;
    font-size:14px !important;
}

@media (max-width: 980px){
    .klemi-sv-direct-layout{
        grid-template-columns:1fr;
    }
    .klemi-sv-quote-form--direct .klemi-sv-quote-panel{
        position:static;
    }
}
