/* Scoped utilities for /home-listing only — avoids loading full Bootstrap globally */

.listing-theme .container-fluid {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

.listing-theme .row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.listing-theme .row > * {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  box-sizing: border-box;
}

.listing-theme .g-3 {
  --sl-gutter-y: 1rem;
}

.listing-theme .g-3 > * {
  margin-top: var(--sl-gutter-y);
}

.listing-theme .col-6 { flex: 0 0 50%; max-width: 50%; }
.listing-theme .col-12 { flex: 0 0 100%; max-width: 100%; }

@media (max-width: 575px) {
  .listing-theme .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }
  .listing-theme .row {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
  }
  .listing-theme .row > * {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
}

@media (min-width: 576px) {
  .listing-theme .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .listing-theme .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
}

@media (min-width: 768px) {
  .listing-theme .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .listing-theme .d-md-none { display: none !important; }
  .listing-theme .d-md-flex { display: flex !important; }
  .listing-theme .py-md-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
}

@media (min-width: 992px) {
  .listing-theme .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
}

@media (min-width: 1200px) {
  .listing-theme .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
}

.listing-theme .d-flex { display: flex !important; }
.listing-theme .d-none { display: none !important; }
.listing-theme .flex-column { flex-direction: column !important; }
.listing-theme .flex-wrap { flex-wrap: wrap !important; }
.listing-theme .align-items-center { align-items: center !important; }
.listing-theme .align-items-start { align-items: flex-start !important; }
.listing-theme .justify-content-center { justify-content: center !important; }
.listing-theme .justify-content-between { justify-content: space-between !important; }
.listing-theme .flex-grow-1 { flex-grow: 1 !important; }
.listing-theme .gap-1 { gap: 0.25rem !important; }
.listing-theme .gap-2 { gap: 0.5rem !important; }
.listing-theme .gap-3 { gap: 1rem !important; }
.listing-theme .ms-auto { margin-left: auto !important; }

.listing-theme .mb-0 { margin-bottom: 0 !important; }
.listing-theme .mb-1 { margin-bottom: 0.25rem !important; }
.listing-theme .mb-3 { margin-bottom: 1rem !important; }
.listing-theme .mb-4 { margin-bottom: 1.5rem !important; }
.listing-theme .mt-1 { margin-top: 0.25rem !important; }
.listing-theme .mt-4 { margin-top: 1.5rem !important; }
.listing-theme .me-1 { margin-right: 0.25rem !important; }
.listing-theme .me-2 { margin-right: 0.5rem !important; }
.listing-theme .p-0 { padding: 0 !important; }
.listing-theme .p-3 { padding: 1rem !important; }
.listing-theme .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.listing-theme .w-100 { width: 100% !important; }
.listing-theme .h-100 { height: 100% !important; }

.listing-theme .fw-bold { font-weight: 700 !important; }
.listing-theme .fw-semibold { font-weight: 600 !important; }
.listing-theme .text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-theme .rounded-pill { border-radius: 999px !important; }
.listing-theme .border-bottom { border-bottom: 1px solid var(--hairline) !important; }
.listing-theme .position-relative { position: relative !important; }
.listing-theme .top-50 { top: 50% !important; }
.listing-theme .start-0 { left: 0 !important; }
.listing-theme .translate-middle-y { transform: translateY(-50%) !important; }

.listing-theme .btn-group { display: inline-flex; vertical-align: middle; }
.listing-theme .btn-group-sm > .btn { padding: 0.35rem 0.75rem; font-size: 0.875rem; }

.listing-theme .offcanvas {
  position: fixed;
  bottom: 0;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  visibility: hidden;
  background-color: var(--charcoal);
  color: var(--white);
  outline: 0;
  transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.listing-theme .offcanvas.offcanvas-start {
  top: 0;
  left: 0;
  width: min(290px, 85vw);
  border-right: 1px solid var(--hairline-2);
  transform: translateX(-100%);
}

.listing-theme .offcanvas.show {
  visibility: visible;
  transform: none;
}

.listing-theme .offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.listing-theme .offcanvas-body {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
}

.listing-theme .btn-close {
  width: 1rem;
  height: 1rem;
  padding: 0.25rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23F1F0EC'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1rem auto no-repeat;
  opacity: 0.7;
  cursor: pointer;
}

.listing-theme .btn-close:hover { opacity: 1; }

.offcanvas-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background-color: rgba(23, 24, 27, 0.72);
}

.offcanvas-backdrop.fade { opacity: 0; transition: opacity 0.15s linear; }
.offcanvas-backdrop.show { opacity: 1; }

.listing-theme .pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
  gap: 4px;
  flex-wrap: wrap;
  margin: 0;
}

.listing-theme .page-item .page-link {
  display: block;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--hairline-2);
  background: var(--charcoal);
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
}

.listing-theme .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #17181B;
}

.listing-theme .page-item.disabled .page-link {
  color: var(--muted-2);
  background: var(--charcoal-2);
  pointer-events: none;
}
