:root{
    --primary-color: #0b77c4;
    --primary-border-color: #e2e2e2;
    --description-color: #dbdbdb;
    --inline-shadow-color: #0b77c45e;
    --text-color: #181818;
    --avg-color: #504899;
}

body{
    font-family: "DM Sans", Sans-serif;
    font-size: 14px;
}

button{
    font-family: "DM Sans", Sans-serif !important;
}

.configuratore{
    display: flex;
    flex-direction: row;
    column-gap: 40px;
}

.sinistra-configuratore{
    display: flex;
    flex-direction: column;
    width: 60%;
}
.destra-configuratore{
    flex-direction: column;
    width: 40%;
    z-index: 10;
}

.toggleRiepilogo {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.togglePreventivo {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: none;
}

.sezione{
    display: flex;
    flex-direction: column;
    width: 100%;
    border-bottom: 1px solid var(--primary-border-color);
    padding-bottom: 25px;
    padding-top: 25px;
}

.sottoSezione{
    padding-bottom: 25px;
    padding-top: 25px;
    border-bottom: 1px solid var(--primary-border-color);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.titoloSezione, .titoloDescrizione{
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    margin-left: 0;
    color: #212529;
}

.sezioneDescrizione{
    position: relative;
    display: none;
    background-color: #dbdbdb;
    padding: 20px;
}

.sezioneDescrizione.active{
    display: block;
}

.contenutoDescrizione{
    color: #212529;
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 3px;
}


.pulsanteDescrizione{
    border: 1px solid var(--avg-color);
    margin-top: 5px;
    width: 20px;
    height: 20px;
    display: flex;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    
}

.chiudiDescrizione{
    position: absolute;
    top: 10px;
    right: 10px;
    font-weight: 600;
    font-size: 20px;
    cursor: pointer;
}

input[type="radio"]{
    margin: 0px;
    margin-bottom: 15px;
}

.contenitoreRadio{
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 10px;
    width: 120px;
    display: flex;
    flex-direction: column;
}

.contenitoreOpzioni{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 25px;
    width: 100%;
    max-width: calc(5 * 120px + 4 * 25px);
}

.contenitoreInputNumero{
    display: flex;
    flex-direction: column;
    width: 200px;
}

.inputNumero{
    display: flex;
    border-radius: 25px;
    border: 1px solid var(--primary-color);
    overflow: hidden;
    justify-content: space-between;
}

.bloccoInputNumero{
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bloccoInputNumero.disabilitato::before{
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("./SVG/lock.svg");
    background-size: contain;
    background-repeat: no-repeat;
}

.configText{
    color: var(--text-color);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 3px;
}

.inputRadio{
    background-color: var(--avg-color);
    color: #fff;
    height: 16px;
    margin-bottom: 5px;
    margin-right: 15px;
    width: 16px;
}

.radioImmagine{
    background-color: transparent;
    border: 1px solid var(--avg-color);
    border-radius: 5px;;
    margin-bottom: 5px;
    margin-right: 15px;
    width: 120px;
    height: 120px;
    appearance: none !important;
    margin-bottom: 10px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    transition: 0.1s ease-in-out;
}

.radioImmagine:checked{
    border: 3px solid var(--avg-color);
    background-color: transparent;
    box-shadow: inset 0px 0px 10px var(--inline-shadow-color);
}

.radioImmagine:disabled::after{
    content: "";
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    background-color: #0000001c;
}


input[type="number"]{
    font-size: 12px !important;
    font-weight: 400;
    height: auto !important;
    padding: 7px 18px;
    transition: none;
    appearance: none;
    background-clip: padding-box;
    line-height: 1.6;
    border: none;
    outline: none;
    background-color: transparent;
    width: 100%;
}

input[type="number"]:disabled{
    width: 60%;
}

.disabilitato{
    width: 40px;
    background-color: var(--primary-color);
    color: black;
    z-index: 999;
}

.contenitoreRiepilogoLavorazione{
    display: flex;
    flex-direction: column;
    background-color: #ffffffa3;
    row-gap: 10px;
    padding: 30px;
    font-weight: 600;
    max-height: 500px;
    overflow: hidden;
    transition: 0.5s ease-in-out;
    backdrop-filter: blur(4px);
}

.contenitoreRiepilogoLavorazione.chiuso {
    max-height: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
}

.contenitorePreventivo{
    background-color: #ffffffa3;
    row-gap: 10px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.contenitorePreventivo > label{
    color: #212529;
    
}

.contenitoreRiepilogoLavorazione > label{
    color: #212529;
    border-bottom: 1px solid var(--primary-border-color);
    padding-bottom: 5px;
}

.contenitoreSticky{
    position: sticky;
    border-radius: 15px;
    box-shadow: 0px 0px 20px #20202047;
    overflow: hidden;
    background-image: url(/wp-content/uploads/2025/12/dark-section-bg.png);
    background-position: center;
}

.titoloSezionePreventivo{
    background-color: var(--text-color);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    padding: 18px 30px;
    position: relative;
    display: flex;
    cursor: pointer;
    justify-content: space-between;
    align-items: center;
    background-image: url(/wp-content/uploads/2025/12/dark-section-bg.png);
    background-position: center;
}

.titoloSezionePreventivo .prezzo-mobile {
    display: none;
    font-size: 16px;
    color: var(--primary-border-color);
    margin-right: 10px;
}

.tabCategoriaMateriale{
    display: none;
}

.contenitorePulsantiTab{
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px 0px;
}

.contenitorePulsantiTab button{
    background-color: inherit;
    float: left;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 17px;
    width: 100%;
}

.visible{
    display: grid;
}

.invisible{
    display: none;
}

#labelTotale{
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--avg-color);
    border-top: 1px solid var(--primary-border-color);
    padding-top: 25px;
}

.scontato{
    text-decoration: line-through;
}

#labelTotaleScontato{
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--avg-color);
    padding-top: 10px;
}


