/* FILTRO GRID CURSOS CATEGORIAS 2026 */
.homs-filtro-scroll-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  position: relative;
}
.homs-filtro-categorias {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
}
.homs-filtro-categorias__btn {
  background: #f2f2f2;
padding: 0px 8px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.homs-filtro-categorias__btn:hover {
  opacity: 0.7;
}
.homs-filtro-categorias__btn.is-active {
  background: var(--homs-filtro-color, #ff5000);
  color: var(--homs-filtro-text-color, #fff);
}

.product-small.col {
  transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center bottom;
}
.product-small.col.homs-filtro-categorias--hidden {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  position: absolute !important;
}

/* FILTRO GRID CURSOS TAXONOMÍAS 2026 */
.homs-filtro-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
}
.homs-filtro-tags__btn {
  background: #f2f2f2;
padding: 0px 8px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.homs-filtro-tags__btn:hover {
  opacity: 0.7;
}
.homs-filtro-tags__btn.is-active {
  background: var(--homs-filtro-color, #ff5000);
  color: var(--homs-filtro-text-color, #fff);
}

/* Flechas de navegación, superpuestas sobre el contenido */
.homs-filtro-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  flex-shrink: 0;
  width: 24px;
  height: 27px;
  min-height: 0;
  min-width: 0;
  background: var(--homs-filtro-color, #fff);
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--homs-filtro-text-color, #999);
  padding: 0;
  line-height: 27px;
}
.homs-filtro-arrow--left {
  left: 0;
}
.homs-filtro-arrow--right {
  right: 30px;
}
.homs-filtro-arrow:hover,
.homs-filtro-arrow:focus,
.homs-filtro-arrow:active {
  background: var(--homs-filtro-color, #fff);
  outline: none;
  box-shadow: none;
}

/* Icono de swipe, integrado en la fila de chips */
.homs-filtro-desplaza-hint {
  display: none;
  width: 20px;
  height: auto;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .homs-filtro-desplaza-hint {
    display: block;
  }
  /* Ajuste de margen del párrafo justo antes del filtro */
.term-description p:has(+ .homs-filtro-scroll-wrapper) {
  margin-bottom: 12px;
}
}

/* Drag scroll con ratón */
.homs-filtro-categorias,
.homs-filtro-tags {
  cursor: grab;
}
.homs-filtro-categorias.is-dragging,
.homs-filtro-tags.is-dragging {
  cursor: grabbing;
}


/* Oculta el filtro nativo de WooCommerce en categorías donde ya usamos el shortcode propio */
body.tax-product_cat.term-grupos-electrogenos-insonorizados-superinsonorizados .category-filter-row {
  display: none !important;
}

/* RESPONSIVE: scroll horizontal con flechas para ambos filtros */
@media (max-width: 767px) {
  .homs-filtro-scroll-wrapper {
    gap: 5px;
    margin-bottom: 0px;
  }
  .homs-filtro-arrow {
    display: flex;
  }
  .homs-filtro-categorias,
  .homs-filtro-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
      gap: 2px;
  }
  .homs-filtro-categorias::-webkit-scrollbar,
  .homs-filtro-tags::-webkit-scrollbar {
    display: none;
  }
  .homs-filtro-categorias__btn,
  .homs-filtro-tags__btn {
    flex-shrink: 0;
    padding: 0px 8px;
    font-size: 12px;
  }
}