.categoria-avanzada{
  width: 100% !important;
  padding: 0 20px;
  box-sizing: border-box;
  margin-bottom: 30px;
  max-width: 1800px;
  margin-left:auto;
  margin-right:auto;
}
.linea-divisoria {
  width: 100%;
  height: 1px;
  background-color: #ccc;
  margin: 20px 0;
  border: none;
}
.item-galeria img {
  width: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.cargando {
  text-align: center;
  padding: 40px 0;
  font-size: 1rem;
  color: #666;
}
li.product.preset-libres {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  height: 100%;
  aspect-ratio: 0.72 / 1; 
  box-sizing: border-box;
}
li.product.preset-libres .imagen-producto {
  width: 100%;
  aspect-ratio: 0.72 / 1;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  background-color: #f9f9f9;
}
li.product.preset-libres .producto-wrapper {
  height: 100%;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; 
}
li.product.preset-libres .imagen-producto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}
/* Wrapper de la imagen (igual que antes) */
li.product.preset-libres a.pst-wrapper {
  flex: 1;
  display: block;
  width: 100%;
  height: 100%;
  position: relative; /* necesario para centrar el botón encima */
  overflow: hidden;
}

/* Botón overlay centrado sobre la imagen */
li.product.preset-libres .btn-ver-preset-overlay{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,0.5); /* blanco 80% opaco */
  backdrop-filter: blur(4px);        /* opcional: efecto vidrio */
}

li.product.preset-libres .btn-ver-preset-overlay:hover{
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

li.product.preset-libres img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
li.product.preset-libres .woocommerce-loop-product__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
li.product.preset-libres:hover img {
  transform: scale(1.03);
}
.bloque-orden {
  flex: 0 0 auto;
}
.contenedor-etiquetas.grande .etiqueta-filtro:hover {
  background-color: #e7e7e7;
}
.pagina-boton {
    background-color: #009FE3;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1em;
    height: 100%;
    transition: background-color 0.3s ease;
}
.pagina-boton.activo {
    background-color: #009FE3;
    font-weight: bold;
    transform: scale(1.2);
    border: 2px solid black;
}
.paginacion {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
}
.item-categoria,
.skeleton-categoria {
  flex: 0 0 260px;         /* Ancho fijo */
  width: 260px;            /* Fijo */
  height: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  scroll-snap-align: start;
  border-radius: 8px;
}
.item-categoria img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}
.nombre-categoria {
    margin-top: 8px;
    font-size: 1.2em;
    font-weight: 600;
    color: black;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    cursor: default;
    text-align: left;
    margin-bottom: 0px;
}
.skeleton-categoria {
  justify-content: center;
  padding: 10px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 400% 100%;
  animation: shimmer 1.2s infinite linear;
}
.skeleton-categoria .skeleton-img-categoria,
.skeleton-img-categoria {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #e0e0e0;
  border-radius: 6px;
  margin-bottom: 10px;
}
.skeleton-categoria .skeleton-texto-categoria,
.skeleton-texto-categoria {
  width: 60%;
  height: 14px;
  background: #d0d0d0;
  border-radius: 4px;
}
@keyframes shimmer {
  0% { background-position: -300px 0; }
  100% { background-position: 300px 0; }
}
ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  column-gap: 20px;
  row-gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}
ul.products li.product,
ul.products li[data-skeleton="true"] {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0px!important;
  box-sizing: border-box;
  overflow: hidden;
  height: auto; /* 💡 cambiá esto */
  transition: box-shadow 0.3s ease;
  margin-bottom: 0px!important;
  width: fit-content;
}
ul.products li.product:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
ul.products li.product img,
ul.products li[data-skeleton="true"] .skeleton-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 0!important;
}
ul.products li[data-skeleton="true"] .skeleton-line {
  height: 14px;
  background: #e0e0e0;
  border-radius: 4px;
  margin-top: 8px;
  animation: shimmer 1.2s infinite linear;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 400% 100%;
}
@keyframes shimmer {
  0% {
    background-position: -300px 0;
  }
  100% {
    background-position: 300px 0;
  }
}
ul.products li.product {
  height: 100%;
  display: flex;
  flex-direction: column;
  width:100%;
}
ul#skeleton-categoria.products.cargado::before {
  display: none !important;
}
.woocommerce-loop-product__title {
  display: -webkit-box;
  /*-webkit-line-clamp: 3;  antes estaba en 2 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.2em * 3); /* asegura espacio para 3 líneas */
  line-height: 1.2em;
  font-size: 1rem;
  font-weight: 600;
  margin: 8px 0;
  cursor: default;
  position: relative;
}
li.product.producto-personalizado .wca-product-card-title {

  display: flex;

  flex-direction: column;

  justify-content: center;

  gap: 3px;

  min-height: calc(1.2em * 2);

  margin: 12px 0 8px;

  line-height: 1.2;

  text-align: center;

}

li.product.producto-personalizado.wca-standard-product-card .wca-product-card-link {
  color: inherit;
  text-decoration: none;
}

li.product.producto-personalizado.wca-standard-product-card .wca-product-card-link:hover {
  color: inherit;
  text-decoration: none;
}

