/* ==========================================================================
   eCampus Market — Listings Page Stylesheet
   Strict rules applied:
   1. Scoped CSS custom properties on .lp-page
   2. Every single selector starts with .lp- (NO bare element selectors, NO !important)
   3. Mobile drawer uses position: fixed (z-index: 9999); desktop sidebar uses position: sticky (top: 7rem)
   ========================================================================== */

.lp-page {
  /* Brand color tokens */
  --lp-primary: #1A56FF;
  --lp-primary-dark: #0D3FD4;
  --lp-primary-tint: #E8EFFF;
  --lp-orange: #FF6B35;
  --lp-navy: #0A0E1A;
  --lp-ink: #1C2340;
  --lp-muted: #6B7280;
  --lp-subtle: #9CA3AF;
  --lp-bg: #F8FAFF;
  --lp-white: #FFFFFF;
  --lp-border: #E5E9F5;
  --lp-gold: #F5B83D;
  --lp-gold-deep: #D99A00;
  --lp-success: #159A79;

  /* Typography tokens (already loaded on site) */
  --lp-font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --lp-font-display: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif;

  /* Shadows & Radius */
  --lp-radius-sm: 6px;
  --lp-radius-md: 10px;
  --lp-radius-lg: 14px;
  --lp-radius-full: 9999px;
  --lp-shadow-sm: 0 1px 3px rgba(28, 35, 64, 0.05);
  --lp-shadow-card: 0 4px 16px -4px rgba(28, 35, 64, 0.08), 0 2px 6px -2px rgba(28, 35, 64, 0.04);
  --lp-shadow-hover: 0 12px 24px -6px rgba(26, 86, 255, 0.16), 0 4px 10px -2px rgba(28, 35, 64, 0.06);

  /* Page container reset */
  display: block;
  width: 100%;
  min-height: 100vh;
  background-color: var(--lp-bg);
  color: var(--lp-ink);
  font-family: var(--lp-font-body);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

.lp-page *,
.lp-page *::before,
.lp-page *::after {
  box-sizing: border-box;
}

.lp-container {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 0.85rem 3rem 0.85rem;
}

@media (min-width: 768px) {
  .lp-container {
    padding: 1.5rem 1.5rem 4rem 1.5rem;
  }
}

/* ── Screen reader only utility ── */
.lp-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;
}

/* ── Header Area ── */
.lp-header {
  margin-bottom: 1.5rem;
}

.lp-header__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lp-header__eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lp-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.lp-header__title {
  margin: 0;
  font-family: var(--lp-font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--lp-ink);
  line-height: 1.15;
}

@media (min-width: 768px) {
  .lp-header__title {
    font-size: 2.15rem;
  }
}

.lp-header__count {
  margin: 0.35rem 0 0 0;
  font-size: 0.825rem;
  color: var(--lp-muted);
}

.lp-clear-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--lp-primary);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: var(--lp-radius-md);
  background-color: var(--lp-primary-tint);
  transition: background-color 0.15s ease;
}

.lp-clear-link:hover {
  background-color: #dbe6ff;
}

/* ── Search Bar ── */
.lp-search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--lp-white);
  border: 1.5px solid var(--lp-border);
  border-radius: var(--lp-radius-lg);
  padding: 0.35rem 0.45rem 0.35rem 0.85rem;
  box-shadow: var(--lp-shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lp-search-bar:focus-within {
  border-color: var(--lp-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 255, 0.15);
}

.lp-search-bar__icon {
  flex-shrink: 0;
  color: var(--lp-subtle);
}

.lp-search-bar__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--lp-ink);
  font-size: 1rem; /* Prevent auto-zoom on mobile */
  outline: none;
  font-family: inherit;
}

.lp-search-bar__input::placeholder {
  color: var(--lp-subtle);
}

.lp-search-bar__btn {
  flex-shrink: 0;
}

