/* Electrodescuento catálogo v3
 * No tocar position/transform: Flatsome fade_in_back usa
 * img.back-image.show-on-hover.absolute.fill (opacity 0 hasta hover).
 */
body.archive .product-small .box-image,
body.tax-product_cat .product-small .box-image,
body.woocommerce-shop .product-small .box-image,
body.woocommerce.archive .product-small .box-image,
body.search-results .product-small .box-image {
  aspect-ratio: 1 / 1;
  background: #fff;
  overflow: hidden;
}

body.archive .product-small .box-image img,
body.tax-product_cat .product-small .box-image img,
body.woocommerce-shop .product-small .box-image img,
body.woocommerce.archive .product-small .box-image img,
body.search-results .product-small .box-image img {
  object-fit: contain !important;
  object-position: center center !important;
  padding: 12px;
  box-sizing: border-box;
}

.product-small .box-text .name.product-title,
.product-small .box-text .product-title,
.woocommerce-loop-product__title {
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media only screen and (max-width: 1199px) {
  body.archive .products.row > .product-small.col,
  body.tax-product_cat .products.row > .product-small.col,
  body.woocommerce-shop .products.row > .product-small.col,
  body.search-results .products.row > .product-small.col {
    flex: 0 0 50% !important;
    flex-basis: 50% !important;
    max-width: 50% !important;
    width: 50% !important;
    box-sizing: border-box !important;
  }
}

@media only screen and (min-width: 1200px) and (max-width: 1599px) {
  body.archive .products.row > .product-small.col,
  body.tax-product_cat .products.row > .product-small.col,
  body.woocommerce-shop .products.row > .product-small.col,
  body.search-results .products.row > .product-small.col {
    flex: 0 0 33.333% !important;
    flex-basis: 33.333% !important;
    max-width: 33.333% !important;
    width: 33.333% !important;
    box-sizing: border-box !important;
  }
}

@media only screen and (min-width: 1600px) {
  body.archive .products.row > .product-small.col,
  body.tax-product_cat .products.row > .product-small.col,
  body.woocommerce-shop .products.row > .product-small.col,
  body.search-results .products.row > .product-small.col {
    flex: 0 0 25% !important;
    flex-basis: 25% !important;
    max-width: 25% !important;
    width: 25% !important;
    box-sizing: border-box !important;
  }
}

/* Bloque catálogo centrado: el row de Flatsome queda en 1080px a la izquierda
   si el padre se estira a 100%. Mismo ancho que la tienda, margin auto. */
@media only screen and (min-width: 850px) {
  body.archive #main,
  body.tax-product_cat #main,
  body.woocommerce-shop #main,
  body.search-results #main {
    max-width: 1400px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
  }

  body.archive .row.category-page-row,
  body.tax-product_cat .row.category-page-row,
  body.woocommerce-shop .row.category-page-row,
  body.search-results .row.category-page-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  body.archive .category-page-row > .col.large-3,
  body.tax-product_cat .category-page-row > .col.large-3,
  body.woocommerce-shop .category-page-row > .col.large-3 {
    flex: 0 0 280px !important;
    max-width: 280px !important;
    width: 280px !important;
    box-sizing: border-box !important;
  }

  body.archive .category-page-row > .col.large-9,
  body.tax-product_cat .category-page-row > .col.large-9,
  body.woocommerce-shop .category-page-row > .col.large-9 {
    flex: 1 1 auto !important;
    max-width: none !important;
    width: auto !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}
