/* ==== GRID DEL CATÁLOGO ==== */

#catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

/* ==== TARJETA DE PRODUCTO ==== */

.card {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--border-subtle, #e3e3e3);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    border-color 0.15s ease-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.1);
  border-color: rgba(0, 0, 0, 0.06);
}

.card .thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

/* cuerpo de la tarjeta */

.card-body {
  padding: 10px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card h3.name {
  margin: 10px 0 2px;
  font-size: 17px;
  font-weight: 600;
  color: #111827;
}

.card .meta-cat {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #6b7280);
}

.card .meta-stock {
  font-size: 11px;
  color: var(--muted, #6b7280);
}

/* stock oculto por ahora — quita hidden cuando lo quieras mostrar */
.meta-stock.hidden {
  display: none;
}

.card .desc {
  font-size: 13px;
  color: var(--muted, #6b7280);
  margin: 4px 0 6px;
  min-height: 34px;
}

/* filas internas (precio + acciones) */

.card .line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.card .price {
  font-weight: 700;
  font-size: 15px;
  color: #111827;
}

/* ==== FILTROS (chips de categorías) ==== */

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.catalog-filters .pill {
  border-radius: 999px;
  border: 1px solid var(--border-subtle, #d1d5db);
  padding: 4px 12px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  color: #374151;
  transition:
    background 0.15s ease-out,
    border-color 0.15s ease-out,
    color 0.15s ease-out,
    box-shadow 0.15s ease-out;
}

.catalog-filters .pill:hover {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.catalog-filters .pill.active {
  background: var(--primary, #16a34a);
  border-color: var(--primary, #16a34a);
  color: #fff;
}

/* ==== BLOQUE DE ACCIONES (cantidad + botón) ==== */

.line-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

/* control de cantidad tipo "pill": − 1 + */

.qty-control {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border-subtle, #d1d5db);
  background: #f9fafb;
  padding: 2px 4px;
}

.qty-input {
  width: 52px;
  border: none;
  text-align: center;
  font-size: 14px;
  outline: none;
  background: transparent;
  -moz-appearance: textfield;
}

/* quita flechas de inputs numéricos en Chrome/Edge */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-btn {
  border: none;
  background: transparent;
  padding: 4px 8px;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  color: #4b5563;
  border-radius: 999px;
  transition: background 0.1s ease-out;
}

.qty-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* botón Agregar dentro de la card */

.card .btn.btn-primary,
.card .btn-primary {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: var(--primary, #16a34a);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s ease-out,
    box-shadow 0.15s ease-out,
    transform 0.05s ease-in;
}

.card .btn.btn-primary:hover,
.card .btn-primary:hover {
  background: #15803d;
  box-shadow: 0 12px 26px rgba(22, 163, 74, 0.35);
}

.card .btn.btn-primary:active,
.card .btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.3);
}

/* texto meta genérico del catálogo (debajo del título) */

.catalog-header .meta,
.content .container > p.meta {
  font-size: 13px;
  color: var(--muted, #6b7280);
  margin-bottom: 8px;
}

/* Buscador del catálogo */

.catalog-search {
  margin: 10px 0 10px;
}

.catalog-search-input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border-subtle, #d1d5db);
  background: #fff;
  padding: 8px 14px;
  font-size: 13px;
  color: #111827;
  outline: none;
  transition:
    border-color 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background 0.15s ease-out;
}

.catalog-search-input::placeholder {
  color: #9ca3af;
}

.catalog-search-input:focus {
  border-color: var(--primary, #16a34a);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.18);
  background: #f9fafb;
}