/* ── Category Pill Chips ── */
.lp-categories {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.85rem 0 0.35rem 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.lp-categories::-webkit-scrollbar {
  display: none;
}

.lp-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 44px; /* Accessible touch target */
  padding: 0 1.05rem;
  border-radius: var(--lp-radius-full);
  border: 1px solid var(--lp-border);
  background-color: var(--lp-white);
  color: var(--lp-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.lp-category-pill:hover {
  border-color: var(--lp-primary);
  color: var(--lp-primary);
}

.lp-category-pill--active {
  border-color: var(--lp-primary);
  background-color: var(--lp-primary);
  color: var(--lp-white);
}

.lp-category-pill--active:hover {
  color: var(--lp-white);
  background-color: var(--lp-primary-dark);
}

/* ── Layout Grid ── */
.lp-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .lp-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (min-width: 1200px) {
  .lp-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 2rem;
  }
}

/* ── Desktop Sticky Sidebar ── */
.lp-sidebar {
  display: none;
}

@media (min-width: 992px) {
  .lp-sidebar {
    display: block;
  }
}

.lp-filter-card {
  position: sticky;
  top: 7rem; /* Fixed header offset requirement */
  background-color: var(--lp-white);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-lg);
  padding: 1.25rem;
  box-shadow: var(--lp-shadow-sm);
}

.lp-filter-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--lp-border);
}

.lp-filter-card__title {
  font-family: var(--lp-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lp-ink);
}

.lp-filter-card__reset {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lp-primary);
  text-decoration: none;
}

.lp-filter-card__reset:hover {
  text-decoration: underline;
}

.lp-filter-section {
  margin-bottom: 1.25rem;
}

.lp-filter-section__title {
  margin: 0 0 0.65rem 0;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--lp-ink);
}

.lp-filter-section__unit {
  font-weight: 400;
  color: var(--lp-muted);
}

.lp-price-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}

.lp-price-inputs__separator {
  color: var(--lp-subtle);
  font-size: 0.8rem;
}

.lp-checkbox-list,
.lp-radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lp-checkbox-label,
.lp-radio-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.825rem;
  color: var(--lp-muted);
  cursor: pointer;
  min-height: 28px;
}

.lp-checkbox-label:hover,
.lp-radio-label:hover {
  color: var(--lp-ink);
}

.lp-checkbox,
.lp-radio {
  accent-color: var(--lp-primary);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.lp-location-search {
  margin-bottom: 0.5rem;
}

.lp-location-scroll {
  max-height: 180px;
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-width: thin;
}

.lp-location-item {
  margin-bottom: 0.35rem;
}

.lp-location-item__text {
  font-size: 0.8rem;
  line-height: 1.25;
}

/* ── Main Column Toolbar ── */
.lp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lp-toolbar__left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lp-toolbar__count {
  font-size: 0.825rem;
  color: var(--lp-muted);
}

.lp-toolbar__count strong {
  color: var(--lp-ink);
}

.lp-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: var(--lp-radius-full);
  background-color: var(--lp-primary);
  color: var(--lp-white);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0 4px;
}

.lp-sort-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lp-sort-form__label {
  font-size: 0.8rem;
  color: var(--lp-muted);
  display: none;
}

@media (min-width: 576px) {
  .lp-sort-form__label {
    display: inline;
  }
}

.lp-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lp-select {
  appearance: none;
  background-color: var(--lp-white);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-md);
  padding: 0.55rem 2rem 0.55rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--lp-ink);
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

.lp-select:focus-visible {
  border-color: var(--lp-primary);
  box-shadow: 0 0 0 2px rgba(26, 86, 255, 0.18);
}

.lp-select-wrap__chevron {
  position: absolute;
  right: 0.7rem;
  pointer-events: none;
  color: var(--lp-muted);
}

/* ── Active Filter Chips ── */
.lp-active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.lp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background-color: var(--lp-primary-tint);
  border: 1px solid rgba(26, 86, 255, 0.2);
  border-radius: var(--lp-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lp-primary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.lp-chip:hover {
  border-color: var(--lp-primary);
  background-color: #dbe6ff;
}

/* ── Results Card Grid ── */
.lp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .lp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 1100px) {
  .lp-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── THE LISTING CARD ── */
.lp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--lp-white);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-lg);
  overflow: hidden;
  box-shadow: var(--lp-shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
  .lp-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--lp-shadow-hover);
    border-color: rgba(26, 86, 255, 0.25);
  }
}