.checkoutButton{
    margin-top: 10px;
    min-width: auto;
    padding: 16px 20px;
    width: 100%;
    border: 1px solid var(--primary-color);
    font-size: 18px;
    font-weight: 700;
    overflow: hidden;
    position: relative;
    white-space: normal;
    background-color: var(--text-color);
    color: var(--primary-border-color);
    border-radius: 5px;
    transition: 0.3s ease-in-out;
    background-image: url(/wp-content/uploads/2025/12/dark-section-bg.png);
    background-position: center;
}

.checkoutButton:hover{
    backdrop-filter: blur(8px);
}

.delivery-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 50px;
}

.delivery-col {
    text-align: center;
}

.delivery-day {
    font-weight: 600;
    text-transform: capitalize;
}

.delivery-date {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 10px;
}

.delivery-price {
    display: inline-block;
    width: 100%;
    padding: 12px 0;
    border-radius: 10px;
    border: 1px solid var(--primary-border-color);
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: 0.3s ease-in-out;
}

.pulsanteTab{
    display: inline-block;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--primary-border-color);
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: 0.3s ease-in-out;
}

.delivery-price:hover {
    border-color: var(--avg-color);
}

.pulsanteTab:hover{
    border-color: var(--avg-color);
}

.delivery-price.active {
    background: var(--text-color);
    color: #fff;
    border-color: var(--avg-color);
    background-image: url(/wp-content/uploads/2025/12/dark-section-bg.png);
    background-position: center;
}

.pulsanteTab.active{
    background: var(--text-color);
    color: #fff;
    border-color: var(--avg-color);  
    background-image: url(/wp-content/uploads/2025/12/dark-section-bg.png);
    background-position: center;
}

.iva-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.iva-option {
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--primary-border-color);
    font-size: 14px;
    transition: 0.3s ease-in-out;
}
.iva-option:hover{
    border-color: var(--primary-color);
    backdrop-filter: blur(8px);
}

.iva-option.active {
    background-color: var(--text-color);
    color: white;
    border: 1px solid var(--primary-color);
    box-shadow: inset 0px 0px 10px var(--inline-shadow-color);
    background-image: url(/wp-content/uploads/2025/12/dark-section-bg.png);
    background-position: center;
}

