/* =====================================================================
   LOCALBUDDY — FIND A SERVICE (categories.php)
   Page-specific styles. Global tokens/header/footer: style.css
   ===================================================================== */

body.lb-cat {
  background: #ffffff;
  font-family: var(--lb-font);
  color: var(--lb-ink);
}

/* Bootstrap reboot resets: keep our type */
body.lb-cat h1, body.lb-cat h2, body.lb-cat h3,
body.lb-cat h4, body.lb-cat h5, body.lb-cat p { font-family: var(--lb-font); }

.lbc-main { padding: 22px 0 56px; }

.lbc-container {
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------------------------------------------------------------------
   ADVERTISE BANNER
   --------------------------------------------------------------------- */
.lbc-adv {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 48px;
  padding: 24px 56px;
  border-radius: 12px;
  background:
    radial-gradient(180px 120px at 2% 110%, rgba(255, 255, 255, .10), transparent 70%),
    radial-gradient(160px 140px at 99% 115%, rgba(255, 255, 255, .10), transparent 70%),
    linear-gradient(100deg, #075a2b 0%, #0b6b34 60%, #0d7a3c 100%);
  color: #ffffff;
}
.lbc-adv-kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .9);
}
.lbc-adv h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #ffffff;
}
.lbc-adv-mid {
  margin: 0;
  padding-left: 48px;
  border-left: 2px solid rgba(255, 255, 255, .4);
  font-size: 19px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .92);
}
.lbc-adv-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 34px;
  border-radius: 8px;
  background: var(--lb-yellow);
  color: #111827 !important;
  font-size: 19px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(248, 197, 28, .3);
  transition: transform .2s ease, background-color .2s ease;
}
.lbc-adv-btn:hover { background: #ffd23a; transform: translateY(-2px); }

/* ---------------------------------------------------------------------
   FILTERS
   --------------------------------------------------------------------- */
.lbc-filters {
  position: relative;
  z-index: 40;
  margin: 16px 0 22px;
  padding: 14px 16px 16px;
  background: #ffffff;
  border: 1px solid #edf0f3;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(16, 24, 40, .07);
}

.lbc-filters .filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr .95fr;
  gap: 22px;
  align-items: end;
}

.lbc-label {
  display: block;
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
}

.lbc-filters .filter-select,
.lbc-filters .filter-input {
  width: 100%;
  height: 46px;
  padding: 0 40px 0 14px;
  border: 1px solid #cfd5dd;
  border-radius: 6px;
  background-color: #ffffff;
  font-family: var(--lb-font);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--lb-ink);
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.lbc-filters .filter-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23111827' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.lbc-filters .filter-select:disabled { opacity: .6; cursor: not-allowed; background-color: #f6f7f9; }
.lbc-filters .filter-select:focus,
.lbc-filters .filter-input:focus {
  outline: none;
  border-color: var(--lb-green);
  box-shadow: 0 0 0 4px rgba(11, 107, 52, .12);
}

.lbc-input-wrap { position: relative; }
.lbc-input-wrap .filter-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #475467;
  font-size: 15px;
  pointer-events: none;
}
.lbc-filters .filter-input { padding-left: 40px; padding-right: 14px; }
.lbc-filters .filter-input::placeholder { color: #8a94a3; }

/* Keyword suggestions */
.browse-keyword-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1000;
  display: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--lb-line);
  border-radius: 12px;
  box-shadow: var(--lb-shadow-lg);
}
.browse-keyword-suggestions.active { display: block; }
.browse-keyword-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.browse-keyword-option i {
  flex: 0 0 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--lb-green-soft);
  color: var(--lb-green);
  font-size: 12px;
}
.browse-keyword-option:hover,
.browse-keyword-option:focus { background: var(--lb-green-mint); outline: none; }
.browse-keyword-text { display: flex; flex-direction: column; min-width: 0; }
.browse-keyword-title { font-size: 14px; font-weight: 600; color: var(--lb-ink); }
.browse-keyword-category { font-size: 12px; color: var(--lb-muted); }
.browse-keyword-message { padding: 12px; font-size: 13.5px; color: var(--lb-muted); text-align: center; }

