/* ============================================================
   PREVENTIVO - STEP 2
   Design isolato: configurazione, colori, upload e anteprima
   ============================================================ */

.preventivo-page .step-due {
    --step2-ink: #172b4d;
    --step2-muted: #667085;
    --step2-border: #e1e7ef;
    --step2-blue: #1769aa;
    --step2-blue-strong: #0d6efd;
    --step2-soft: #f6f9fd;
    color: var(--step2-ink);
}

.preventivo-page .step-due .step2-section,
.preventivo-page .step-due .step2-anteprima {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.preventivo-page .step-due .step2-section *,
.preventivo-page .step-due .step2-anteprima * {
    box-sizing: border-box;
}

/* HEADER */
.preventivo-page .step-due .step2-header {
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fbff 0%, #edf3fc 100%);
    border: 1px solid #dce6f5;
    border-radius: 18px;
}

.preventivo-page .step-due .step2-header .step-title-wrapper {
    display: flex;
    align-items: center;
    gap: 18px;
}

.preventivo-page .step-due .step2-header .step2-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    margin: 0;
    color: #2457a7;
    background: #fff;
    border: 1px solid #dce6f5;
    border-radius: 16px;
    font-size: 26px;
    box-shadow: 0 5px 14px rgb(36 87 167 / 9%);
}

.preventivo-page .step-due .step2-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #2457a7;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.preventivo-page .step-due .step2-header .step-title {
    margin: 0;
    color: #172b4d;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 750;
    line-height: 1.2;
}

.preventivo-page .step-due .step2-header .step-description {
    margin: 8px 0 0;
    color: #58677d;
    font-size: 14px;
    line-height: 1.6;
}

/* SEZIONI */
.preventivo-page .step-due .step2-configurazioni {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.preventivo-page .step-due .step2-section {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--step2-border);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgb(16 24 40 / 3%);
}

.preventivo-page .step-due .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    color: #263b57;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.4;
}

.preventivo-page .step-due .section-title>i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    color: #2457a7;
    background: #edf4ff;
    border-radius: 9px;
    font-size: 16px;
}

.preventivo-page .step-due .section-title span {
    min-width: 0;
}

/* UPLOAD PDF */
.preventivo-page .step-due .upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 28px 18px;
    text-align: center;
    background: #f8fbff;
    border: 2px dashed #c7d6e8;
    border-radius: 14px;
    transition: border-color .2s ease, background-color .2s ease;
}

.preventivo-page .step-due .upload-box:hover {
    background: #f2f7ff;
    border-color: #7da6d3;
}

.preventivo-page .step-due .upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 12px;
    color: #1769aa;
    background: #e7f0ff;
    border-radius: 16px;
    font-size: 27px;
}

.preventivo-page .step-due .upload-box h5 {
    margin: 0 0 7px;
    color: #263b57;
    font-size: 16px;
    font-weight: 750;
}

.preventivo-page .step-due .upload-box p {
    margin: 3px 0;
    color: #667085;
    font-size: 13px;
}

.preventivo-page .step-due .upload-box p.small {
    margin-bottom: 16px;
    font-size: 12px;
}

.preventivo-page .step-due #btnScegliCopertina {
    min-height: 44px;
    padding: 11px 18px;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgb(13 110 253 / 15%);
}

.preventivo-page .step-due .file-preview-container {
    margin-top: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce5ef;
    border-radius: 12px;
}

.preventivo-page .step-due .file-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #f7f9fc;
    border-bottom: 1px solid #e5eaf0;
}

.preventivo-page .step-due .file-preview-header>div {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: #344054;
    font-size: 13px;
    font-weight: 650;
}

.preventivo-page .step-due #nomeFileCopertina {
    overflow-wrap: anywhere;
}

.preventivo-page .step-due .btn-remove-file {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    color: #b42318;
    background: #fff;
    border: 1px solid #f1c9c6;
    border-radius: 8px;
}

.preventivo-page .step-due .file-preview-content {
    display: flex;
    justify-content: center;
    padding: 14px;
}

.preventivo-page .step-due #imagePreview {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
}

.preventivo-page .step-due .pdf-preview-message {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #344054;
    font-size: 13px;
}

.preventivo-page .step-due .pdf-preview-message i {
    color: #c0392b;
    font-size: 24px;
}

