/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* ============================================
   STILI TABELLA CATEGORIE
   ============================================ */
.bbc-pumpselector-category-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.bbc-pumpselector-category-row:hover {
    background-color: #f8f9fa !important;
}

.bbc-pumpselector-category-row td {
    vertical-align: middle;
}

/* ============================================
   STILI PAGINA PRODOTTO SINGOLO
   ============================================ */
.page-content {
    padding: 0;
}

/* Immagine prodotto - sovrascrive Elementor per impostare 50% */
.bbc-pumpselector-public-display .page-content img.product-image,
.elementor-shortcode .page-content img.product-image,
.elementor-element .page-content img.product-image,
.page-content img.product-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 16px !important;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 0px !important;
    border: 1px solid #f2f2f2;
}

.page-content h1 {
    font-size: 61px;
    line-height: 3.182rem;
    font-weight: 700;
    color: #333;
}

h1.h1-single-product {
    font-size: 49px;
    line-height: 3.062rem;
    margin-bottom: 0.6rem;
    margin-top: 60px;
}

/* Descrizione prodotto */
.product-description {
    margin-bottom: 30px;
}

.product-description p {
    font-size: 16px;
    line-height: 1.4rem;
    margin-bottom: 1rem;
    color: #333333;
}

.product-description h3,
.product-description h4,
.product-description h5 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #333;
}

.product-description ul,
.product-description ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.product-description li {
    margin-bottom: 0.5rem;
}

.product-description table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.product-description table th,
.product-description table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.product-description table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.product-description img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

/* Contenuto extra prodotto */
.product-extra-content {
    margin-top: 0px;
    padding-top: 0px;
    border-top: 0px;
}

.product-extra-section {
    margin-bottom: 30px;
}

.product-extra-section:last-child {
    margin-bottom: 0;
}

.product-extra-section h3,
.product-extra-section h5 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0078bf;
}

.product-extra-section h4 {
    font-size: 26px;
    line-height: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333333;
    padding-bottom: 4px;
    border-bottom: 2px solid #0078bf;
}

.product-extra-section p {
    margin-bottom: 1rem;
    line-height: 1.4rem;
    color: #555;
}

.product-extra-section ul,
.product-extra-section ol {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}

.product-extra-section li {
    margin-bottom: 0.25rem;
    line-height: 1.4rem;
}

.product-extra-section table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.1);
}

.product-extra-section table thead {
    background-color: #2c3e50;
    color: #fff;
}

.product-extra-section table thead.tab-intestazione {
    background-color: #2c3e50 !important;
    color: #ffffff !important;
    border-bottom: none;
}

