/* FXR Vargas Filtros — panel de filtros con el estilo de Vargas (Barlow, rojo de marca, esquinas rectas).
 * Los !important evitan que Salient y los estilos globales del sitio pisen los controles. */

.fxvf, .fxvf-open, .fxvf-capa { --fxvf-a: #a3231f; --fxvf-ink: #161616; --fxvf-mut: #6a6a6a; --fxvf-line: #e4e2de; --fxvf-bg: #f6f5f3; }

.fxvf {
  font-family: Barlow, system-ui, sans-serif; color: var(--fxvf-ink); text-align: left;
  background: #fff; border: 1px solid var(--fxvf-line); border-top: 3px solid var(--fxvf-a); padding: 20px 22px 6px;
}
.fxvf *, .fxvf *::before, .fxvf *::after { box-sizing: border-box; }
.fxvf [hidden] { display: none !important; }
.fxvf ul, .fxvf li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.fxvf li::before, .fxvf li::marker { content: none !important; display: none !important; }
.fxvf input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.fxvf :focus-visible { outline: 2px solid #0f62fe; outline-offset: 2px; }
.fxvf.is-loading { opacity: .6; pointer-events: none; transition: opacity .15s; }
.fxvf-widget { margin: 0 0 30px !important; padding: 0 !important; border: 0 !important; }
#sidebar:has(.fxvf) .widget:not(.fxvf-widget):not(:has(*:not(style))) { display: none !important; }

@media (min-width: 1000px) {
  /* Salient deja 56 px de relleno a la derecha de la barra lateral: se baja a 10 px y el panel crece. */
  .row:has(> #sidebar .fxvf) > #sidebar.span_3 { padding-right: 10px !important; }
  .fxvf { position: sticky; top: 120px; max-height: calc(100vh - 140px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}

/* Cabecera y filtros activos */
.fxvf-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.fxvf-h b { margin-right: auto; font: 800 22px/1 'Barlow Condensed', sans-serif; letter-spacing: .02em; text-transform: uppercase; }
.fxvf .fxvf-clear { font-size: 13px; color: var(--fxvf-mut) !important; text-decoration: underline; text-underline-offset: 3px; }
.fxvf .fxvf-x { display: none !important; }
.fxvf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.fxvf .fxvf-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--fxvf-ink); color: #fff !important; font: 600 12px Barlow, sans-serif; letter-spacing: .04em; text-decoration: none !important; }
.fxvf .fxvf-chip:hover { background: #393939; }
.fxvf-chip i { font-style: normal; color: #ff8a85; }
.fxvf-dot { width: 10px; height: 10px; flex: none; border: 1px solid rgba(255, 255, 255, .6); background: #d0d0d0; }

/* Secciones plegables */
.fxvf-sec { border-top: 1px solid var(--fxvf-line); padding: 14px 0; }
.fxvf-sec > summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; font: 700 13px Barlow, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.fxvf-sec > summary::-webkit-details-marker { display: none; }
.fxvf-sec > summary small { color: var(--fxvf-a); font: 700 13px Barlow, sans-serif; letter-spacing: 0; }
.fxvf-sec > summary::after { content: ""; margin-left: auto; margin-right: 4px; width: 7px; height: 7px; border-right: 2px solid var(--fxvf-ink); border-bottom: 2px solid var(--fxvf-ink); transform: rotate(45deg); transition: transform .2s; }
.fxvf-sec[open] > summary::after { transform: rotate(-135deg); }
.fxvf-body { margin-top: 12px; }

/* Categoría: principales en el orden del menú + subcategorías desplegables.
   Letra y tamaño forzados: Salient agranda los enlaces de la barra lateral. */
.fxvf .fxvf-cat { border-bottom: 1px solid #f0eeea !important; }
.fxvf .fxvf-cat:last-child { border-bottom: 0 !important; }
.fxvf-cat__r { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.fxvf .fxvf-cat__a, .fxvf .fxvf-sub a {
  flex: 1; min-width: 0; display: flex !important; justify-content: space-between; align-items: center; gap: 10px;
  font: 600 15px/1.3 Barlow, sans-serif !important; letter-spacing: 0 !important; text-transform: none !important;
  color: var(--fxvf-ink) !important; text-decoration: none !important; background: none !important; padding: 0 !important; margin: 0 !important;
}
.fxvf .fxvf-cat__a:hover span, .fxvf .fxvf-sub a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.fxvf .fxvf-cat__a.is-cur, .fxvf .fxvf-sub a.is-cur { color: var(--fxvf-a) !important; font-weight: 700 !important; }
.fxvf .fxvf-cat__a em { flex: none; min-width: 34px; padding: 2px 7px; background: var(--fxvf-bg); text-align: center; font: normal 12px/1.4 Barlow, sans-serif !important; color: #8d8d8d; }
.fxvf .fxvf-tg {
  flex: none; display: grid !important; place-items: center; width: 26px !important; height: 26px !important; min-width: 0 !important; padding: 0 !important; margin: 0 !important;
  border: 1px solid var(--fxvf-line) !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important;
  font: 400 17px/1 Barlow, sans-serif !important; color: var(--fxvf-ink) !important; cursor: pointer;
}
.fxvf .fxvf-tg:hover { border-color: var(--fxvf-ink) !important; }
.fxvf .fxvf-cat.is-open .fxvf-tg, .fxvf .fxvf-tg[aria-expanded="true"] { background: var(--fxvf-ink) !important; border-color: var(--fxvf-ink) !important; color: #fff !important; }
.fxvf .fxvf-sub { margin: 0 0 8px 0 !important; padding: 2px 0 6px 12px !important; border-left: 2px solid var(--fxvf-a); }
.fxvf .fxvf-sub a { padding: 6px 0 6px 10px !important; font-weight: 400 !important; font-size: 14px !important; color: #333 !important; }
.fxvf .fxvf-sub a em { font: normal 12px Barlow, sans-serif !important; color: #9a9a9a; }
.fxvf .fxvf-sub a.fxvf-todo { justify-content: flex-start; font-weight: 600 !important; font-size: 13px !important; color: var(--fxvf-a) !important; text-decoration: underline !important; text-underline-offset: 3px; }

/* Muestras de color */
/* 1.2.3: cuadros de 28 px, 10 por fila */
.fxvf-sw { display: grid; grid-template-columns: repeat(auto-fill, 28px); gap: 6px; }
.fxvf-sw label { cursor: pointer; margin: 0; }
.fxvf-sw span { display: block; aspect-ratio: 1; background: #d0d0d0; border: 1px solid rgba(0, 0, 0, .15); box-shadow: inset 0 0 0 2px #fff; transition: transform .12s; }
.fxvf-sw label:hover span { transform: scale(1.06); }
.fxvf-sw input:checked + span { outline: 2px solid var(--fxvf-ink); outline-offset: 2px; }
.fxvf-sw input:focus-visible + span { outline: 2px solid #0f62fe; outline-offset: 2px; }
.fxvf .is-tr { background: linear-gradient(135deg, #fff 45%, #d33 45%, #d33 55%, #fff 55%) !important; }

/* Botones (atributos y etiquetas) */
.fxvf-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.fxvf-pills label { margin: 0; cursor: pointer; }
.fxvf-pills span { display: inline-block; padding: 7px 11px; border: 1px solid var(--fxvf-line); background: #fff; font: 400 13px/1.2 Barlow, sans-serif; color: var(--fxvf-ink); transition: border-color .15s, background .15s; }
.fxvf-pills span em { margin-left: 4px; font-style: normal; font-size: 11px; color: #9a9a9a; }
.fxvf-pills label:hover span { border-color: var(--fxvf-ink); }
.fxvf-pills input:checked + span { background: var(--fxvf-ink); border-color: var(--fxvf-ink); color: #fff; }
.fxvf-pills input:checked + span em { color: #bbb; }
.fxvf-pills input:focus-visible + span { outline: 2px solid #0f62fe; outline-offset: 2px; }
.fxvf .fxvf-mas { display: inline-block; margin: 10px 0 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; cursor: pointer; font: 600 13px Barlow, sans-serif !important; color: var(--fxvf-ink) !important; text-decoration: underline; text-underline-offset: 3px; text-transform: none !important; letter-spacing: 0 !important; }

/* Buscador de etiquetas */
.fxvf-srch { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; margin: 0 0 12px; border: 1px solid var(--fxvf-line); background: #fafafa; cursor: text; }
.fxvf-srch:focus-within { border-color: var(--fxvf-ink); background: #fff; }
.fxvf-srch svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--fxvf-mut); stroke-width: 2; }
.fxvf .fxvf-srch input { flex: 1; min-width: 0; height: 38px !important; padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; font: 400 14px Barlow, sans-serif !important; color: var(--fxvf-ink) !important; }
.fxvf .fxvf-srch input:focus { outline: 0; }
.fxvf-nada { margin: 6px 0 0 !important; font-size: 13px; color: var(--fxvf-mut); }

/* Barra inferior y botón "Filtros": solo celular */
.fxvf-bar, .fxvf-open, .fxvf-capa { display: none; }

@media (max-width: 999px) {
  /* Botón sobre los productos */
  .fxvf-open {
    display: flex !important; align-items: center; justify-content: space-between; width: 100%; height: 48px !important; margin: 10px 0 16px !important; padding: 0 16px !important;
    border: 1.5px solid var(--fxvf-ink) !important; border-radius: 0 !important; background: #fff !important; color: var(--fxvf-ink) !important; box-shadow: none !important;
    font: 700 13px Barlow, sans-serif !important; letter-spacing: .1em !important; text-transform: uppercase !important; cursor: pointer;
  }
  .fxvf-open small { padding: 2px 7px; background: var(--fxvf-a); color: #fff; font-size: 12px; letter-spacing: 0; }

  /* Sin Salient: mientras el panel vive en la barra lateral (antes de moverlo al cajón) no se muestra */
  body:not(:has(.nectar-shop-filter-trigger)) .fxvf-widget, .fxvf:not(.is-drawer):not(.is-salient) { display: none !important; }

  /* Con Salient: un solo botón (el suyo); nuestro panel va dentro de su barra lateral */
  body:has(.nectar-shop-filter-trigger) .fxvf-open, body.fxvf-salient .fxvf-open { display: none !important; }
  .fxvf.is-salient { display: block !important; position: static; max-height: none; overflow: visible; border: 0; padding: 0 0 110px; }
  .fxvf.is-salient .fxvf-h { display: none; }
  .fxvf.is-salient .fxvf-chips { margin-top: 4px; }
  .fxvf.is-salient .fxvf-sec:first-of-type, .fxvf.is-salient .fxvf-chips + .fxvf-sec { border-top: 0; }
  #sidebar.open .fxvf.is-salient .fxvf-bar {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20001;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--fxvf-line);
  }
  #sidebar:has(.fxvf) .header { background: #fff !important; border-bottom: 1px solid #e4e2de; }
  #sidebar:has(.fxvf) .header h4 { font: 800 26px/1 'Barlow Condensed', sans-serif !important; letter-spacing: .02em !important; text-transform: uppercase !important; color: #161616 !important; }
  .nectar-shop-filter-trigger .fxvf-badge { display: inline-block; margin-left: 8px; padding: 1px 7px; background: var(--fxvf-a, #a3231f); color: #fff; font: 700 12px/1.4 Barlow, sans-serif; vertical-align: 1px; }

  /* Cajón */
  .fxvf.is-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 100001; width: min(420px, 100%); max-height: none;
    display: flex; flex-direction: column; padding: 0; border: 0; overflow: hidden;
    transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s;
  }
  .fxvf.is-drawer.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
  .fxvf.is-drawer > * { flex: none; }
  .fxvf.is-drawer .fxvf-h { margin: 0; padding: 16px; border-bottom: 1px solid var(--fxvf-line); align-items: center; }
  .fxvf.is-drawer .fxvf-h b { font-size: 26px; }
  .fxvf.is-drawer .fxvf-clear { display: none; }
  .fxvf.is-drawer .fxvf-x { display: grid !important; place-items: center; width: 40px; height: 40px; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; font-size: 22px !important; color: var(--fxvf-ink) !important; cursor: pointer; }
  .fxvf.is-drawer .fxvf-chips { margin: 14px 16px 0; }
  .fxvf.is-drawer .fxvf-sec { margin: 0 16px; }
  .fxvf.is-drawer .fxvf-sec:first-of-type { border-top: 0; }
  /* El contenido entre la cabecera y la barra se desplaza */
  .fxvf.is-drawer { overflow-y: auto; padding-bottom: 96px; }
  .fxvf.is-drawer .fxvf-h { position: sticky; top: 0; z-index: 2; background: #fff; }

  .fxvf.is-drawer .fxvf-bar {
    display: flex; gap: 10px; position: fixed; right: 0; bottom: 0; width: min(420px, 100%); z-index: 3;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--fxvf-line);
  }
  .fxvf .fxvf-bar__l, .fxvf .fxvf-bar__v { height: 52px !important; display: flex !important; align-items: center; justify-content: center; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; font: 700 13px Barlow, sans-serif !important; letter-spacing: .1em !important; text-transform: uppercase !important; text-decoration: none !important; cursor: pointer; }
  .fxvf .fxvf-bar__l { flex: 0 0 110px; border: 1.5px solid var(--fxvf-ink) !important; background: #fff !important; color: var(--fxvf-ink) !important; }
  .fxvf .fxvf-bar__v { flex: 1; padding: 0 12px !important; border: 0 !important; background: var(--fxvf-a) !important; color: #fff !important; }
  .fxvf .fxvf-bar__v:disabled { opacity: .55; cursor: default; }

  .fxvf-capa { display: block; position: fixed; inset: 0; z-index: 100000; background: rgba(22, 22, 22, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .fxvf-capa.is-on { opacity: 1; pointer-events: auto; }
  html.fxvf-lock, html.fxvf-lock body { overflow: hidden !important; }
}

@media (prefers-reduced-motion: reduce) { .fxvf *, .fxvf, .fxvf-capa { transition: none !important; } }

/* 1.2.2 — Salient (.material #sidebar .widget li a { padding: 0 !important }) pegaba las subcategorías:
   este selector pesa más para recuperar el espacio entre líneas. */
html body #sidebar .fxvf .fxvf-sub a { padding: 7px 0 7px 10px !important; line-height: 1.3 !important; }
html body #sidebar .fxvf .fxvf-sub a.fxvf-todo { margin-top: 4px !important; }
