/* =========================================================
   PRODUCT MODELS TABLE – RESPONSIVE CLEAN VERSION
   ========================================================= */

/* =======================
   MOBILE (<= 768px)
   ======================= */
@media (max-width: 768px){

  /* Nascondi colonne secondarie */
  .models-table .col-secondary{
    display: none !important;
  }

  /* La tabella deve rientrare nello schermo */
  .models-table{
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
  }

  /* Distribuzione colonne visibili:
     1 = Codice | 4 = Prezzo | 5 = Acquista */
  .models-table tr:not(.kit-summary-desktop):not(.kit-summary-mobile) > *:nth-child(1){
    width: 44%;
  }
  .models-table tr:not(.kit-summary-desktop):not(.kit-summary-mobile) > *:nth-child(4){
    width: 34%;
  }
  .models-table tr:not(.kit-summary-desktop):not(.kit-summary-mobile) > *:nth-child(5){
    width: 22%;
  }

  /* Celle: testo compatto ma leggibile */
  .models-table td{
    padding: 0.45rem 0.35rem;
    font-size: 0.9rem !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Codice allineato a sinistra */
  .models-table td:first-child,
  .models-table tr.first td:first-child{
    text-align: left !important;
  }

  /* Input quantità più compatto */
  .quantity-input{
    width: 44px;
    padding: 0.2rem;
    font-size: 0.9rem;
  }

  /* --------
     RIGA FINALE – MOBILE
     -------- */
  .models-table tr.kit-summary-desktop{
    display: none !important;
  }

  .models-table tr.kit-summary-mobile{
    display: table-row !important;
  }

  .models-table tr.kit-summary-mobile > td{
    width: 100% !important;
    padding: 0.75rem 0.6rem !important;
    text-align: left !important;
  }

  .models-table tr.kit-summary-mobile .add-to-cart-btn{
    width: 100% !important;
    display: block !important;
    margin-top: 0.6rem;
  }
}

/* =======================
   DESKTOP (>= 769px)
   ======================= */
@media (min-width: 769px){

  /* Mostra versione desktop, nascondi mobile */
  .models-table tr.kit-summary-mobile{
    display: none !important;
  }

  .models-table tr.kit-summary-desktop{
    display: table-row !important;
  }  
}


/* mobile: default */
.only-desktop { display: none !important; }
.only-mobile  { display: inline-block !important; }

/* desktop */
@media (min-width: 768px) {
  .only-desktop { display: inline-block !important; }
  .only-mobile  { display: none !important; }
}


/* per verifica */
/* @media (max-width: 768px){
  .models-table .col-secondary{
    background: red !important;
  }
} */