.product-extra-section table th,
.product-extra-section table td {
    padding: 1rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.product-extra-section table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.product-extra-section:not(.product-certificazioni) table tbody tr:hover {
    background-color: #e9ecef;
}

.product-extra-section img {
    max-width: 100%;
    height: auto;
    /*border-radius: 8px;*/
    margin: 1.5rem 0;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
}

.product-extra-section, .product-materiali table {
    table-layout: fixed;
}

/* Stile tabella accessori */

.table-no-striped tbody>tr:nth-child(odd)>td, .table-no-striped tbody>tr:nth-child(odd)>th {
    background-color: #ffffff;
}

.table-no-striped tbody>tr:nth-child(even)>td, .table-no-striped tbody>tr:nth-child(even)>th {
    background-color: #ffffff;
}

table.table-no-striped tbody tr td {
    vertical-align: middle;
}

.table-no-striped tbody tr:not(:last-child) td {
    border-bottom: 1px solid #d0d0d0 !important;
}

table.table-no-striped tbody tr td p {
    margin-bottom: 0;
}

/* Stili specifici per sezioni extra */
.product-applicazioni h3,
.product-applicazioni h4,
.product-applicazioni h5 {
    border-bottom-color: #0078bf;
}

.product-funzionamento h3,
.product-funzionamento h4,
.product-funzionamento h5 {
    border-bottom-color: #e74c3c;
}

.product-caratteristiche-costruzione h3,
.product-caratteristiche-costruzione h4,
.product-caratteristiche-costruzione h5 {
    border-bottom-color: #f39c12;
}

/* Stili Nico */
.space-container-main {
    width: 100%;
    height: 120px;
    background-color: #ffffff00;
}

.container-main {
    width: 100%;
    display: flex;
    flex-direction: row;
    column-gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
}

.container-image {
    width: 30%;
    position: sticky;
    top: 120px;
    align-self: flex-start;
}

.container-backend {
    width: 70%;
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.container-tabelle-dotazioni-accessori {
    width: 100%;
    display: flex;
    flex-direction: row;
    column-gap: 30px;
}

.container-tabelle-dotazioni-accessori > div {
    width: 50%;
}

.product-extra-section>p>img {
    width: 70% !important;
}

.product-extra-section>img {
    width: 70% !important;
}

/* TABELLE PAGINA PRODOTTO */

/* Rimuove bordi */
.product-extra-section>table, td, tr {
    border: none !important;
}

/* Impostazioni generali */
.product-extra-section>table {
    border-collapse: collapse;
    width: 100%;
}

/* thead bianca */
.product-extra-section table thead {
    background-color: #ffffff !important;
    color: #333333 !important;
}

/* Padding e stili base */
.product-extra-section>table td {
    /* width: 50%; */
    padding: 12px;
    vertical-align: middle; /* allinea tutto verticalmente al centro */
}

/* Alternanza righe */
.product-extra-section:not(.product-dotazioni-serie)>table tr:nth-child(odd) td {
    background-color: #f6f6f6;
}

.product-extra-section:not(.product-dotazioni-serie)>table tr:nth-child(even) td {
    background-color: #ffffff;
}

/* Hover */
.product-extra-section:not(.product-certificazioni):not(.product-dotazioni-serie) > table tr:hover td,
.product-extra-section:not(.product-certificazioni):not(.product-dotazioni-serie) > table td[rowspan]:hover {
    background-color: #E5F1F8 !important;
    transition: background-color 0.2s ease-in-out;
}

/* Prima colonna bold */
.product-extra-section>table td:first-child,
.product-extra-section>table td:nth-child(1) {
    font-weight: bold;
}

/* Allineamento immagini a destra */
.product-extra-section>table td img {
    /*display: block;*/ /* evita che l'immagine sia inline e sballi l'allineamento */
    /*margin-left: auto !important;*/ /* spinge a destra */
    /*margin-right: 0;*/
    /*width: 40% !important;*/
    /*max-width: 100%;*/ /* non sfora la cella */
    max-width: 150px;
    margin-top: 0;
    margin-bottom: 0;
    vertical-align: middle; /* se l'immagine è in linea con testo */
    height: auto; /* mantiene proporzioni */
}

/* Stile tabella Certificazioni */
.product-certificazioni>table td img {
    display: block;
    vertical-align: middle;
    max-width: initial;
    height: auto;
    width: 80px !important;
    margin: 5px 0;
}

.product-certificazioni>table tr td {
    background-color: #ffffff !important;
}

.product-certificazioni table td:first-child {
    width: auto;
    padding: 0;
}

.product-certificazioni table td:last-child {
    width: auto;
    padding: 0 1rem;
}

/* Stile tabelle generate da pump selector */
table caption+thead tr:first-child td, table caption+thead tr:first-child th, table colgroup+thead tr:first-child td, table colgroup+thead tr:first-child th, table thead:first-child tr:first-child td, table thead:first-child tr:first-child th {
    border-block-start: 0px solid hsla(0, 0%, 50%, .502);
    border: none;
}

.product-extra-section table thead {
    border-bottom: 2px solid #d0d0d0;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #f6f6f6;
}

.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #ffffff;
}

/* Hover riga */
.table-striped > tbody > tr:hover > * {
    background-color: #E5F1F8 !important;
    transition: background-color 0.2s ease-in-out;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    --bs-table-bg-type: rgb(0 0 0 / 0%)!important;
}

/* Stile tabella Dotazioni di serie */
/*.product-dotazioni-serie>table td img {
    width: 120px !important;
    height: auto;
    margin-top: auto;
    margin-bottom: auto;
}*/

.product-dotazioni-serie>table tbody>tr:nth-child(even)>td, .product-dotazioni-serie>table tbody>tr:nth-child(odd)>td {
    background-color: #ffffff;
}

.product-dotazioni-serie table tbody tr:not(:last-child) td {
    border-bottom: 1px solid #d0d0d0 !important;
}

.product-dotazioni-serie>table td {
    width: auto;
}

/* Stile tabelle applicazioni - create per gli accessori - QUESTO STILE È VALIDO SIA PER IL BLOCCO APPLICAZIONI CHE CARATTERISTICHE DI UTILIZZO DEL BACKEND */

/* 1. Contenitore per lo scroll (essenziale per il mobile) */
.product-applicazioni, 
.product-caratteristiche-utilizzo {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 2. La tabella occupa tutto lo spazio disponibile senza eccedere */
.product-applicazioni table,
.product-caratteristiche-utilizzo table {
    width: 100%;
    table-layout: auto; /* Lascia che il browser calcoli le proporzioni */
    border-collapse: collapse;
}

/* 3. INTESTAZIONI (thead): Rigide e su una riga sola */
.product-applicazioni thead th,
.product-caratteristiche-utilizzo thead th {
    white-space: nowrap; /* Impedisce il ritorno a capo */
    width: 1%;           /* Stringe la colonna attorno al testo dell'header */
    padding: 10px 15px;
}

/* 4. CELLE (tbody): Flessibili, il testo va a capo se non c'è spazio */
.product-applicazioni tbody td,
.product-caratteristiche-utilizzo tbody td {
    white-space: normal; /* Permette al testo di andare a capo */
    word-wrap: break-word; /* Spezza parole lunghissime se necessario */
    padding: 10px 15px;
}

/* FINE TABELLE PAGINA PRODOTTO */

/* ============================================
   STILI GRIGLIA PRODOTTI
   ============================================ */

.product-grid-img {
    margin-bottom: 20px;
}

.product-grid-name {
    text-align: center;
}

.product-grid-short-description {
    text-align: center;
}

.bbc-pumpselector-products-grid .col-md-4 {
    margin-bottom: 2rem;
}

.bbc-pumpselector-products-grid > div > div {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bbc-pumpselector-products-grid > div > div:hover {
    transform: translateY(-10px);
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
}

.bbc-pumpselector-products-grid a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bbc-pumpselector-products-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.bbc-pumpselector-products-grid h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1rem 1rem 0.5rem;
    color: #2c3e50;
}

.bbc-pumpselector-products-grid ul {
    list-style: none;
    padding: 0 0 1rem;
    margin: 0;
    flex-grow: 1;
}

.bbc-pumpselector-products-grid ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    color: #555;
}

.bbc-pumpselector-products-grid ul li:last-child {
    border-bottom: none;
}

.bbc-pumpselector-products-grid ul li strong {
    color: #2c3e50;
    margin-right: 0.5rem;
}

/* ============================================
   STILI ALERT E MESSAGGI
   ============================================ */
.bbc-pumpselector-public-display .alert {
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.bbc-pumpselector-public-display .alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.bbc-pumpselector-public-display .alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.bbc-pumpselector-public-display .alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .page-content h1 {
        font-size: 2rem;
    }
    
    .bbc-pumpselector-public-display .page-content img.product-image,
    .elementor-shortcode .page-content img.product-image,
    .elementor-element .page-content img.product-image,
    .page-content img.product-image {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .product-extra-section h3,
    .product-extra-section h4,
    .product-extra-section h5 {
        font-size: 1.5rem;
    }
    
    .bbc-pumpselector-products-grid h3 {
        font-size: 1.25rem;
    }
    
    .product-description table,
    .product-extra-section table {
        font-size: 0.9rem;
    }
    
    .product-description table th,
    .product-description table td,
    .product-extra-section table th,
    .product-extra-section table td {
        padding: 0.5rem;
    }

    .mb-3 {
        width: 50% !important;
    }

    .row.bbc-pumpselector-products-grid {
    --bs-gutter-x: 1rem;
    }
  
}

@media (max-width: 480px) {

.container-main {
    width: 100%;
    flex-direction: column;
    padding: 0 6px;
}

.container-image {
    width: 100%;
    position: initial;
}

.container-backend {
    width: 100%;
}

h1.h1-single-product {
    margin-top: 0;
}

.product-grid-name > h6 {
    font-size: 14px;
    margin-bottom: 4px;
}

.product-grid-short-description > ul > li {
    font-size: 12px;
}

h1.h1-single-product {
        margin-top: 0;
        font-size: 1.8rem;
        line-height: 2rem;
    }

.product-description p {
    font-size: 14px;
}

}