/* ============================================================
   Estoque2 — filtro dinâmico (topbar + chips + drawer)
   Cards usam .vehicle-card etc. de estoque.css (compartilhado).
   ============================================================ */

/* --- Topbar --- */
.eq-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  padding: 12px 0 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #eef0f3;
}
.eq-topbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.eq-topbar__spacer { flex: 1 1 auto; }

.eq-search {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
}
.eq-search i {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: #9aa4b2;
  pointer-events: none;
}
.eq-search .form-control {
  padding-left: 40px;
  height: 44px;
  border-radius: 999px;
  border-color: #e2e6ea;
}
.eq-search .form-control:focus {
  border-color: var(--bs-primary, #a70d25);
  box-shadow: none;
}

.eq-sort {
  width: auto;
  min-width: 160px;
  height: 44px;
  border-radius: 999px;
  border-color: #e2e6ea;
}

.eq-btn-filtros {
  height: 44px;
  border-radius: 999px;
  border: 1px solid #e2e6ea;
  background: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.eq-btn-filtros:hover { background: #f6f7f9; }

/* --- Segmented (Tipo) --- */
.eq-seg-group {
  display: inline-flex;
  background: #f1f3f5;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.eq-seg {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  color: #5b6672;
  transition: all .15s;
  white-space: nowrap;
}
.eq-seg:hover { color: #22272e; }
.eq-seg.active {
  background: #fff;
  color: var(--bs-primary, #a70d25);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

/* --- Meta (contador + chips) --- */
.eq-topbar__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
}
.eq-count {
  font-weight: 700;
  color: #22272e;
  white-space: nowrap;
}
.eq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e6ea;
  background: #f6f7f9;
  color: #33404d;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.eq-chip:hover { background: #edeff2; }
.eq-chip i { font-size: .7rem; opacity: .6; }
.eq-chip--clear {
  background: transparent;
  border-color: transparent;
  color: var(--bs-primary, #a70d25);
  text-decoration: underline;
}

/* --- Estados --- */
.eq-state { text-align: center; padding: 60px 20px; }

/* --- Drawer --- */
.eq-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s;
  z-index: 1050;
}
.eq-backdrop.show { opacity: 1; visibility: visible; }

.eq-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 380px;
  max-width: 90vw;
  background: #fff;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s ease;
  box-shadow: -8px 0 30px rgba(0,0,0,.12);
}
.eq-drawer.open { transform: translateX(0); }

.eq-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eef0f3;
}
.eq-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 20px 20px;
}
.eq-drawer__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid #eef0f3;
  background: #fff;
}

/* --- Facetas --- */
.eq-facet {
  padding: 16px 0;
  border-bottom: 1px solid #f0f2f4;
}
.eq-facet:last-child { border-bottom: 0; }
.eq-facet__title {
  font-weight: 700;
  color: #22272e;
  margin-bottom: 10px;
}
.eq-facet__list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.eq-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  margin: 0;
  user-select: none;
}
.eq-check:hover { background: #f6f7f9; }
.eq-check input { cursor: pointer; margin: 0; }
.eq-check span { font-size: .92rem; color: #33404d; }

/* --- Responsivo --- */
@media (max-width: 575.98px) {
  .eq-seg-group { order: 3; width: 100%; justify-content: center; }
  .eq-sort { flex: 1 1 auto; }
  .eq-topbar__spacer { display: none; }
}
