/* Listing filter card — "Option 3.2 Dropdown + Pills" (owner's choice, 2026-11-15).
   Used by the category listing page and the /search results page. Loaded only there. */

.listing-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 0 48px; }

/* Card */
.fc__panel { padding: 22px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.fc__toggle { display: none; }
.fc__h { margin: 20px 0 10px; color: var(--ink); font-size: 15px; font-weight: 800; }

/* Search */
.fc__search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); }
.fc__search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 52, 79, .12); }
.fc__search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14.5px; outline: none; }
.fc__search input::-webkit-search-cancel-button { cursor: pointer; }

/* Dropdowns (typeable "sd" component + plain fallback) */
.fc__select, .fc .sd--filter .sd__btn { height: 46px; border: 1px solid var(--line); border-radius: 12px; background-color: var(--surface); color: var(--ink); font-size: 14.5px; }
.fc__select { width: 100%; padding: 0 12px; }
.fc .sd--filter .sd__btn { padding: 0 40px 0 14px; }
.fc .sd--filter.is-open .sd__btn { border-color: var(--red); }
.fc .sd__pop { border-radius: 14px; }
.fc .sd__search { border-radius: 10px; }
.fc .sd__opt { border-radius: 8px; }
/* Category picker: red outline + bold, like the design */
.fc__select--cat, .fc .sd--filter:has(> .fc__select--cat) .sd__btn { border-color: var(--red); font-weight: 700; }
.fc__noscript { display: grid; gap: 4px; margin: 8px 0 0; padding-left: 18px; font-size: 14px; }

/* Sub category pills */
.fc__pills { display: flex; flex-wrap: wrap; gap: 7px; }
.fc__pill { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600; line-height: 1.3; cursor: pointer; transition: border-color .15s, color .15s, background-color .15s; }
.fc__pill input { position: absolute; opacity: 0; pointer-events: none; }
.fc__pill em { font-style: normal; font-size: 12px; opacity: .65; }
.fc__pill:hover { border-color: var(--red); color: var(--red); }
.fc__pill:has(input:checked), .fc__pills:not(:has(input:checked)) .fc__pill--all { border-color: var(--red); background: var(--red); color: #fff; }
.fc__pill:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }

/* Switches */
.fc__switch { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--ink); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.fc__switch input { position: absolute; opacity: 0; }
.fc__switch span { position: relative; flex: none; width: 40px; height: 22px; border-radius: 999px; background: var(--line); transition: background-color .2s; }
.fc__switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.fc__switch input:checked + span { background: var(--red); }
.fc__switch input:checked + span::after { transform: translateX(18px); }
.fc__switch input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.fc__first { margin-top: 20px; }
.fc__clear { display: inline-block; margin-top: 18px; font-size: 14px; text-decoration: none; }
.fc__clear:hover { text-decoration: underline; }

/* Phones / tablets: the card collapses behind a "Filter & Search" button */
@media (max-width: 991px) {
  .listing-layout { grid-template-columns: 1fr; gap: 20px; }
  .fc__toggle { display: flex; border-radius: 14px; }
  .fc__panel { margin-top: 10px; }
}
