/* Wishlist: no pintar corazón en la grilla (la página Favoritos sigue). */
body.archive .product-small .wishlist-icon,
body.tax-product_cat .product-small .wishlist-icon,
body.woocommerce-shop .product-small .wishlist-icon,
body.search-results .product-small .wishlist-icon,
body.archive .product-small .yith-wcwl-add-to-wishlist,
body.woocommerce-shop .product-small .yith-wcwl-add-to-wishlist {
  display: none !important;
}

/* 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;
  min-height: calc(1.35em * 3);
}

@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;
  }
}


.facetwp-facet[data-name="marca"] .ed-marca-facet-search {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.3;
}
.facetwp-facet[data-name="marca"] .ed-marca-facet-search:focus {
  outline: none;
  border-color: #1a1a1a;
}

/* Sidebar catálogo: buscar arriba, chips compactos, sin hueco FacetWP (margin 40px). */
#shop-sidebar .facetwp-facet {
  margin-bottom: 8px !important;
}
#shop-sidebar .facetwp-facet-busqueda,
#shop-sidebar .facetwp-type-search,
#shop-sidebar .facetwp-input-wrap,
.fwp-filtros .facetwp-facet-busqueda,
.fwp-filtros .facetwp-input-wrap {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
#shop-sidebar .facetwp-facet input.facetwp-search,
#shop-sidebar .facetwp-type-search input.facetwp-search,
.fwp-filtros .facetwp-facet input.facetwp-search {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.fwp-filtros > .fwp-busqueda {
  margin: 0 0 10px !important;
  width: 100% !important;
}
.fwp-filtros > .fwp-selecciones {
  margin: 0 0 12px !important;
}
.fwp-filtros > .fwp-selecciones > h4 {
  display: none !important;
}
.fwp-filtros > .fwp-selecciones.is-empty-sel {
  display: none !important;
}
.fwp-filtros > .fwp-selecciones .facetwp-selections ul {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.fwp-filtros > .fwp-selecciones .facetwp-type-reset {
  margin-top: 0;
}
.facetwp-selections li:has([data-facet="categorias_full"]),
.facetwp-selections [data-facet="categorias_full"] {
  display: none !important;
}


/* Breadcrumb del catálogo (H1 + ruta). Categoría = FacetWP nativo, un nivel. */
.shop-page-title .woocommerce-breadcrumb,
nav.woocommerce-breadcrumb.ed-cat-bc,
.product-info .woocommerce-breadcrumb,
.product-summary .woocommerce-breadcrumb {
  text-transform: none !important;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 400;
  white-space: normal;
  line-height: 1.4;
}
.woocommerce-breadcrumb .ed-bc-sep {
  margin: 0 5px;
  opacity: 0.5;
}
.woocommerce-breadcrumb .ed-bc-current {
  color: inherit;
  opacity: 0.85;
}
.ed-back-catalog {
  margin: 6px 0 10px;
}
.ed-back-catalog-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
  color: inherit;
  text-decoration: none;
}
.ed-back-catalog-link:hover,
.ed-back-catalog-link:focus {
  text-decoration: underline;
}

.facetwp-facet-categorias_full .facetwp-expand,
.facetwp-facet-categorias_full .facetwp-toggle {
  display: none !important;
}
.facetwp-facet-categorias_full .facetwp-checkbox.ed-cat-hide {
  display: none !important;
}
.facetwp-facet-categorias_full .facetwp-overflow {
  display: block !important;
  height: auto !important;
}
.facetwp-facet-categorias_full.facetwp-type-checkboxes .facetwp-depth {
  margin-left: 0 !important;
}
.facetwp-facet-categorias_full.facetwp-type-checkboxes .facetwp-depth:has(.facetwp-checkbox:not(.ed-cat-hide)) {
  display: block !important;
}
.facetwp-facet-categorias_full.facetwp-type-checkboxes .facetwp-depth:not(:has(.facetwp-checkbox:not(.ed-cat-hide))) {
  display: none !important;
}
.ed-cat-nav {
  display: none !important;
}
.fwp-categorias.ed-cat-hide-block,
body.ed-cat-leaf .fwp-categorias {
  display: none !important;
}

.facetwp-template.ed-cat-wait,
.products.ed-cat-wait {
  pointer-events: none;
}
.woocommerce-result-count.ed-cat-count-wait {
  opacity: 0.75;
}

.facetwp-facet[data-name="precio"],
.facetwp-facet-precio,
.facet-wrap:has(.facetwp-facet[data-name="precio"]),
.fwp-precio {
  display: none !important;
}

.product-small .ed-ship-badge {
  display: none !important;
}

/* Sin categoría en cards (Ferretería y Herramientas, etc.). */
.product-small .category,
.product-small .product-cat,
.product-small p.category {
  display: none !important;
}

/* Por si algún CSS pone «Precio:» delante. */
.product-small .price-wrapper::before,
.product-small .price::before,
.product-small .ed-price-card-reg::before {
  content: none !important;
  display: none !important;
}
.product-small .box-text {
  padding: 12px 14px 14px !important;
}
.product-small .ed-ship-hint {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}
.product-small .ed-ship-hint--fast {
  color: #1f7a38;
}
.product-small .ed-ship-hint--coord {
  color: #b45309;
}

@media only screen and (max-width: 849px) {
  body.archive #main,
  body.tax-product_cat #main,
  body.woocommerce-shop #main,
  body.search-results #main {
    padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
    box-sizing: border-box !important;
  }
  .shop-page-title .woocommerce-breadcrumb,
  nav.woocommerce-breadcrumb.ed-cat-bc {
    font-size: 12px;
    margin-top: 4px;
  }
}

/* Shimmer en la foto: el recuadro blanco se lee como página rota. */
@keyframes ed-img-skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
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 {
  background-color: #e8edf3;
  background-image: linear-gradient(90deg, #e8edf3 0%, #f4f6fa 42%, #e8edf3 88%);
  background-size: 200% 100%;
  animation: ed-img-skel 1.15s ease-in-out infinite;
}
body.archive .product-small .box-image.is-ready,
body.tax-product_cat .product-small .box-image.is-ready,
body.woocommerce-shop .product-small .box-image.is-ready,
body.woocommerce.archive .product-small .box-image.is-ready,
body.search-results .product-small .box-image.is-ready {
  animation: none;
  background: #fff;
}
body.archive .product-small .box-image.ed-wait img:not(.back-image),
body.tax-product_cat .product-small .box-image.ed-wait img:not(.back-image),
body.woocommerce-shop .product-small .box-image.ed-wait img:not(.back-image),
body.search-results .product-small .box-image.ed-wait img:not(.back-image) {
  opacity: 0;
}
body.archive .product-small .box-image.is-ready img:not(.back-image),
body.tax-product_cat .product-small .box-image.is-ready img:not(.back-image),
body.woocommerce-shop .product-small .box-image.is-ready img:not(.back-image),
body.search-results .product-small .box-image.is-ready img:not(.back-image) {
  opacity: 1;
  transition: opacity 0.18s ease;
}
@media (prefers-reduced-motion: reduce) {
  body.archive .product-small .box-image,
  body.tax-product_cat .product-small .box-image,
  body.woocommerce-shop .product-small .box-image,
  body.search-results .product-small .box-image {
    animation: none;
    background: #e8edf3;
  }
  body.archive .product-small .box-image.ed-wait img:not(.back-image),
  body.woocommerce-shop .product-small .box-image.ed-wait img:not(.back-image) {
    opacity: 1;
  }
}

