/* Eldesa catálogo v4 — fotos (hover Flatsome intacto) + filtros + cards */

/* --- Fotos: no pelear fade_in_back. Gana a style.css viejo (static). --- */
body.archive .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;
  position: relative;
}

body.archive .product-small .box-image .image-fade_in_back,
body.archive .product-small .box-image .image-cover,
body.archive .product-small .box-image .image-none,
body.woocommerce-shop .product-small .box-image .image-fade_in_back,
body.woocommerce-shop .product-small .box-image .image-cover,
body.search-results .product-small .box-image .image-fade_in_back,
body.archive .product-small .box-image a,
body.woocommerce-shop .product-small .box-image a,
body.search-results .product-small .box-image a {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden;
}

body.archive .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;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  padding: 14px;
  box-sizing: border-box;
  transform: none;
}

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

/* --- Grilla --- */
@media only screen and (max-width: 1199px) {
  .products.large-columns-4 > .product-small.col,
  .products.medium-columns-3 > .product-small.col {
    flex-basis: 50% !important;
    max-width: 50% !important;
  }
}

@media only screen and (min-width: 850px) {
  body.archive #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.woocommerce-shop .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;
  }

  body.archive .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;
    padding-right: 20px;
    box-sizing: border-box;
  }

  body.archive .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;
  }
}

@media only screen and (min-width: 1200px) and (max-width: 1599px) {
  .products.large-columns-4 > .product-small.col {
    flex-basis: 33.333% !important;
    max-width: 33.333% !important;
  }
}

@media only screen and (min-width: 1600px) {
  .products.large-columns-4 > .product-small.col {
    flex-basis: 25% !important;
    max-width: 25% !important;
  }
}

/* --- Cards --- */
body.archive .product-small .col-inner,
body.woocommerce-shop .product-small .col-inner {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  box-shadow: none;
}
body.archive .product-small .box-text,
body.woocommerce-shop .product-small .box-text {
  padding: 10px 14px 14px !important;
}

/* --- Filtros FacetWP: acordeón limpio (sin círculo gris) --- */
#shop-sidebar .fwp-filtros {
  font-size: 14px;
  color: #1a1a1a;
}

#shop-sidebar .fwp-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7e8f;
  margin: 0 0 10px;
}

#shop-sidebar .fwp-selecciones {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8edf2;
}

#shop-sidebar .fwp-accordion {
  margin: 0;
  border-bottom: 1px solid #e8edf2;
}

#shop-sidebar .fwp-accordion .fwp-acc-title,
#shop-sidebar .facet-label {
  cursor: pointer;
  user-select: none;
  position: relative;
  margin: 0;
  padding: 14px 28px 14px 0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.3;
  color: #1a1a1a !important;
  border: 0 !important;
  background: transparent;
}

#shop-sidebar .fwp-accordion .fwp-acc-icon {
  position: absolute !important;
  right: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  background: none !important;
  mask: none !important;
}

#shop-sidebar .fwp-accordion .fwp-acc-icon::before {
  content: "+" !important;
  display: block !important;
  position: static !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  mask: none !important;
  background: none !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: #1e73be !important;
  opacity: 1 !important;
}

#shop-sidebar .fwp-accordion.is-open .fwp-acc-icon {
  transform: translateY(-50%) !important;
  background: none !important;
}

#shop-sidebar .fwp-accordion.is-open .fwp-acc-icon::before {
  content: "−" !important;
}

#shop-sidebar .facetwp-facet {
  padding: 0 0 12px;
}

#shop-sidebar .facetwp-facet-busqueda .facetwp-search {
  width: 100%;
  border: 1px solid #d7dee6 !important;
  border-radius: 8px !important;
  background: #f7f9fb !important;
  padding: 10px 12px 10px 36px;
  min-height: 42px;
  box-shadow: none !important;
}

#shop-sidebar .facetwp-checkbox,
#shop-sidebar .facetwp-radio {
  padding: 7px 0;
  font-size: 13.5px;
  line-height: 1.35;
  color: #2a2a2a;
}

#shop-sidebar .facetwp-counter {
  color: #8a96a3;
  font-size: 12px;
}

#shop-sidebar .facetwp-checkbox.checked {
  font-weight: 600;
}

#shop-sidebar .facetwp-selections .facetwp-selection {
  display: block;
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px solid #e3e7ee;
  border-radius: 8px;
  background: #f7f9fc;
  font-size: 13px;
}

#shop-sidebar .facetwp-checkbox,
#shop-sidebar .facetwp-radio {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 6px 0 !important;
}
