/* =========================================================
   DOTT. CARLO VALLI B2B — PRODOTTI / TABELLA PRODOTTI
   Fase 8 CLEAN: regole prodotto migrate da style.css.
   Le regole condivise con lista, carrello, promo e altre pagine
   restano nello style.css finché non verranno separate a loro volta.
   ========================================================= */

/* header tabella più leggibile */
.products-table th{
  padding:11px 12px;
  font-size:12px !important;
  font-weight:700 !important;
  line-height:1.2;
  letter-spacing:.035em;
  color:#516174 !important;
  text-transform:uppercase;
  border-bottom:1px solid #cddde8;
}

/* prodotto: più protagonista */


/* prezzo: deve saltare fuori */
.products-table td.b2b-col-price{
  min-width: 130px;
  text-align: center;
}

.products-table .b2b-price-main,
.products-table .b2b-price-main .amount{
  display: inline-block;
  font-size: 17px !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
  color:#172333 !important;
  white-space: nowrap;
}

.products-table .b2b-price-wrap{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.products-table .b2b-promo-badge{
  font-size: 11px !important;
  font-weight: 800 !important;
  border-radius: 999px;
  padding: 3px 8px;
}

.products-table .b2b-price-old{
  font-size: 13px !important;
  line-height: 1 !important;
  opacity: .55;
  text-decoration: line-through;
}

.products-table .b2b-price-new,
.products-table .b2b-price-new .amount{
  font-size: 23px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  color: #cf2e2e !important;
  white-space: nowrap;
}

/* “su richiesta” più dignitoso */
.products-table .b2b-price-request{
  display: inline-block;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #6b7280 !important;
  white-space: nowrap;
}

/* unità più ordinata */
.products-table td.b2b-col-unit{
  min-width: 90px;
}

.products-table .b2b-unit{
  font-size: 15px !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
  color:#172333 !important;
}

.products-table .b2b-cartoni{
  font-size: 12px !important;
  line-height: 1.15 !important;
  color: #6b7280 !important;
  margin-top: 4px;
}

/* quantità più compatta e pulita */
.products-table td.b2b-col-qty{
  min-width: 92px;
}

.products-table td.b2b-col-qty input.b2b-qty{
  width: 68px !important;
  min-width: 68px !important;
  height: 38px !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-align: center !important;
  background: #fff !important;
}

/* bottone: deve chiudere la riga */
.products-table td.b2b-col-action{
  min-width: 120px;
  text-align: center;
}

.products-table td.b2b-col-action .b2b-add-to-cart{
  min-width: 104px !important;
  height: 38px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow:none;
  transition:transform .15s ease, opacity .15s ease;
}

.products-table td.b2b-col-action .b2b-add-to-cart:hover{
  transform: translateY(-1px);
  box-shadow:none;
}

/* stella lista un filo più ordinata */
.products-table td.b2b-col-list,
.products-table td:last-child{
  min-width: 62px;
  text-align: center;
}

.products-table .dcv-add-my-list{
  font-size: 18px;
  line-height: 1;
}

/* foto leggermente più curate */
.products-table .b2b-thumb{
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,0.6);
}

/* compatta un po’ la tabella su schermi medi */
@media (max-width: 1280px){
  .products-table .b2b-product-name{
    font-size: 17px !important;
  }

  .products-table .b2b-price-main,
  .products-table .b2b-price-main .amount,
  .products-table .b2b-price-new,
  .products-table .b2b-price-new .amount{
    font-size: 20px !important;
  }
}
/* ===== STEP 2.5 – effetto card senza cambiare HTML ===== */

.products-table {
  border-collapse: separate;
  border-spacing: 0 5px;
}


.products-table tbody tr td {
  padding-top:8px;
  padding-bottom:8px;
  vertical-align:middle;
  background: #ffffff;
}