li.product.producto-personalizado.wca-standard-product-card .wca-product-card-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

li.product.producto-personalizado.wca-standard-product-card .wca-product-card-link--image,
li.product.producto-personalizado.wca-standard-product-card .wca-product-card-link--title,
li.product.producto-personalizado.wca-standard-product-card .wca-product-card-link--price {
  display: block;
  width: 100%;
}

li.product.producto-personalizado.wca-standard-product-card .wca-product-card-link--title .wca-product-card-title,
li.product.producto-personalizado.wca-standard-product-card .wca-product-card-link--quantity-label {
  cursor: pointer;
}

.wca-product-card-title__model,

.wca-product-card-title__dimensions {

  display: block;

  overflow: hidden;

  text-overflow: ellipsis;

}

.wca-product-card-title__model {

  color: #31373b;

  font-size: 1.08rem;

  font-weight: 700;

  white-space: nowrap;

}

.wca-product-card-title__dimensions {

  color: #687177;

  font-size: 0.96rem;

  font-weight: 500;

  white-space: nowrap;

}

li.product.producto-personalizado.wca-standard-product-card .precio-unitario-dinamico::after {

  content: none;

}

li.product.producto-personalizado.wca-standard-product-card .precio-unitario-dinamico {

  display: flex;

  align-items: baseline;

  justify-content: center;

  gap: 4px;

  margin-bottom: 0;

}

.precio-unitario-dinamico .precio-valor {

  font-size: 20px;

  font-weight: 700;

}

.precio-unitario-dinamico .precio-sufijo {

  color: #687177;

  font-size: 15px;

  font-weight: 600;

}

.precio-unitario-dinamico--error .precio-valor {

  color: #b42318;

  font-size: 14px;

}

