/* Grid y tarjetas */
.precios-grid {
  display: grid;
  grid-template-columns: repeat(var(--wp-cols), minmax(0, 1fr));
  gap: 12px;
}

.precios-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  outline: none;
}

/* Aísla la tipografía del theme (evita icon-fonts que provocan ???) */
.precios-card, .precios-card * {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
}

.precios-card__image {
  position: relative;
  display: block;
  padding-top: 62%;
  background: #f8fafc;
}
.precios-card__image img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}
.precios-card__badge {
  position: absolute; left: 8px; top: 8px;
  background: #0ea5e9; color: #fff; font-size: 12px;
  padding: 2px 6px; border-radius: 999px;
}

.precios-card__body { padding: 10px; }
.precios-card__title {
  font-size: 14px; margin: 0 0 6px 0; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.6em;
}
.precios-card__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.precios-card__market { font-size: 12px; color: #475569; }
.precios-card__price { font-weight: 700; }

.precios-card__offers { margin-top: 6px; font-size: 12px; color: #334155; }
.precios-card__offers .label { color: #64748b; margin-right: 4px; }

/* Precio por unidad/peso */
.precios-card__unit { margin-top: 4px; font-size: 12px; color: #475569; }

/* Paginación */
.precios-pagination { display: flex; gap: 6px; margin: 14px 0 4px; flex-wrap: wrap; }
.precios-pagination .precios-page {
  border: 1px solid #e5e7eb; background: #fff; padding: 6px 10px; border-radius: 8px; text-decoration: none;
}
.precios-pagination .precios-page.is-active { background: #111827; color: #fff; }
.precios-pagination .precios-page.is-disabled { opacity: .5; pointer-events: none; }

.no-results { color: #6b7280; margin: 10px 0; }

/* Si el theme mete <i> o pseudo-iconos, los anulamos */
.precios-card i,
.precios-card i::before,
.precios-card [class*="icon"]::before {
  display: none !important; content: normal !important;
}

/* Adaptativos */
@media (max-width: 920px) { :root { --wp-cols: 3; } }
@media (max-width: 680px) { :root { --wp-cols: 2; } }
@media (max-width: 460px) { :root { --wp-cols: 1; } }

/* Estado de carga al actualizar resultados por AJAX */
#wp-results-grid.is-loading {
  opacity: .5;
  filter: grayscale(30%);
  pointer-events: none;
  transition: opacity .15s ease;
}