/* ============================================================================
   search-empty-premium.css
   Polished empty state for /buscar/ and category no-results.
   Also fixes the search-chip count text wrapping (1008 → "100"+"8").
   ============================================================================ */

/* --- Empty state container: premium card ------------------------------- */
.empty-state.empty-state--in-grid {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 6px 20px -8px rgba(15, 23, 42, 0.06);
  padding: 48px 40px 40px;
  margin: 0 auto;
  max-width: 780px;
  text-align: center;
}
.empty-state__icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
  border: 1px solid rgba(37, 99, 235, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state__icon svg {
  width: 40px;
  height: 40px;
  color: var(--primary, #2563eb);
  stroke-width: 1.8;
}
.empty-state__title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin: 0 0 8px;
}
.empty-state__text {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.empty-state__suggest {
  display: inline-block;
  padding: 10px 16px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 10px;
  color: #92400e;
  font-size: 13.5px;
  font-weight: 600;
  margin: 0 0 20px;
}
.empty-state__suggest a {
  color: #92400e;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Tips list: left-aligned card -------------------------------------- */
.prose.empty-state__tips {
  text-align: left;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 16px 20px;
  max-width: 520px;
  margin: 0 auto 24px;
}
.prose.empty-state__tips ul {
  margin: 0;
  padding-left: 18px;
}
.prose.empty-state__tips li {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.65;
  margin: 4px 0;
}
.prose.empty-state__tips li::marker {
  color: var(--primary, #2563eb);
}

/* --- Section headers (Búsquedas/Categorías/Marcas populares) ------------- */
.search-facets-quick__heading {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #475569;
  text-align: left;
  margin: 0 0 10px;
  padding-left: 4px;
}
.empty-state__section-title {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 16px 0 10px;
  text-align: left;
}

/* --- Chip container: centered rows with gap --------------------------- */
.search-facets-quick__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  padding: 0;
}

/* --- Chips: refined, single-line count ------------------------------- */
.search-chip {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.search-chip:hover,
.search-chip.is-highlighted {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--primary, #2563eb);
  transform: translateY(-1px);
}
.search-chip__label {
  white-space: nowrap;
  font-weight: 700;
}
.search-chip__count {
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary, #2563eb);
  font-weight: 800;
  font-size: 11px;
  /* Fix: large counts (1000+) must stay on one line */
  white-space: nowrap;
  line-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --- Category chip variant ------------------------------------------- */
.search-chip--category {
  background: #f8fafc;
}
.search-chip--category:hover {
  background: rgba(37, 99, 235, 0.06);
}

/* --- Empty state facets group spacing -------------------------------- */
.search-facets-quick {
  margin: 20px auto 0;
  max-width: 640px;
  text-align: left;
}

/* --- Relaxed results grid ------------------------------------------- */
.empty-state__relaxed {
  margin: 24px auto 0;
  max-width: 720px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 20px;
}
.relaxed-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.relaxed-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  padding: 10px;
  text-decoration: none;
  color: #0f172a;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.relaxed-card:hover {
  box-shadow: 0 6px 18px -4px rgba(15, 23, 42, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
  transform: translateY(-2px);
}
.relaxed-card__img {
  aspect-ratio: 1;
  background: #fafbfc;
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 8px;
}
.relaxed-card__img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.relaxed-card__name {
  font-size: 12px;
  font-weight: 600;
  margin: 8px 0 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.relaxed-card__price {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary, #2563eb);
}
.relaxed-card__stock {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.relaxed-card__stock--in { color: #166534; }
.relaxed-card__stock--out { color: #991b1b; }

.relaxed-results__cta {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* --- Matching categories in empty state -------------------------------- */
.empty-state__matching-cats {
  margin: 20px auto;
  max-width: 640px;
  text-align: left;
}

/* When aside is hidden (no query + no filters): center main column without two-col grid */
@media (min-width: 768px) {
  .search-layout.search-layout--no-aside {
    display: block;
  }
}

/* CTA after trending: small ghost link, doesn't compete with trending grid */
.empty-state__actions--after-trending {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

/* Spaced actions: allow wrap so 3 buttons fit on mobile */
.empty-state__actions--spaced {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .empty-state.empty-state--in-grid {
    padding: 32px 20px 24px;
    border-radius: 12px;
  }
  .empty-state__icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }
  .empty-state__icon svg {
    width: 32px;
    height: 32px;
  }
  .empty-state__title { font-size: 18px; }
}
