/* NAIA — the category bar and filter, test page for Nora (4 Nov 2026).
   Her "NAIA Filter Design" email (28 Oct): six categories under the logo or
   when the search bar is tapped, and NET-A-PORTER's filter (FILTER ×, folding
   sections with "All", Unselect all, Clear All + Apply), in NAIA's colours. */

:root {
  --fx-ink: var(--charcoal);
  --fx-soft: var(--mid-gray);
  --fx-line: var(--border);
  --fx-line-soft: var(--border-soft);
  --fx-paper: var(--white);
  --fx-cream: var(--cream);
  --fx-label: 12.5px;
}

html, body { overflow-x: clip; }

/* ── The test bar: two switches Nora can flip ─────────────────────────── */
.fx-test {
  background: var(--fx-ink); color: var(--fx-cream);
  font-family: var(--sans); font-size: 13px;
  padding: 10px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px;
}
.fx-test p { margin: 0; }
.fx-test-group { display: flex; align-items: center; gap: 8px; }
.fx-test-group > span { opacity: .75; }
.fx-test button {
  font: inherit; color: var(--fx-cream); background: none; cursor: pointer;
  border: 1px solid rgba(245, 243, 241, .35); border-radius: 999px; padding: 4px 12px;
}
.fx-test button[aria-pressed="true"] { background: var(--fx-cream); color: var(--fx-ink); border-color: var(--fx-cream); }
.fx-test button:focus-visible { outline: 2px solid var(--fx-cream); outline-offset: 2px; }

/* ── Category bar under the logo ─────────────────────────────────────── */
.fx-catbar {
  position: relative; background: var(--fx-cream);
  border-bottom: 1px solid var(--fx-line-soft);
}
.fx-catbar[hidden] { display: none; }
.fx-cats {
  list-style: none; margin: 0 auto; padding: 0 24px; max-width: var(--max-w);
  display: flex; justify-content: center; gap: 4px 34px; overflow-x: auto; scrollbar-width: none;
}
.fx-cats::-webkit-scrollbar { display: none; }
.fx-cat {
  font-family: var(--sans); font-size: 14.5px; color: var(--fx-ink); white-space: nowrap;
  background: none; border: 0; border-bottom: 1.5px solid transparent;
  padding: 14px 0 12px; cursor: pointer;
}
a.fx-cat { display: inline-block; text-decoration: none; line-height: normal; }   /* Editorials: a link among the buttons */
.fx-cat:hover, .fx-cat[aria-expanded="true"], .fx-cat[aria-current="true"] { border-bottom-color: var(--fx-ink); }
.fx-cat:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: 2px; }

/* The panel that drops down from a category (NET-A-PORTER's step 1). */
.fx-menu {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  background: var(--fx-paper); border-bottom: 1px solid var(--fx-line);
  box-shadow: 0 18px 30px -24px rgba(0, 0, 0, .35);
}
.fx-menu[hidden] { display: none; }
.fx-menu-inner { max-width: 1100px; margin: 0 auto; padding: 28px 24px 34px; }
.fx-menu-label {
  font-family: var(--sans); font-size: var(--fx-label); letter-spacing: .14em; text-transform: uppercase;
  color: var(--fx-soft); margin: 0 0 18px;
}
.fx-menu-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 48px; max-width: 560px; }
.fx-menu-list li { break-inside: avoid; margin: 0 0 14px; }
.fx-menu-list a, .fx-brand-cols a {
  font-family: var(--sans); font-size: 15px; color: var(--fx-ink); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.fx-menu-list a:hover, .fx-brand-cols a:hover { border-bottom-color: var(--fx-ink); }
.fx-menu-list a:focus-visible, .fx-brand-cols a:focus-visible, .fx-letters a:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: 2px; }
/* Shoes, the NET-A-PORTER way (Nora, 16 Nov 2026): the menu lists the main
   kinds only, Where to Wear beside them; in the filter, Category is one choice. */