ul.products li[data-skeleton="true"] .woocommerce-loop-product__title.skeleton-line {
  min-height: 2.4em; /* igual al producto real */
}
.producto-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* garantiza que el footer del producto no quede pegado arriba */
}
.titulo-industria {
    font-size: 1.2em;
    color: #333;
    font-weight: 400;
}
ul.products li.product.preset-libres img {
    width: auto;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0 !important;
}
ul.products li.product.product-anuncio::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--wca-pattern-actual);
  background-repeat: repeat;
  background-size: 400px auto; /* ajustá si querés más grande o más pequeño el patrón */
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}
.item-categoria.desactivado {
  opacity: 0.4;
  filter: grayscale(100%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.item-categoria.activo {
  opacity: 1 !important;
  filter: none !important;
}
.paginacion .pagina-boton.flecha-anterior::before {
  content: '←'; /* Podés usar iconos Unicode, SVG con background o fuentes */
  font-size: 1.2em;
  margin-right: 4px;
}
.paginacion .pagina-boton.flecha-siguiente::after {
  content: '→';
  font-size: 1.2em;
  margin-left: 4px;
}
li.product.producto-personalizado.wca-standard-product-card .etiqueta-cantidad {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #747b80;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  width: 100%;
  margin: 0 0 4px;
  text-align: center;
  white-space: nowrap;
}

li.product.producto-personalizado.wca-standard-product-card .cantidad-editar-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  min-width: 24px;
  height: 42px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #747b80;
  box-shadow: none;
  cursor: pointer;
  position: absolute;
  right: 10px;
  bottom: 0;
}

li.product.producto-personalizado.wca-standard-product-card .cantidad-editar-boton:hover,
li.product.producto-personalizado.wca-standard-product-card .cantidad-editar-boton:focus-visible {
  color: #0073aa;
}

li.product.producto-personalizado.wca-standard-product-card .cantidad-editar-boton:focus-visible {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

li.product.producto-personalizado.wca-standard-product-card .cantidad-editar-icono {
  width: 19px;
  height: 19px;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

li.product.producto-personalizado.wca-standard-product-card .campo-cantidad {
  display: flex;
  flex: 0 0 130px;
  flex-direction: column;
  width: 130px;
}

li.product.producto-personalizado.wca-standard-product-card .bloque-interactivo-moderno,
li.product.producto-personalizado.wca-standard-product-card .bloque-cantidad {
  width: 100%;
}

li.product.producto-personalizado.wca-standard-product-card .bloque-cantidad {
  margin-top: 8px;
}

li.product.producto-personalizado.wca-standard-product-card .fila-input-boton {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}

li.product.producto-personalizado.wca-standard-product-card .grupo-input-un {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  position: relative;
  width: 100%;
  height: 42px;
  padding: 0 62px 0 12px;
  border: 1px solid #b9c0c4;
  border-radius: 10px;
  background: #fff;
  cursor: text;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

li.product.producto-personalizado.wca-standard-product-card .grupo-input-un:focus-within {
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.14);
}

li.product.producto-personalizado.wca-standard-product-card .grupo-input-un.is-pending {
  border-color: #0073aa;
  background: #f5fbfe;
}

li.product.producto-personalizado.wca-standard-product-card .grupo-input-un.is-success {
  border-color: #118847;
  background: #f3fbf6;
}

li.product.producto-personalizado.wca-standard-product-card .grupo-input-un.is-invalid {
  border-color: #c0362c;
  background: #fff7f6;
}

li.product.producto-personalizado.wca-standard-product-card .grupo-input-un.is-loading {
  border-color: #7b858b;
  background: #f4f5f6;
}

li.product.producto-personalizado.wca-standard-product-card .grupo-input-un .input-cantidad-base,
li.product.producto-personalizado.wca-standard-product-card .grupo-input-un .input-cantidad-base.input-azul,
li.product.producto-personalizado.wca-standard-product-card .grupo-input-un .input-cantidad-base.input-verde,
li.product.producto-personalizado.wca-standard-product-card .grupo-input-un .input-cantidad-base.input-rojo {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 40px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  box-shadow: none !important;
  background: transparent;
  color: #31373b;
  font-size: 17px;
  font-weight: 700;
  line-height: 38px;
  text-align: left;
  margin: 0;
}

li.product.producto-personalizado.wca-standard-product-card .grupo-input-un .unidad-sufijo {
  position: absolute;
  right: 10px;
  top: auto;
  bottom: 14px;
  transform: none;
  margin: 0;
  color: #6c757b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

li.product.producto-personalizado.wca-standard-product-card .btn-recalcular {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  height: 42px;
  padding: 0;
  margin: 0;
  border: 1px solid #0073aa;
  border-radius: 10px;
  background: #fff;
  color: #0073aa;
  font-size: 0 !important;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  position: absolute;
  right: -8px;
  bottom: 0;
}

li.product.producto-personalizado.wca-standard-product-card .fila-input-boton:has(.btn-recalcular:not(.boton-oculto)) .cantidad-editar-boton {
  display: none;
}

li.product.producto-personalizado.wca-standard-product-card .btn-recalcular:not(:disabled):hover,
li.product.producto-personalizado.wca-standard-product-card .btn-recalcular:not(:disabled):focus-visible {
  border-color: #006494;
  background: #0073aa;
  color: #fff;
}

li.product.producto-personalizado.wca-standard-product-card .btn-recalcular:disabled {
  border-color: #c9ced1;
  background: #f3f4f4;
  color: #91999e;
  opacity: 0.72;
  cursor: default;
}

li.product.producto-personalizado.wca-standard-product-card .btn-recalcular.boton-oculto {
  display: none !important;
}

.btn-recalcular__icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-recalcular[aria-busy="true"] .btn-recalcular__icon {
  animation: wca-rotate 0.85s linear infinite;
}

@keyframes wca-rotate {
  to { transform: rotate(360deg); }
}
ul.products li.product.product-anuncio {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: min(5vh, 2em);
  color: #000;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  min-height: 100%;
  box-sizing: border-box;
}
ul.products li.product.product-anuncio::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--wca-pattern-actual);
  background-repeat: repeat;
  background-size: 300px auto;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}
ul.products li.product.product-anuncio .contenido-anuncio {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding:20px;
}
ul.products li.product.product-anuncio .anuncio-titulo {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 1.2rem;
  color: #fff;
}
ul.products li.product.product-anuncio .anuncio-descripcion {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0; /* Ajuste si no hay botón */
}
.product-anuncio {
    display: flex;
    flex-direction: column;
    justify-content: center;     /* Centrado vertical */
    align-items: center;         /* Centrado horizontal */
    text-align: center;
    height: 100%;                /* Fuerza a ocupar todo el alto disponible */
    padding: min(5vh, 2em);
    color: #000;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    min-height: 100%;           /* Garantiza que se estiren dentro del grid */
    box-sizing: border-box;
}
.boton-cargar-mas{
    background-color: #009FE3;
    color: white;
    height: 3em;
    width: 100%;
    font-size: 1.5em;
    font-weight: 400;
}
@media screen and (max-width: 768px) {
  ul.products li.product.product-anuncio {
    padding: 20px 10px;
  }
  ul.products li.product.product-anuncio .anuncio-titulo {
    font-size: 1.1rem;
  }
  ul.products li.product.product-anuncio .anuncio-descripcion {
    font-size: 0.9rem;
  }
}
@media screen and (max-width: 1250px) {
  .wca-header-supercategoria #info-general {
    flex: 1 1 100%;
    padding-right: 0;
  }
}
@media (min-width: 1400px) {
  ul.products {
    /* La grilla de categorías se define en el selector específico inferior. */
  }
}
body.tax-product_cat #categoria-ajax-content > ul.products {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  justify-content: space-between;
  column-gap: 28px;
  width: 100%;
  max-width: 1580px;
  margin-right: auto;
  margin-left: auto;
}

body.tax-product_cat #categoria-ajax-content > ul.products li.product.producto-personalizado .producto-wrapper {
  padding-right: 12px;
  padding-left: 12px;
}

@media screen and (max-width: 1199px) {
  body.tax-product_cat #categoria-ajax-content > ul.products {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    justify-content: stretch;
    column-gap: 24px;
  }
}

@media screen and (max-width: 520px) {
  body.tax-product_cat #categoria-ajax-content > ul.products {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
}

.boton-oculto {
  display: none !important;
}
