/* Catálogo productos — compensar navbar fijo */
body.nc-productos-body {
  padding-top: 4.5rem;
}

@media (max-width: 767.98px) {
  body.nc-productos-body {
    padding-top: 11.5rem !important;
  }

  .nc-productos-page {
    padding-top: 0;
  }

  .nc-catalogo-header {
    margin-top: 0;
  }
}

@media (max-width: 575.98px) {
  body.nc-productos-body {
    padding-top: 12.5rem !important;
  }
}

.nc-productos-page {
  padding-top: 0.35rem;
}

.nc-catalogo-header {
  background: #fff;
  border: 1px solid #e8ece9;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(27, 67, 50, 0.06);
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.nc-catalogo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.nc-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.nc-chip--lista {
  background: #d8f3dc;
  color: #1b4332;
  border: 1px solid #95d5b2;
}

.nc-chip--minimo {
  background: #f1f3f5;
  color: #495057;
  border: 1px solid #dee2e6;
}

.nc-catalogo-alerta {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fff8e6;
  border: 1px solid #ffe8a3;
  border-left: 4px solid #f0ad4e;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  color: #664d03;
  line-height: 1.45;
}

.nc-catalogo-alerta strong {
  color: #856404;
}

.nc-catalogo-mantenimiento {
  background: #fde8e8;
  border: 1px solid #f5c2c2;
  border-left: 4px solid #dc3545;
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  color: #842029;
  text-align: center;
}

.nc-listas-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.nc-lista-btn {
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  opacity: 0.88;
}

.nc-lista-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 1;
}

.nc-lista-btn--active {
  opacity: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
  outline: 2px solid rgba(0, 0, 0, 0.15);
  outline-offset: 2px;
}

.nc-catalogo-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid #eef1ef;
}

.nc-catalogo-contador {
  font-size: 0.8rem;
  color: #6c757d;
  margin: 0;
}

.nc-catalogo-contador strong {
  color: #2d6a4f;
}

.nc-pagination-wrap .pagination {
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nc-pagination-wrap .page-item .page-link,
.nc-pagination-wrap li.page-link {
  border-radius: 8px !important;
  margin: 0 2px;
  font-size: 0.82rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #dee2e6;
  color: #2d6a4f;
}

.nc-pagination-wrap .page-item.active .page-link {
  background: #2d6a4f;
  border-color: #2d6a4f;
  color: #fff;
}

@media (max-width: 575.98px) {
  .nc-catalogo-meta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .nc-pagination-wrap .pagination {
    justify-content: center;
  }

  .nc-listas-tabs {
    justify-content: center;
  }
}

/* Grilla de productos — 4 por fila en desktop */
.nc-productos-grid {
  justify-content: flex-start;
}

.nc-producto-col {
  display: flex;
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
  margin-bottom: 0.5rem;
}

.nc-rubros-sidebar .list-group-item {
  padding: 0.55rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.35;
  word-break: break-word;
}

.nc-rubros-sidebar .list-group-item .badge {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  white-space: normal;
}

.nc-productos-grid .tarjeta {
  width: 100%;
  max-width: none;
}

.nc-tarjeta-compact {
  font-size: 0.78rem;
  border-radius: 10px;
  overflow: hidden;
}

.nc-tarjeta-compact .card-header {
  padding: 0.3rem 0.45rem;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.nc-tarjeta-compact .card-header .badge {
  font-size: 0.58rem;
  font-weight: 600;
}

.nc-tarjeta-img-wrap {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 0.5rem;
}

.nc-tarjeta-img-wrap img {
  max-height: 92px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.nc-tarjeta-compact .card-title {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  min-height: 2.5em;
}

.nc-tarjeta-compact .card-text .badge {
  font-size: 0.72rem;
}

.nc-tarjeta-acciones .btn {
  font-size: 0.68rem;
  padding: 0.2rem 0.35rem;
  line-height: 1.2;
}

@media (min-width: 992px) {
  div.scroll.nc-productos-scroll,
  div.scroll.nc-rubros-sidebar {
    height: 400px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  div.scroll.nc-productos-scroll {
    height: auto;
    max-height: calc(100vh - 280px);
  }

  .nc-tarjeta-compact {
    font-size: 0.85rem;
  }

  .nc-tarjeta-img-wrap {
    height: 130px;
    padding: 0.65rem;
  }

  .nc-tarjeta-img-wrap img {
    max-height: 118px;
  }

  .nc-tarjeta-compact .card-title {
    font-size: 0.8rem;
    min-height: 2.4em;
  }

  .nc-tarjeta-compact .card-text .badge {
    font-size: 0.82rem;
  }

  .nc-tarjeta-acciones .btn {
    font-size: 0.78rem;
    padding: 0.3rem 0.45rem;
  }
}

@media (max-width: 991.98px) {
  .nc-productos-scroll {
    height: auto !important;
    max-height: none;
    overflow: visible !important;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .nc-productos-grid {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .nc-tarjeta-img-wrap {
    height: 88px;
  }

  .nc-tarjeta-img-wrap img {
    max-height: 80px;
  }
}