/* FEATURED CARD MODIFIER (Driven by one single modifier class) */
.lp-card--featured {
  border: 1.5px solid var(--lp-gold);
  box-shadow: 0 4px 18px -3px rgba(217, 154, 0, 0.25), var(--lp-shadow-card);
  background: linear-gradient(180deg, #FFFDF8 0%, #FFFFFF 100%);
}

@media (hover: hover) {
  .lp-card--featured:hover {
    box-shadow: 0 12px 28px -4px rgba(217, 154, 0, 0.35);
    border-color: var(--lp-gold-deep);
  }
}

.lp-card__media-link {
  display: block;
  text-decoration: none;
  outline: none;
}

.lp-card__image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--lp-primary-tint);
  overflow: hidden;
}

.lp-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.lp-card:hover .lp-card__image {
  transform: scale(1.03);
}

.lp-card__no-image {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: rgba(26, 86, 255, 0.5);
  font-size: 0.7rem;
  font-weight: 700;
}

/* Badges on card image */
.lp-card__photo-badge {
  position: absolute;
  bottom: 0.45rem;
  left: 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: var(--lp-radius-sm);
  background-color: rgba(10, 14, 26, 0.75);
  color: var(--lp-white);
  font-size: 0.65rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.lp-card__discount-badge {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  padding: 0.2rem 0.45rem;
  border-radius: var(--lp-radius-sm);
  background-color: var(--lp-orange);
  color: var(--lp-white);
  font-size: 0.65rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(255, 107, 53, 0.35);
}

.lp-card__featured-badge {
  position: absolute;
  bottom: 0.45rem;
  right: 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--lp-radius-sm);
  background-color: var(--lp-navy);
  color: var(--lp-gold);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background-image: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.2) 48%, transparent 72%);
  background-size: 200% 100%;
  animation: lp-sheen 3.5s ease-in-out infinite;
}

@keyframes lp-sheen {
  0% { background-position: 180% 0; }
  100% { background-position: -180% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-card__featured-badge {
    animation: none;
  }
}

/* Wishlist Heart Button */
.lp-card__heart-form {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  margin: 0;
}

.lp-card__heart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--lp-radius-full);
  border: none;
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--lp-ink);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
}

.lp-card__heart-btn:hover {
  transform: scale(1.08);
  background-color: var(--lp-white);
  color: var(--lp-orange);
}

.lp-card__heart-btn--active {
  color: var(--lp-orange);
}

/* Card Body */
.lp-card__body {
  padding: 0.75rem 0.7rem 0.85rem 0.7rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

@media (min-width: 768px) {
  .lp-card__body {
    padding: 0.85rem 0.85rem 0.95rem 0.85rem;
  }
}

.lp-card__title-link {
  text-decoration: none;
  color: inherit;
}

.lp-card__title {
  margin: 0 0 0.45rem 0;
  font-size: 0.825rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--lp-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2rem;
}

@media (min-width: 768px) {
  .lp-card__title {
    font-size: 0.875rem;
  }
}

.lp-card__price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  font-family: var(--lp-font-display);
}

.lp-card__price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--lp-primary-dark);
}

.lp-card--featured .lp-card__price {
  color: var(--lp-gold-deep);
}

.lp-card__price--discount {
  color: var(--lp-orange);
}

.lp-card__price-original {
  font-size: 0.75rem;
  color: var(--lp-subtle);
  text-decoration: line-through;
}

.lp-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
}

.lp-card__tag {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: var(--lp-radius-sm);
  background-color: var(--lp-primary-tint);
  color: var(--lp-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.lp-card__tag--soft {
  background-color: var(--lp-bg);
}

.lp-card__meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--lp-muted);
  margin-bottom: 0.65rem;
}

.lp-card__meta-icon {
  flex-shrink: 0;
  color: var(--lp-subtle);
}

.lp-card__meta-location {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.lp-card__meta-dot {
  color: var(--lp-subtle);
}

.lp-card__meta-time {
  white-space: nowrap;
  flex-shrink: 0;
}

.lp-card__seller {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--lp-border);
  margin-top: auto;
  font-size: 0.725rem;
  color: var(--lp-muted);
}

.lp-card__seller-avatar {
  width: 20px;
  height: 20px;
  border-radius: var(--lp-radius-full);
  background-color: var(--lp-primary-tint);
  color: var(--lp-primary);
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-card__seller-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.lp-card__seller-verified {
  flex-shrink: 0;
}

/* ── Pagination ── */
.lp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 2.5rem;
}

