.comarsport-veicoli-loading,
.comarsport-veicoli-empty {
    padding: 14px 0;
    color: #777;
    font-size: 13px;
}

.comarsport-veicoli-table-wrap {
    overflow-x: auto;
}

.comarsport-veicoli-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.comarsport-veicoli-table th {
    padding: 9px 10px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    background: #f5f5f5;
}

.comarsport-veicoli-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.comar-samco-related-product,
.comar-samco-add-clips {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #dedede;
    border-radius: 8px;
    background: #fafafa;
}

.comar-samco-related-title,
.comar-samco-add-clips-title {
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
}

.comar-samco-related-list {
    display: grid;
    gap: 8px;
}

.comar-samco-related-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
}

.comar-samco-related-name {
    font-weight: 600;
}

.comar-samco-related-sku {
    color: #777;
    font-size: 12px;
    white-space: nowrap;
}

.comar-samco-add-clips-intro {
    margin: 0 0 12px;
    color: #666;
    font-size: 13px;
}

.comar-samco-clip-option {
    display: grid;
    grid-template-columns: auto 64px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px;
    border: 1px solid #e1e1e1;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}

.comar-samco-clip-option + .comar-samco-clip-option {
    margin-top: 8px;
}

.comar-samco-clip-option input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.comar-samco-clip-image img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.comar-samco-clip-copy {
    display: grid;
    gap: 3px;
}

.comar-samco-clip-name {
    font-size: 13px;
}

.comar-samco-clip-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.comar-samco-clip-sku {
    color: #777;
    font-size: 12px;
}

.comar-samco-clip-price {
    font-weight: 700;
}

.cs-custom-wrap {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

.cs-custom-title {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
}

.cs-custom-field + .cs-custom-field {
    margin-top: 14px;
}

.cs-custom-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
}

.cs-custom-field label small {
    color: #777;
    font-weight: 400;
}

.cs-color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cs-color-swatch {
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid var(--cs-swatch-color, #ccc);
    border-radius: 4px;
    background-color: var(--cs-swatch-color, #ccc) !important;
    background-image: linear-gradient(
        var(--cs-swatch-color, #ccc),
        var(--cs-swatch-color, #ccc)
    ) !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.cs-color-swatch.is-selected {
    outline: 3px solid #333;
    outline-offset: 2px;
}

.cs-color-none {
    border-color: #333;
    background-color: #fff !important;
    background-image: repeating-linear-gradient(
        45deg,
        #ccc,
        #ccc 2px,
        #fff 2px,
        #fff 8px
    ) !important;
}

.cs-color-none span {
    display: grid;
    height: 100%;
    place-items: center;
    font-size: 18px;
}

.cs-color-label {
    min-height: 18px;
    margin-top: 8px;
    color: #555;
    font-size: 12px;
}

#cs-custom-letters {
    width: 100%;
    padding: 9px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.cs-custom-price-wrap {
    margin-top: 12px;
    font-size: 15px;
}

.cs-custom-price-wrap strong {
    color: #e31b2e;
}

.cs-custom-price-wrap small {
    display: block;
    margin-top: 3px;
    color: #777;
}

@media (max-width: 600px) {
    .comar-samco-clip-option {
        grid-template-columns: auto 50px minmax(0, 1fr);
        gap: 9px;
    }

    .comar-samco-clip-image img {
        width: 50px;
        height: 50px;
    }

    .comar-samco-clip-meta,
    .comar-samco-related-link {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}

/* v1.0.5: swatch RAL indipendenti dagli stili button del tema Partdo. */
.cs-color-palette .cs-color-swatch {
    display: block !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 36px !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: hidden !important;
    background-color: var(--cs-swatch-color, #ccc) !important;
    background-image: none !important;
}

.cs-color-palette .cs-color-swatch::before,
.cs-color-palette .cs-color-swatch::after {
    display: none !important;
    content: none !important;
}

.cs-color-palette .cs-color-none {
    background-color: #fff !important;
    background-image: repeating-linear-gradient(
        45deg,
        #ccc,
        #ccc 2px,
        #fff 2px,
        #fff 8px
    ) !important;
}


/* v1.0.6: nomi e stato selezionato per gli swatch immagine delle variazioni. */
.single-product form.variations_form
.klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"] {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 10px 0 14px !important;
    overflow: visible !important;
}

.single-product form.variations_form
.klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"]
.klbtheme-term {
    position: relative !important;
    display: grid !important;
    grid-template-rows: 120px minmax(40px, auto) !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: none !important;
    cursor: pointer !important;
    opacity: 1 !important;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}

.single-product form.variations_form
.klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"]
.klbtheme-term:hover {
    border-color: #999 !important;
    transform: translateY(-1px);
}

.single-product form.variations_form
.klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"]
.klbtheme-term.comar-is-selected {
    border-color: #e31b2e !important;
    box-shadow: 0 0 0 3px rgba(227, 27, 46, .20) !important;
}

.single-product form.variations_form
.klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"]
.klbtheme-term.comar-is-selected::after {
    content: "✓" !important;
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    z-index: 3 !important;
    display: grid !important;
    width: 22px !important;
    height: 22px !important;
    place-items: center !important;
    border-radius: 50% !important;
    background: #e31b2e !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.single-product form.variations_form
.klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"]
.klbtheme-term img {
    display: block !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    height: 120px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
}

.single-product form.variations_form
.klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"]
.comar-color-name {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 5px 3px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    color: #222 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    pointer-events: none !important;
}

@media (max-width: 991px) {
    .single-product form.variations_form
    .klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"] {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .single-product form.variations_form
    .klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"] {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .single-product form.variations_form
    .klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"]
    .klbtheme-term {
        grid-template-rows: 95px minmax(38px, auto) !important;
    }

    .single-product form.variations_form
    .klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"]
    .klbtheme-term img {
        height: 95px !important;
    }

    .single-product form.variations_form
    .klbtheme-terms.klbtheme-type-image[data-attribute="pa_colore"]
    .comar-color-name {
        min-height: 38px !important;
        font-size: 9px !important;
    }
}

.woocommerce-product-attributes-item--attribute_pa_note_spiegazione
.comar-note-spiegazione-line {
    display: block;
    margin-bottom: 8px;
}

.woocommerce-product-attributes-item--attribute_pa_note_spiegazione
.comar-note-spiegazione-line:last-child {
    margin-bottom: 0;
}
/* ==========================================================
 * TAB RICHIEDI INFORMAZIONI
 * ========================================================== */
.comar-product-inquiry {
    max-width: 960px;
}

.comar-product-inquiry__intro {
    margin: 0 0 24px;
}

.comar-product-inquiry__intro h3 {
    margin: 0 0 8px;
}

.comar-product-inquiry__intro p {
    margin: 0;
}

/*
 * L'introduzione viene resa dal plugin prima del riepilogo. Il campo HTML
 * resta nel Gravity Form per compatibilità con il modulo già creato, ma non
 * deve essere mostrato una seconda volta.
 */
#comar-product-inquiry .comar-product-info-intro-field {
    display: none !important;
}

.comar-product-inquiry__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0 0 28px;
    overflow: hidden;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    background: #e7e7e7;
}

.comar-product-inquiry__summary-row {
    min-width: 0;
    padding: 14px 16px;
    background: #fff;
}

.comar-product-inquiry__summary-row span,
.comar-product-inquiry__summary-row strong {
    display: block;
}

.comar-product-inquiry__summary-row span {
    margin-bottom: 4px;
    color: #6f6f6f;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
}

.comar-product-inquiry__summary-row strong {
    color: #222;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.comar-product-inquiry__form .gform_wrapper {
    margin: 0;
}

.comar-product-inquiry__form .comar-product-info-intro h3 {
    margin-top: 0;
}

@media (max-width: 767px) {
    .comar-product-inquiry__summary {
        grid-template-columns: 1fr;
    }
}


/* v1.4.5: dati veicolo e caricamento libretto sempre visibili. */
#comar-product-inquiry .comar-vehicle-manual-field {
    display: block !important;
}

#comar-product-inquiry .comar-vehicle-document-field .gfield_description {
    margin-top: 7px;
    color: #666;
    font-size: 13px;
    line-height: 1.45;
}