.fx-menu-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 260px)); gap: 24px 64px; }
.fx-menu-one { columns: 1; }
.fx-menu-cols > .fx-menu-wide { grid-column: span 2; }
.fx-menu-two { columns: 2; max-width: 560px; }
.fx-opt.fx-radio input { border-radius: 50%; }
.fx-opt.fx-radio input:checked { background: var(--fx-paper); border-color: var(--fx-ink); }
.fx-opt.fx-radio input:checked::after { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--fx-ink); transform: none; }

/* Brands A–Z in the menu: every brand, a letter row, a search. */
.fx-brand-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0 0 18px; }
.fx-brand-search, .fx-fbrand-search {
  font: inherit; font-family: var(--sans); font-size: 14px; color: var(--fx-ink);
  border: 1px solid var(--fx-line); background: var(--fx-paper); border-radius: 999px; padding: 8px 14px; width: 240px; max-width: 100%;
}
.fx-brand-search:focus-visible, .fx-fbrand-search:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: 1px; }
.fx-letters { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.fx-letters a { font-family: var(--sans); font-size: 13px; color: var(--fx-ink); text-decoration: none; padding: 2px; }
.fx-letters span { font-family: var(--sans); font-size: 13px; color: var(--fx-line); padding: 2px; }
.fx-brand-scroll { max-height: min(52vh, 460px); overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; }
.fx-brand-group { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--fx-line-soft); scroll-margin-top: 4px; }
.fx-brand-group h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1; margin: 0; }
.fx-brand-cols { list-style: none; margin: 0; padding: 0; columns: 4; column-gap: 28px; }
.fx-brand-cols li { break-inside: avoid; margin: 0 0 9px; }
.fx-brand-cols a { font-size: 14px; }

/* Brand names in the two looks Nora asked to compare (small and subtle). */
.fx-names-caps .fx-bn { text-transform: uppercase; font-size: 0.86em; letter-spacing: .06em; }
/* The cards follow the switch too (the shop's cards are always in capitals). */
body:not(.fx-names-caps) .shopx-brand { text-transform: none; letter-spacing: .01em; font-size: 13.5px; }

/* ── Hero, as on the homepage, with the search box ───────────────────── */
/* Tall enough that the search bar's category panel opens over the hero,
   not over the footer, while no results are showing yet. */
.fx-hero { text-align: center; padding: 56px 24px 40px; min-height: min(78vh, 760px); }
.fx-hero-lead { font-family: var(--sans); font-size: 15px; color: var(--fx-soft); margin: 0 0 18px; }
.fx-hero h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5vw, 60px); line-height: 1.08;
  margin: 0 auto 30px; max-width: 16ch; overflow-wrap: break-word;
}
.fx-search { position: relative; max-width: 720px; margin: 0 auto; }
.fx-search-box {
  display: flex; align-items: center; gap: 10px; background: var(--fx-paper);
  border: 1px solid var(--fx-line); border-radius: 14px; padding: 14px 16px 14px 20px;
}
.fx-search-box:focus-within { border-color: var(--fx-ink); }
.fx-search-box input {
  flex: 1; min-width: 0; font: inherit; font-family: var(--sans); font-size: 16px; color: var(--fx-ink);
  border: 0; background: none; outline: none;
}
.fx-search-box button {
  font-family: var(--sans); font-size: 14px; color: var(--fx-paper); background: var(--fx-ink);
  border: 0; border-radius: 999px; padding: 8px 18px; cursor: pointer;
}
.fx-search-box button:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: 2px; }
.fx-search-note { font-family: var(--sans); font-size: 13px; color: var(--fx-soft); margin: 12px 0 0; }
.fx-search-note[hidden] { display: none; }