.download-template{
    display: inline-block;
    padding: 12px;
    border-radius: 10px;
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    width: 300px;
    background-color: var(--text-color);
    height: 80px;
    display: flex;
    align-items: center;
    flex-direction: row;
    color: #ffffff;
    margin-top: 20px;
    background-image: url(/wp-content/uploads/2025/12/dark-section-bg.png);
    background-position: center;
}


.download-template > img{
    width: 40px;
    height: 40px;
    margin-right: 20px;
}

.wrapperDettagli{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Mobile sticky footer - nascosto di default, visibile solo su mobile */
.mobile-sticky-footer {
    display: none;
}

/* ================================
   RESPONSIVE BREAKPOINTS
   ================================ */

/* Small devices (portrait phones, less than 576px) */
@media only screen and (max-width: 575px) {
    body {
        font-size: 13px;
    }

    .configuratore {
        flex-direction: column;
        column-gap: 0;
        padding-bottom: 120px; /* Spazio per footer mobile */
    }

    .sinistra-configuratore {
        width: 100%;
        margin-bottom: 20px;
    }

    .destra-configuratore {
        width: 100%;
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        z-index: 10;
        display: block;
        padding: 0;
        background: none;
    }

    .contenitoreSticky {
        position: relative;
        top: 0;
        width: 100%;
        border-radius: 10px;
        max-width: 100%;
    }

    .titoloSezione, .titoloDescrizione {
        font-size: 15px;
    }

    .titoloSezionePreventivo {
        font-size: 16px;
        padding: 14px 20px;
    }

    .contenitorePreventivo {
        padding: 20px;
    }

    .contenitoreRiepilogoLavorazione {
        padding: 20px;
        max-height: 300px;
        overflow-y: auto;
    }

    /* GRID OPZIONI - 3 colonne su mobile */
    .contenitoreOpzioni {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        column-gap: 10px;
        row-gap: 10px;
        width: 100%;
        max-width: none;
    }

    .contenitoreRadio {
        width: 100%;
        padding: 0;
    }

    .radioImmagine {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        margin-right: 0;
        margin-bottom: 5px;
    }

    .configText {
        font-size: 12px;
        text-align: left;
    }

    /* Input numero più grande */
    .contenitoreInputNumero {
        width: 100%;
        max-width: 250px;
    }

    .inputNumero {
        padding: 5px;
    }

    input[type="number"] {
        font-size: 14px !important;
        padding: 10px 15px;
    }

    /* Delivery table - 2 colonne */
    .delivery-table {
        grid-template-columns: repeat(1, 1fr);
        gap: 12px;
        margin-top: 20px;
    }

    .delivery-price {
        padding: 10px 5px;
        font-size: 13px;
    }

    /* Tab buttons */
    .contenitorePulsantiTab {
        flex-direction: column;
        gap: 10px;
        padding: 15px 0;
    }

    .pulsanteTab {
        padding: 10px;
        font-size: 14px;
    }

    /* Download template */
    .download-template {
        width: 100%;
        height: auto;
        min-height: 70px;
        padding: 15px;
    }

    .download-template > img {
        width: 35px;
        height: 35px;
        margin-right: 15px;
    }

    /* Checkout button */
    .checkoutButton {
        font-size: 16px;
        padding: 14px 18px;
    }

    #labelTotale, #labelTotaleScontato {
        font-size: 16px;
    }

    /* Sezioni */
    .sezione {
        padding-bottom: 20px;
        padding-top: 20px;
    }

    .sottoSezione {
        padding-bottom: 20px;
        padding-top: 20px;
        gap: 15px;
    }

    /* MOBILE STICKY FOOTER - Nuovo elemento */
    .mobile-sticky-footer {
        display: flex;
        flex-direction: column;
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        z-index: 1000;
        padding: 15px 20px;
        gap: 10px;
    }

    .mobile-price-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
    }

    .mobile-price-label {
        font-size: 14px;
        color: #666;
        font-weight: 500;
    }

    .mobile-price-value {
        font-size: 20px;
        font-weight: 700;
        color: var(--avg-color);
    }

    .mobile-price-value.scontato {
        text-decoration: line-through;
        font-size: 16px;
        color: #999;
        margin-right: 10px;
    }

    .mobile-checkout-button {
        width: 100%;
        padding: 16px 20px;
        background-color: var(--text-color);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        transition: 0.3s ease-in-out;
        background-image: url(/wp-content/uploads/2025/12/dark-section-bg.png);
        background-position: center;
    }

    .mobile-checkout-button:hover {
        opacity: 0.9;
    }

    /* Nascondi preventivo normale su mobile */
    .contenitorePreventivo {
        display: none;
    }
}