/* SELECT E QUANTITÀ */
.preventivo-page .step-due .form-select-custom,
.preventivo-page .step-due #quantitaCopieCopertina {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    color: #263445;
    background-color: #fff;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgb(16 24 40 / 4%);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.preventivo-page .step-due .form-select-custom:hover,
.preventivo-page .step-due #quantitaCopieCopertina:hover {
    border-color: #8da4ba;
}

.preventivo-page .step-due .form-select-custom:focus,
.preventivo-page .step-due #quantitaCopieCopertina:focus {
    border-color: var(--step2-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgb(23 105 170 / 14%);
}

/* RIVESTIMENTI */
.preventivo-page .step-due .rivestimento-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.preventivo-page .step-due .rivestimento-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 82px;
    padding: 13px;
    background: #fff;
    border: 1px solid #d8e0e9;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.preventivo-page .step-due .rivestimento-option:hover {
    border-color: #8daac5;
    background: #f8fbff;
    box-shadow: 0 4px 12px rgb(16 40 70 / 6%);
}

.preventivo-page .step-due .rivestimento-option:has(input[type="radio"]:checked) {
    border: 2px solid #0d6efd;
    padding: 12px;
    background: #eef5ff;
    box-shadow: 0 0 0 3px rgb(13 110 253 / 9%);
}

.preventivo-page .step-due .rivestimento-option input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.preventivo-page .step-due .rivestimento-option:focus-within {
    outline: 3px solid rgb(13 110 253 / 22%);
    outline-offset: 2px;
}

.preventivo-page .step-due .rivestimento-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 22px;
}