/* Option two: the categories appear when the search bar is tapped. */
.fx-drop {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; text-align: left;
  background: var(--fx-paper); border: 1px solid var(--fx-line); border-radius: 14px;
  box-shadow: 0 18px 30px -24px rgba(0, 0, 0, .35); padding: 18px 20px 20px;
}
.fx-drop[hidden] { display: none; }
.fx-drop .fx-cats { justify-content: flex-start; padding: 0; gap: 4px 24px; border-bottom: 1px solid var(--fx-line-soft); }
.fx-drop .fx-cat { padding: 6px 0 10px; }
.fx-drop-menu { padding-top: 18px; }
.fx-drop-menu .fx-brand-cols { columns: 2; }
.fx-drop-menu .fx-brand-scroll { max-height: 320px; }

/* ── Results ─────────────────────────────────────────────────────────── */
.fx-results { max-width: var(--max-w); margin: 0 auto; padding: 24px 40px 90px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.fx-results[hidden] { display: none; }
.fx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; border-bottom: 1px solid var(--fx-line-soft); padding-bottom: 18px; margin-bottom: 18px; }
.fx-crumb { font-family: var(--sans); font-size: 13px; color: var(--fx-soft); margin: 0 0 6px; }
.fx-title { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; margin: 0; overflow-wrap: break-word; min-width: 0; }
.fx-count { font-family: var(--sans); font-size: 13.5px; color: var(--fx-soft); margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.fx-tools { display: flex; align-items: center; gap: 12px; }
.fx-open, .fx-sort {
  font-family: var(--sans); font-size: 14px; color: var(--fx-ink); background: var(--fx-paper);
  border: 1px solid var(--fx-ink); border-radius: 999px; padding: 9px 18px; cursor: pointer;
}
.fx-open { display: inline-flex; align-items: center; gap: 8px; }
.fx-open-n { font-size: 12px; background: var(--fx-ink); color: var(--fx-paper); border-radius: 999px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; }
.fx-open-n[hidden] { display: none; }
/* Sort By (Nora, 17 Nov): a pill that opens NET-A-PORTER's list; the
   current order carries a bar on its left. */
.fx-sortbox { position: relative; }
.fx-sort { display: inline-flex; align-items: center; gap: 10px; }
.fx-sort::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.fx-sort[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.fx-sort-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 220px; margin: 0; padding: 6px 0; list-style: none; background: var(--fx-paper); border: 1px solid var(--fx-ink); }
.fx-sort-list[hidden] { display: none; }
.fx-sort-list:focus { outline: none; }
.fx-sort-list:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: 2px; }
.fx-sort-list [role="option"] { font-family: var(--sans); font-size: 15px; color: var(--fx-ink); padding: 12px 20px; cursor: pointer; white-space: nowrap; }
.fx-sort-list [role="option"]:hover, .fx-sort-list [role="option"].active { background: var(--fx-cream); }
.fx-sort-list [role="option"][aria-selected="true"] { box-shadow: inset 4px 0 0 var(--fx-ink); }
@media (prefers-reduced-motion: reduce) { .fx-sort::after { transition: none; } }
.fx-sort-list.end { left: auto; right: 0; }
.fx-open:focus-visible, .fx-sort:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: 2px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.fx-chips:empty { display: none; }
.fx-chip {
  font-family: var(--sans); font-size: 13px; color: var(--fx-ink); background: var(--fx-cream);
  border: 1px solid var(--fx-line); border-radius: 999px; padding: 5px 12px; cursor: pointer;
}
.fx-chip span[aria-hidden] { margin-left: 6px; }
.fx-chip:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: 2px; }
.fx-results .shopx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── The filter (NET-A-PORTER's steps 2 and 3) ───────────────────────── */
.fx-backdrop { position: fixed; inset: 0; background: rgba(25, 25, 25, .35); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s; }
.fx-backdrop.open { opacity: 1; pointer-events: auto; }
.fx-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(440px, 100%);
  background: var(--fx-paper); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .26s cubic-bezier(.2, .7, .2, 1);
}
.fx-panel.open { transform: none; }
.fx-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 2px solid var(--fx-line-soft); }
.fx-panel-head h2 { font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: .04em; margin: 0; }
.fx-x { background: none; border: 0; padding: 6px; cursor: pointer; color: var(--fx-ink); line-height: 0; }
.fx-x:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: 2px; }
.fx-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.fx-sec { border-bottom: 1px solid var(--fx-line); }
.fx-sec-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left;
  background: none; border: 0; padding: 18px 22px; cursor: pointer; color: var(--fx-ink);
}
.fx-sec-btn:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: -2px; }
.fx-sec-title { display: block; font-family: var(--sans); font-size: 14.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.fx-sec-val { display: block; font-family: var(--sans); font-size: 14.5px; color: var(--fx-soft); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 330px; }
.fx-chev { flex: none; width: 16px; height: 16px; transition: transform .2s; }
.fx-sec-btn[aria-expanded="true"] .fx-chev { transform: rotate(180deg); }
.fx-sec-body { padding: 0 22px 16px; }
.fx-sec-body[hidden] { display: none; }
.fx-unselect {
  font-family: var(--sans); font-size: 14px; color: var(--fx-soft); background: none; border: 0;
  border-bottom: 1px solid var(--fx-line); padding: 0 0 3px; margin: 0 0 12px; cursor: pointer;
}
.fx-unselect:disabled { color: var(--fx-line); cursor: default; }
.fx-unselect:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: 2px; }
.fx-opts { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }
.fx-opt { display: flex; align-items: center; gap: 14px; padding: 9px 0; cursor: pointer; font-family: var(--sans); font-size: 15px; color: var(--fx-ink); }
.fx-opt input { appearance: none; flex: none; width: 20px; height: 20px; border: 1px solid var(--fx-soft); border-radius: 2px; margin: 0; display: grid; place-items: center; cursor: pointer; background: var(--fx-paper); }
.fx-opt input:checked { background: var(--fx-ink); border-color: var(--fx-ink); }
.fx-opt input:checked::after { content: ''; width: 10px; height: 5px; border: solid var(--fx-paper); border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.fx-opt input:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: 2px; }
.fx-swatch { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .14); }
.fx-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.fx-sizes .fx-opt { padding: 0; }
.fx-sizes .fx-opt input { position: absolute; opacity: 0; pointer-events: none; }
.fx-sizes .fx-opt span { display: block; width: 100%; text-align: center; border: 1px solid var(--fx-line); padding: 10px 6px; font-size: 14px; }
.fx-sizes .fx-opt input:checked + span { background: var(--fx-ink); color: var(--fx-paper); border-color: var(--fx-ink); }
.fx-sizes .fx-opt input:focus-visible + span { outline: 2px solid var(--fx-ink); outline-offset: 2px; }
.fx-fbrand-search { width: 100%; margin: 0 0 10px; }
.fx-size-note { font-family: var(--sans); font-size: 12.5px; color: var(--fx-soft); margin: 10px 0 0; }
.fx-panel-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px 22px 20px; border-top: 1px solid var(--fx-line); }
.fx-clear, .fx-apply { font-family: var(--sans); font-size: 15px; padding: 14px; cursor: pointer; }
.fx-clear { background: var(--fx-paper); color: var(--fx-ink); border: 1px solid var(--fx-line); }
.fx-apply { background: var(--fx-ink); color: var(--fx-paper); border: 1px solid var(--fx-ink); }
.fx-clear:focus-visible, .fx-apply:focus-visible { outline: 2px solid var(--fx-ink); outline-offset: 2px; }

@media (max-width: 900px) {
  .fx-results { padding: 20px 20px 70px; }
  .fx-results .shopx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-cats { justify-content: flex-start; gap: 4px 26px; padding: 0 16px; }
  .fx-menu-inner { padding: 22px 16px 26px; }
  .fx-menu-list { columns: 1; }
  .fx-menu-cols > .fx-menu-wide { grid-column: auto; }
  .fx-brand-cols, .fx-drop-menu .fx-brand-cols { columns: 2; }
  .fx-test { padding: 10px 16px; }
}
@media (max-width: 520px) {
  .fx-brand-cols, .fx-drop-menu .fx-brand-cols { columns: 1; }
  .fx-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-panel, .fx-backdrop, .fx-chev { transition: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
