/* ==== Filter groups ==== */
.filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}
.filter-toggle i { transition: transform 0.2s ease; }
.filter-group.collapsed .filter-toggle i { transform: rotate(180deg); }
.filter-group.collapsed > div:not(.filter-toggle) { display: none; }

/* ==== Checkbox rows ==== */
.filter-checkbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #334155;
  cursor: pointer;
  padding: 2px 0;
}
.filter-checkbox-row input {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  accent-color: #2563eb;
}
.filter-checkbox-row .count {
  font-size: 0.75rem;
  color: #94a3b8;
}

.pill-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  color: #475569;
  background: #fff;
  transition: all .15s ease;
}
.pill-btn:hover { border-color: #93c5fd; color: #1d4ed8; }
.pill-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* ==== Product card ==== */
.product-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.product-card:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 0.28rem 0;
  border-bottom: 1px dashed #f1f5f9;
  color: #475569;
}
.spec-row:last-child { border-bottom: none; }
.spec-row .label { color: #94a3b8; display:flex; align-items:center; gap:0.35rem; }
.spec-row .value { font-weight: 600; color: #1e293b; text-align: right; }

/* Compare checkbox on card */
.compare-check-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}
.compare-check-wrap input {
  width: 16px; height: 16px;
  accent-color: #2563eb;
}

/* Line-clamp helper */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tray item chip */
.tray-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  padding: 0.25rem 0.5rem 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1d4ed8;
  white-space: nowrap;
}
.tray-chip button { color: #60a5fa; }
.tray-chip button:hover { color: #ef4444; }

/* Pagination buttons */
.page-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.page-btn:hover:not(:disabled) { border-color: #93c5fd; color: #1d4ed8; }
.page-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Compare table */
.compare-table th, .compare-table td {
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.compare-table th.row-label {
  position: sticky;
  left: 0;
  background: #f8fafc;
  text-align: left;
  color: #64748b;
  font-weight: 600;
  z-index: 1;
  white-space: nowrap;
}
.compare-table td.feat-yes { color: #16a34a; }
.compare-table td.feat-no { color: #cbd5e1; }

/* Scrollbar niceties */
#type-options::-webkit-scrollbar, #brand-options::-webkit-scrollbar { width: 5px; }
#type-options::-webkit-scrollbar-thumb, #brand-options::-webkit-scrollbar-thumb {
  background: #cbd5e1; border-radius: 4px;
}