/* effetto “blocco unico” */
.products-table tbody tr td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.products-table tbody tr td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* ombra leggera */
.products-table tbody tr {
  transition: background-color .18s ease, box-shadow .18s ease;

  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;

  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

/* hover più evidente */
.products-table tbody tr:hover {
  background: rgba(255,255,255,0.28);
  box-shadow: inset 0 0 0 9999px rgba(255,255,255,0.06);

  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}


/* quando passi sopra tutta la riga */
.products-table tbody tr:hover .b2b-add-to-cart {
  transform: scale(1.05);
}



.products-table tbody tr:hover .b2b-product-name {
  color: #000;
}


/* ===== Catalogo: nome prodotto più evidente, ma non troppo ===== */

.products-table .b2b-col-product,
.products-table td:nth-child(2) {
  width:250px;
}

.products-table .b2b-product-name,
.products-table .b2b-name,
.products-table .b2b-name a{
  font-size:16px;
  font-weight:700;
  line-height:1.2;
  letter-spacing:-0.01em;
  color:#172333;
  text-decoration:none;
}

.products-table .b2b-col-desc{
  width:330px;
}

.products-table .b2b-product-desc,
.products-table tbody td:nth-child(3){
  font-size:14px;
  line-height:1.4;
  color:#5f6f84;
}



/* =========================
   PREZZI CATALOGO = CARRELLO
   ========================= */

.products-table .b2b-price-cell{
  vertical-align: middle;
  text-align: center;
}

.products-table .b2b-price-cell .b2b-price-wrap{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1;
}

.products-table .b2b-price-cell .b2b-promo-badge{
  display: inline-block;
  background: #c94a3b;
  color: #fff;
  font-size: 10px !important;
  font-weight: 700;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  white-space: nowrap;
  margin-bottom: 1px;
}

.products-table .b2b-price-cell .b2b-price-old{
  color: #9aa0a6;
  font-size: 12px !important;
  line-height: 1;
  text-decoration: line-through;
  margin: 0;
  opacity: .95;
}

.products-table .b2b-price-cell .b2b-price-old .amount{
  color: #9aa0a6 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.products-table .b2b-price-cell .b2b-price-new{
  color: #cf4a3a;
  font-size: 16px !important;
  font-weight: 800;
  line-height: 1;
  margin: 0;
}

.products-table .b2b-price-cell .b2b-price-new .amount{
  color: #cf4a3a !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

.products-table .b2b-price-cell > .amount,
.products-table .b2b-price-cell .b2b-price-request{
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1f2f43 !important;
}


/* COMPATIBILE COM */

.b2b-compatible-callout{
  margin-top: 8px;
  padding-top: 8px;

  display:block;

  border-top: 1px solid #8dc9ef;

  color:#168fc9;

  font-size:13px;
  font-weight:700;
  line-height:1.35;
}

.b2b-compatible-callout::before{
  content:"↔ ";
  font-weight:900;
}

.b2b-compatible-callout a{
  color: inherit;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.b2b-compatible-callout a:hover{
  opacity: .75;
}

.products-table tr.b2b-product-focus td{
  background:#eef8ff !important;
  border-top:2px solid #38aee8;
  border-bottom:2px solid #38aee8;
}

.products-table tr.b2b-product-focus td:first-child{
  border-left:2px solid #38aee8;
  border-radius:14px 0 0 14px;
}

.products-table tr.b2b-product-focus td:last-child{
  border-right:1px solid #38aee8;
  border-radius:0 14px 14px 0;
  box-shadow:0 0 18px rgba(56,174,232,.18);
}

.b2b-compatible-refills{
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid #8dc9ef;
  color:#168fc9;
  font-size:13px;
  font-weight:700;
  line-height:1.35;
}

.b2b-compatible-refills a{
  display:inline-block;
  margin-top:5px;
  margin-right:8px;
  color:inherit;
  font-weight:800;
  text-decoration:none;
  border-bottom:1px dotted currentColor;
}

.b2b-compatible-refills a:hover{
  opacity:.75;
}

/* PRODOTTI COMPATIBILI CON */

.b2b-dosatore-name{
  color:#1f2b3d !important;
  font-weight:700 !important;
  display:inline-block;
  margin-top:4px;
}



.b2b-title-compat{
    font-size:28px;
    line-height:1.08;
    letter-spacing:-0.5px;
    margin:6px 0 24px;
    max-width:900px;
}
.b2b-compat-header{
  display:flex;
  align-items:center;
  gap:18px;
  margin-bottom:20px;
}

.b2b-compat-thumb{
  width:72px;
  height:72px;
  object-fit:contain;
  border-radius:12px;
  background:#fff;
  padding:8px;
  flex-shrink:0;
}

.b2b-thumb-btn{
  border:0;
  background:none;
  padding:0;
  cursor:zoom-in;
}


/* =========================================
   B2B - hover righe prodotti senza barra blu
   ========================================= */

/* Tabelle catalogo / compatibili / la mia lista */
body .products-table tbody tr{
  transition: background-color .18s ease, box-shadow .18s ease;
}

body .products-table .b2b-product-trigger{
  cursor:pointer;
}

body .products-table tbody tr:hover{
  background:#dff3ff !important;
  box-shadow:0 9px 24px rgba(13,116,165,.18) !important;
}

/* La prima riga non deve salire contro l'intestazione:
   così il lato superiore della cornice rimane ben visibile. */
body .products-table tbody tr:first-child:hover{
  transform:none;
}

body .products-table tbody tr td{
  transition:background-color .18s ease, color .18s ease;
}

body .products-table tbody tr:hover td{
  background:#dff3ff !important;
  box-shadow:
    inset 0 1px 0 #159bd3,
    inset 0 -1px 0 #159bd3;
}

body .products-table tbody tr:hover td:first-child{
  box-shadow:
    inset 1px 0 0 #159bd3,
    inset 0 1px 0 #159bd3,
    inset 0 -1px 0 #159bd3;
}

body .products-table tbody tr:hover td:last-child{
  box-shadow:
    inset -1px 0 0 #159bd3,
    inset 0 1px 0 #159bd3,
    inset 0 -1px 0 #159bd3;
}

body .products-table tbody tr a,
body .products-table tbody tr button,
body .products-table tbody tr input,
body .products-table tbody tr select,
body .products-table tbody tr textarea,
body .products-table tbody tr label,
body .products-table tbody tr [data-b2b-modal="1"]{
  cursor:auto;
}

body .products-table tbody tr a,
body .products-table tbody tr button,
body .products-table tbody tr [data-b2b-modal="1"]{
  cursor:pointer;
}


/* Nome prodotto */
body .products-table tbody tr:hover .b2b-product-name,
body .products-table tbody tr:hover .b2b-name{
  color:#0784bd !important;
}

/* Descrizione: segue l'evidenziazione della riga cliccabile */
body .products-table tbody td:nth-child(3){
  transition:color .18s ease;
}

body .products-table tbody tr:hover td:nth-child(3){
  color:#0b7fab;
  font-weight:600;
}

/* Foto */
body .products-table tbody td:first-child img{
  transition: transform .18s ease;
}

body .products-table tbody tr:hover td:first-child img{
  transform: scale(1.06);
}

/* Bottoni */
body .products-table tbody td .btn,
body .products-table tbody td .b2b-btn,
body .products-table tbody td button{
  transition: transform .18s ease, box-shadow .18s ease;
}

body .products-table tbody tr:hover td .btn,
body .products-table tbody tr:hover td .b2b-btn,
body .products-table tbody tr:hover td button{
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

/* Stella */
body .products-table tbody td .dcv-add-my-list{
  transition: transform .18s ease, color .18s ease;
}

body .products-table tbody tr:hover td .dcv-add-my-list{
  transform: scale(1.12);
}

body .products-table tbody tr:hover td .dcv-add-my-list:not(.is-saved){
  color:#2daae1;
}


/*schede di sicurezza*/

.b2b-product-sds{
  margin-top:6px;
  margin-bottom:4px;
}

.b2b-product-sds .b2b-sds-link{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0284c7 !important;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1;
  cursor: pointer;
}

.b2b-product-sds .b2b-sds-link::before{
  content: "PDF";
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: #0284c7;
  border-radius: 4px;
  padding: 2px 4px;
}

.b2b-product-sds .b2b-sds-link:hover{
  background: #bae6fd;
  color: #0369a1 !important;
}

.products-table .b2b-product-link{
  color:#0f172a;
  font-weight:700;
  text-decoration:none;
}

.products-table .b2b-product-link:focus-visible{
  outline:2px solid #2daae1;
  outline-offset:4px;
  border-radius:4px;
}

.products-table .b2b-name a{
  color:#0f172a;
  font-weight:700;
  text-decoration:none;
  transition:color .15s ease;
}

.products-table tbody td:nth-child(2) .b2b-name a{
  color:#0f172a !important;
  font-weight:700 !important;
  text-decoration:none !important;
}

.products-table .b2b-name a:hover{
  color:#27b3f6 !important;
  text-decoration:none !important;
}

.products-table tbody td:nth-child(2) .b2b-name a:hover{
  color:#27b3f6 !important;
  text-decoration:none !important;
}


.products-table .b2b-product-link:hover{
  color:#2daae1;
  text-decoration:none !important;
}

.b2b-compat-icon::before {
  content: "🧩";
  font-size: 18px;
  line-height: 1;
}

.b2b-compat-icon {
  display: inline-block;
  margin-right: 4px;
  vertical-align: -2px;
}