/* Applied location chip */
.lbc-location-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: var(--lb-green-soft);
  color: var(--lb-green-dark);
  font-size: 13px;
  font-weight: 600;
}
.lbc-location-chip[hidden] { display: none; }
.lbc-location-chip button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 107, 52, .15);
  color: var(--lb-green-dark);
  font-size: 11px;
  cursor: pointer;
}

/* Mobile-only action buttons (hidden on desktop) */
.lb-mobile-actions { display: none; }

/* ---------------------------------------------------------------------
   RESULTS + MAP LAYOUT
   --------------------------------------------------------------------- */
.lbc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.lbc-results-head { margin-bottom: 10px; }
.lbc-results-head h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0b0f14;
}
.lbc-results-head h2 span { color: var(--lb-green); }
.lbc-results-head p { margin: 2px 0 0; font-size: 15.5px; font-weight: 500; color: #344054; }

.lbc-results-meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--lb-muted);
}
.lbc-results-meta strong { color: var(--lb-ink); }

/* Card grid */
.lbc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* same as the design */
  gap: 16px;
}

.lbc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #eceff3;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, .06);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.lbc-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(16, 24, 40, .12); }
.lbc-card:focus-visible { outline: 3px solid rgba(11, 107, 52, .35); outline-offset: 2px; }
.lbc-card.map-selected { border-color: var(--lb-green); box-shadow: 0 0 0 3px rgba(11, 107, 52, .15), 0 12px 28px rgba(16, 24, 40, .12); }

.lbc-card-media {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f4ec, #fdf3cf);
}
.lbc-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.lbc-card:hover .lbc-card-media img { transform: scale(1.05); }

/* Heart */
.lbc-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, .28);
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
  backdrop-filter: blur(2px);
  transition: transform .15s ease, background-color .2s ease;
}
.lbc-fav:hover { transform: scale(1.08); background: rgba(17, 24, 39, .45); }
.lbc-fav .fas { display: none; }
.lbc-fav.is-on { background: #ffffff; color: #e11d48; }
.lbc-fav.is-on .far { display: none; }
.lbc-fav.is-on .fas { display: inline-block; }

/* Distance badge */
.lbc-distance {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--lb-green-dark);
  font-size: 11.5px;
  font-weight: 700;
}
.lbc-distance i { font-size: 10px; }

