/* overrides.css */

/* Forzar 1 sola línea en los títulos del loop de productos 
ul.products li.product h2,
ul.products li.product h3,
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .wc-block-grid__product-title,
.wc-block-grid__products li.product h2,
.wc-block-grid__products li.product h3,
.wc-block-grid__products li.product .woocommerce-loop-product__title,
.wc-block-grid__products li.product .wc-block-grid__product-title {

  -webkit-line-clamp: 1 !important;    Sólo 1 línea 

}*/

/* overrides.css */

/**
 * Reduce el loader de YITH a 20×20px,
 * lo alinea verticalmente con el texto del botón
 * y añade un pequeño espacio a la izquierda.*/

.yith-ywraq-add-button .ywraq-loader {
  width: 20px !important;
  height: auto !important;
  vertical-align: middle;
  margin-left: .5em;
}






/* Título sin truncamiento y con altura mínima */
.product-caption .woocommerce-loop-product__title {
/*  white-space: normal !important;
  overflow: visible !important;
  display: block !important;*/
  min-height: 3.5em;
  line-height: 1.2;
  margin: 0 0 0.5em 0;
}



/* Botón ocupa todo el ancho disponible */
.add-request-quote-button {
  width: 100%;
  display: block;
  text-align: center;
  border-radius: 9999px;
}

@media (max-width: 768px) {
  /* Evita que el botón se aplaste en pantallas pequeñas */
  .add-request-quote-button {
    font-size: 0.9rem;
    padding: 0.75em 1em;
  }

  /* Asegura que el producto conserve su estructura vertical */
  .product-block {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
  }

  /* Si necesitas limitar la altura en móvil para que no se vea exagerado */
  .product-caption .woocommerce-loop-product__title {
    min-height: 2.8em;
    font-size: 0.95rem;
  }

  /* Asegura que cada tarjeta tenga margen inferior */
  ul.products li.product {
    margin-bottom: 1.5em;
  }
  
  
  
  
      /* Cada fila del producto se ve como una columna */
    table.cart .cart_item {
        flex-direction: column!important;
        align-items: flex-start;
        padding-left: 0px!important;
        padding: 1.5em 1em;
        border-bottom: 1px solid #eee;
    }

    /* Imagen centrada y ajustada */
    table.cart td.product-thumbnail {
        display: block!important;
        text-align: center;
        width: 100%;
        margin-bottom: 1em;
        padding: 0;
        border: none !important;
    }

    table.cart td.product-thumbnail img {
        max-width: 150px!important;
        height: auto;
        margin: 0 auto!important;
    }

    /* Nombre + SKU */
    table.cart td.product-name {
        display: block;
        width: 100%;
        text-align: center!important;
        margin-bottom: 1em;
    }
    
        table.cart td.product-thumbnail {
        position: initial!important;
    }

    table.cart td.product-name a {
        font-size: 1.2rem;
        font-weight: bold;
        display: block;
        margin-bottom: 0.3em;
        word-break: keep-all;
        white-space: normal;
    }

    table.cart td.product-name small {
        display: block;
        color: #888;
        font-size: 0.9rem;
        margin-bottom: 1em;
    }

    table.cart td.product-name ul {
        padding: 0;
        list-style: none;
        margin: 0;
    }



    /* Cantidad */
    #yith-ywraq-form .product-quantity {
        display: flex;
        justify-content: center;
        text-align: center;
        width: 100%;
        padding: 20px 0;
    }
    
      #yith-ywrq-table-list .cart_item br {
    display: none !important;
  }
  
  /* Evita que la X se repita visualmente al remover productos de cotización */
.yith-ywraq-item-remove.remove::before {
  content: none !important;
}

}



/* Ocultar el bloque de cantidad y botón nativo en productos variables */
.single_variation_wrap {
  display: none !important;
}



.tabla-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.tabla-responsive table {
  width: 100%;
  min-width: 600px; /* Puedes ajustar este ancho según el tamaño típico de tus tablas */
  border-collapse: collapse;
}

/* Evita cortes de palabras muy largas que rompan el diseño */
body,
.woocommerce,
.woocommerce-loop-product__title,
.elementor-widget,
.elementor-cta__title,
.elementor-cta__subtitle,
.elementor-heading-title {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Estilos para mejorar el comportamiento del texto en celdas */
@media (max-width: 768px) {
  .woocommerce table tr td,
  .woocommerce table tr th {
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }

  .woocommerce table {
    table-layout: fixed; /* Opcional: controla mejor el ajuste en móviles */
  }

  .woocommerce table td,
  .woocommerce table th {
    padding: 1em 0.75em;
  }
}



.prefilled-readonly {
    background-color: #f4f4f4 !important;
    color: #666 !important;
    cursor: not-allowed;
}