.preventivo-page .step-due .rivestimento-similpelle {
    color: #fff;
    background: linear-gradient(135deg, #604535, #30241e);
}

.preventivo-page .step-due .rivestimento-tela {
    color: #554538;
    background: repeating-linear-gradient(45deg,
            #e9dfd0,
            #e9dfd0 3px,
            #d9c9b5 3px,
            #d9c9b5 5px);
}

.preventivo-page .step-due .rivestimento-cartonato {
    color: #174a75;
    background: linear-gradient(135deg, #e4edf5, #bdcedd);
}

.preventivo-page .step-due .rivestimento-plastificato {
    color: #1769aa;
    background: linear-gradient(135deg, #eaf5ff, #fff 45%, #d5e8fa);
}

.preventivo-page .step-due .rivestimento-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.preventivo-page .step-due .rivestimento-text strong {
    color: #263445;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.preventivo-page .step-due .rivestimento-text small {
    color: #667085;
    font-size: 12px;
    line-height: 1.35;
}

.preventivo-page .step-due .rivestimento-check {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    margin-left: auto;
    color: #1769aa;
    font-size: 17px;
    opacity: 0;
    transform: scale(.8);
    transition: opacity .2s ease, transform .2s ease;
}

.preventivo-page .step-due .rivestimento-option:has(input[type="radio"]:checked) .rivestimento-check {
    opacity: 1;
    transform: scale(1);
}

.preventivo-page .step-due .rivestimento-option:has(input[type="radio"]:checked) .rivestimento-text strong {
    color: #124f82;
}

/* GRIGLIE COLORE GENERICHE */
.preventivo-page .step-due .color-grid:not(.color-grid-similpelle) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin-top: 12px;
}

.preventivo-page .step-due .color-option:not(.color-option-fotografico) {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
    min-height: 60px;
    padding: 10px;
    background: #fff;
    border: 1px solid #dce2e8;
    border-radius: 11px;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.preventivo-page .step-due .color-option:not(.color-option-fotografico):hover {
    border-color: #9aaec2;
    background: #f8fafc;
}

.preventivo-page .step-due .color-option:not(.color-option-fotografico):has(input[type="radio"]:checked) {
    border: 2px solid #1769aa;
    padding: 9px;
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgb(23 105 170 / 8%);
}

.preventivo-page .step-due .color-option input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.preventivo-page .step-due .color-option:focus-within {
    outline: 3px solid rgb(23 105 170 / 22%);
    outline-offset: 2px;
}

.preventivo-page .step-due .color-circle:not(.color-texture-img) {
    display: block;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 1px solid rgb(0 0 0 / 16%);
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgb(255 255 255 / 35%), 0 1px 3px rgb(0 0 0 / 12%);
}

.preventivo-page .step-due .color-label {
    min-width: 0;
    color: #344054;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
}

.preventivo-page .step-due .color-option:has(input[type="radio"]:checked) .color-label {
    color: #124f82;
    font-weight: 700;
}

.preventivo-page .step-due .color-circle.bianco {
    background: #fff;
}

.preventivo-page .step-due .color-circle.nero {
    background: #171717;
}

.preventivo-page .step-due .color-circle.blu {
    background: #174a8b;
}

.preventivo-page .step-due .color-circle.rosso {
    background: #c62828;
}

.preventivo-page .step-due .color-circle.verde {
    background: #27834a;
}

.preventivo-page .step-due .color-circle.bordeaux {
    background: #70243b;
}

.preventivo-page .step-due .color-circle.grigio {
    background: #80868b;
}

.preventivo-page .step-due .color-circle.verde_scuro {
    background: #174d36;
}

.preventivo-page .step-due .color-circle.blu_scuro {
    background: #102d55;
}

.preventivo-page .step-due .color-circle.arancione {
    background: #ed8123;
}

.preventivo-page .step-due .color-circle.viola {
    background: #7544a0;
}

.preventivo-page .step-due .color-circle.giallo {
    background: #f2c230;
}

/* 32 CAMPIONI FOTOGRAFICI SIMILPELLE
   Quattro colonne, immagini 3:2 e numeri compatti. */
.preventivo-page .step-due .color-grid.color-grid-similpelle {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    row-gap: 7px;
    align-items: start;
    width: 100%;
    margin-top: 12px;
}

.preventivo-page .step-due .color-grid-similpelle .color-option-fotografico {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 2px;
    gap: 3px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
}

.preventivo-page .step-due .color-grid-similpelle .color-option-fotografico:hover,
.preventivo-page .step-due .color-grid-similpelle .color-option-fotografico:has(input[type="radio"]:checked) {
    padding: 2px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.preventivo-page .step-due .color-grid-similpelle .color-option-fotografico input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.preventivo-page .step-due .color-grid-similpelle .color-option-fotografico img.color-circle.color-texture-img {
    display: block;
    flex: none;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border: 1px solid transparent;
    border-radius: 4px;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.preventivo-page .step-due .color-grid-similpelle .color-option-fotografico .color-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 20px;
    margin: 0;
    padding: 3px 1px;
    color: #111827;
    background: #e9edf2;
    border: 1px solid #cbd2dc;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .03em;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.preventivo-page .step-due .color-grid-similpelle .color-option-fotografico input[type="radio"]:checked+img.color-texture-img {
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px rgb(13 110 253 / 30%);
}

.preventivo-page .step-due .color-grid-similpelle .color-option-fotografico input[type="radio"]:focus-visible+img.color-texture-img {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* ANTEPRIMA PDF: non modifica il rendering del canvas */
.preventivo-page .step-due .step2-anteprima {
    min-width: 0;
    margin-top: 18px;
    overflow: hidden;
}

.preventivo-page .step-due .cover-editor-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 16px;
    box-shadow: 0 6px 22px rgb(16 24 40 / 5%);
}

.preventivo-page .step-due .cover-editor-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: #f8faff;
    border-bottom: 1px solid #e7edf5;
}

.preventivo-page .step-due .cover-editor-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: #2457a7;
    background: #e7f0ff;
    border-radius: 12px;
    font-size: 20px;
}

.preventivo-page .step-due .cover-editor-header h4 {
    margin: 0;
    color: #263b57;
    font-size: 16px;
    font-weight: 750;
}

.preventivo-page .step-due .cover-editor-header p {
    margin: 4px 0 0;
    color: #667085;
    font-size: 12px;
}

.preventivo-page .step-due .cover-canvas-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 140px;
    padding: 18px;
    background: #f3f5f8;
    overflow: hidden;
}

.preventivo-page .step-due #coverEditor {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 100px;
    overflow: hidden;
}

.preventivo-page .step-due #pdfCanvas {
    display: block;
    flex: 0 1 auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 720px;
    object-fit: contain;
    margin: 0 auto;
}

.preventivo-page .step-due .cover-editor-message {
    max-width: 320px;
    padding: 28px 16px;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}

.preventivo-page .step-due .cover-editor-message i {
    display: block;
    margin-bottom: 10px;
    color: #98a9bd;
    font-size: 34px;
}

.preventivo-page .step-due .preview-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 16px;
}

.preventivo-page .step-due .preview-info-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 11px 12px;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 9px;
}