.lp-pagination__btn,
.lp-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px; /* Accessible 44px touch target */
  height: 44px;
  padding: 0 0.5rem;
  border-radius: var(--lp-radius-md);
  border: 1px solid var(--lp-border);
  background-color: var(--lp-white);
  color: var(--lp-ink);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.lp-pagination__btn:hover,
.lp-pagination__page:hover {
  border-color: var(--lp-primary);
  color: var(--lp-primary);
}

.lp-pagination__page--active {
  background-color: var(--lp-primary);
  border-color: var(--lp-primary);
  color: var(--lp-white);
}

.lp-pagination__page--active:hover {
  background-color: var(--lp-primary-dark);
  color: var(--lp-white);
}

.lp-pagination__btn--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.lp-pagination__ellipsis {
  padding: 0 0.25rem;
  color: var(--lp-subtle);
}

/* ── Empty State ── */
.lp-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1rem;
  background-color: var(--lp-white);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-lg);
  margin-top: 1rem;
}

.lp-empty-state__icon {
  margin-bottom: 1.25rem;
}

.lp-empty-state__title {
  margin: 0;
  font-family: var(--lp-font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--lp-ink);
}

.lp-empty-state__desc {
  margin: 0.5rem 0 1.5rem 0;
  font-size: 0.85rem;
  color: var(--lp-muted);
  max-width: 380px;
  line-height: 1.45;
}

.lp-empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

/* ── Form Inputs & Shared Buttons ── */
.lp-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-md);
  padding: 0 0.75rem;
  background-color: var(--lp-white);
  color: var(--lp-ink);
  font-size: 1rem; /* Prevent phone zoom */
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.lp-input--small {
  height: 38px;
  font-size: 0.85rem;
}

.lp-input:focus-visible {
  border-color: var(--lp-primary);
  box-shadow: 0 0 0 2px rgba(26, 86, 255, 0.18);
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: var(--lp-radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.lp-btn:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}

.lp-btn--primary {
  background-color: var(--lp-primary);
  color: var(--lp-white);
}

.lp-btn--primary:hover {
  background-color: var(--lp-primary-dark);
  color: var(--lp-white);
}

.lp-btn--outline {
  background-color: var(--lp-white);
  border: 1px solid var(--lp-border);
  color: var(--lp-ink);
}

.lp-btn--outline:hover {
  border-color: var(--lp-primary);
  color: var(--lp-primary);
}

.lp-btn--full {
  width: 100%;
}

.lp-btn--drawer-trigger {
  display: inline-flex;
}

@media (min-width: 992px) {
  .lp-btn--drawer-trigger {
    display: none;
  }
}

/* ── Mobile Filter Drawer (Bottom Sheet) ── */
.lp-drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 14, 26, 0.55);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lp-drawer-overlay--open {
  display: block;
  opacity: 1;
}

.lp-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88vh;
  background-color: var(--lp-white);
  border-radius: 18px 18px 0 0;
  z-index: 9999; /* Covers fixed headers and bottom phone nav */
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
}

.lp-drawer--open {
  transform: translateY(0);
}

.lp-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--lp-border);
}

.lp-drawer__title {
  margin: 0;
  font-family: var(--lp-font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--lp-ink);
}

.lp-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--lp-radius-full);
  border: none;
  background-color: var(--lp-bg);
  color: var(--lp-ink);
  cursor: pointer;
}

.lp-drawer__form {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.lp-drawer__content {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.lp-drawer__footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--lp-border);
  background-color: var(--lp-white);
}

.lp-drawer__reset-btn {
  flex: 1;
}

.lp-drawer__apply-btn {
  flex: 2;
}
/* ==========================================================================
   Site fixes (paste at the very bottom of listings-page.css)
   ========================================================================== */

/* sidebar card scrolls inside itself if it is taller than the screen */
.lp-filter-card { max-height: calc(100vh - 8.5rem); overflow-y: auto; scrollbar-width: thin; }

/* heart button (used as <button> and as <a>) */
.lp-card__heart-btn { padding: 0; }
.lp-card__heart-btn[disabled] { opacity: 0.7; cursor: progress; }
.lp-card__heart-btn:focus-visible { outline: 2px solid var(--lp-primary); outline-offset: 2px; }

/* removable filter chips */
.lp-chip svg { flex-shrink: 0; }

/* the main nav search already exists on desktop, keep this one tidy */
.lp-search-bar__input::-webkit-search-cancel-button { cursor: pointer; }