/* ============================================================
   WP Marketplace Extension – Frontend Styles
   ============================================================ */

/* ── Shared font ─────────────────────────────────────────── */
.ts-filter-bar,
.ts-filter-label,
.ts-filter-select,
.ts-filter-input,
.ts-filter-btn,
.ts-filter-reset,
.ts-grid,
.ts-card,
.ts-body,
.ts-title,
.ts-line,
.ts-price,
.ts-owner-link,
.ts-badge-mini {
  font-family: 'Poppins', sans-serif !important;
  box-sizing: border-box;
}

/* ── Filter bar ──────────────────────────────────────────── */
.ts-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .05);
}

.ts-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 180px;
}

/* Location field can be a bit wider */
.ts-filter-group:has(#ts-location) {
  flex: 1 1 220px;
}

.ts-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.ts-filter-select,
.ts-filter-input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

.ts-filter-select:focus,
.ts-filter-input:focus {
  border-color: #00a389;
  box-shadow: 0 0 0 3px rgba(0, 163, 137, .15);
  background: #fff;
}

/* Hide browser spinner arrows on number inputs */
.ts-filter-input[type="number"]::-webkit-inner-spin-button,
.ts-filter-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ts-filter-input[type="number"] { -moz-appearance: textfield; }

.ts-price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ts-price-range .ts-filter-input {
  width: 0;
  flex: 1;
}

.ts-range-sep {
  color: #94a3b8;
  font-size: 14px;
  flex-shrink: 0;
}

/* Actions group */
.ts-filter-actions {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding-top: 20px; /* align with inputs */
}

.ts-filter-btn {
  height: 42px;  
  background: #00a389 !important;
  color: #fff !important;
  border: none;  
  transition: background .15s, transform .1s !important;
  white-space: nowrap !important;
      border: unset !important;
}

.ts-filter-btn:hover {
  background: #008f77 !important;
  transform: translateY(-1px) !important;
}

.ts-filter-reset {
  font-size: 12px;
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s;
}

.ts-filter-reset:hover {
  color: #0f172a;
}

/* ── Listing grid ────────────────────────────────────────── */
.ts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 8px 0 24px;
}

.ts-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .12s ease, box-shadow .12s ease;
}

.ts-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .09);
}

.ts-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f1f5f9;
  display: block;
}

.ts-body { padding: 14px; }

.ts-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.ts-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
}

.ts-line-main {
  margin-bottom: 6px;
  color: #475569;
}

.ts-dot { opacity: .5; }

.ts-price {
  font-weight: 600;
  color: #0f172a;
}

.ts-line-owner {
  font-size: 12px;
  color: #64748b;
}

.ts-owner-link {
  font-weight: 500;
  color: #0f172a;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ts-badge-mini {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 600;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .ts-filter-bar {
    
    gap: 12px;
  }

  .ts-filter-group {
    flex: 1 1 100%;
  }

  .ts-filter-actions {
    padding-top: 10px !important;
    justify-content: center;

  }

  .ts-filter-btn {
    flex: 0 0 auto;
    width: auto;
  }
}