/* ─── Directory Map – 50/50 Split Layout (≥1024px only) ────────────── */

@media (min-width: 1024px) {
  .dir-cat-page__body {
    padding: 0;
  }

  .dir-cat-page__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: start;
  }

  .dir-cat-page__listings {
    padding: 40px 32px 80px;
    max-height: calc(100vh - 62px);
    overflow-y: auto;
    position: sticky;
    top: 62px;
  }
}

/* ── Left pane: scrollable listings ── */
.dir-cat-page__listings {
  min-height: 0;
}

/* ── Right pane: sticky full-height map ── */
.dir-cat-page__map {
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  overflow: hidden;
}

#dir-map {
  width: 100%;
  height: 100%;
}

/* ─── Horizontal Filter Pills ──────────────────────────────────────── */

.dir-cat-page__filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 100%;
}

.dir-filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.dir-filter-pills__label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  margin-right: 6px;
  white-space: nowrap;
}

.dir-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family:var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 5px 12px;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.dir-filter-pill:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(255,255,255,.15);
}

.dir-filter-pill__count {
  font-size: 10px;
  color: rgba(255,255,255,.2);
}

/* ─── Pin Button on Cards ──────────────────────────────────────────── */

.dlc-card,
.dlc-featured {
  position: relative;
}

.dlc-pin-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  transition: all .15s;
  z-index: 2;
  padding: 0;
}

.dlc-pin-btn:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* Make inner link fill card for click-through */
.dlc-card__link,
.dlc-featured__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ─── Active Card Highlight ────────────────────────────────────────── */

.dir-card--active {
  box-shadow: 0 0 0 2px var(--red);
  border-radius: 14px;
}

/* ─── MapLibre Rich Popcard ─────────────────────────────────────────── */

.dir-map-popcard .maplibregl-popup-content {
  background: #fff;
  color: #1a1a1a;
  font-family:var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  overflow: hidden;
  min-width: 180px;
  max-width: 220px;
}

.dir-map-popcard .maplibregl-popup-tip {
  border-top-color: #fff;
}

.dir-popcard__img {
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: #f0efed;
}

.dir-popcard__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dir-popcard__body {
  padding: 12px 14px 14px;
}

.dir-popcard__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 2px;
  color: #1a1a1a;
}

/* The verified tick, beside the business name in the popup. Same blue as
   hm_dir_tick_svg() paints on the listing and the card; sized in em so it tracks
   the name rather than needing its own breakpoint. */
.dir-popcard__tick {
  color: #4ea1ff;
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.22em;
  vertical-align: -0.08em;
}

.dir-popcard__cat {
  font-size: 12px;
  font-weight: 600;
  color: #6b6863;
  margin-bottom: 10px;
}

.dir-popcard__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
  transition: color .15s;
  border: none;
  outline: none;
  background: none;
  padding: 0;
}

.dir-popcard__link:hover {
  color: var(--red);
}

.dir-popcard__dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dir-popcard__arrow {
  font-size: 15px;
  margin-left: 2px;
}

/* ─── Below 1024px: hide map, responsive cards only ────────────────── */

@media (max-width: 1023px) {
  .dir-cat-page__grid {
    grid-template-columns: 1fr;
  }

  .dir-cat-page__map {
    display: none;
  }

  .dlc-pin-btn {
    display: none;
  }

  .dir-filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .dir-filter-pills::-webkit-scrollbar {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DIRECTORY SEARCH BAR + SORT PILLS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Search section (search bar + result note) ── */
.dir-search-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* ── Search bar ── */
.dir-search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 0 4px 0 16px;
  margin-bottom: 0;
  transition: border-color .15s;
}
.dir-search-bar:focus-within {
  border-color: rgba(255,255,255,.2);
}
.dir-search-bar__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family:var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  padding: 11px 0;
  min-width: 0;
}
.dir-search-bar__input::placeholder {
  color: rgba(255,255,255,.25);
}
.dir-search-bar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255,255,255,.3);
  cursor: pointer;
  padding: 8px;
  transition: color .15s;
}
.dir-search-bar__btn:hover {
  color: #fff;
}
.dir-search-bar__clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,.3);
  text-decoration: none;
  border-radius: 50%;
  transition: all .15s;
  flex-shrink: 0;
}
.dir-search-bar__clear:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.dir-search-bar__icon {
  flex-shrink: 0;
  color: rgba(255,255,255,.2);
  margin-right: 8px;
}
.dir-search-section__note {
  margin: 10px 0 0;
  font-size: 13px;
  color: rgba(255,255,255,.35);
}
.dir-search-section__note strong {
  color: rgba(255,255,255,.6);
}
.dir-search-section__note a {
  color: rgba(255,255,255,.45);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dir-search-section__note a:hover {
  color: #fff;
}

/* ── Toolbar: count + sort on same line ── */
.dir-cat-page__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

/* ── Sort pills ── */
.dir-sort-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.dir-sort-pills__label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.2);
  margin-right: 4px;
  white-space: nowrap;
}
.dir-sort-pill {
  font-family:var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  background: transparent;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 4px 10px;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.dir-sort-pill:hover {
  color: rgba(255,255,255,.7);
  border-color: rgba(255,255,255,.12);
}
.dir-sort-pill--active {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
}

/* ── Tag filter pills ── */
.dir-tag-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.dir-tag-pills::-webkit-scrollbar {
  display: none;
}
.dir-tag-pills__label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.2);
  margin-right: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.dir-tag-pill {
  font-family:var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  background: transparent;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 4px 10px;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.dir-tag-pill:hover {
  color: rgba(255,255,255,.7);
  border-color: rgba(255,255,255,.12);
}
.dir-tag-pill--active {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
}

@media (max-width: 767px) {
  .dir-cat-page__toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .dir-search-bar {
    margin-bottom: 0;
  }
  .dir-search-section {
    margin-bottom: 16px;
    padding-bottom: 14px;
  }
}

/* ─── Directory Pagination ─────────────────────────────────────────── */

.dir-cat-page .nav-links,
.dir-pagination .nav-links {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-family:var(--font-body);
}

.dir-cat-page .nav-links a,
.dir-cat-page .nav-links span,
.dir-pagination .nav-links a,
.dir-pagination .nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s ease;
  border: 1px solid transparent;
  color: rgba(255,255,255,.55);
}

.dir-cat-page .nav-links a,
.dir-pagination .nav-links a {
  color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}

.dir-cat-page .nav-links a:hover,
.dir-pagination .nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.18);
}

.dir-cat-page .nav-links .current,
.dir-pagination .nav-links .current {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.dir-cat-page .nav-links .dots,
.dir-pagination .nav-links .dots {
  color: rgba(255,255,255,.25);
  background: none;
  border: none;
  min-width: 24px;
}

.dir-cat-page .nav-links .prev,
.dir-cat-page .nav-links .next,
.dir-pagination .nav-links .prev,
.dir-pagination .nav-links .next {
  padding: 0 16px;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
}

.dir-cat-page .nav-links .prev:hover,
.dir-cat-page .nav-links .next:hover,
.dir-pagination .nav-links .prev:hover,
.dir-pagination .nav-links .next:hover {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.dir-cat-page .nav-links .prev svg,
.dir-cat-page .nav-links .next svg,
.dir-pagination .nav-links .prev svg,
.dir-pagination .nav-links .next svg {
  flex-shrink: 0;
}

/* Page status indicator */
.dir-pagination__status,
.dir-cat-page .dir-pagination__status {
  text-align: center;
  font-family:var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.3);
  margin-top: 12px;
  letter-spacing: .02em;
}
