/* Filtros de /products.
   Corrige la cascada del sidebar antiguo (`.wsus__product_sidebar ul li a:hover`)
   que pintaba fondo azul y dejaba el texto azul sobre azul. Se carga despues
   de responsive.css para ser la ultima palabra, sin tocar el CSS purgado. */

/* --- Neutraliza la regla legacy sobre los componentes del rediseno --- */
.wsus__product_sidebar ul li a.wsus__filter_item,
.wsus__product_sidebar ul li a.wsus__filter_check {
  border-left: 0;
  transform: none;
  box-shadow: none;
}

/* --- Categorias --- */
.wsus__product_sidebar ul li a.wsus__filter_item {
  color: #334155 !important;
  background: transparent;
}

.wsus__product_sidebar ul li a.wsus__filter_item:hover {
  color: #0088cc !important;
  background: #f0f7fc;
  padding-left: 16px;
  transform: none;
  box-shadow: none;
}

.wsus__product_sidebar ul li a.wsus__filter_item.active {
  color: #fff !important;
  background: #0088cc;
  padding-left: 16px;
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.25);
}

.wsus__product_sidebar ul li a.wsus__filter_item.active:hover {
  color: #fff !important;
  background: #0076b3;
}

.wsus__filter_item.active .wsus__filter_item_dot {
  background: #fff;
}

/* --- Marcas --- */
.wsus__product_sidebar ul li a.wsus__filter_check {
  color: inherit;
  background: transparent;
}

.wsus__product_sidebar ul li a.wsus__filter_check:hover {
  background: #f0f7fc;
  transform: none;
  box-shadow: none;
}

.wsus__filter_check:hover .wsus__check_label {
  color: #0088cc;
}

.wsus__filter_check:hover .wsus__check_count {
  background: #e0f2fe;
  color: #0088cc;
}

.wsus__product_sidebar ul li a.wsus__filter_check.active {
  background: #0088cc;
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.25);
}

.wsus__filter_check.active .wsus__check_box {
  background: #fff;
  border-color: #fff;
}

.wsus__filter_check.active .wsus__check_box i {
  color: #0088cc;
}

.wsus__filter_check.active .wsus__check_label {
  color: #fff;
}

.wsus__filter_check.active .wsus__check_count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* Hover sobre una marca ya activa: mantener el texto legible */
.wsus__filter_check.active:hover .wsus__check_label,
.wsus__filter_check.active:hover .wsus__check_count {
  color: #fff;
}

.wsus__filter_check.active:hover .wsus__check_count {
  background: rgba(255, 255, 255, 0.3);
}

.wsus__filter_empty {
  padding: 10px 12px;
  font-size: 13px;
  color: #8a99a6;
}

/* --- Actualizacion en vivo (AJAX) --- */
#product-results {
  transition: opacity 0.18s ease;
}

#product-results.is-loading {
  opacity: 0.45;
  pointer-events: none;
}

/* --- Barra de precio ---
   .flat-slider recortaba los handles y el label del maximo (overflow:hidden
   + posicionamiento absoluto calculado por el plugin). Se reemplaza por un
   layout propio: los handles quedan centrados y los valores siempre visibles
   debajo de la barra, alineados a cada extremo. */
.wsus__price_filter .flat-slider {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "track track"
    "minval maxval";
  row-gap: 10px;
  align-items: start;
  overflow: visible;
  padding: 6px 10px 4px;
}

.wsus__price_filter .flat-slider::after {
  content: none;
}

.wsus__price_filter .flat-slider .slider {
  grid-area: track;
  width: 100%;
  padding-block: 7px;
}

/* Los extremos absolutos del catalogo se ocultan: los valores seleccionados
   ya muestran el intervalo debajo de la barra. */
.wsus__price_filter .flat-slider .min,
.wsus__price_filter .flat-slider .max {
  display: none;
}

.wsus__price_filter .flat-slider .ui-slider-horizontal {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
}

.wsus__price_filter .flat-slider .ui-widget-header {
  background: linear-gradient(90deg, #38bdf8 0%, #0088cc 100%);
  border-radius: 999px;
}

.wsus__price_filter .flat-slider .ui-slider-handle {
  width: 20px;
  height: 20px;
  top: -7px;
  margin-left: -10px;
  background: #0088cc;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 136, 204, 0.35);
  transition: box-shadow 0.2s ease;
}

.wsus__price_filter .flat-slider .ui-slider-handle:hover,
.wsus__price_filter .flat-slider .ui-slider-handle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 136, 204, 0.18), 0 2px 6px rgba(0, 136, 204, 0.35);
}

.wsus__price_filter .flat-slider .min_value,
.wsus__price_filter .flat-slider .max_value {
  position: static !important;
  left: auto !important;
  margin-top: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #0b2c3d;
  white-space: nowrap;
}

.wsus__price_filter .flat-slider .min_value {
  grid-area: minval;
  justify-self: start;
  text-align: left;
}

.wsus__price_filter .flat-slider .max_value {
  grid-area: maxval;
  justify-self: end;
  text-align: right;
}