.preventivo-page .step-due .preview-info-row span {
    color: #667085;
    font-size: 11px;
}

.preventivo-page .step-due .preview-info-row strong {
    color: #263b57;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* PULSANTI */
.preventivo-page .step-due .step2-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

.preventivo-page .step-due .step2-actions button {
    min-height: 46px;
    border-radius: 10px;
    font-weight: 700;
}

/* TABLET */
@media (max-width: 991px) {
    .preventivo-page .step-due .color-grid:not(.color-grid-similpelle) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
    }

    .preventivo-page .step-due #pdfCanvas {
        max-height: 600px;
    }
}

/* SMARTPHONE */
@media (max-width: 767px) {
    .preventivo-page .step-due .step2-section {
        padding: 15px;
        border-radius: 13px;
    }

    .preventivo-page .step-due .color-grid:not(.color-grid-similpelle) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .preventivo-page .step-due .color-option:not(.color-option-fotografico) {
        min-height: 56px;
        gap: 7px;
        padding: 8px;
    }

    .preventivo-page .step-due .color-option:not(.color-option-fotografico):has(input[type="radio"]:checked) {
        padding: 7px;
    }

    .preventivo-page .step-due .color-circle:not(.color-texture-img) {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
    }

    .preventivo-page .step-due .color-label {
        font-size: 12px;
    }

    .preventivo-page .step-due .rivestimento-grid {
        gap: 8px;
    }

    .preventivo-page .step-due .rivestimento-option {
        gap: 8px;
        min-height: 70px;
        padding: 9px;
    }

    .preventivo-page .step-due .rivestimento-option:has(input[type="radio"]:checked) {
        padding: 8px;
    }

    .preventivo-page .step-due .rivestimento-icon {
        flex-basis: 35px;
        width: 35px;
        height: 35px;
        border-radius: 8px;
        font-size: 18px;
    }

    .preventivo-page .step-due .rivestimento-text strong {
        font-size: 12px;
    }

    .preventivo-page .step-due .rivestimento-text small {
        font-size: 10px;
    }

    .preventivo-page .step-due .rivestimento-check {
        flex-basis: 14px;
        font-size: 13px;
    }

    .preventivo-page .step-due .color-grid.color-grid-similpelle {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        row-gap: 6px;
    }

    .preventivo-page .step-due .color-grid-similpelle .color-option-fotografico {
        padding: 1px;
        gap: 2px;
    }

    .preventivo-page .step-due .color-grid-similpelle .color-option-fotografico .color-label {
        min-height: 19px;
        font-size: 11px;
        padding: 3px 0;
    }

    .preventivo-page .step-due .cover-canvas-wrapper {
        padding: 10px;
    }

    .preventivo-page .step-due #pdfCanvas {
        max-height: 480px;
    }

    .preventivo-page .step-due .preview-info {
        padding: 10px;
        gap: 7px;
    }

    .preventivo-page .step-due .preview-info-row {
        padding: 9px;
    }

    .preventivo-page .step-due .step2-header {
        padding: 17px 14px;
        margin-bottom: 18px;
        border-radius: 12px;
    }

    .preventivo-page .step-due .step2-header .step-title-wrapper {
        align-items: flex-start;
        gap: 12px;
    }

    .preventivo-page .step-due .step2-header .step2-header-icon {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        border-radius: 12px;
        font-size: 21px;
    }

    .preventivo-page .step-due .step2-eyebrow {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .preventivo-page .step-due .step2-header .step-title {
        font-size: 21px;
    }

    .preventivo-page .step-due .step2-header .step-description {
        margin-top: 6px;
        font-size: 13px;
    }
}