.lbc-card-body { display: flex; flex-direction: column; flex: 1; padding: 10px 14px 12px; }
.lbc-card-title {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #0b0f14;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lbc-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  font-size: 12.5px;
  color: #344054;
}
.lbc-stars { color: #f5a524; font-size: 11px; letter-spacing: 1px; }
.lbc-rating strong { color: #b54708; font-weight: 700; }   /* darker amber: readable on white (was 2:1 contrast) */
.lbc-review-count { color: #475467; }
.lbc-new {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--lb-green-soft);
  color: var(--lb-green);
  font-size: 11px;
  font-weight: 700;
}

.lbc-card-cat,
.lbc-card-place {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #344054;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lbc-card-place { display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.lbc-card-place i { color: var(--lb-green); font-size: 12px; flex: 0 0 auto; }
.lbc-card-place span { overflow: hidden; text-overflow: ellipsis; }

.lbc-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}
.lbc-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: #ffffff;
  color: #344054 !important;
  font-family: var(--lb-font);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.lbc-act:hover { border-color: var(--lb-green); color: var(--lb-green) !important; }
.lbc-act-green { border-color: var(--lb-green); background: var(--lb-green); color: #ffffff !important; }
.lbc-act-green:hover { background: var(--lb-green-dark); color: #ffffff !important; }
.lbc-act:disabled { opacity: .5; cursor: not-allowed; }

/* Empty / error */
.lbc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 20px;
  border: 1px dashed #cfe0d5;
  border-radius: 14px;
  background: var(--lb-bg-soft);
  text-align: center;
  color: var(--lb-muted);
}
.lbc-empty i { font-size: 30px; color: var(--lb-green); margin-bottom: 4px; }
.lbc-empty strong { color: var(--lb-ink); font-size: 16px; }

/* Loading skeleton */
.lbc-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.lbc-skeleton {
  height: 250px;
  border-radius: 10px;
  background: linear-gradient(100deg, #f1f4f6 30%, #fafbfc 50%, #f1f4f6 70%);
  background-size: 300% 100%;
  animation: lbcShimmer 1.2s ease-in-out infinite;
}
@keyframes lbcShimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Pagination */
.lbc-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
}
.lbc-page {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #ffffff;
  color: #344054;
  font-family: var(--lb-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.lbc-page:hover:not(:disabled) { border-color: var(--lb-green); color: var(--lb-green); }
.lbc-page.is-active { background: var(--lb-green); border-color: var(--lb-green); color: #ffffff; }
.lbc-page:disabled { opacity: .45; cursor: not-allowed; }
.lbc-page-gap { padding: 0 2px; color: var(--lb-muted); }

/* ---------------------------------------------------------------------
   MAP
   --------------------------------------------------------------------- */
.lbc-map-shell {
  position: sticky;
  top: calc(var(--lb-header-h) + 16px);
  height: calc(100vh - var(--lb-header-h) - 32px);
  min-height: 520px;
  max-height: 860px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e3e8ee;
  box-shadow: 0 6px 22px rgba(16, 24, 40, .08);
  background: #e6efe9;
}
.lbc-map { position: absolute; inset: 0; z-index: 1; }
.lbc-map-error { display: grid; place-items: center; height: 100%; color: var(--lb-muted); }

.lbc-map-tools {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lbc-map-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .18);
}
.lbc-map-toggle button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475467;
  font-family: var(--lb-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.lbc-map-toggle button.active { background: #f2f4f7; color: #111827; font-weight: 800; }

.lbc-near-me {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--lb-green);
  color: #ffffff;
  font-family: var(--lb-font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(11, 107, 52, .3);
}
.lbc-near-me:hover { background: var(--lb-green-dark); }
.lbc-near-me:disabled { opacity: .7; cursor: wait; }

.lb-map-toolbar-close { display: none; }

/* Leaflet controls */
.lbc-map .leaflet-control-zoom { border: 0 !important; box-shadow: 0 2px 8px rgba(16, 24, 40, .2) !important; border-radius: 8px !important; overflow: hidden; }
.lbc-map .leaflet-control-zoom a { width: 36px !important; height: 36px !important; line-height: 36px !important; color: #344054 !important; font-size: 18px !important; }
.lbc-map .leaflet-control-attribution { font-size: 10px; }

/* LocalBuddy pins */
.lbc-pin-wrap { background: none; border: 0; }
.lbc-pin {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(145deg, #0f8a45, #0b6b34);
  border: 3px solid #ffffff;
  transform: rotate(-45deg);
  box-shadow: 0 6px 14px rgba(6, 60, 30, .35);
  transition: transform .2s ease, background .2s ease;
}
.lbc-pin-inner {
  position: absolute;
  inset: 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--lb-green);
  transform: rotate(45deg);
}
.lbc-pin-inner svg { width: 18px; height: 18px; }
.leaflet-marker-icon.is-hover .lbc-pin,
.lbc-pin:hover { transform: rotate(-45deg) scale(1.12); }
.lbc-pin.is-selected {
  background: linear-gradient(145deg, #ffd23a, #f2b705);
  transform: rotate(-45deg) scale(1.18);
  animation: lbcBounce .6s ease;
}
.lbc-pin.is-selected .lbc-pin-inner { color: #8a6400; }
@keyframes lbcBounce {
  0% { transform: rotate(-45deg) translate(0, 0) scale(1.18); }
  40% { transform: rotate(-45deg) translate(6px, -6px) scale(1.18); }
  100% { transform: rotate(-45deg) translate(0, 0) scale(1.18); }
}

/* "You are here" */
.lbc-me-wrap { background: none; border: 0; }
.lbc-me {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1a73e8;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(26, 115, 232, .5);
}
.lbc-me span {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: rgba(26, 115, 232, .25);
  animation: lbcPulse 1.8s ease-out infinite;
}
@keyframes lbcPulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

/* Popup */
.lbc-leaflet-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 12px; box-shadow: 0 12px 30px rgba(16, 24, 40, .2); }
.lbc-leaflet-popup .leaflet-popup-content { margin: 0; width: auto !important; }
.lbc-popup { display: flex; gap: 10px; padding: 10px; font-family: var(--lb-font); }
.lbc-popup img { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 10px; object-fit: cover; background: #eef3ef; }
.lbc-popup-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lbc-popup-body strong { font-size: 14px; color: var(--lb-ink); line-height: 1.25; }
.lbc-popup-rating { font-size: 12px; font-weight: 700; color: #b54708; }
.lbc-popup-cat { font-size: 12px; color: var(--lb-green); font-weight: 600; }
.lbc-popup-addr { font-size: 12px; color: #475467; line-height: 1.35; }
.lbc-popup-note { font-size: 10.5px; color: var(--lb-muted); }
.lbc-popup-actions { display: flex; gap: 6px; margin-top: 6px; }
.lbc-popup-btn {
  flex: 1;
  height: 30px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-family: var(--lb-font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.lbc-popup-btn.is-green { border-color: var(--lb-green); background: var(--lb-green); color: #fff; }

/* ---------------------------------------------------------------------
   MODALS (Bootstrap) + GOOGLE LOCATION
   --------------------------------------------------------------------- */
.lb-cat .modal { z-index: 400000; }
.lb-cat .modal-backdrop { z-index: 399000; }
.lb-cat .modal-content { border: 0; border-radius: 18px; font-family: var(--lb-font); }
.lb-cat .modal-title { font-weight: 800; }

.lbc-loc-address { margin: 2px 0 0; font-size: 13px; color: var(--lb-muted); }
.lbc-loc-modal .modal-body { padding: 0; }
.lbc-loc-frame { position: relative; height: min(60vh, 460px); background: #eef3ef; }
.lbc-loc-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lbc-loc-modal .modal-footer { gap: 10px; }

.lbc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-family: var(--lb-font);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.lbc-btn-green { background: var(--lb-green); color: #fff !important; }
.lbc-btn-green:hover { background: var(--lb-green-dark); }
.lbc-btn-outline { background: #fff; border-color: #d0d5dd; color: #344054 !important; }
.lbc-btn-outline:hover { border-color: var(--lb-green); color: var(--lb-green) !important; }
.lbc-btn.disabled { opacity: .5; pointer-events: none; }

/* Toast */
.lbc-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 500000;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: #101828;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--lb-shadow-lg);
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
}
.lbc-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1500px) {
  .lbc-adv { padding: 22px 36px; gap: 32px; }
  .lbc-adv h2 { font-size: 28px; }
  .lbc-adv-mid { font-size: 16px; padding-left: 32px; }
  .lbc-adv-btn { height: 50px; font-size: 16px; padding: 0 24px; }
  .lbc-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .lbc-grid { gap: 12px; }
}

@media (max-width: 1200px) {
  .lbc-container { padding: 0 24px; }
  .lbc-grid,
  .lbc-skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lbc-adv { grid-template-columns: 1fr auto; }
  .lbc-adv-mid { display: none; }
  .lbc-filters .filters-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}

@media (max-width: 991.98px) {
  .lbc-layout { grid-template-columns: 1fr; }
  .lbc-map-shell { position: relative; top: 0; height: 420px; min-height: 0; order: -1; }
  .lbc-grid,
  .lbc-skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------------
   MOBILE (≤ 767px) — app-style: compact ad, sticky search + chips,
   readable list rows, floating "Map" button.
   --------------------------------------------------------------------- */
.lbc-chips,
.lbc-adv-ico { display: none; }

@media (max-width: 767.98px) {
  body.lb-cat { background: #f6f8f7; }
  .lbc-main { padding: 12px 0 96px; }
  .lbc-container { padding: 0 14px; }

  /* Compact ad strip */
  .lbc-adv {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    border-radius: 16px;
  }
  .lbc-adv-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    color: var(--lb-yellow);
    font-size: 17px;
  }
  .lbc-adv-kicker { font-size: 10px; margin: 0; letter-spacing: .08em; }
  .lbc-adv h2 { font-size: 14.5px; line-height: 1.25; letter-spacing: -0.01em; }
  .lbc-adv-mid { display: none; }
  .lbc-adv-btn {
    height: 36px;
    padding: 0 12px;
    gap: 6px;
    border-radius: 10px;
    font-size: 0;
    box-shadow: none;
  }
  .lbc-adv-btn::before { content: "Advertise"; font-size: 13px; }
  .lbc-adv-btn i { font-size: 12px; }

  /* Sticky search panel */
  .lbc-filters {
    position: sticky;
    top: calc(var(--lb-header-h) - 1px);
    z-index: 300;
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    column-gap: 8px;
    margin: 10px -14px 14px;
    padding: 10px 14px 10px;
    border: 0;
    border-radius: 0 0 18px 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .06);
  }
  .lbc-filters .filters-grid { display: block; order: 1; flex: 0 0 100%; }
  /* These groups are moved into the Filters modal by JS after load; hide them until then so the page doesn't jump (CLS) */
  .lbc-filters .filters-grid > .filter-group:not(.browse-keyword-group) { display: none; }
  .lbc-filters .browse-keyword-group .lbc-label { display: none; }
  .lbc-filters .filter-input {
    height: 46px;
    padding-left: 42px;
    border: 0;
    border-radius: 999px;
    background: #f1f4f2;
    font-size: 15px;
  }
  .lbc-filters .filter-input:focus { background: #fff; box-shadow: 0 0 0 2px var(--lb-green); }
  .lbc-input-wrap .filter-icon { left: 16px; color: var(--lb-green); }
  .lbc-filters .filter-input::placeholder { color: #8a94a3; }

  /* Filters button + chips in one swipe row */
  .lb-mobile-actions {
    display: flex;
    order: 2;
    flex: 0 0 auto;
    margin-top: 10px;
  }
  .lbc-chips {
    display: flex;
    order: 3;
    flex: 1 1 0;
    min-width: 0;
    gap: 8px;
    margin: 10px -14px 0 0;
    padding: 0 14px 2px 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .lbc-chips::-webkit-scrollbar { display: none; }
  .lbc-chip {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 14px;
    border: 1px solid #dfe5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #344054;
    font-family: var(--lb-font);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
  }
  .lbc-chip.is-active { background: var(--lb-ink); border-color: var(--lb-ink); color: #ffffff; }
  .lbc-location-chip { order: 4; margin-top: 8px; }

  .lb-mobile-filter-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--lb-green);
    border-radius: 999px;
    background: var(--lb-green-soft);
    color: var(--lb-green-dark);
    font-family: var(--lb-font);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
  }

  /* Floating Map button (Airbnb style) */
  .lb-mobile-map-button {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 350;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--lb-ink);
    color: #ffffff;
    font-family: var(--lb-font);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .3);
    transform: translateX(-50%);
    cursor: pointer;
  }
  .lb-mobile-map-button:active { transform: translateX(-50%) scale(.97); }

  /* Filters moved into the modal */
  .lb-mobile-filter-holder .filter-group { margin-bottom: 14px; }
  .lb-mobile-filter-holder .lbc-label { font-size: 13px; color: #344054; }
  .lb-mobile-filter-holder .filter-select {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 14px;
    border: 1px solid #cfd5dd;
    border-radius: 12px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23111827' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
    font-family: var(--lb-font);
    font-size: 15px;
    appearance: none;
  }
  .lb-mobile-modal .modal-dialog { margin: 0; max-width: none; min-height: 100%; display: flex; align-items: flex-end; }
  .lb-mobile-modal .modal-content { border-radius: 22px 22px 0 0; }
  .lb-mobile-modal .modal-footer { flex-wrap: nowrap; }
  .lb-mobile-modal .modal-footer .lbc-btn { flex: 1; }

  /* Results heading */
  .lbc-results-head { margin-bottom: 4px; }
  .lbc-results-head h2 { font-size: 19px; }
  .lbc-results-head h2 span { color: var(--lb-ink); }
  .lbc-results-head p { display: none; }
  .lbc-results-meta { margin-bottom: 10px; font-size: 12.5px; }

  /* Map lives in the fullscreen modal on mobile */
  .main-content-grid > .lbc-map-shell { display: none; }
  .lb-mobile-map-modal .modal-content { border-radius: 0; }
  .lb-mobile-map-modal .modal-body { position: relative; padding: 0; }
  .lb-mobile-map-modal .lbc-map-shell {
    display: block;
    position: absolute;
    inset: 0;
    height: auto;
    max-height: none;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .lb-mobile-map-modal .lbc-map-tools { top: 10px; left: 10px; right: 10px; justify-content: space-between; }
  .lb-map-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: #f2f4f7;
    font-weight: 700;
  }

  /* List rows */
  .lbc-grid,
  .lbc-skeleton-grid { grid-template-columns: 1fr; gap: 10px; }
  .lbc-skeleton { height: 128px; border-radius: 16px; }

  .lbc-card {
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
    padding: 10px;
    border: 1px solid #edf0ee;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  }
  .lbc-card:hover { transform: none; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
  .lbc-card:active { background: #fbfcfb; }
  .lbc-card.map-selected { border-color: var(--lb-green); }

  .lbc-card-media {
    flex: 0 0 104px;
    width: 104px;
    height: 104px;
    aspect-ratio: auto;
    align-self: center;
    border-radius: 12px;
  }
  .lbc-card:hover .lbc-card-media img { transform: none; }
  .lbc-fav { top: 6px; right: 6px; width: 28px; height: 28px; font-size: 13px; }
  .lbc-distance { left: 5px; bottom: 5px; padding: 2px 7px; font-size: 10.5px; }

  .lbc-card-body { min-width: 0; padding: 0; }
  .lbc-card-title { font-size: 15px; margin-bottom: 2px; }
  .lbc-rating { font-size: 12.5px; margin-bottom: 2px; }
  .lbc-stars { display: none; }
  .lbc-rating strong::before { content: "\2605 "; }
  .lbc-card-cat { font-size: 12.5px; color: var(--lb-green); font-weight: 600; }
  .lbc-card-place { font-size: 12.5px; color: #667085; }

  .lbc-card-actions {
    display: flex;
    gap: 6px;
    padding-top: 8px;
  }
  .lbc-act {
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
  }
  .lbc-act i { display: inline-block; font-size: 11px; }
  .lbc-act-green { flex: 1; max-width: 160px; }

  .lbc-empty { padding: 36px 16px; border-radius: 16px; }

  .lbc-pagination { gap: 6px; margin-top: 18px; }
  .lbc-page { min-width: 38px; height: 38px; border-radius: 12px; }

  /* Get Location bottom sheet */
  .lbc-loc-modal .modal-dialog { margin: 0; max-width: none; min-height: 100%; display: flex; align-items: flex-end; }
  .lbc-loc-modal .modal-content { border-radius: 22px 22px 0 0; }
  .lbc-loc-frame { height: 55vh; }
  .lbc-loc-modal .modal-footer { flex-wrap: nowrap; }
  .lbc-loc-modal .modal-footer .lbc-btn { flex: 1; }

  .lbc-toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* Hide the floating Map button while a modal is open */
body.modal-open .lb-mobile-map-button { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .lbc-skeleton, .lbc-me span, .lbc-pin.is-selected { animation: none; }
}

/* Safety: keep modals hidden even if the Bootstrap CSS CDN is slow */
.lb-cat .modal:not(.show) { display: none; }
.lb-cat .lb-mobile-map-modal:not(.show) .lbc-map-shell { display: none; }

/* Google map inside the Get Location modal */
.lbc-loc-gmap { position: absolute; inset: 0; width: 100%; height: 100%; }
.lbc-loc-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--lb-muted);
}