/* Biekar Posts / Listings Page */
.bk-posts-page {
  font-family: 'Plus Jakarta Sans', 'Open Sans', sans-serif;
  background: #f4f6fa;
  min-height: 100vh;
  padding-top: 100px;
  padding-bottom: 3rem;
}

.bk-posts-page__header {
  background: linear-gradient(135deg, #1a1d26 0%, #2d3344 100%);
  padding: 2rem 0;
  margin-bottom: 2rem;
  margin-top: -1rem;
}

.bk-posts-page__header h1 {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.35rem;
}

.bk-posts-page__header p {
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.bk-posts-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.75rem;
  align-items: start;
}

/* Filter Sidebar */
.bk-filter-sidebar {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  position: static; /* full height, so every filter is visible as the page scrolls */
  overflow: hidden;
}

/* Only pin the sidebar when the whole filter panel fits on screen. */
@media (min-height: 1000px) {
  .bk-filter-sidebar {
    position: sticky;
    top: 110px;
  }
}

.bk-filter-sidebar__head {
  background: linear-gradient(135deg, #f7951f, #e67e22);
  color: #fff;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.bk-filter-sidebar__head h5 {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bk-filter-sidebar__body {
  padding: 1.25rem;
}

.bk-filter-sidebar__body::-webkit-scrollbar {
  width: 5px;
}

.bk-filter-sidebar__body::-webkit-scrollbar-thumb {
  background: #f7951f;
  border-radius: 4px;
}

.bk-filter-group {
  margin-bottom: 1.35rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid #eef1f6;
}

.bk-filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.bk-filter-group__label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a6275;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bk-filter-group__label i {
  color: #f7951f;
}

.bk-filter-sidebar .form-control,
.bk-filter-sidebar .form-select {
  border: 2px solid #e8ecf3 !important;
  border-radius: 10px !important;
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
}

.bk-filter-sidebar .form-control:focus,
.bk-filter-sidebar .form-select:focus {
  border-color: #f7951f !important;
  box-shadow: 0 0 0 3px rgba(247, 149, 31, 0.12);
}

.bk-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bk-filter-pill {
  padding: 0.4rem 0.9rem;
  border: 2px solid #e8ecf3;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #5a6275;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.bk-filter-pill:hover,
.bk-filter-pill.active {
  border-color: #f7951f;
  background: #f7951f;
  color: #fff;
}

.bk-filter-checklist {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bk-filter-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #1a1d26;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.bk-filter-check:hover {
  background: rgba(247, 149, 31, 0.08);
}

.bk-filter-check input[type="checkbox"],
.bk-filter-check input[type="radio"] {
  accent-color: #f7951f;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.bk-filter-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.bk-btn-filter-apply {
  background: linear-gradient(135deg, #f7951f, #e67e22);
  color: #fff;
  border: none;
  padding: 0.75rem;
  border-radius: 10px;
  font-weight: 700;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bk-btn-filter-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(247, 149, 31, 0.35);
  color: #fff;
}

.bk-btn-filter-reset {
  background: transparent;
  color: #5a6275;
  border: 2px solid #e8ecf3;
  padding: 0.65rem;
  border-radius: 10px;
  font-weight: 600;
  width: 100%;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
}

.bk-btn-filter-reset:hover {
  border-color: #f7951f;
  color: #f7951f;
}

.bk-price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* Results area */
.bk-results-toolbar {
  background: #fff;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.bk-results-count {
  font-weight: 600;
  color: #1a1d26;
}

.bk-results-count span {
  color: #f7951f;
  font-weight: 800;
}

.bk-results-sort {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bk-results-sort label {
  font-size: 0.9rem;
  color: #5a6275;
  font-weight: 600;
  white-space: nowrap;
}

.bk-results-sort select {
  border: 2px solid #e8ecf3;
  border-radius: 10px;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1d26;
  cursor: pointer;
}

.bk-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.bk-active-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(247, 149, 31, 0.12);
  color: #e67e22;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(247, 149, 31, 0.3);
  transition: all 0.2s;
}

.bk-active-tag:hover {
  background: #f7951f;
  color: #fff;
}

.bk-active-tag i {
  font-size: 0.75rem;
}

/* Mobile filter toggle */
.bk-mobile-filter-btn {
  display: none;
  background: #f7951f;
  color: #fff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  align-items: center;
  gap: 0.5rem;
}

/* Empty state */
.bk-posts-empty {
  background: #fff;
  border-radius: 20px;
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.bk-posts-empty i {
  font-size: 4rem;
  color: #f7951f;
  margin-bottom: 1rem;
}

/* Pagination */
.bk-pagination .pagination {
  gap: 0.35rem;
}

.bk-pagination .page-link {
  border-radius: 10px !important;
  border: 2px solid #e8ecf3;
  color: #1a1d26;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
}

.bk-pagination .page-item.active .page-link {
  background: #f7951f;
  border-color: #f7951f;
}

.bk-pagination .page-link:hover {
  background: rgba(247, 149, 31, 0.1);
  border-color: #f7951f;
  color: #f7951f;
}

/* Offcanvas mobile filters */
/* Bootstrap's default offcanvas z-index (1045) sits below the fixed
   site header (z-index: 1050 in header.css), so the drawer's own
   title/close row was rendering underneath it. Push both the drawer
   and its backdrop above the header stack. */
.bk-filter-offcanvas {
  z-index: 1070;
}

.offcanvas-backdrop {
  z-index: 1065;
}

.bk-filter-offcanvas .offcanvas-header {
  background: linear-gradient(135deg, #f7951f, #e67e22);
  color: #fff;
}

.bk-filter-offcanvas .btn-close {
  filter: brightness(0) invert(1);
}

/* Responsive */
@media (max-width: 991px) {
  .bk-posts-layout {
    grid-template-columns: 1fr;
  }

  .bk-filter-sidebar--desktop {
    display: none;
  }

  .bk-mobile-filter-btn {
    display: inline-flex;
  }

  .bk-results-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .bk-results-sort {
    justify-content: space-between;
  }
}

@media (min-width: 992px) {
  .bk-filter-offcanvas-wrap {
    display: none;
  }
}

/* Enhanced bike cards on posts page */
.bk-bike-card__fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a6275;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.bk-bike-card__fav:hover {
  background: #f7951f;
  color: #fff;
  transform: scale(1.1);
}

.bk-bike-card__fav.active {
  background: #fff;
  color: #ef4444;
}

.bk-bike-card__fav.active i {
  color: #ef4444;
}

.bk-bike-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eef1f6;
  font-size: 0.8rem;
}

.bk-bike-card__time {
  color: #5a6275;
}

.bk-bike-card__link {
  color: #f7951f;
  font-weight: 700;
}

.bk-posts-results .bk-bikes-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ── Mobile extra fixes ── */
@media (max-width: 479.98px) {
  .bk-posts-page {
    padding-top: 80px;
  }
  .bk-posts-page__header {
    padding: 1.5rem 0;
  }
  .bk-results-toolbar {
    padding: 0.85rem 1rem;
  }
  .bk-results-count {
    font-size: 0.88rem;
  }
  .bk-posts-results .bk-bikes-grid {
    grid-template-columns: 1fr;
  }
  .bk-pagination .page-link {
    padding: 0.4rem 0.65rem;
    font-size: 0.82rem;
  }
  .bk-filter-pill {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
  }
}

@media (min-width: 480px) and (max-width: 767.98px) {
  .bk-posts-results .bk-bikes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Quick answers on brand and city pages */
.bk-landing-faq { background: #fff; border: 1px solid #e6e9f0; border-radius: 16px; padding: 1.5rem 1.75rem; }
.bk-landing-faq__item { padding: .85rem 0; border-top: 1px solid #eef0f5; }
.bk-landing-faq__item:first-of-type { border-top: 0; }
.bk-landing-faq__item h3 { font-weight: 700; color: #12141d; margin-bottom: .3rem; }
.bk-landing-faq__item p { margin: 0; color: #4a4f63; line-height: 1.65; }
@media (max-width: 575px) { .bk-landing-faq { padding: 1.1rem 1rem; } }