/* SMARTPHONE PICCOLI */
@media (max-width: 400px) {
    .preventivo-page .step-due .color-grid:not(.color-grid-similpelle) {
        gap: 6px;
    }

    .preventivo-page .step-due .color-option:not(.color-option-fotografico) {
        gap: 5px;
        padding: 6px;
    }

    .preventivo-page .step-due .color-option:not(.color-option-fotografico):has(input[type="radio"]:checked) {
        padding: 5px;
    }

    .preventivo-page .step-due .color-circle:not(.color-texture-img) {
        flex-basis: 26px;
        width: 26px;
        height: 26px;
    }

    .preventivo-page .step-due .color-grid.color-grid-similpelle {
        gap: 3px;
        row-gap: 5px;
    }

    .preventivo-page .step-due .preview-info {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ============================================================
   CAMPIONI FOTOGRAFICI - RIGIDA E MORBIDA
   Stesso design elegante di Premium
   ============================================================ */

.preventivo-page .step-due .color-grid.color-grid-basic,
.preventivo-page .step-due .color-grid.color-grid-morbida {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    row-gap: 14px;
    align-items: start;
    width: 100%;
    margin-top: 12px;
}

/* Card campione */
.preventivo-page .step-due .color-grid-basic .color-option-fotografico,
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    margin: 0;
    padding: 5px;
    gap: 6px;
    background: #fff;
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    cursor: pointer;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

/* Hover */
.preventivo-page .step-due .color-grid-basic .color-option-fotografico:hover,
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico:hover {
    border-color: #8daac5;
    box-shadow: 0 5px 14px rgb(16 40 70 / 9%);
    transform: translateY(-2px);
}

/* Radio nascosto */
.preventivo-page .step-due .color-grid-basic .color-option-fotografico input[type="radio"],
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

/* Immagini */
.preventivo-page .step-due .color-grid-basic .color-option-fotografico img.color-circle.color-texture-img,
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico img.color-circle.color-texture-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border: 1px solid #e1e7ef;
    border-radius: 7px;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

/* Etichetta */
.preventivo-page .step-due .color-grid-basic .color-option-fotografico .color-label,
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico .color-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 30px;
    margin: 0;
    padding: 5px;
    color: #344054;
    background: #f4f7fb;
    border: 1px solid #e1e7ef;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

/* Selezione */
.preventivo-page .step-due .color-grid-basic .color-option-fotografico:has(input[type="radio"]:checked),
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico:has(input[type="radio"]:checked) {
    border: 2px solid #0d6efd;
    padding: 4px;
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgb(13 110 253 / 10%);
}

.preventivo-page .step-due .color-grid-basic .color-option-fotografico input[type="radio"]:checked+img.color-texture-img,
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico input[type="radio"]:checked+img.color-texture-img {
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px rgb(13 110 253 / 25%);
}

/* Etichetta selezionata */
.preventivo-page .step-due .color-grid-basic .color-option-fotografico:has(input[type="radio"]:checked) .color-label,
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico:has(input[type="radio"]:checked) .color-label {
    color: #124f82;
    background: #e7f0ff;
    border-color: #b8d2f2;
}

/* Focus accessibile */
.preventivo-page .step-due .color-grid-basic .color-option-fotografico input[type="radio"]:focus-visible+img.color-texture-img,
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico input[type="radio"]:focus-visible+img.color-texture-img {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Smartphone */
@media (max-width: 767px) {

    .preventivo-page .step-due .color-grid.color-grid-basic,
    .preventivo-page .step-due .color-grid.color-grid-morbida {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .preventivo-page .step-due .color-grid-basic .color-option-fotografico,
    .preventivo-page .step-due .color-grid-morbida .color-option-fotografico {
        padding: 3px;
        gap: 4px;
    }

    .preventivo-page .step-due .color-grid-basic .color-option-fotografico .color-label,
    .preventivo-page .step-due .color-grid-morbida .color-option-fotografico .color-label {
        min-height: 26px;
        padding: 4px 2px;
        font-size: 11px;
    }
}

/* FIX SELEZIONE CAMPIONI RIGIDA E MORBIDA */

.preventivo-page .step-due .color-grid-basic .color-option-fotografico:has(input[type="radio"]:checked),
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico:has(input[type="radio"]:checked) {
    border: 2px solid #1769aa !important;
    background: #eef5ff !important;
    box-shadow: 0 0 0 3px rgb(23 105 170 / 15%) !important;
}

.preventivo-page .step-due .color-grid-basic .color-option-fotografico:has(input[type="radio"]:checked) img,
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico:has(input[type="radio"]:checked) img {
    border: 2px solid #1769aa !important;
}

.preventivo-page .step-due .color-grid-basic .color-option-fotografico:has(input[type="radio"]:checked) .color-label,
.preventivo-page .step-due .color-grid-morbida .color-option-fotografico:has(input[type="radio"]:checked) .color-label {
    color: #124f82 !important;
    background: #dcecff !important;
    border-color: #8bb8e8 !important;
    font-weight: 800 !important;
}