/* Mom-Owned Directory: hero search, faceted filters, listing cards, Leaflet map. */

/* ------------------------------------------------------------------ Hero */
.dir-hero { background: var(--blush); padding: clamp(40px, 5vw, 64px) 0 clamp(32px, 4vw, 48px); }
.dir-hero__kicker { margin-bottom: 14px; }
.dir-hero .kicker--accent, .dir-hero .pill--accent { color: var(--accent-on-blush); }
.dir-hero__title { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 5vw, 72px); line-height: .92; letter-spacing: -.01em; }
.dir-hero__title em { font-style: italic; color: var(--accent); }

.dir-search { margin-top: 28px; display: flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--ink); max-width: 980px; }
.dir-search__field { min-width: 0; display: flex; flex-direction: column; padding: 12px 18px; border-right: 1px solid var(--line); }
.dir-search__field--what { flex: 1.4 1 260px; }
.dir-search__field--where { flex: 1 1 200px; }
.dir-search__label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; }
.dir-search input, .dir-search select { border: 0; outline: 0; padding: 6px 0 2px; font-size: 16px; background: transparent; color: var(--ink); min-width: 0; width: 100%; border-radius: 0; }
.dir-search select { cursor: pointer; }
.dir-search input::placeholder { color: var(--muted); }
.dir-search__field:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.dir-search__near, .dir-search__go {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0;
  padding: 0 18px; min-height: 60px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; white-space: nowrap;
  transition: background-color .25s, color .25s;
}
.dir-search__near { background: #fff; color: var(--ink); border-right: 1px solid var(--line); }
.dir-search__near:hover { background: var(--mist); }
.dir-search__near[aria-busy="true"] { cursor: progress; }
.dir-search__go { background: var(--ink); color: #fff; padding: 0 26px; gap: 10px; letter-spacing: .18em; }
.dir-search__go:hover { background: var(--accent); }
.dir-search__near:focus-visible, .dir-search__go:focus-visible { outline-offset: -4px; }

.dir-hero__err { margin-top: 10px; font-size: 14px; color: var(--error); }
.dir-hero__err:empty { display: none; }

.dir-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.dir-quick__label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; margin-right: 4px; }
.dir-quick__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #fff; color: var(--ink); border: 1px solid var(--ink); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background-color .2s, color .2s; }
.chip:hover { background: var(--mist); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }

@media (max-width: 640px) {
  .dir-search__field { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .dir-search__near, .dir-search__go { flex: 1 1 50%; min-height: 54px; padding: 0 12px; }
  .dir-search__near[hidden] + .dir-search__go { flex-basis: 100%; }
}

/* ------------------------------------------------------------------ Layout: filters | head+list | map */
.dir { display: flex; align-items: flex-start; border-top: 1px solid var(--ink); position: relative; }
.dir-body {
  flex: 1 1 0; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 40%; grid-template-rows: auto 1fr;
  grid-template-areas: "head map" "list map";
}
.dir-head { grid-area: head; min-width: 0; padding: 22px clamp(18px, 2.4vw, 32px) 0; }
.dir-list { grid-area: list; min-width: 0; padding: 0 clamp(18px, 2.4vw, 32px) 40px; }
.dir-map {
  grid-area: map; min-width: 0; position: sticky; top: var(--nav-h); align-self: start;
  height: calc(100vh - var(--nav-h)); border-left: 1px solid var(--ink); background: var(--mist);
}
@supports (height: 100dvh) { .dir-map { height: calc(100dvh - var(--nav-h)); } }

.dir[data-view="list"] .dir-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "list"; }
.dir[data-view="list"] .dir-map { display: none; }
.dir[data-view="map"] .dir-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "map"; }
.dir[data-view="map"] .dir-list { display: none; }
.dir[data-view="map"] .dir-head { padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.dir[data-view="map"] .dir-map { border-left: 0; }
.dir[data-view="list"] .dir-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }

/* ------------------------------------------------------------------ Filters sidebar / drawer */
.dir-filters {
  flex: 0 0 280px; width: 280px; position: sticky; top: var(--nav-h); align-self: flex-start;
  max-height: calc(100vh - var(--nav-h)); overflow-y: auto; background: #fff; border-right: 1px solid var(--line);
  overscroll-behavior: contain;
}
.dir-filters__top, .dir-filters__foot { display: none; }
.dir-filters__body { padding: 20px 24px 28px; }
.dir-filters__refine { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.linkbtn { background: transparent; border: 0; padding: 0; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--accent); }

