/* Faceted listings and search (SEA_FACETS=on only; docs/FACETED_SEARCH.md, spec §11.1): the sidebar, pills, results
   and, at 1000 px and below, the "Filtrar productos" bar and the full-height sheet. Uses site.css's tokens; existing
   classes are not restyled. */
.fc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
/* focus and the results' top (facets.js toTop) land below the sticky header, not under it */
html:has(> body.fc-page) { scroll-padding-top: calc(var(--fc-hdr, 102px) + 8px); }
.fc-nopanel { display: block; }
.fc-main { min-width: 0; }
/* sticky without a z-index: the header (50), the WhatsApp button and its menu stay above it */
.fc-panel { position: sticky; top: calc(var(--fc-hdr, 102px) + 12px); max-height: calc(100vh - var(--fc-hdr, 102px) - 24px); overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); }
/* these classes set a display, which beats the hidden attribute (#fc-results is also site.css's .grid) */
.fc-panel[hidden], .fc-bar[hidden], .fc-badge[hidden], .fc-opt[hidden], .fc-more-res[hidden], .fc-prog[hidden], #fc-results[hidden] { display: none; }
.fc-sheet-h .fc-x, .fc-sheet-f, .fc-subs-row, .fc-bar { display: none; }
.fc-sheet-h h2 { margin: 2px 0 4px; font-size: 16px; }
#fc-panel-h:focus, #fc-status:focus { outline: none; }   /* focus targets set by script (bom.js does the same) */
.fc-panel :focus-visible, .fc-pills :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.fc-group { border-top: 1px solid var(--line-2); padding: 6px 0; }
.fc-gh { margin: 0; font-size: 14px; }
.fc-tog { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 36px; padding: 4px 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.fc-tog::after { content: ""; flex: none; width: 7px; height: 7px; margin-right: 4px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
.fc-tog[aria-expanded="true"]::after { transform: rotate(-135deg); }
.fc-vals { border: 0; margin: 0; padding: 0 0 4px; min-width: 0; }
.fc-opt { display: flex; align-items: center; gap: 8px; min-height: 30px; font-size: 14px; cursor: pointer; }
.fc-opt input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.fc-child { padding-left: 24px; }
.fc-l { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fc-n { color: var(--muted); font-size: 12.5px; }
.fc-zero { color: #6b7684; cursor: default; }
.fc-more { border: 0; background: none; padding: 4px 0; color: var(--link); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.fc-note { margin: 2px 0 4px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.fc-err { color: var(--ink); font-weight: 600; }
.fc-subs { list-style: none; margin: 0; padding: 0 0 4px; }
.fc-subs a { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; color: var(--ink); font-size: 14px; }
/* a subcategory with no result for the filters it can apply: text, not a link */
.fc-subs .fc-zero, .fc-subs-row .chip.fc-zero { color: #6b7684; text-decoration: none; cursor: default; }
.fc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.fc-status { margin: 0; font-size: 14px; }
.fc-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fc-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; border: 1px solid var(--blue); border-radius: 999px; padding: 3px 12px; background: #f0f6fc; color: var(--blue); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fc-pill span { font-size: 16px; line-height: 1; }
.fc-pill:hover { background: #e1edf8; }
.fc-clear-all { min-height: 32px; border: 0; background: none; padding: 3px 6px; color: var(--link); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.fc-spec { margin: 0; color: var(--blue); font-size: 12.5px; font-weight: 600; }
.fc-empty { grid-column: 1 / -1; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px; text-align: center; }
.fc-empty p { margin: 0 0 10px; }
.fc-empty .btn { margin: 0 4px 10px; }
.fc-prog { margin: -12px 0 8px; font-size: 13px; text-align: center; }
.fc-more-res { display: flex; margin: 0 auto 24px; }

@media (max-width: 1000px) {
  .fc-layout { display: block; }
  .fc-panel { display: none; }
  .chips.subs.fc-subs-row { display: flex; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 8px; scrollbar-width: thin; }   /* beats .chips.subs */
  .fc-subs-row .chip { flex: none; white-space: nowrap; }
  /* above the WhatsApp button (40), below its menu (70); the button sits at right 18 with width 54 */
  .fc-page .fc-bar { position: fixed; left: 16px; right: 84px; bottom: calc(18px + env(safe-area-inset-bottom)); height: 54px; z-index: 45; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; font: inherit; font-size: 15px; font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); cursor: pointer; }
  .fc-page .fc-bar[hidden] { display: none; }
  /* a control focused by Tab is never left under the bar (WCAG 2.4.11) */
  html:has(> body.fc-page) { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .fc-page .fc-bar:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
  .fc-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 800; }
  .fc-page main { padding-bottom: 84px; }
  .fc-page .ftr .tm { padding-bottom: 96px; }
  .fc-page .bom-pill { bottom: 84px; }
  /* the sheet: above the header, the skip link and every float */
  html.fc-open .fc-panel { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 200; height: 100vh; height: 100dvh; max-height: none; padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; overflow: hidden; }
  html.fc-open .fc-sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); }
  html.fc-open .fc-sheet-h h2 { margin: 0; font-size: 18px; }
  html.fc-open .fc-sheet-h .fc-x { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: 28px; line-height: 1; cursor: pointer; }
  html.fc-open .fc-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 16px 8px; }
  html.fc-open .fc-sheet-f { display: flex; gap: 10px; position: sticky; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
  html.fc-open .fc-sheet-f .btn { flex: 1; min-height: 44px; }
  html.fc-open .fc-opt, html.fc-open .fc-subs a, html.fc-open .fc-tog, html.fc-open .fc-more { min-height: 44px; }
  html.fc-open .fc-subs a { align-items: center; }
  html.fc-open .fc-panel :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
}
html.fc-lock, html.fc-lock body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .fc-tog::after { transition: none; }
}