/* Medium devices (tablets, 576px to 767px) */
@media only screen and (min-width: 576px) and (max-width: 767px) {
    .configuratore {
        flex-direction: column;
        column-gap: 0;
    }

    .sinistra-configuratore {
        width: 100%;
        margin-bottom: 30px;
    }

    .destra-configuratore {
        width: 100%;
        position: sticky;
        bottom: 20px;
        left: 0;
        display: flex;
        justify-content: flex-end;
        z-index: 100;
    }

    .contenitoreSticky {
        top: 0;
        width: 100%;
    }

    /* Grid opzioni - 3 colonne */
    .contenitoreOpzioni {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 20px;
    }

    .contenitoreRadio {
        width: 100%;
    }

    .radioImmagine {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    /* Delivery table - 3 colonne */
    .delivery-table {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        margin-top: 30px;
    }

    .download-template {
        width: 100%;
        max-width: 350px;
    }
}

/* Large tablets and small laptops (768px to 1024px) */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .configuratore {
        flex-direction: column;
        column-gap: 0;
    }

    .sinistra-configuratore {
        width: 100%;
        margin-bottom: 40px;
    }

    .destra-configuratore {
        width: 100%;
        position: sticky;
        bottom: 30px;
        display: flex;
        justify-content: flex-end;
        z-index: 100;
    }

    .contenitoreSticky {
        top: 0;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

    /* Grid opzioni - 4 colonne */
    .contenitoreOpzioni {
        grid-template-columns: repeat(4, 1fr);
        column-gap: 20px;
    }

    .contenitoreRadio {
        width: 100%;
    }

    .radioImmagine {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    /* Delivery table - 4 colonne */
    .delivery-table {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        margin-top: 40px;
    }
}

/* Medium laptops (1025px to 1366px) */
@media only screen and (min-width: 1025px) and (max-width: 1366px) {
    .configuratore {
        flex-direction: column;
        column-gap: 0;
    }

    .sinistra-configuratore {
        width: 100%;
        margin-bottom: 50px;
    }

    .destra-configuratore {
        width: 100%;
        position: sticky;
        bottom: 40px;
        display: flex;
        justify-content: flex-end;
        z-index: 100;
    }

    .contenitoreSticky {
        top: 0;
        width: 100%;
        max-width: 700px;
        margin: 0 auto;
    }

    /* Grid opzioni mantiene 5 colonne ma riduce gap */
    .contenitoreOpzioni {
        column-gap: 20px;
    }
}

/* Large screens (1367px and up) */
@media only screen and (min-width: 1367px) {
    .contenitoreSticky {
        top: 210px;
    }

    .configuratore {
        column-gap: 50px;
    }
}

/* Extra large screens (1920px and up) */
@media only screen and (min-width: 1920px) {
    .configuratore {
        max-width: 1800px;
        margin: 0 auto;
        column-gap: 60px;
    }

    .contenitoreSticky {
        top: 220px;
    }
}

/* Landscape orientation adjustments for mobile */
@media only screen and (max-height: 500px) and (orientation: landscape) {
    .destra-configuratore {
        position: relative;
        bottom: auto;
        padding: 20px 0;
    }

    .contenitoreSticky {
        position: relative;
        top: 0;
    }

    .contenitoreRiepilogoLavorazione {
        max-height: 200px;
    }
}

/* Print styles */
@media print {
    .destra-configuratore {
        position: relative;
        bottom: auto;
    }

    .contenitoreSticky {
        position: relative;
        top: 0;
        box-shadow: none;
    }

    .checkoutButton {
        display: none;
    }
}