.facet-group { border: 0; margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facet-group--last { border-bottom: 0; }
.facet-group legend { padding: 0; font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1; margin-bottom: 8px; float: left; width: 100%; }
.facet-group legend + * { clear: left; }
.facet-group__sub { margin: 14px 0 8px; font-size: 13px; color: var(--text-3); }
.facet-group__more { margin-top: 6px; font-size: 14px; }
.facet { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; font-size: 15px; clear: left; }
.facet input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); flex: none; cursor: pointer; }
.facet__label { flex: 1; min-width: 0; }
.facet__n { font-size: 13px; color: var(--muted); }
.facet.is-empty { opacity: .5; }
.facet:hover .facet__label { color: var(--accent); }
.dir-filters.is-collapsed .facet.is-extra:not(.is-on) { display: none; }
.dir-filters:not(.is-cities-open) .facet.is-extra-city:not(.is-on) { display: none; }
.facet--story { gap: 12px; padding: 0; }
.facet__main { display: block; }
.facet__hint { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

.dir-me { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: var(--ink); border: 1px solid var(--ink); padding: 11px 12px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.dir-me:hover { background: var(--mist); }
.dir-me.is-on { background: var(--ink); color: #fff; }
.dir-radius { display: flex; flex-wrap: wrap; gap: 6px; }
.dir-radius__btn { background: #fff; color: var(--ink); border: 1px solid var(--ink); padding: 7px 11px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.dir-radius__btn[aria-pressed="true"] { background: var(--ink); color: #fff; }

.dir-backdrop { display: none; }

/* ------------------------------------------------------------------ Toolbar + applied chips */
.dir-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.dir-toolbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dir-toolbar__right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.dir-count { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1; }
.dir-filterbtn { display: none; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--ink); padding: 10px 14px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--ink); white-space: nowrap; }
.dir-filterbtn:hover { background: var(--mist); }
.dir-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.dir-sort select { border: 1px solid var(--ink); background: #fff; padding: 8px 10px; font-size: 14px; color: var(--ink); cursor: pointer; border-radius: 0; }
.dir-views { display: flex; }
.dir-views__btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ink); border: 1px solid var(--ink); margin-left: -1px; padding: 8px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.dir-views__btn:first-child { margin-left: 0; }
.dir-views__btn:hover { background: var(--mist); }
.dir-views__btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.dir-views__btn:focus-visible { position: relative; z-index: 1; }

.dir-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.dir-applied__chip { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 7px 12px 7px 14px; font-size: 13px; font-weight: 500; max-width: 100%; }
.dir-applied__chip:hover { background: var(--accent); }
.dir-applied__type { opacity: .75; }
.dir-applied__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dir-applied__x { font-size: 15px; line-height: 1; }
.dir-applied .linkbtn { padding: 4px; }

/* ------------------------------------------------------------------ Listing cards */
.dir-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 32px; margin-top: 12px; }
.biz { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); background: #fff; transition: background-color .2s, box-shadow .2s; scroll-margin-top: calc(var(--nav-h) + 16px); }
.biz.is-hot { box-shadow: inset 3px 0 0 var(--ink); }
.biz.is-selected { background: #FBF7F4; box-shadow: inset 3px 0 0 var(--accent); }
.biz.is-hot, .biz.is-selected { padding-left: 14px; }
.biz__thumb { flex: none; width: clamp(96px, 11vw, 136px); height: clamp(96px, 11vw, 136px); border: 0; padding: 0; }
.biz__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.biz__thumb:hover img { transform: scale(1.04); }
.biz__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.biz__meta { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.biz__cat { color: var(--accent); }
.biz__city { color: var(--muted); }
.biz__dist { color: var(--ink); }
.biz__name { margin-top: 6px; font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2vw, 30px); line-height: 1.02; overflow-wrap: anywhere; }
.biz__founder { margin-top: 4px; font-size: 13px; color: var(--muted); }
.biz__desc { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.biz__tags { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.biz__tag { font-size: 12px; font-weight: 500; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.biz__tag--story { background: var(--blush); border-color: var(--blush); }
.biz__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.biz__cta { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; padding: 10px 14px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }
.biz__cta:hover { background: var(--accent); color: #fff; }
.biz__story { font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--ink); padding-bottom: 2px; white-space: nowrap; }
.biz__ig { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.biz__ig--link { border: 1px solid var(--ink); height: 38px; padding: 0 12px; font-weight: 600; }
.biz__ig--link:hover { background: var(--ink); color: #fff; }
.biz__maplink { background: transparent; border: 0; padding: 0; font-size: 13px; font-weight: 600; color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.biz__maplink:hover { color: var(--accent); }

.dir-empty { margin-top: 24px; padding: 40px 28px; background: var(--mist); text-align: center; }
.dir-empty__title { font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: 1.05; }
.dir-empty__hint { margin-top: 10px; font-size: 16px; color: var(--text-2); }
.dir-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.dir-empty .btn { white-space: normal; text-align: center; }

/* ------------------------------------------------------------------ Map */
.dir-map__canvas { position: absolute; inset: 0; }
.dir-map .leaflet-container { background: var(--mist); font-family: var(--sans); }
.dir-map .leaflet-tile-pane { filter: grayscale(1) contrast(1.02) brightness(1.03); }
.dir-map .leaflet-control-zoom { border: 0; box-shadow: none; }
.dir-map .leaflet-control-zoom a { width: 36px; height: 36px; line-height: 34px; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); font-size: 18px; }
.dir-map .leaflet-control-zoom a + a { border-top: 0; }
.dir-map .leaflet-control-attribution { font-size: 10px; background: rgba(255, 255, 255, .85); }
.dir-map .leaflet-control-attribution a { color: var(--ink); text-decoration: underline; }
.dir-map .leaflet-popup-content-wrapper { border-radius: 0; border: 1px solid var(--ink); box-shadow: 0 12px 32px rgba(0, 0, 0, .14); padding: 0; overflow: hidden; }
.dir-map .leaflet-popup-content { margin: 0; width: 260px; line-height: 1.4; }
.dir-map .leaflet-popup-tip { border: 1px solid var(--ink); box-shadow: none; }
.dir-map .leaflet-container a.leaflet-popup-close-button { color: var(--ink); background: #fff; top: 8px; right: 8px; width: 28px; height: 28px; font-size: 20px; line-height: 26px; }
.dir-map .leaflet-marker-icon:focus-visible { outline: none; }
.dir-map .leaflet-marker-icon:focus-visible .dir-pin { outline: 2px solid var(--accent); outline-offset: 3px; }

.dir-pin { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .28); display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; transition: transform .2s, background-color .2s; }
.dir-pin.is-on { background: var(--accent); transform: scale(1.18); }
.dir-me-pin { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); box-shadow: 0 0 0 6px rgba(10, 10, 10, .12); }

.dir-pop__img { height: 120px; background: var(--stone); overflow: hidden; }
.dir-pop__img img { width: 100%; height: 100%; object-fit: cover; }
.dir-pop__body { padding: 14px 16px 16px; }
.dir-map .dir-pop__cat { margin: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.dir-map .dir-pop__name { margin: 6px 0 0; font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.02; }
.dir-map .dir-pop__meta { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.dir-pop__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.dir-map .dir-pop__cta { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; padding: 9px 12px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.dir-map .dir-pop__cta:hover { background: var(--accent); color: #fff; }
.dir-map .dir-pop__link { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.dir-map .dir-pop__link:hover { color: var(--accent); border-color: var(--accent); }

.dir-map__empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 500; background: #fff; border: 1px solid var(--ink); padding: 18px 22px; text-align: center; max-width: calc(100% - 32px); }
.dir-map__empty-title { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.1; }
.dir-map__empty-hint { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.dir-map__showlist { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 500; display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; border: 0; padding: 13px 20px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); white-space: nowrap; }
.dir-map__showlist:hover { background: var(--accent); }

/* ------------------------------------------------------------------ Get listed */
.dir-listed { margin-top: 88px; }
.dir-listed__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; border-top: 3px solid var(--ink); padding-top: 32px; }
.dir-listed__copy { flex: 1 1 420px; min-width: 0; }
.dir-listed__title { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 3.6vw, 52px); line-height: 1; }
.dir-listed__title em { font-style: italic; color: var(--accent); }
.dir-listed__lede { margin-top: 12px; max-width: 560px; font-size: 16px; line-height: 1.55; color: var(--text-2); }
.dir-listed__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dir-listed .btn { padding: 17px 26px; }

/* ------------------------------------------------------------------ < 1200px: filters become a drawer */
@media (max-width: 1199px) {
  .dir-body { grid-template-columns: minmax(0, 1fr) 45%; }
  .dir-filterbtn { display: inline-flex; }
  .dir-filters { display: none; }
  .dir.is-drawer-open .dir-filters {
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 110;
    width: 400px; max-width: 100%; max-height: none; height: 100%; border-right: 1px solid var(--ink);
    animation: dir-drawer-in .22s ease;
  }
  .dir.is-drawer-open .dir-backdrop { display: block; position: fixed; inset: 0; z-index: 105; background: rgba(10, 10, 10, .45); }
  .dir-filters__top { display: flex; position: sticky; top: 0; z-index: 2; background: #fff; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--ink); }
  .dir-filters__title { font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1; }
  .dir-filters__close { width: 40px; height: 40px; border: 1px solid var(--ink); background: #fff; font-size: 22px; line-height: 1; padding: 0; }
  .dir-filters__close:hover { background: var(--ink); color: #fff; }
  .dir-filters__body { flex: 1 1 auto; overflow-y: auto; padding: 20px; }
  .dir-filters__foot { display: flex; position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--ink); padding: 14px 20px; gap: 10px; }
  .dir-filters__clear, .dir-filters__show { padding: 15px 18px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
  .dir-filters__clear { flex: 0 0 auto; background: #fff; border: 1px solid var(--ink); color: var(--ink); }
  .dir-filters__clear:hover { background: var(--mist); }
  .dir-filters__show { flex: 1; background: var(--ink); color: #fff; border: 0; }
  .dir-filters__show:hover { background: var(--accent); }
  body.dir-drawer-open { overflow: hidden; }
}
@media (min-width: 1200px) {
  .dir-filters__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* The sidebar scrolls on its own; a fade at its bottom edge shows there is more below. */
  .dir-filters::after { content: ''; display: block; position: sticky; bottom: 0; height: 44px; margin-top: -44px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 80%); pointer-events: none; }
}
@keyframes dir-drawer-in { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .dir.is-drawer-open .dir-filters { animation: none; }
  .biz__thumb img { transition: none; }
}

/* ------------------------------------------------------------------ < 900px: list OR map, full width */
@media (max-width: 899px) {
  .dir-views__btn--split { display: none; }
  .dir[data-view="split"] .dir-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "list"; }
  .dir[data-view="split"] .dir-map { display: none; }
  .dir[data-view="map"] .dir-map { position: relative; top: auto; height: calc(100vh - var(--nav-h) - 24px); min-height: 420px; }
  @supports (height: 100dvh) { .dir[data-view="map"] .dir-map { height: calc(100dvh - var(--nav-h) - 24px); } }
  .dir.is-drawer-open .dir-filters { width: 100%; }
}

@media (max-width: 560px) {
  .dir-head { padding: 18px var(--gutter) 0; }
  .dir-list { padding: 0 var(--gutter) 32px; }
  .dir-count { font-size: 22px; }
  .dir-toolbar__right { width: 100%; justify-content: space-between; }
  .biz { gap: 14px; }
  .biz.is-hot, .biz.is-selected { padding-left: 10px; }
  .dir-listed { margin-top: 64px; }
  .dir-listed__actions, .dir-listed .btn { width: 100%; }
  .dir-listed .btn { white-space: normal; }
  .biz__maplink, .biz__ig { min-height: 44px; }
  .biz__ig--link { height: 44px; }
}

/* Landing pages (one city or category) and listing links */
.dir-hero__title--landing { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.02; max-width: 900px; }
.dir-hero__lede { margin-top: 14px; max-width: 620px; font-family: var(--serif); font-weight: 500; font-style: italic; font-size: clamp(18px, 1.8vw, 22px); line-height: 1.3; color: var(--text-3); }
.biz__namelink { color: inherit; }
.biz__namelink:hover { color: var(--accent); }
